View previous topic :: View next topic |
Author |
Message |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 3:02 am Post subject: alloc (newmem,2048) meaning |
|
|
What does the line Code: | alloc (newmem,2048) | mean in the injection code?
|
|
Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
|
Back to top |
|
 |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 4:55 am Post subject: |
|
|
Could you then please explain why the following codes in the attached picture cause my game to run slower when executed. The top is instant build. On the left of it is my code and the right is the memory view. The bottom is instant unit production
Description: |
|
Filesize: |
60.39 KB |
Viewed: |
25803 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Mon Jul 08, 2013 5:24 am Post subject: |
|
|
that depends on the game.
perhaps it doesn't expect instant build, and every time something is build it goes into a infinite loop waiting till the build counter is increased by one (which never happens because it's already build), until it give up because it took too long
animations for example
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Mon Jul 08, 2013 7:14 am Post subject: |
|
|
Check what accesses it.
Perhaps other stuff are using the given op codes.
also, if you know how much time is required for unit to be build or instant unit production,
Why not just sub that amount from the source..
_________________
I'm rusty and getting older, help me re-learn lua. |
|
Back to top |
|
 |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 7:57 am Post subject: |
|
|
So if it has animations that happen as the building happens it could be that? If I maybe force the animations to complete would it then make it run better?
|
|
Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Mon Jul 08, 2013 8:40 am Post subject: |
|
|
Instant animation is NOT instant build or production.
_________________
I'm rusty and getting older, help me re-learn lua. |
|
Back to top |
|
 |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 11:02 am Post subject: |
|
|
I am fully aware of that. What I'm stating is along with reducing the time it takes to build I should speed up the animation thus preventing confusion on the game?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Mon Jul 08, 2013 11:24 am Post subject: |
|
|
it was just an example
it might just as well be a secondary timer, or a mutex that has a lock
so try not to instantly build it, but near instant build
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Jul 08, 2013 1:57 pm Post subject: |
|
|
Does the game run slowly only during build times, or is the game always running slowly when the script(s) are enabled?
By the way, you are repeating code unnecessarily in your scripts.
|
|
Back to top |
|
 |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 2:01 pm Post subject: |
|
|
GNIREENIGNE the whole game runs slowly when the script is enabled not only during build times. And could you then show me how to make my code less? Thanx in advance
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Jul 08, 2013 2:19 pm Post subject: |
|
|
In that case, the reason(s) could have nothing to do with a timer associated with the build sequence etc. It may be more difficult to remedy, in this case.
Regarding your script(s), you can paste them here, in their entirety, within code brackets, and we can take a look at them.
|
|
Back to top |
|
 |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 3:58 pm Post subject: |
|
|
Instant Build for Buildings
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem:
mov [ebx],edx
sub [ebx],edx
test ecx,ecx
jne WW2Mod.dll+30EA69
originalcode:
sub [ebx],edx
test ecx,ecx
jne WW2Mod.dll+30EA69
exit:
jmp returnhere
"WW2Mod.dll"+30EA5D:
jmp newmem
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"WW2Mod.dll"+30EA5D:
sub [ebx],edx
test ecx,ecx
jne WW2Mod.dll+30EA69
//Alt: db 29 13 85 C9 75 06 |
Instant Unit Production Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem:
fstp dword ptr [ebp+2C]
mov [ebp+2C],1
fldz
originalcode:
fstp dword ptr [ebp+2C]
fldz
exit:
jmp returnhere
"WW2Mod.dll"+1D53EF:
jmp newmem
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"WW2Mod.dll"+1D53EF:
fstp dword ptr [ebp+2C]
fldz
//Alt: db D9 5D 2C D9 EE |
The thing is there is a table I downloaded which was made by greenseed and when I activate them they do not cause the lag such as my own codes. I've always wanted to learn how to do instant build and thought now is a good time to start so that's why I have made my own table. Greenseeds table can be found at the following url http://www.cheatengine.org/forum/viewtopic.php?p=5325172&sid=916c4304a3a50944c361cced82c6da01 I must also state that I have learned on this specific game the build timer counts down so for instance the unit build uses Code: | fstp dword ptr [ebp+2C] | which from my understanding loads a float which holds the time it takes to produce the unit and building build uses Code: | sub [ebx],edx
test ecx,ecx | which also from my understanding means that ebx is the time it takes for a building to be built and edx has a value which is dependant on how many engineers you have building it and each second or whatever the code is run to subtract the amount of engineers from the build time until it gets to zero. I appologise if I explained that incorrectly or badly but thats the best I can discribe
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Jul 08, 2013 5:14 pm Post subject: |
|
|
SILENT_SUFFERER wrote: | Instant Build for Buildings
Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem:
mov [ebx],edx
sub [ebx],edx
test ecx,ecx
jne WW2Mod.dll+30EA69
jmp returnhere //add this to jump over originalcode
originalcode:
sub [ebx],edx //this code is repeating
test ecx,ecx //this code is repeating
jne WW2Mod.dll+30EA69 //this code is repeating
exit:
jmp returnhere
"WW2Mod.dll"+30EA5D:
jmp newmem
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"WW2Mod.dll"+30EA5D:
sub [ebx],edx
test ecx,ecx
jne WW2Mod.dll+30EA69
//Alt: db 29 13 85 C9 75 06 |
| -See my //comments above. Apply similar code for both scripts to avoid repeating code unnecessarily. Better yet, if no compare is required for player/enemy, remove 'originalcode' and 'exit' altogether.
Do greenseed's tables work for your game, for instant build? Do your tables work? I am curious, because the injection points are not the same.
SILENT_SUFFERER wrote: | the build timer counts down so for instance the unit build uses Code: | fstp dword ptr [ebp+2C] | which from my understanding loads a float which holds the time it takes to produce the unit | -If this is true, simply figure out what value is required at [ebp+2C] for instant build, and move that value in to [ebp+2C] before it gets loaded. For example, if the building process is complete when the timer reaches zero seconds, simply do this:
Code: |
cmp [ebp+2C],0
je originalcode
mov [ebp+2C],0
originalcode:
fstp dword ptr [ebp+2C] |
SILENT_SUFFERER wrote: | and building build uses Code: | sub [ebx],edx
test ecx,ecx | which also from my understanding means that ebx is the time it takes for a building to be built and edx has a value which is dependant on how many engineers you have building it and each second or whatever the code is run to subtract the amount of engineers from the build time until it gets to zero. | -If this is true, simply move 1 in to [ebx] (or whatever value is necessary) just before the subtraction occurs:
Code: |
cmp [ebx],1
jle originalcode
mov [ebx],1
originalcode:
sub [ebx],edx
test ecx,ecx |
|
|
Back to top |
|
 |
SILENT_SUFFERER Cheater
Reputation: 0
Joined: 28 Mar 2012 Posts: 28
|
Posted: Mon Jul 08, 2013 5:20 pm Post subject: |
|
|
I will take a good look tomorrow at ur comments and try write my script over. I know the entry points differ as I took his entry point, looked at what address it accessed and then looked at what writes to that address. Both mine and his tables work
|
|
Back to top |
|
 |
|