[G2NK] Stworzenie zwoju przemiany w chrząszcza 1267 1

O temacie

Autor Vesemir

Zaczęty 20.02.2022 roku

Wyświetleń 1267

Odpowiedzi 1

Vesemir

Vesemir

Użytkownicy
posty44
Propsy3
ProfesjaGracz
  • Użytkownicy
Witam
Próbowałem stworzyć czar przemiany w chrząszcza w formie zwoju. O dziwo w G2NK go nie ma.
Jednak mimo starań nie działa. Bezimienny bierze zwój i rozpoczyna animację przemiany ale nie zmienia się w chrząszcza tylko klęczy na kolanie po czym wstaje.
Byłbym wdzięczy za pomoc we wskazaniu co zrobiłem źle, co przeoczyłem  :)
I jak mogę to naprawić.


W pliku Constants.d  wykorzystałem SPL_Reserved_90
Spoiler
const int SPELL_GOOD = 0;
const int SPELL_NEUTRAL = 1;
const int SPELL_BAD = 2;
const int SPL_DONTINVEST = 0;
const int SPL_RECEIVEINVEST = 1;
const int SPL_SENDCAST = 2;
const int SPL_SENDSTOP = 3;
const int SPL_NEXTLEVEL = 4;
const int SPL_STATUS_CANINVEST_NO_MANADEC = 8;
const int SPL_FORCEINVEST = 1 << 16;
const int TARGET_COLLECT_NONE = 0;
const int TARGET_COLLECT_CASTER = 1;
const int TARGET_COLLECT_FOCUS = 2;
const int TARGET_COLLECT_ALL = 3;
const int TARGET_COLLECT_FOCUS_FALLBACK_NONE = 4;
const int TARGET_COLLECT_FOCUS_FALLBACK_CASTER = 5;
const int TARGET_COLLECT_ALL_FALLBACK_NONE = 6;
const int TARGET_COLLECT_ALL_FALLBACK_CASTER = 7;
const int TARGET_TYPE_ALL = 1;
const int TARGET_TYPE_ITEMS = 2;
const int TARGET_TYPE_NPCS = 4;
const int TARGET_TYPE_ORCS = 8;
const int TARGET_TYPE_HUMANS = 16;
const int TARGET_TYPE_UNDEAD = 32;
const int SPL_PalLight = 0;
const int SPL_PalLightHeal = 1;
const int SPL_PalHolyBolt = 2;
const int SPL_PalMediumHeal = 3;
const int SPL_PalRepelEvil = 4;
const int SPL_PalFullHeal = 5;
const int SPL_PalDestroyEvil = 6;
const int SPL_PalTeleportSecret = 7;
const int SPL_TeleportSeaport = 8;
const int SPL_TeleportMonastery = 9;
const int SPL_TeleportFarm = 10;
const int SPL_TeleportXardas = 11;
const int SPL_TeleportPassNW = 12;
const int SPL_TeleportPassOW = 13;
const int SPL_TeleportOC = 14;
const int SPL_TeleportOWDemonTower = 15;
const int SPL_TeleportTaverne = 16;
const int SPL_Teleport_3 = 17;
const int SPL_Light = 18;
const int SPL_Firebolt = 19;
const int SPL_Icebolt = 20;
const int SPL_LightHeal = 21;
const int SPL_SummonGoblinSkeleton = 22;
const int SPL_InstantFireball = 23;
const int SPL_Zap = 24;
const int SPL_SummonWolf = 25;
const int SPL_WindFist = 26;
const int SPL_Sleep = 27;
const int SPL_MediumHeal = 28;
const int SPL_LightningFlash = 29;
const int SPL_ChargeFireball = 30;
const int SPL_SummonSkeleton = 31;
const int SPL_Fear = 32;
const int SPL_IceCube = 33;
const int SPL_ChargeZap = 34;
const int SPL_SummonGolem = 35;
const int SPL_DestroyUndead = 36;
const int SPL_Pyrokinesis = 37;
const int SPL_Firestorm = 38;
const int SPL_IceWave = 39;
const int SPL_SummonDemon = 40;
const int SPL_FullHeal = 41;
const int SPL_Firerain = 42;
const int SPL_BreathOfDeath = 43;
const int SPL_MassDeath = 44;
const int SPL_ArmyOfDarkness = 45;
const int SPL_Shrink = 46;
const int SPL_TrfSheep = 47;
const int SPL_TrfScavenger = 48;
const int SPL_TrfGiantRat = 49;
const int SPL_TrfGiantBug = 50;
const int SPL_TrfWolf = 51;
const int SPL_TrfWaran = 52;
const int SPL_TrfSnapper = 53;
const int SPL_TrfWarg = 54;
const int SPL_TrfFireWaran = 55;
const int SPL_TrfLurker = 56;
const int SPL_TrfShadowbeast = 57;
const int SPL_TrfDragonSnapper = 58;
const int SPL_Charm = 59;
const int SPL_MasterOfDisaster = 60;
const int SPL_Deathbolt = 61;
const int SPL_Deathball = 62;
const int SPL_ConcussionBolt = 63;
const int SPL_Reserved_64 = 64;
const int SPL_Reserved_65 = 65;
const int SPL_Reserved_66 = 66;
const int SPL_Reserved_67 = 67;
const int SPL_Reserved_68 = 68;
const int SPL_Reserved_69 = 69;
const int SPL_Thunderstorm = 70;
const int SPL_Whirlwind = 71;
const int SPL_WaterFist = 72;
const int SPL_IceLance = 73;
const int SPL_Inflate = 74;
const int SPL_Geyser = 75;
const int SPL_Waterwall = 76;
const int SPL_Reserved_77 = 77;
const int SPL_Reserved_78 = 78;
const int SPL_Reserved_79 = 79;
const int SPL_Plague = 80;
const int SPL_Swarm = 81;
const int SPL_GreenTentacle = 82;
const int SPL_Earthquake = 83;
const int SPL_SummonGuardian = 84;
const int SPL_Energyball = 85;
const int SPL_SuckEnergy = 86;
const int SPL_Skull = 87;
const int SPL_SummonZombie = 88;
const int SPL_SummonMud = 89;
const int SPL_Reserved_90 = 90;
const int SPL_Reserved_91 = 91;
const int SPL_Reserved_92 = 92;
const int SPL_Reserved_93 = 93;
const int SPL_Reserved_94 = 94;
const int SPL_Reserved_95 = 95;
const int SPL_Reserved_96 = 96;
const int SPL_Reserved_97 = 97;
const int SPL_Reserved_98 = 98;
const int SPL_Reserved_99 = 99;
const int MAX_SPELL = 100;


const string spellFxInstanceNames[100] =
{
"PalLight",
"PalHeal",
"PalHolyBolt",
"PalHeal",
"PalRepelEvil",
"PalHeal",
"PalDestroyEvil",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Teleport",
"Light",
"Firebolt",
"Icebolt",
"Heal",
"SummonGoblinSkeleton",
"InstantFireball",
"Zap",
"SummonWolf",
"WindFist",
"Sleep",
"Heal",
"LightningFlash",
"ChargeFireball",
"SummonSkeleton",
"Fear",
"Icecube",
"ChargeZap",
"SummonGolem",
"DestroyUndead",
"Pyrokinesis",
"Firestorm",
"Icewave",
"SummonDemon",
"Heal",
"Firerain",
"BreathOfDeath",
"MassDeath",
"ArmyOfDarkness",
"Shrink",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Transform",
"Charm",
"MasterOfDisaster",
"Deathbolt",
"Deathball",
"Concussionbolt",
"Light",
"Light",
"Light",
"Light",
"Light",
"Light",
"Thunderstorm",
"Whirlwind",
"Waterfist",
"IceLance",
"Sleep",
"Geyser",
"Firerain",
"Light",
"Light",
"Light",
"Fear",
"Swarm",
"Greententacle",
"Firerain",
"SummonGuardian",
"Energyball",
"SuckEnergy",
"Skull",
"SummonZombie",
"SummonMud",
"Transform",
"Light",
"Light",
"Light",
"Light",
"Light",
"Light",
"Light",
"Light",
"Light"
};

const string spellFxAniLetters[100] =
{
"SLE",
"HEA",
"FBT",
"HEA",
"FBT",
"HEA",
"FIB",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"HEA",
"SLE",
"FBT",
"FBT",
"HEA",
"SUM",
"FBT",
"FBT",
"SUM",
"WND",
"SLE",
"HEA",
"WND",
"FIB",
"SUM",
"FEA",
"FRZ",
"FIB",
"SUM",
"FIB",
"FIB",
"FIB",
"FEA",
"SUM",
"HEA",
"FEA",
"FIB",
"MSD",
"SUM",
"SLE",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"TRF",
"FIB",
"FIB",
"FBT",
"FBT",
"FBT",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX",
"STM",
"WHI",
"WND",
"FBT",
"SLE",
"WND",
"FEA",
"XXX",
"XXX",
"XXX",
"FBT",
"FBT",
"FRZ",
"FEA",
"SUM",
"WND",
"WND",
"WND",
"SUM",
"SUM",
"TRF",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX",
"XXX"
};



W const string spellFxInstanceNames zmieniłem "Light" na "Transform"
W const string spellFxAniLetters[100] zmieniłem "XXX" na "TRF",

Dzięki czemu po wybraniu zwoju w ręku Beziego jest właściwy efekt czaru przemiany

W Spell_ProcesMana.d na końcu dopisałem

Spoiler
        if(activeSpell == SPL_Reserved_90)
{
return Spell_Logic_Reserved_90(manaInvested);
};
return FALSE;


Po użyciu zwoju mana zostaje prawidłowo zużyta z zasobów many beziego.

W Spell_Transform.d wpisałem
Spoiler

const int SPL_Cost_TrfMeatBug = 10;  <----- To na początku pliku



func int Spell_Logic_Reserved_90(var int manaInvested)       <----- To na końcu pliku
{
if((Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll)) || (self.attribute[ATR_MANA] >= SPL_Cost_TrfMeatBug))
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_TrfMeatBug;
Npc_SetActiveSpellInfo(self,Meatbug);
return SPL_SENDCAST;
}
else
{
return SPL_SENDSTOP;
};
};



Dla pewności dodałem jeszcze w Spell_Transform_Alle.d
Spoiler

const int SPL_Cost_TrfMeatBug = 10; <----- To na początku pliku


func int Spell_Logic_Reserved_90 (var int manaInvested)      <----- To na końcu pliku
{
if ((Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll)))
|| (self.attribute[ATR_MANA] >= SPL_Cost_TrfMeatBug)
{
self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_TrfMeatBug;

Npc_SetActiveSpellInfo(self, Meatbug);
return SPL_SENDCAST;
}
else
{
return SPL_SENDSTOP;
};
};



W pliku IT_Addon_Scrolls.d zdefiniowałem zwój
Spoiler
instance ItSc_TrfMeatBug(C_Item)
{
name = NAME_Spruchrolle;
mainflag = ITEM_KAT_RUNE;
flags = ITEM_MULTI;
value = Value_Sc_TrfMeatBug;
visual = "ItSc_TrfMeatBug.3DS";
material = MAT_LEATHER;
spell = SPL_Reserved_90;
cond_atr[2] = ATR_MANA_MAX;
cond_value[2] = SPL_Cost_Scroll;
wear = WEAR_EFFECT;
effect = "SPELLFX_WEAKGLIMMER";
description = NAME_SPL_Reserved_90;
text[0] = NAME_MageScroll;
text[1] = NAME_Mana_needed;
count[1] = SPL_Cost_Scroll;
text[5] = NAME_Value;
count[5] = value;
};



Już pomijam że w pliku Text.d wpisałem nazwy i opisy bo to szczegół.
 

Yetem12

Yetem12

Użytkownicy
posty207
Propsy48
Profesjabrak
  • Użytkownicy
Wszystko zrobiłeś dobrze, niestety silnik gry zawiera limit zaklęć przemiany. Nie wiem czy da się to przeskoczyć może jakimś unionem czy czymś takim.
 


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry