Page 1 of 1

Amour Save Editing

PostPosted: Wed Mar 12, 2014 9:50 pm
by RiptideOverdrive
I have been trying to find a way to decrement armour saves when a unit selects an option. I tried looking at some of the types of saves from WH40k and WHFB but I can't seem to find one that just decreases the armour save by 1 when an option is selected.

I've tried a few different commands in the Evaluate section of the item such as:
Code: Select all
unit.basestat[Save] = unit.basestat[Save] + 1
entity.basestat[Save] = entity.basestat[Save] - 1
unit.stat[Save] = unit.stat[Save] + 1

However every time the option is selected the invulnerable save is edited instead of the armour save or nothing happens. Is "Save" the wrong stat name to use or am I just putting in the commands improperly?

Re: Amour Save Editing

PostPosted: Thu Mar 13, 2014 1:03 am
by shaggai
You may have to check out a few places which are not entirely obvious but invulnerble save is done by adding ten to the nominal save and procedures determine that and make the save invulnerable. This make it easy to "connvert" a save on the fly by just adding ten. So while a plus four save is 4, an invulnerable save of four is "counted" as 14 and then converted to 4i. Check out the Finalize button under the Unit Stat in the DEF file...

Re: Amour Save Editing

PostPosted: Thu Mar 13, 2014 1:08 am
by shaggai
Of course, I'm not entirely sure why you would specifically want to edit the save and input that. It'd would probably just be better making a procedure call to the invulnerable save based on the selection of an option say:

if (option[Rosarius].selection >0) then
   call inv4
endif

That's why we have the procedure calls in the generalDat file. The only time that it would get tricky is when you have something like chaos and tzeentch making Chaos Sorcerer's a pain...

Re: Amour Save Editing

PostPosted: Thu Mar 13, 2014 8:29 pm
by RiptideOverdrive
Thanks shaggai, I checked out the code under Unit Stat section and I see what you mean about the save conversion process. However, I was trying to edit armour saves of units instead of the invul saves. For instance, a unit has a save of 3+/6i and I just wanted to edit the 3+ armour save part.