Quote:
Originally Posted by sheep
@cali..
ok, i tested your trainer last night, that is one very odd trainer you have coded.. for instance.. why does just pressing the SHIFT key start a stream of writeprocessmemory calls? even before you press one of the other buttons, very odd.. and its certainly not good for the game attaching that stream onto a common key such as SHIFT.
instant build:
I used my FOW option to see the enemy and for some strange reason your INSTANT BUILD CODE doesnt break, which would indicate that the enemy DOES NOT!! get usage from the option.. BUT!!! they do.. i watched them several times raise 2 buildings at EXACTLY the same time, this is impossible because of the build times unless they were built instantly so the enemy are DEFINITLY getting the benefit from your instant build option..
mouse over:
your routines are very badly chosen.. the pointers are far from isolated and include all sorts of stray pointers which could easily crash the game if you write to the wrong one, atm the worst case was that the pointers strayed into several soliders i didnt want to give health or kill..
its rather funny that you yourself claim this is the EASY!!!! way and a copout.. yet.. doesnt look so easy that your not making mistakes.. prob best to judge things ONCE you got them correct instead of just assuming next time.
i wont go on.. i know how annoying it is people listing problems with ur trainers.. but i can assure u these are 100% factual errors.. not the shit that most idiots make up.. which i get my fare share aswell.. good luck in fixing them, from what you keep saying you dont have much time, eventually im sure u will get there.. good luck..
|
thanks for all of this info. i will look into it. i appreciate you looking at the code and giving me some pointers. perhaps i should look at different places to install the instant build code (maybe different places that aren't accessed). could it be also, that the enemy has two building structures (structures that build buildings). in those cases, two buildings could be raised at nearly the same time since two structures are doing the building simultaneously.
the shift key thing must be an artifact in the way that i coded the capture of the Shift-function keys. it checks first to see if shift is pressed and then checks to see if the function key is pressed. if function is pressed a 1,2,3 is sent to a variable. if no function pressed then 0 is sent to the variable. this sets the health code to do several things based on the variable's contents (nothing, invincible, normal, zerohealth). i don't think the shift key is used much in the game so this is how i coded it based on my thoughts of what to try. perhaps there is a better way?
regarding the global god mode vs. individual unit, it appears to me that if both troops (enemy and freindly) access the same functions to modify their health, then if their structures in memory are identical then it becomes harder to trace code down to find just code that is accessed by one and not the other when it comes to certain things like health. at least for me it is. it's so much simpler to breakpoint on friendly health and see what accesses it and then breakpoint on enemy health and see what accesses and voila, the only difference is when your mouse goes over it then it's easier to code health changes that way. for this game, though it presents some problems. the magic peice of code is the following in the cncgame.dat:
FLD DWORD PTR DS:[ECX+8]
RETN
this small peice of code is CALLed by other areas to access the troop health when you put the mouse over them. the two areas i concerned myself with were:
0047E4A3 8B06 MOV EAX,DWORD PTR DS:[ESI]
0047E4A5 8BCE MOV ECX,ESI
0047E4A7 FF50 18--> CALL DWORD PTR DS:[EAX+18]
0047E4AA D91B FSTP DWORD PTR DS:[EBX]
0047E4AC 5F POP EDI
health 2
0047E4F6 85C9 TEST ECX,ECX
0047E4F8 74 09 JE SHORT cnc3game.0047E503
0047E4FA 8B01 MOV EAX,DWORD PTR DS:[ECX]
0047E4FC FF50 18--> CALL DWORD PTR DS:[EAX+18]
0047E4FF D803 FADD DWORD PTR DS:[EBX]
0047E501 D91B FSTP DWORD PTR DS:[EBX]
health 1 is called mostly by buildings and health 2 mostly by troops
at any rate, an anomaly is that when a unit is being shot at, the code is also accessed (not just mouse over). so i didn't trace that fully. it also affects the god mode commands. for instance if you have selected a NOD troop and you are GDI and the NOD troops are shooting your GDI but you don't have GDI highlighted, just NOD, and you press F3 to set NOD to 0, then the GDI will sometimes get 0. even though you select each troop group with the mouse, each troop member has health individually and that FLD DWORD PTR DS:[ECX+8] function gets called by each of them in a loop. at any rate, yes-it was a little more of a challenge for this game than i anticipated, but i can work through the kinks. i never did find a loop of code that goes through only unit health of friendlies and i could not get any differences in the unit structures with freind/foe to make a global unit invincible option. i am curious how you found such a place as you told me earlier.
btw, is anyone having troubles with your trainers at CH with the Scrin mission?
also, i don't know where you accessed the health pointer when mouse over, but i didn't find alot of them and chose that one up there. so if you did something similar to me then likely you had units accessesing that code when friendlies where being shot at, just as i described. this may be the reason some people were complaining of random troops getting set to zero or invincible on the CH website. i saw those posts and it isn't always that people aren't reading the instructions. this isn't a jab at you, just something that i noticed when testing my own trainer and that function being called.
also, i still can't get the fog thing perfect. i have only a half-baked working solution that isn't instant and can't be turned off and on. i am curious how you did it. it drives me crazy that i cannot isolate the code perfectly.
i know you are busy too with trainer work and other coding ventures and so i appreciate the time with this. i also enjoy talking like this about the code and such and i always hope to learn more. thanks sheep-
best,
Cal