Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
I'm having problems with fractional unit costs not working correctly 100% of the time.
For instance Unit X which has 6 members costs 5 points and has the option to take 4 more for a total cost of 8 points. So, I have set the unit cost to 0.8 and this works. Most of the time. I have, on occasion, noticed that if I change something with the unit (add an option or even change the spelling of the unit name) the cost reverts to a whole number (1 in this case) and throws the unit cost out of whack. Anyone else have this problem? Am I doing something wrong? Thanks for the help!! Butcher Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#1 |
Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 158
|
Do you have the decimals spaces set properly or have Trim decimals set in the DEF file?
|
#2 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
Butcher, can you give me an example of where this happens? The cost shouldn't suddenly bound itself to a whole number, unless you're manually rounding it somewhere.
Edit: I just checked, and the Warmachine data files don't specify a "decimals" value in the definition file. This means that every cost is going to be displayed at 0 decimal places by AB. If you want to display more decimals, you should set it to another value, like "3" (the maximum) - As long as the "Trim Decimals?" checkbox is ticked, AB will automatically trim any trailing 0s from the end of the number. Last edited by Colen; February 24th, 2011 at 09:31 AM. |
#3 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
Thanks!
I'll give it a try setting it to 2 decimals, should take care of my issues. Cheers! Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#4 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
Well...it's close.
Here's my conundrum: Unit X has an option for 6 models @ 4 pts total OR 10 models @ 6 pts total So, I set the cost to 0.6 pts and Size: Min-6 Max-10 Start-6 Incr-4 I also set the Text Cost-4/6 for display purposes. What I get is the starting unit size Cost=3.6, I go to the max unit size and Cost=6. Is there a way to get at the Cost and do a rounding using something like the Unit Stat tab and the Finalize or Calc button? I know I've worked around this problem before in the AT-43 files I've been working on. But, it's a bit messy. I use a set of options and a min/max tag. I was hoping to find a better way though. Thanks for the help guys! Butcher Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#5 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
You should be able to use a "post-link" script on Unit X. If the unit has 10 models, you can modify @each or @special to change the cost of the unit appropriately.
|
#6 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Posts: 220
|
BINGO!
Just setting @base = 0.6 does the trick! Thanks for the help! Butcher Warmachine/Hordes ('Retired' Confrontation and AT-43) Army Builder Author. Magic the Gathering Card Vault Author. |
#7 |
Thread Tools | |
Display Modes | |
|
|