HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A good way to give units negative armor?

12-18-2010, 01:30 AM#1
rogueteddybear
I was wondering what a good was to give enemies negative armor. I am using UnitProperties for my stats modification and it will not go into negatives for some reason. I have also tried using Faerie Fire with a dummy caster but I must be messing that up because it won't work (yet other spells like lightning shield work with my dummy cast).

Anyone have any suggestions?
12-18-2010, 01:41 AM#2
Anitarf
UnitProperties should work. If they're giving you problems, have you tried using BonusMod instead?

As for the dummy caster problem, perhaps the dummy caster does not have enough mana to cast the spell? Other possible issues are incompatible spell targeting options techtree requirements although I doubt they're at fault here.
12-18-2010, 02:30 AM#3
rogueteddybear
Well, I have given BonusMod some thought but I've already been using UnitProperties for a while now and it is used throughout my code a lot.

As for the dummy casting, my custom faerie fire has no mana cost, no dependencies/requirements and can target enemies. So I don't know whats up with that.

I will try to experiment a bit more with Unit Properties.

Edit: It seems if i directly add the modification abilities that UnitProperties uses, then armor goes into negatives. There must be something in the code stopping this though.

Edit2: I found the problem. For some reason I changed the offset in the code to 2048 from 512 thinking it had to do with stat increases when in fact it was the difference between positive stat/negative stat ability id's.