Page 1 of 1

Disabling nitro and speed boost

PostPosted: 22 Aug 2017, 21:35
by jobenmoe
Hello,

I'm new to the forum but I've been using STK as a part of my neuroscience research. It's a great open source software for my research.

I want to know if there is anyway that I can disable the nitro and speed boost features in STK. I'm trying to create most naive driver game play experience involving only forward and lateral kart movements for a neuroscience experiment. Please let me know how I can go on about doing this.

Re: Disabling nitro and speed boost

PostPosted: 23 Aug 2017, 21:06
by QwertyChouskie
I would map the "fire" and "nitro" keys in the control config to nothing, and maybe replace the texture for the nitro cans with a 1px transparent png.

Re: Disabling nitro and speed boost

PostPosted: 23 Aug 2017, 23:36
by Auria
For collectible speed boosts, you can edit file "data/powerup.xml" (where data is will depend on your OS). Near the end of the file, you can set all zeros in the "zipper" column and that should remove them. Speed boosts on the ground of tracks cannot be removed, however

As for nitro, however, there is no simple way to do it, except by editing all tracks, or editing the code (not sure you're willing to go there)

Re: Disabling nitro and speed boost

PostPosted: 24 Aug 2017, 05:15
by hiker
Auria {l Wrote}:As for nitro, however, there is no simple way to do it, except by editing all tracks, or editing the code (not sure you're willing to go there)

If you compile yourself, therer might be an easy option: in src/tracks/track.cpp lines 1863:

for (unsigned int i=0; i<root->getNumNodes(); i++)
{l Code}: {l Select All Code}
        {
            const XMLNode *node = root->getNode(i);
            const std::string &name = node->getName();
            if (name=="banana"      || name=="item"      ||
                name=="small-nitro" || name=="big-nitro" ||
                name=="easter-egg"                           )
            {
                itemCommand(node);
            }
        }   // for i<root->getNumNodes()

I haven't verified it, but if you remove the two nitro comparisons, no nitro should be created.

Let us know how you go, I am always glad to see STK used in research.

Cheers,
Joerg

Re: Disabling nitro and speed boost

PostPosted: 31 Oct 2017, 18:52
by jobenmoe
hiker {l Wrote}:
Auria {l Wrote}:As for nitro, however, there is no simple way to do it, except by editing all tracks, or editing the code (not sure you're willing to go there)

If you compile yourself, therer might be an easy option: in src/tracks/track.cpp lines 1863:

for (unsigned int i=0; i<root->getNumNodes(); i++)
{l Code}: {l Select All Code}
        {
            const XMLNode *node = root->getNode(i);
            const std::string &name = node->getName();
            if (name=="banana"      || name=="item"      ||
                name=="small-nitro" || name=="big-nitro" ||
                name=="easter-egg"                           )
            {
                itemCommand(node);
            }
        }   // for i<root->getNumNodes()

I haven't verified it, but if you remove the two nitro comparisons, no nitro should be created.

Let us know how you go, I am always glad to see STK used in research.

Cheers,
Joerg


I've commented out this bit and it disabled all in game items! Thanks for the help.

As far as our research, we are trying to see how the representation of brain activity of gameplay (supertuxkart) by comparing evoked neural responses to visual features of the game.

Our paper, is here
http://www.sciencedirect.com/science/ar ... 1917304299

We are doing a series of experiments using STK and we plan to see if we can predict the next move of the user (i.e. go left or right) based on looking only at neural response and we want to see how better neural response is in predicting the players movement in comparison to the visual ques in the game (i.e. optical flow).

Thanks again for the help!
Jason