Project X Forums http://px.worms2d.info/forum/ |
|
DebugErr - Game Speed Manipulation Utilities http://px.worms2d.info/forum/viewtopic.php?f=13&t=2011 |
Page 1 of 1 |
Author: | DebugErr [ Mon Aug 18, 2014 7:46 pm ] | ||
Post subject: | DebugErr - Game Speed Manipulation Utilities | ||
Hi there, I crafted out a library which allows you to get and set the game speed. The game speed is the game parameter which can be set to 150% in the lobby by the /150 command or manipulated by the number rows in replays. I also wrote two utilities to play around with it. They also allow you to change the physics speed or the sound speed separately. Please note that there's still a bug that it doesn't reset the game manipulations, so you probably have to restart your game if you quitted it while a speed manipulation was active. If someone knows how to catch the event of the game being (abruptly) closed, please tell me. It requires hack_utils by Steps (included in the download) to allow process memory editing and manipulation of game code. As a general note before going into details about the libs attached, I put methods and variables under "namespaces"; they're prefixed with my acronym "deb_" and the library name. For example, if I mentioned the method "SetGameSpeed(int value)" here, it's actually deb_gamespeed_SetGameSpeed(int value). That's because of the global namespace clutter PX generates. The deb_gamespeed_priv_* methods are of no interest to you and may only be used by the library itself internally. deb_gamespeed This is the core of the game speed manipulation. The following behavior is triggered at game start when using this library:
The following methods are provided by the library for you to use:
Technical details: To allow the manipulation of the game speed with the current hacking possibilities, the opcode which retrieves the speed is manipulated to not return the value at address x, but a constant modified by you: Original code: WA+0x4FBB1A - MOV EAX, [ESI+4C720000]; Hacked code: WA+0x4FBB1A - MOV EAX, <deb_gamespeed_physicsSpeed>; NOP; Another opcode is manipulated which retrieves the sound sample rate to allow pitching of the sounds. Original code: WA+0x545AB1 - MOV EAX, [EBX+B80B0000]; Hacked code: WA+0x545AB1 - MOV EAX, <deb_gamespeed_soundSpeed>; NOP; As you might have guessed this is not the "official" method call to change the game speed as this isn't possible with the current hacking tools. ManipulateOpcode(bool enable) keeps track of the opcode state and must not be called by you. Even though the library is protected against dumb usage as much as possible, this doesn't include some users dumbness. Right now, this opcode stays manipulated even after leaving the game, so if the speed hasn't been reset, even normal, non-PX games will have the last speed set (but other players won't see that except as lags since they don't run a manipulated WA executable). Restart the game to fix this. Replays may also not be toggled in speed anymore after using a game speed manipulating weapon if you're playing offline. deb_slowmotion Provides a small test utility to be used in game. It halfs the game speed if used and duplicates it if used again. At the turns end, it is reset anyways. deb_lsd This provides a slightly advanced testing utility which "wobbles" the game speed when used, it gets faster and slower and faster and over and again, as if you're on LSD, but without the nice colors (still writing the deb_palette lib for global color modifications yet). Resets the effect when the turn ends or the utility is used again. I also attached a small PX scheme to test out the utilities instantly, they replace laser sight and invisibility. Greetards
|
Author: | Danylo [ Mon Aug 25, 2014 10:01 am ] |
Post subject: | Re: DebugErr - Game Speed Manipulation Utilities |
ahahahahahahahhaha ![]() that's funny a lot ![]() great libs for kaos scheme!!! ![]() |
Author: | Danylo [ Mon Aug 25, 2014 10:06 am ] |
Post subject: | Re: DebugErr - Game Speed Manipulation Utilities |
btw, your idea with namespace is super great. there are so much mess with this PX globals that i can't stand it D: PX community must consider this issue i think! we must follow some conventions... no entuser - no moderator of coding style :| |
Author: | DebugErr [ Tue Aug 26, 2014 5:33 pm ] |
Post subject: | Re: DebugErr - Game Speed Manipulation Utilities |
Noone can tell me how to code! ![]() Would be nice to rewamp some libs by putting them into namespaces. I don't know if my rules are perfect yet. |
Author: | DebugErr [ Mon Mar 02, 2015 6:35 pm ] |
Post subject: | Re: DebugErr - Game Speed Manipulation Utilities |
Updated, you can now separately set, get and reset physics and sound speed. The game speed still does both synchronized, so your old scripts stay compatible. |
Author: | -raffie- [ Tue Mar 03, 2015 9:56 am ] |
Post subject: | Re: DebugErr - Game Speed Manipulation Utilities |
Wow, completely forgot about this xD Fucking awesome that you're still updating it! |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |