Page 1 of 1

Unit doesnt want to cast

Posted: Thu Aug 27, 2015 7:55 am
by TheMadman
I was making a mod, and now i have encountered a problem in spells. Suddendly, Firebat Hero (i gave him mana) cannot cast any spells that i added for him through Firegraft (Restoration, Matrix) but still can be targeted. I checked Firegraft many times, and i didnt found anything that would cause it.

P.S i didn't saw ANY tutorials about modding, so dont blame about how stupid i am.
EDITED: I've tried to use Icecc to find the problem within, and i added Casting Code, but still it doesnt want to cast anything. Even Hero Medic.

Re: Unit doesnt want to cast

Posted: Fri Aug 28, 2015 10:11 am
by Revolta
In Firegraft, go to Dat Requirements -> Use Tech, select the spells you added to Gui Montag (Firebat), and add him to the list of requirements.

Re: Unit doesnt want to cast

Posted: Fri Aug 28, 2015 1:27 pm
by IskatuMesk
I don't know what casting code is, but it was a specific sigorder in iscript that was required in the related animation to signal the actual spell cast. I suspect that got turned into casting code by the new definitions (I always used the old ones). If a unit lacks the header entirely for spellcasting you may need to update that (and the "type") accordingly. And yeah, requirements are also a big deal.

Medics have a lot of hardcoded junk associated with them iirc, so I don't know how well that will work.

Re: Unit doesnt want to cast

Posted: Fri Aug 28, 2015 7:38 pm
by Revolta
If you're changing the spells of a medic you're better off changing their default spells instead of giving them new ones because they use spell carriers like queens do for broodling, ensnare, and parasite, which do have AI hardcode aspects.

Re: Unit doesnt want to cast

Posted: Fri Aug 28, 2015 10:52 pm
by TheMadman
Ok, some things in dat for heros were corrected, now units can cast now spells propetly.