Kart Config Modding Project

Re: Kart Config Modding Project

Postby Seebi » 10 Jan 2016, 15:23

Hello again,

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 :) .
User avatar
Seebi
 
Posts: 9
Joined: 07 Mar 2015, 03:18

Re: Kart Config Modding Project

Postby GeekPenguinBR » 12 Jan 2016, 21:17

Seebi {l Wrote}: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.


Just an idea:
I wonder if these improved karts could be bonus to be used in the supertux level. To be clear: we could have the possibility to buy improved karts after collecting a certain number of coins.

The coins could be showed on expert level thus:
200 coins of $1 in 20 tracks (10 coins by track) placed in easy points;
60 coins of $5 in 20 tracks (3 coins by track) placed in as not as easy points; and,
20 coins of $10 in 20 tracks (1 coins by track) placed in not easy points.

The easy coins of $1 shows number one and a fish. The coins of $5 shows Tux and the coins of $10 shows Nolok. See the ilustration:
CoinsS.jpg


The gamers would be allowed to buy an improved kart after collecting at least 70% of all available points (196 in 280).

I don't know if it's easy to implement and I don't know if this seems interesting for all (as always, I expect comments of people who disagree), but, IMO it seems a cool idea to mix collecting coins (as suggested by Tuxkartdriver months ago), your improved karts and levels of difficult.
"Making cool harmless games makes the world a better place".
User avatar
GeekPenguinBR
 
Posts: 466
Joined: 22 Mar 2014, 00:41
Location: Rio de Janeiro

Re: Kart Config Modding Project

Postby ArDanWol » 13 Jan 2016, 23:19

Nice textures, but I'm not sure how I feel about "buying" better karts. :/
I'm know pretty much everywhere else on the internet as "Kpenguin"
"Profanity is one language all computer users know" - Murphy's 50th Law of Computers
Software bugs are impossible to detect by anybody except the end user - Murphy's 31st law of software
Each computer code has five bugs, regardless of how many bugs have been already found - Murphy's 50th law of software
"That's not a bug, it's an undocumented feature!"
User avatar
ArDanWol
 
Posts: 181
Joined: 07 Nov 2014, 17:36
Location: Ohio, USA

Re: Kart Config Modding Project

Postby hiker » 15 Jan 2016, 04:14

ArDanWol {l Wrote}:Nice textures, but I'm not sure how I feel about "buying" better karts. :/

Clarification: the different kart physics should result in kart that behave (noticeably) different behaviour, but not in 'better' behaviour. We don't want to have one kart that will (nearly) always win, we want to have variation in the driving style.

How feasible this is ... not sure ;)

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Who is online

Users browsing this forum: No registered users and 1 guest