A
ace at madbomber.net
Guest
OK--another brain buster for you all to contemplate, and Rob to propose a
solution for.
Topic: Inquisitor data file, applying cost to armour points.
When I tried to calculate cost for the statistics of a character, Rob filled
me in on how to do this:
- create an option, "BaseCost". The option "BaseCost" is assigned an
"auto" relationship to a character. The option BaseCost has the following
attributes:
xlat:from=WS-to=X1-map:0-9=0,10-19=1,20-29=2,30-39=3,40-49=4,50-59=5,60-69=7
,70-79=9,80-89=11,90-99=13,100-109=15,110-119=17,120-129=19,130-139=21,140-1
49=23,150-159=25,160-169=27,170-179=29,180-189=31,190-199=33,200-209=35,210-
219=37,220-229=39,230-239=41,240-249=43,250-259=45,260-269=47,270-279=49,280
-289=51,290-299=53,300-309=55,310-319=57,320-329=59,330-339=61,340-349=63,35
0-359=65,360-369=67,370-379=69,380-389=71,390-399=73,400-409=75,410-419=77,4
20-429=79,430-439=81,440-449=83,450-459=85,460-469=87,470-479=89,480-489=91,
490-499=93
where "WS" is weapon skill, a character's stat, and "X1" is a stat that
translates the value in WS into a corresponding point cost in X1.
and then
base:X2+(X1) (where x2 is an "accumulation stat"). In this model, X2 starts
as 0 and is incremented to include the cost calculated in x1, using the xlat
formula above.
There is a series of
xlat: ...
followed by
base:X2+(X1) commands.
Each time the "base" command is represented, it takes the NEW value in X1
(calculated from the previous calculation of points on the next stat in
line), and increments it onto X2, representing the TOTAL cost for the all
stats the character has.
At the end of all of this, there are 2 more attributes:
cost:stat@X2*1, which makes the cost of the option equal to the the value in
the statistic X2, times 1.
and,
"hide"
which hides the option from the user.
Now--this works PERFECTLY to calculate the base cost of a character,
dependent on his statistic set.
The problem comes in when I try to replicate this situation/model for the
armour cost. A little background: armour is a unit, and is automatically
added to EVERY character through the use of a child unit option. So my
theory is that I should be able to create 2 new stats, X3 and X4, and create
a new option, "ArmCost", and attach ArmCost to the Armour unit as an auto
option, and it will increment the cost of the armour based on the # of
armour points selected for that armour child unit. Here's what I did:
xlat:from=Hd-to=X3-map:1-1=1,2-2=2,3-3=3,4-4=4,5-5=5,6-5=6,7-7=7,8-8=8,9-9=9
,10-10=10...etc
This takes the "Hd" stat, which is the # of armour points at the head
location, and maps it into the X3 stat. Then...
base:X4+(X3)
This should take the current value in X3 and add it to the value in X4
(which starts at 0).
Do this for each of the armour "stats" (Hd, RA, LA, Ch, Ab, RL, LL, Gr, AL),
following each "xlat" attribute with the "base" attribute. At the end of
the last "base" statement,
cost:stat@X4*1
To take the total incremented value in X4 and multiply it by 1, generating
the cost of the option (which is auto-attached to teh character)
and finally "hide" to hide it again (like above).
Now--theoretically, this should increment X3 by 1 point for every point of
armour at a location, and then take that total value and add it to X4,
incrementing x4 each time to get a total points value of the armour.
Maybe I'm making this too complex, but it seems like it should work...so
what's wrong, you ask?
When I actually get into the armour child unit, and add a location (like
head), and then increment the armour points at that location, for some
reason it's multiplying the # of armour points selected at the location by
some value (2, 3 and 6 seem to be common values) before calculating the
cost. I'm not sure what it is I'm doing wrong...
For a real-live example:
Open inquisitor file
- add an "Inquisitor"
- click on "armour"
- click on the "special items" button
- add "abdomen armour" and "groin" armour", and "right arm armour"
- exit special items screen
- under the "armour" child unit, click on "abdomen armour"
- select "Flak Armour"; two things will happen--1) the "Ab" stat on the
armour child unit will increment from - to 3. The total cost of the armour
will go from 0 to 15. It should only go to 3, however, because each point
of armour is equivalent to 1 point of cost, and I've only added 3 points of
armour.
- under the armour child unit, click on "Groin armour".
- select "Flak Armour" again. The "Gr" stat will increment from - to 3, but
the cost of the unit will not increase. Now, it SHOULDN'T, b/c it's already
9 points over cost (3+3 is 6, 15-6 is 9), but that's odd...
- under the armour child unit, click on "Right Arm Armour"
- select "Flak Armour" again. The "RA" stat will increment from - to 3.
The cost of the unit goes from 15 to 24. Huh? It should be 9 TOTAL, but it
appears to multiply the # of armour points at the location by some value
before applying the cost.
As near as I can tell, here is what it is doing:
- if the "x armour" location is the first stat on the armour option (i.e.
"Hd"), it multiplies it by 1. If it's the 2nd stat (LA?) it multiplies it
by 2. RA by 3. Ch by 4. Etc. The position in the stat line dictates a
multiplier for the cost of the unit. At least I think that's what it's
doing.
What am I doing wrong? I just want it to increment the cost of the "Armour"
Child unit by 1 point for every 1 point of armour at any of the "armour"
stats/locations (there are 9 of them total).
Help!
solution for.
Topic: Inquisitor data file, applying cost to armour points.
When I tried to calculate cost for the statistics of a character, Rob filled
me in on how to do this:
- create an option, "BaseCost". The option "BaseCost" is assigned an
"auto" relationship to a character. The option BaseCost has the following
attributes:
xlat:from=WS-to=X1-map:0-9=0,10-19=1,20-29=2,30-39=3,40-49=4,50-59=5,60-69=7
,70-79=9,80-89=11,90-99=13,100-109=15,110-119=17,120-129=19,130-139=21,140-1
49=23,150-159=25,160-169=27,170-179=29,180-189=31,190-199=33,200-209=35,210-
219=37,220-229=39,230-239=41,240-249=43,250-259=45,260-269=47,270-279=49,280
-289=51,290-299=53,300-309=55,310-319=57,320-329=59,330-339=61,340-349=63,35
0-359=65,360-369=67,370-379=69,380-389=71,390-399=73,400-409=75,410-419=77,4
20-429=79,430-439=81,440-449=83,450-459=85,460-469=87,470-479=89,480-489=91,
490-499=93
where "WS" is weapon skill, a character's stat, and "X1" is a stat that
translates the value in WS into a corresponding point cost in X1.
and then
base:X2+(X1) (where x2 is an "accumulation stat"). In this model, X2 starts
as 0 and is incremented to include the cost calculated in x1, using the xlat
formula above.
There is a series of
xlat: ...
followed by
base:X2+(X1) commands.
Each time the "base" command is represented, it takes the NEW value in X1
(calculated from the previous calculation of points on the next stat in
line), and increments it onto X2, representing the TOTAL cost for the all
stats the character has.
At the end of all of this, there are 2 more attributes:
cost:stat@X2*1, which makes the cost of the option equal to the the value in
the statistic X2, times 1.
and,
"hide"
which hides the option from the user.
Now--this works PERFECTLY to calculate the base cost of a character,
dependent on his statistic set.
The problem comes in when I try to replicate this situation/model for the
armour cost. A little background: armour is a unit, and is automatically
added to EVERY character through the use of a child unit option. So my
theory is that I should be able to create 2 new stats, X3 and X4, and create
a new option, "ArmCost", and attach ArmCost to the Armour unit as an auto
option, and it will increment the cost of the armour based on the # of
armour points selected for that armour child unit. Here's what I did:
xlat:from=Hd-to=X3-map:1-1=1,2-2=2,3-3=3,4-4=4,5-5=5,6-5=6,7-7=7,8-8=8,9-9=9
,10-10=10...etc
This takes the "Hd" stat, which is the # of armour points at the head
location, and maps it into the X3 stat. Then...
base:X4+(X3)
This should take the current value in X3 and add it to the value in X4
(which starts at 0).
Do this for each of the armour "stats" (Hd, RA, LA, Ch, Ab, RL, LL, Gr, AL),
following each "xlat" attribute with the "base" attribute. At the end of
the last "base" statement,
cost:stat@X4*1
To take the total incremented value in X4 and multiply it by 1, generating
the cost of the option (which is auto-attached to teh character)
and finally "hide" to hide it again (like above).
Now--theoretically, this should increment X3 by 1 point for every point of
armour at a location, and then take that total value and add it to X4,
incrementing x4 each time to get a total points value of the armour.
Maybe I'm making this too complex, but it seems like it should work...so
what's wrong, you ask?
When I actually get into the armour child unit, and add a location (like
head), and then increment the armour points at that location, for some
reason it's multiplying the # of armour points selected at the location by
some value (2, 3 and 6 seem to be common values) before calculating the
cost. I'm not sure what it is I'm doing wrong...
For a real-live example:
Open inquisitor file
- add an "Inquisitor"
- click on "armour"
- click on the "special items" button
- add "abdomen armour" and "groin" armour", and "right arm armour"
- exit special items screen
- under the "armour" child unit, click on "abdomen armour"
- select "Flak Armour"; two things will happen--1) the "Ab" stat on the
armour child unit will increment from - to 3. The total cost of the armour
will go from 0 to 15. It should only go to 3, however, because each point
of armour is equivalent to 1 point of cost, and I've only added 3 points of
armour.
- under the armour child unit, click on "Groin armour".
- select "Flak Armour" again. The "Gr" stat will increment from - to 3, but
the cost of the unit will not increase. Now, it SHOULDN'T, b/c it's already
9 points over cost (3+3 is 6, 15-6 is 9), but that's odd...
- under the armour child unit, click on "Right Arm Armour"
- select "Flak Armour" again. The "RA" stat will increment from - to 3.
The cost of the unit goes from 15 to 24. Huh? It should be 9 TOTAL, but it
appears to multiply the # of armour points at the location by some value
before applying the cost.
As near as I can tell, here is what it is doing:
- if the "x armour" location is the first stat on the armour option (i.e.
"Hd"), it multiplies it by 1. If it's the 2nd stat (LA?) it multiplies it
by 2. RA by 3. Ch by 4. Etc. The position in the stat line dictates a
multiplier for the cost of the unit. At least I think that's what it's
doing.
What am I doing wrong? I just want it to increment the cost of the "Armour"
Child unit by 1 point for every 1 point of armour at any of the "armour"
stats/locations (there are 9 of them total).
Help!