it has been a long time since the last activity here but some time ago the kart properties system in SuperTuxKart changed a lot.
I implemented a new system to change the properties of karts, kart-types and difficulties which is based on NowhereMan's ideas.
Now it's possible to change the properties of a single kart relative to the base values. E.g. you can multiply the speed of a kart by 2.
As NowhereMan pointed out, it should be possible to override operator binding (normally products take precedence over sums). The used approach in the code is quite simple: Operator precedence doesn't exist, all computations are done from left to right. That should (hopefully) give all the freedom that is needed.
If the plunger in-face-time has a base value of 3 the following entries would modify it:
- {l Code}: {l Select All Code}
<plunger in-face-time="*2" /> <!-- The result would be 6 -->
<plunger in-face-time="+2" /> <!-- The result would be 5 -->
<plunger in-face-time="/2" /> <!-- The result would be 1.5 (this time is saved as a floating point value) -->
<plunger in-face-time="*2+1" /> <!-- The result would be 7 -->
<plunger in-face-time="+2*2" /> <!-- The result would be (3+2)*2 = 10 (computed from left to right) -->
<plunger in-face-time="42" /> <!-- The result would be 42 (override the previous value) -->
<plunger in-face-time="-1" /> <!-- The result would be -1, NOT 3-1=2 because somehow it has to be possible to enter negative values -->
<plunger in-face-time="x-1" /> <!-- This result would actually be 2 -->
<plunger in-face-time="*x" /> <!-- The result would be 3*3=9; every x will be replaced by the previous value that will be modified -->
<plunger in-face-time="+3/x-1*2" /> <!-- The result would be ((3+3)/3-1)*2=2 (complicated computation for whatever reasons) -->
The properties were also taken out of stk_config.xml and are now in kart_characteristics.xml.
Every property (or "characteristic") that is present in the base characteristics can be modified per difficulty, per kart type and per kart (combined in this order). If a value is not specified, it won't be modified.
These properties are only available in the development version of the game, so if you want to use them, you have to compile stk youself: https://github.com/supertuxkart/stk-code#compiling-supertuxkart
If you encounter a problem (not enough documentation or stk just does what it wants and ignores all configuration values ) or you made funny kart modifications it would be nice to hear that .