Kart Config Modding Project

I'd like to start by thanking solistice for going to so much effort to provide semi-customized kart configs (yay!), as well as a quick way to represent that in the kart selection menu. Because of his efforts, I felt encouraged to expand on the idea. Naturally, I've run into some problems.
What I'd like to do:
Rather than 3 kart-types, I'd like to expand that into 5 chassis and 5 transmissions. This would give us 25 combinations to use for karts, leaving plenty of room for immediate expansion (at least among standard karts; obviously you could easily blow through these if you include addons). However, it appears the game won't allow me to define new kart tags in stk_config. When I tried and referenced them in a kart config file, it just used the default settings.
So first off, would it be possible to define new option-sets in a similar way as "kart-type" (e.g. "kart-chassis" and "kart-transmission")? Defining 25 kart types individually is a pain (and naming them would quickly devolve into numbers), but I don't know of another way, currently, other than my copy-paste method (see below).
Second, I currently have turn, nitro, and skid parameters split between chassis and transmission. Obviously, this doesn't work since the game only recognizes the first instance of an xml tag. But, taking the nitro tag as one example, engine-force needs to be based on the chassis or heavy karts with weak transmissions won't get enough power while light karts with powerful transmissions will get too much. However, the rest of the nitro settings should be based on the transmission since that's the part of the engine I think should be used to determine all the efficiency factors. Similar thinking goes into the other tags I'm trying to split.
Is there some way to make this work, or am I stuck adding those options in manually for each kart?
Third, looking to the future, I'd like to add three basic engine types. (Coupled with the above, this would provide a total of 75 unique kart types; more than enough for every kart to be unique, including all the current addons.) These engine types would modify the engine and nitro settings; possibly some others. The standard engine would use the normal settings for the kart. The supercharged engine would boost nitro effects at the cost of some engine power. The high-power engine would increase the base engine specs but nitro wouldn't be as good. Thus, the affected settings would need to be modified percentage-wise, which obviously is not currently possible. I'd like to put it on the wish-list, though, for anyone who can code and has the time and will (and assuming it's trivial or at least not too non-trivial).
Last, for now, I'd like to share what I've currently worked on. Please realize it's a huge work in progress. I think the biggest hurdles for most people are going to be the higher top speeds and the twitchier skidding, but there are a bunch of changes to other areas as well. I'll hit the highlights.
Chassis:
Transmission:
General notes:
I've included two files, below. One is a zipped file containing my modified kart.xml files for all the standard karts. These are my own interpetations of what I think the karts should have. If you don't like them, by all means, change them. In any case, just copy the files into the appropriate kart folders and start the game. (Make backups first, of course.) Here's a brief rundown:
Kart: Chassis / Transmission
Adiumy: Dainty / Light
Amanda: Standard / Heavy
Beastie: Heavy / Standard
ElePhPant: Heavy / Universal
eMule: Standard / Universal
Gnu: Light / Universal
Hexley: Dainty / Super
Konqi: Heavy / Super
Nolok: Heavy / Heavy
Pidgin: Light / Super
Puffy: Massive / Light
Sara (Racer): Light / Heavy
Sara (Wizard): Light / Light
Suzanne: Standard / Super
Tux: Standard / Standard
Wilber: Dainty / Standard
Xue: Dainty / Universal
The second zip file is my xml file containing the chassis and transmission options. How to use:
If you're not sure if you've done it right, download the file containing the kart files I've already modded and compare them to yours.
Note that you can also use these settings in 0.8.1 for the most part. However, in the stability tag, make the following changes:
To do:
Lots. Main focus at the moment is....
In 0.8.2, ending the skid is jerky, so that needs smoothing. Works great in 0.8.1, though. Not sure why the discrepancy. I'm guessing it may have something to do with the skid's increase/decrease params, which I think determine how quickly the kart enters and leaves the skid, but the code comments on those params are utterly useless, so I'll just have to test some numbers and see what happens. In any case, the current number range I'm using is more like placeholders for my future intentions (if my assumptions are correct, which they very well may not be) than any real effort to make a change. They don't seem to have any noticable impact at the moment.
Also need to get the karts to stop tumbling so easily. I don't think modding roll-influence will solve it entirely. Maybe needs some angular damping? Not sure I want to touch that param, though. What's it even do? No code comment on it. (Tumbling might also be something that needs to be addressed in the game code, itself.)
Beyond that, not sure. This is more of a whatever-the-heck-I-feel-like-working-on-today project.
Thoughts, ideas, and other comments welcome.
Edit:
3/8/15 - Updated files. Changed stability roll-influence to 0 in all cases. Renamed standard-kart-mods-0.8.2beta to standard-kart-mods. Still only meant for 0.8.2beta, though.
What I'd like to do:
Rather than 3 kart-types, I'd like to expand that into 5 chassis and 5 transmissions. This would give us 25 combinations to use for karts, leaving plenty of room for immediate expansion (at least among standard karts; obviously you could easily blow through these if you include addons). However, it appears the game won't allow me to define new kart tags in stk_config. When I tried and referenced them in a kart config file, it just used the default settings.
So first off, would it be possible to define new option-sets in a similar way as "kart-type" (e.g. "kart-chassis" and "kart-transmission")? Defining 25 kart types individually is a pain (and naming them would quickly devolve into numbers), but I don't know of another way, currently, other than my copy-paste method (see below).
Second, I currently have turn, nitro, and skid parameters split between chassis and transmission. Obviously, this doesn't work since the game only recognizes the first instance of an xml tag. But, taking the nitro tag as one example, engine-force needs to be based on the chassis or heavy karts with weak transmissions won't get enough power while light karts with powerful transmissions will get too much. However, the rest of the nitro settings should be based on the transmission since that's the part of the engine I think should be used to determine all the efficiency factors. Similar thinking goes into the other tags I'm trying to split.
Is there some way to make this work, or am I stuck adding those options in manually for each kart?
Third, looking to the future, I'd like to add three basic engine types. (Coupled with the above, this would provide a total of 75 unique kart types; more than enough for every kart to be unique, including all the current addons.) These engine types would modify the engine and nitro settings; possibly some others. The standard engine would use the normal settings for the kart. The supercharged engine would boost nitro effects at the cost of some engine power. The high-power engine would increase the base engine specs but nitro wouldn't be as good. Thus, the affected settings would need to be modified percentage-wise, which obviously is not currently possible. I'd like to put it on the wish-list, though, for anyone who can code and has the time and will (and assuming it's trivial or at least not too non-trivial).
Last, for now, I'd like to share what I've currently worked on. Please realize it's a huge work in progress. I think the biggest hurdles for most people are going to be the higher top speeds and the twitchier skidding, but there are a bunch of changes to other areas as well. I'll hit the highlights.
Chassis:
- stability - changes are currently only meant to maintain kart balance given differences in mass; needs more work
rescue - currently using default settings; not sure if I should even touch it, but if I do, heavier karts will get rescued faster; this would keep with the theme of heavier karts being tankier
bubblegum - made it so you really feel like you just drove through gum instead of insta-stop; heavier is less affected; minor tweaks might be useful, but plays great as is
zipper - more effective on lighter karts
slipstream - harder to use with heavier karts; I have a hard time using it, even under the best circumstances, so I can't tell how well the changes are working
swatter - lighter karts have shorter reach and duration; if I'm understanding the params correctly, being squashed by lighter karts shouldn't slow you down as much and shouldn't last very long
mass - lightest is 125, heaviest is 525; no intention of changing this; it's kinda the basis of the chassis, after all, and it's working surprisingly well
plunger - heavier karts have a longer band, but lighter karts get more out of it; I'm considering tweaking duration, but for now, it's the same for all karts
explosion - time and invulnerability are longer for lighter karts; radius is bigger for heavier karts
engine - mostly the changes are to maintain balance, but all else being equal, heavier karts have lower power-to-weight ratios, so they'll accel slightly slower compared to lighter karts; heavier karts should also take longer to brake
nitro - chassis only affects engine-force; again, power-to-weight ratio means heavier karts receieve less effect; could probably use some tweaking
skid - chassis affects about half the parameters; heavier karts have a wider base skid radius and get some more boost, but shouldn't be enough to completely make up for the mass difference; I'm still working on the rest
turn - heavier karts have a slightly wider turn radius; might not be that noticable, but I'm hesitant to mess with this much
Transmission:
- startup - heavier transmissions are more lenient on the timing and provide a better boost; I'm thinking of keeping the better boost, but making the timing stricter so lighter transmissions have something here; even so, the start usually isn't crucial and sometimes "bad" starts are better (avoid the scrum), so it doesn't bother me much if the startup favors one transmission type over another; I'm open to opinions one way or the other
gear - heavier transmissions have more gears, but that doesn't mean better power overall; universal transmissions have a single gear at power-increase of 1.8; heavier transmissions have more gears, up to 5, with lower gears more powerful and upper gears less powerful, so you'll be able to get up to speed faster, but it'll be harder to keep top speed; this could probably use more tweaking, but it's quite playable as is
turn - heavier transmission results in the kart going to full steer slightly quicker; didn't want to play with this too much since the default steering is already in a pretty sweet spot, so if I've done this right, it shouldn't make a huge difference in play but should hopefully still provide a difference in feel...if that makes any sense
nitro - the rest; heavier transmissions need more nitro per use and get less duration from it, so if you like to use nitro, go with a lighter transmission; game bug is currently causing problems with nitro consumption or some aspect thereof, so super transmissions only use 3 or 4 units of nitro instead of the 5 they're supposed to. (Hard to test since there's no nitro count on the HUD.)
skid - heavier transmissions take less time to get their bonuses, have lower min-speed to start the skid--heaviest can start skidding from a dead stop--have higher speed bonuses, but bonus duration is lower; also heavier transmissions provide a bigger turn range between skid min and max radius, meaning slightly better handling during a skid
General notes:
- Default top speed on SuperTux difficulty in 0.8.1 is 27. In 0.8.2, the light karts top out at 30 by default. I use 32 across the board. Despite this, I've found lighter karts still feel zippier compared to heavy karts, and heavier karts definitely have a real sense of weight to them that makes you feel like you can just shove everything out of the way. (You can't, though, because you probably won't be the only heavy kart in the race.)
Skidding is much more responsive, now. Karts take only 0.3 seconds to get into the skid rather than the default 0.5. I tried 0.25, which worked fine in 0.8.1, but it's too twitchy in 0.8.2. For now, this is across the board, but I do intend a range (probably 0.3 to 0.4, but that's pure guesswork at the moment) based on chassis.
Overall, heavier karts are tankier while lighter karts are zippier. Heavier transmissions are better for twisty tracks (i.e. minigolf) where you have to slow down a lot, so getting back up to speed is important, while lighter transmissions are better for gentler tracks (i.e. barnyard). There is no outright race-winning combo. You should be able to win (or at least compete well, depending on your lap and kart number settings) on any track no matter which kart you drive, so choose one that suits your preferences. I prefer heavier transmissions, myself, but the lighter transmissions are not to be dismissed (I had plenty of fun winning with ElePhPant--heavy chassis, universal transmission--on a 16 kart 20 lap minigolf race).
I'm not sure if modding the collision parameters will address some of the kart<->track collision issues the game is having. My guess is probably not. I'll probably also play around with suspension some, just to see what happens, but I don't have any plans to include it right away.
I've included two files, below. One is a zipped file containing my modified kart.xml files for all the standard karts. These are my own interpetations of what I think the karts should have. If you don't like them, by all means, change them. In any case, just copy the files into the appropriate kart folders and start the game. (Make backups first, of course.) Here's a brief rundown:
Kart: Chassis / Transmission
Adiumy: Dainty / Light
Amanda: Standard / Heavy
Beastie: Heavy / Standard
ElePhPant: Heavy / Universal
eMule: Standard / Universal
Gnu: Light / Universal
Hexley: Dainty / Super
Konqi: Heavy / Super
Nolok: Heavy / Heavy
Pidgin: Light / Super
Puffy: Massive / Light
Sara (Racer): Light / Heavy
Sara (Wizard): Light / Light
Suzanne: Standard / Super
Tux: Standard / Standard
Wilber: Dainty / Standard
Xue: Dainty / Universal
The second zip file is my xml file containing the chassis and transmission options. How to use:
- 1) Choose a kart you'd like to modify.
2) Make a backup of the kart.xml file.
3) Open the kart.xml file in a text editor.
4) Remove the "type" parameter (the entire line) from the "kart" tag. In the standard karts, you'll find it between the "random-wheel-rot" and "groups" parameters. It may or may not exist in addon karts.
5) From my xml mod file, choose one chassis and one transmission you'd like to use.
6) Copy the chassis and transmission types anywhere after the opening kart tag and before the closing kart tag. (I prefer to put them after the "hat" tag. I find it easier to keep track of them that way.)
6.5) If you copied the type tags, delete those. (i.e. if you chose the heavy chassis, and you copied the <heavy> and </heavy> tags, delete those.)
7) Put all the nitro parameters into one tag and delete the other (which should be empty).
8) Repeat step 7 for the skid parameters.
9) Repeat step 7 for the turn parameters.
10) Save the file.
11) Play the game.
If you're not sure if you've done it right, download the file containing the kart files I've already modded and compare them to yours.
Note that you can also use these settings in 0.8.1 for the most part. However, in the stability tag, make the following changes:
- downward-impulse-factor="0"
roll-influence="0.3"
To do:
Lots. Main focus at the moment is....
In 0.8.2, ending the skid is jerky, so that needs smoothing. Works great in 0.8.1, though. Not sure why the discrepancy. I'm guessing it may have something to do with the skid's increase/decrease params, which I think determine how quickly the kart enters and leaves the skid, but the code comments on those params are utterly useless, so I'll just have to test some numbers and see what happens. In any case, the current number range I'm using is more like placeholders for my future intentions (if my assumptions are correct, which they very well may not be) than any real effort to make a change. They don't seem to have any noticable impact at the moment.
Also need to get the karts to stop tumbling so easily. I don't think modding roll-influence will solve it entirely. Maybe needs some angular damping? Not sure I want to touch that param, though. What's it even do? No code comment on it. (Tumbling might also be something that needs to be addressed in the game code, itself.)
Beyond that, not sure. This is more of a whatever-the-heck-I-feel-like-working-on-today project.

Thoughts, ideas, and other comments welcome.
Edit:
3/8/15 - Updated files. Changed stability roll-influence to 0 in all cases. Renamed standard-kart-mods-0.8.2beta to standard-kart-mods. Still only meant for 0.8.2beta, though.