Username:


Password:


Remember me


  • Find Us On Facebook



Amour Save Editing

Have a question about how to do something in the datafiles? Ask it here, we'll help if we can. NOTE: We cannot teach you how to use ABCREATE or how our files work, we don't have the time.

Amour Save Editing

#1  Postby RiptideOverdrive » Wed Mar 12, 2014 9:50 pm

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?
Last edited by RiptideOverdrive on Thu Mar 13, 2014 2:19 am, edited 1 time in total.
RiptideOverdrive
Recruit
Recruit
 
Posts: 2
Joined: Wed Mar 12, 2014 9:07 pm

Re: Amour Save Editing

#2  Postby shaggai » Thu Mar 13, 2014 1:03 am

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...
Age of Cash-mar - alienate you fan base and find a new way to squeeze money out of those poor souls!
User avatar
shaggai
Site Admin
Site Admin
 
Posts: 1507
Joined: Mon Jun 19, 2006 12:00 am
Location: Matawan, NJ, USA

Re: Amour Save Editing

#3  Postby shaggai » Thu Mar 13, 2014 1:08 am

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...
Age of Cash-mar - alienate you fan base and find a new way to squeeze money out of those poor souls!
User avatar
shaggai
Site Admin
Site Admin
 
Posts: 1507
Joined: Mon Jun 19, 2006 12:00 am
Location: Matawan, NJ, USA

Re: Amour Save Editing

#4  Postby RiptideOverdrive » Thu Mar 13, 2014 8:29 pm

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.
RiptideOverdrive
Recruit
Recruit
 
Posts: 2
Joined: Wed Mar 12, 2014 9:07 pm


Return to Datafile Programming Support

Who is online

Registered users: No registered users

cron