Street Legal Racing: Redline v2.3.1

Street Legal Racing: Redline v2.3.1

View Stats:
xof 26 Jul, 2024 @ 3:46pm
The long-search for changing the game's gravity.
I noticed in the older version of SLRR had their own Config.Java where it holds a lot of 'valuable' config lines of code for the game - one particular code I am currently looking for is 'gravity'

The steam version of SLRR does *not* have a Config.Java file - which kinda hinders my progress on a mod I am currently working on.

Looking deeper into the game's files, I couldn't really find anything related to the game's gravity - which got me thinking that I might never be able to finish this mod lmao,

BUT I turned to the 'discussions' tab to see if anyone else could provide me with an explanation or an answer or - dare I say help me look and find a way to change the game's gravity.
Last edited by xof; 26 Jul, 2024 @ 3:47pm
Originally posted by DevilMcSheep:
You can just add Config.gravity = whatever; to Init.java. Default is 9.81.
Another fun one is Config.ground_friction! 1.0 is default there.
< >
Showing 1-11 of 11 comments
The author of this thread has indicated that this post answers the original topic.
DevilMcSheep 26 Jul, 2024 @ 3:57pm 
You can just add Config.gravity = whatever; to Init.java. Default is 9.81.
Another fun one is Config.ground_friction! 1.0 is default there.
xof 26 Jul, 2024 @ 4:04pm 
Can you give me a rundown of this whole process, if you don't mind?
Do I just add Config.gravity into the Init.java file and give it a value?
Last edited by xof; 26 Jul, 2024 @ 4:04pm
DevilMcSheep 26 Jul, 2024 @ 4:10pm 
Yeah, just put that line anywhere in the constructor.
You'll figure it out :D
Last edited by DevilMcSheep; 26 Jul, 2024 @ 4:11pm
xof 26 Jul, 2024 @ 4:12pm 
Originally posted by DevilMcSheep:
Yeah, just put that line anywhere in the constructor.
You'll figure it out :D
Hey - thanks! If I encounter any more issues my monkey-brain can't figure out, I'll let you know

Another question; Does it matter where I put the 'Config.gravity' or can it be anywhere?

For now - I'll leave the discussion open
Last edited by xof; 26 Jul, 2024 @ 4:13pm
DevilMcSheep 26 Jul, 2024 @ 4:18pm 
Well, you do need to put it somewhere the code will actually be run :D
So yeah, inside the constructor, and not inside the restart_apply branch.
Also, make sure the line/block isn't commented.
You know, basic java stuff :D
xof 26 Jul, 2024 @ 4:26pm 
Originally posted by DevilMcSheep:
Well, you do need to put it somewhere the code will actually be run :D
So yeah, inside the constructor, and not inside the restart_apply branch.
Also, make sure the line/block isn't commented.
You know, basic java stuff :D


Noted.
xof 26 Jul, 2024 @ 4:48pm 
Yo, MC, you a TRUE MC! Thank you so much, tried a value of 0.80 just to test if the gravity works, and it does!! So - again thank you! You've saved me and my upcoming mods!
DevilMcSheep 26 Jul, 2024 @ 5:01pm 
Hell yeah! Link it here once it's out! :)
xof 26 Jul, 2024 @ 5:03pm 
Originally posted by DevilMcSheep:
Hell yeah! Link it here once it's out! :)
Link it? I'll upload it directly to the steam workshop!
I'll make sure to credit you as well for helping me change the gravity!

(Honestly didn't know I *had* to make the code myself, but hey - it works!)
Last edited by xof; 26 Jul, 2024 @ 5:03pm
DevilMcSheep 26 Jul, 2024 @ 5:07pm 
I mean linking the workshop item! Would be nice to get a notification, and for anyone else reading to see what this question was all about :)
xof 26 Jul, 2024 @ 5:11pm 
Originally posted by DevilMcSheep:
I mean linking the workshop item! Would be nice to get a notification, and for anyone else reading to see what this question was all about :)
Sure, I could do that! Once I am done with the mod though, haha!
< >
Showing 1-11 of 11 comments
Per page: 1530 50