•     Please make sure you check the Support FAQ and relevant Guides before you create a new thread in this section!

Hosting Server Gravity

Posts
1,384
Likes
1,306
It used to be possible. Don't remember if they disallowed the command or not.

g_gravity was the cheat for it years ago. Maybe you need to /rcon devmap:)?

Wait, it is possible. I remember during Christmas some servers had events where gravity was changed.
 
Posts
92
Likes
39
It used to be possible. Don't remember if they disallowed the command or not.

g_gravity was the cheat for it years ago. Maybe you need to /rcon devmap:)?

Wait, it is possible. I remember during Christmas some servers had events where gravity was changed.
Yeap, I saw that on xmas too, but forgot to ask there :C
 
Posts
1,384
Likes
1,306
Ask a dev, or go to the aod forums and ask there. Pretty sure it was their server with all the Christmas stuff.
Viserys would probably know but I think shes mia at the moment.
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
In case you're still interested, I've found some way to change g_gravity.

There is a file "jampgamex86.dll" in "Jedi Academy\GameData\MBII\MBII.pk3".
Extract it, open in any hex editor. Search for "g_gravity" string.
There will be one match, and just before that, at offset 0x139F60, there will be actual value: 800.
Change it to the one you want, save file.
Now patched jampgamex86 should be given to the game; it's possible to do it by repacking of MBII.pk3.
Or, you can temporary move MBII.pk3 to some unrelated folder, and leave jampgamex86.dll in "Jedi Academy\GameData\MBII", but also it's needed to delete jampgamex86 from "Jedi Academy\GameData" and from "My Documents\My Games\OpenJK\MBII", if any.
When you start MBII, gravity will be changed to value you've written into jampgamex86.dll.
If gravity will still the same, that's probably because there is unpatched jampgamex86.dll somewhere, you have to find and delete it.

As you can see, this is not very handy method; no way to change value from a console, have to use hex editor every time.
Also, I see no way to set gravity value bigger than 999.

Another way is patching jampDed.exe:
Open "jampDed.exe" in hex editor, go to offset 0x120F3.
If everything is right, current value at that offset is 0x74. Change it to 0xEB, save file.
Start server, now "g_gravity" is no longer read only, as well as (probably) all other variables.
In case you're too lazy to patch it by yourself, I've uploaded modified file.

The problem is that value of g_gravity is reset after each round. Very sad. :(

The ultimate method is to fork OpenJKDed.exe and modifying it to make g_gravity not read only and block jampgamex86 from resetting it each round. Do it yourself.
GitHub - JACoders/OpenJK: Community effort to maintain and improve Jedi Academy + Jedi Outcast released by Raven Software

d22a2fb0364e.png


c7bd19142535.png


6b77e4b8b359.png


2d74778838e9.png


8f902c599509.png


d523179636a4.png


898a4cbf628c.png


d4b7b8f518c7.png


00693e357996.jpg


e38c0a59d5bd.jpg
 

Attachments

  • jampDed.hack.zip
    396.7 KB · Views: 218
Last edited:

StarWarsGeek

Internal Beta Team
Posts
497
Likes
403
The problem is that value of g_gravity is reset after each round. Very sad. :(
This is because the gravity is set by the map itself with the gravity value in worldspawn. Easiest way to change gravity permanently is probably editting worldspawn on a per-map basis. No hacking required, just some decompile/recompiling bsps. :p Although this does require you to do each map you want individually.
 
Last edited:
Top