Difference between revisions of "Formula System Conversion"
Tom Parker (talk | contribs) |
Tom Parker (talk | contribs) |
||
Line 182: | Line 182: | ||
*RANGE: Token in Equipment LST | *RANGE: Token in Equipment LST | ||
− | |||
*BONUS:EQMWEAPON|RANGEADD to alter the range | *BONUS:EQMWEAPON|RANGEADD to alter the range | ||
*BONUS:EQMWEAPON|RANGEMULT to alter the range | *BONUS:EQMWEAPON|RANGEMULT to alter the range |
Revision as of 05:15, 4 March 2016
Background
This work is based on:
- Formula Parser Equip Vars Demo based on Formula Parser Equip Vars Proposal which includes Formula Parser-JEP removal (sandbox) and Formula Parser Conversion Instructions
Considerations
Things to watch out for in any conversion:
- If the BONUS token has trailing PRExxx, then conversion may not be possible without other conversions being done in parallel
- If the BONUS token takes in other variables, then conversion may require other new variables to be created
Conversions
Alternate HP
Past Process
BONUS:HP|ALTHP|...
Replacement
Requires a codeControl.lst file in the game mode. Reminder that the codeControl.lst file takes one token per line.
The codeControl.lst token is:
- ALTHP:x
- "x" in this case is the name of the new formula system variable that contains the alternate HP value.
Effects
If the ALTHP code control is used, then any BONUS:HP|ALTHP will be reported as a "not supported" token. The ALTHP control is either ON (new variable) or OFF (BONUS supported).
The ALTHP export (output system) token will continue to function, and its value is controlled by whether the ALTHP code control is enabled. If not, it uses BONUS, if it is, it uses the new formula provided as the argument to the ALTHP code control.
Of course, the preferred method (since the old output tokens will be deprecated anyway) is to convert the ALTHP export token to use the FreeMarker tokens for new variables:
${pc.val.x}
(again, where the "x" is the new variable now holding alternate HP.
Specific Considerations
None
Face
Past Process
FACE: in Race LST
FACE: in Template LST (overrides Race LST - order is somewhat arbitrary of "what wins")
Replacement
Requires a codeControl.lst file in the game mode. Reminder that the codeControl.lst file takes one token per line.
The codeControl.lst token is:
- FACE:x
- "x" in this case is the name of the new formula system variable that contains the FACE value. It is expected to be an ORDEREDPAIR
Effects
If the FACE code control is used, then any FACE token in Race or Template LST files will be reported as a "not supported" token. The FACE control is either ON (new variable) or OFF (FACE LST token supported).
The FACE export (output system) token will continue to function, and its value is controlled by whether the FACE code control is enabled. If not, it uses FACE. if it is, it uses the new formula provided as the argument to the FACE code control.
Of course, the preferred method (since the old output tokens will be deprecated anyway) is to convert the FACE export token to use the FreeMarker tokens for new variables:
${pc.val.x}
(again, where the "x" is the new variable now holding new FACE).
Specific Considerations
None
Equipment Critical Multiplier (CRITMULT)
Past Process
- CRITMULT: Token in Equipment LST (for primary head)
- ALTCRITMULT: Token in Equipment LST (for secondary head)
- BONUS:WEAPONPROF|CRITMULTADD to alter the critical multiplier
Replacement
Requires a codeControl.lst file in the game mode. Reminder that the codeControl.lst file takes one token per line.
The codeControl.lst token is:
CRITMULT:x
"x" in this case is the name of the new formula system variable LOCAL to EQUIPMENT.PART that contains the CRITMULT value. It is expected to be a NUMBER
Effects
If the CRITMULT code control is used, then any CRITMULT or ALTCRITMULT token in Equipment LST files will be reported as a "not supported" token. The CRITMULT control is either ON (new variable) or OFF (*CRITMULT LST tokens supported).
Any BONUS:WEAPONPROF|CRITMULTADD will also be reported as an unsupported token if the CRITMULT code control is used.
The Equipment CRITMULT Term will also break (not have the correct value)
The CRIT (and ALTCRIT) portions of the export system (output system) will continue to function. This includes portions of the following Export tokens: EQ, EQCONTAINERS, EQCONTAINER, EQCONTAINERW, WEAPON. The Crit Mult values are controlled by whether the CRITMULT code control is enabled. If not, it uses the CRITMULT as generated by the tokens. if it is, it uses the new formula provided as the argument to the CRITMULT code control.
In the long term, the preferred method will be to convert fetching the Critical Multiplier to getting the variable, but this is not currently possible due to lack of ability to do all the export of equipment in the new freemarker system.
Specific Considerations
Check for usage of "CRITMULT" in a formula in any Equipment. If this is used, then the game mode may not be convertable (yet) and/or a temporary variable may need to be created to carry that value in the old calculation system.
Equipment Critical Multiplier (CRITRANGE)
Past Process
- CRITRANGE: Token in Equipment LST (for primary head)
- ALTCRITRANGE: Token in Equipment LST (for secondary head)
- BONUS:EQMWEAPON|CRITRANGEADD to alter the critical range
- BONUS:EQMWEAPON|CRITRANGEDOUBLE to alter the critical range
- BONUS:WEAPONPROF|CRITRANGEADD to alter the critical range
- BONUS:WEAPONPROF|CRITRANGEDOUBLE to alter the critical range
Replacement
Requires a codeControl.lst file in the game mode. Reminder that the codeControl.lst file takes one token per line.
The codeControl.lst token is:
CRITRANGE:x
"x" in this case is the name of the new formula system variable LOCAL to EQUIPMENT.PART that contains the CRITRANGE value. It is expected to be a NUMBER
Effects
If the CRITRANGE code control is used, then any CRITRANGE or ALTCRITRANGE token in Equipment LST files will be reported as a "not supported" token. The CRITRANGE control is either ON (new variable) or OFF (*CRITRANGE LST tokens supported).
Any BONUS shown above will also be reported as an unsupported token if the CRITRANGE code control is used.
The CRITRANGE (and ALTCRITRANGE) portions of the export system (output system) will continue to function. This includes portions of the following Export tokens: EQ, EQCONTAINERS, EQCONTAINER, EQCONTAINERW, WEAPON. The Crit Range values are controlled by whether the CRITRANGE code control is enabled. If not, it uses the CRITRANGE as generated by the tokens. if it is, it uses the new formula provided as the argument to the CRITRANGE code control.
In the long term, the preferred method will be to convert fetching the Critical Range to getting the variable, but this is not currently possible due to lack of ability to do all the export of equipment in the new freemarker system.
Specific Considerations
None
Equipment (Armor) EDR
Past Process
EDR: in Equipment LST
- BONUS:EQMARMOR|EDR to alter the EDR
Replacement
Requires a codeControl.lst file in the game mode. Reminder that the codeControl.lst file takes one token per line.
The codeControl.lst token is:
- EDR:x
- "x" in this case is the name of the new formula system variable that contains the EDR value. It is expected to be a NUMBER
Effects
If the EDR code control is used, then any EDR token in Equipment LST files will be reported as a "not supported" token. The EDR control is either ON (new variable) or OFF (EDR LST token supported).
Any BONUS:EQMARMOR|EDR will also be reported as an unsupported token if the EDR code control is used.
The EDR export (output system) token will continue to function, and its value is controlled by whether the EDR code control is enabled. This includes portions of the following Export tokens: EQ, EQCONTAINERS, EQCONTAINER, EQCONTAINERW, ARMOR. If not, it uses EDR. if it is, it uses the new formula provided as the argument to the EDR code control.
In the long term, the preferred method will be to convert fetching the Critical Range to getting the variable, but this is not currently possible due to lack of ability to do all the export of equipment in the new freemarker system.
Specific Considerations
None
Equipment RANGE
Past Process
- RANGE: Token in Equipment LST
- BONUS:EQMWEAPON|RANGEADD to alter the range
- BONUS:EQMWEAPON|RANGEMULT to alter the range
- BONUS:RANGEMULT|* to alter the range
- BONUS:POSTRANGEADD|* to alter the range
- BONUS:RANGEADD|* to alter the range
Replacement
Requires a codeControl.lst file in the game mode. Reminder that the codeControl.lst file takes one token per line.
The codeControl.lst token is:
RANGE:x
"x" in this case is the name of the new formula system variable LOCAL to EQUIPMENT that contains the RANGE value. It is expected to be a NUMBER
NOTE: This is currently attached to the EQUIPMENT. Ideally, in the future, range will be attached to the EQUIPMENT.PART, but this is necessary for current backward compatibility in places where the Range is used and which are not aware of which PART they are operating upon. Expect a future code control to allow modification of this value to a PART once ToHit and Damage are complete.
Effects
If the RANGE code control is used, then any RANGE token in Equipment LST files will be reported as a "not supported" token. The RANGE control is either ON (new variable) or OFF (*RANGE LST tokens supported).
Any BONUS shown above will also be reported as an unsupported token if the RANGE code control is used.
The RANGE portions of the export system (output system) will continue to function. This includes portions of the following Export tokens: EQ, EQCONTAINERS, EQCONTAINER, EQCONTAINERW, WEAPON. The Range values are controlled by whether the RANGE code control is enabled. If not, it uses the RANGE as generated by the tokens. if it is, it uses the new formula provided as the argument to the RANGE code control.
In the long term, the preferred method will be to convert fetching the Range to getting the variable, but this is not currently possible due to lack of ability to do all the export of equipment in the new freemarker system.
Specific Considerations
Check for usage of "RANGE" in a formula in any Equipment. If this is used, then the game mode may not be convertable (yet) and/or a temporary variable may need to be created to carry that value in the old calculation system.