 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
DigitalEpicness How do I cheat?
Reputation: 0
Joined: 07 Oct 2015 Posts: 2
|
Posted: Wed Oct 07, 2015 5:35 am Post subject: Field of View fix for old Stalker build |
|
|
I am having trouble creating a FoV table for Stalker (Build 1935). I think I found the right address(es) that controls the FoV. (Mind you, there seem to be two. One for weapon zoom and one overall for freecam.)
They both change from 90 to 55 (float) once zoomed in through the weapon's scope. If I set up both of them to lets say 30 (nevermind the unchecked box in the pics below, I checked it the other time), only one of them sticks with it, the other one goes back to 90. However, if I zoom in again, the fov of 30 is being applied by both again.
So I take it one of them is hardcoded and requires an actual edit of one of the libraries, am I right about this?
I know that SoC, CS and CoP have all their FoVs in the xrGame.dll stored. I did some reverse engineering (if you will^^) by comparing a FoV mod with the original files and changed the overall FoV myself by editing the values. But the structure of the xrGame.dll of the older builds is nothing like that unfortunatly.
Where do I go from here? The addresses are not inside the build's xrGame.dll it seems? Any tips for a newbie? ^.^
| Description: |
|
| Filesize: |
467.91 KB |
| Viewed: |
8529 Time(s) |

|
| Description: |
|
| Filesize: |
506.89 KB |
| Viewed: |
8529 Time(s) |

|
|
|
| Back to top |
|
 |
deama1234 Master Cheater
Reputation: 3
Joined: 20 Dec 2014 Posts: 328
|
Posted: Wed Oct 07, 2015 10:07 am Post subject: |
|
|
| Right click the freecam address and see "what writes to this address", then zoom in and out and post here what comes up.
|
|
| Back to top |
|
 |
Gniarf Grandmaster Cheater Supreme
Reputation: 43
Joined: 12 Mar 2012 Posts: 1285
|
Posted: Wed Oct 07, 2015 10:47 am Post subject: Re: Field of View fix for old Stalker build |
|
|
I can't bother to find a cinematic (if any) to test the freecam fov, so I only did the weapon zoomed in/out ones.
tweaking zoomed in fov: edit the hud_fov variable in user.ltx. Your zoomed in fov is hud_fov*90 degrees.
tweaking zoomed out fov (I'll call that the ZOF):
1-Set your debugger to windows debugger in CE settings->debugger options. VEH is usually better but doesn't seem to work in this game.
2-Right click on weapon fov->find out what writes.... You'll get 2 results: | Code: | xrGame.dll+1F5A9D - 89 81 50010000 - mov [ecx+00000150],eax <-used what zooming in
xrGame.dll+1F5AB7 - C7 81 50010000 0000B442 - mov [ecx+00000150],42B40000 <- 42B40000(hex) = 90.0 (float). | Obviously you'll want to edit the 2nd one to set the zof, and you'll notice that it has no effect.
Interpretation: weapon fov is read when zooming in, but not when zooming out, so you have to find what takes the weapon fov and feeds it to to fov setter when zooming it, then find the fov setter, then find who is giving a 90.0 to the fov setter when zooming out. It can take a while but this time it's exceptionally short.
3-Find out what accesses the weapon fov, there will be 3 results: the 2 writers you found in #2 and: | Code: | | xrGame.dll+1C6EDE - 8B 8F 50010000 - mov ecx,[edi+00000150] |
4-Now you have to find what is done with this ecx. Click show disassembler, you should see:
| Code: | xrGame.dll+1C6EDE - 8B 8F 50010000 - mov ecx,[edi+00000150] <-this is what reads the weapon fov into ecx, let's follow ecx
xrGame.dll+1C6EE4 - 8B 54 24 14 - mov edx,[esp+14]
xrGame.dll+1C6EE8 - 51 - push ecx <-push either means "save before overwriting" or "pass as function argument". Let's keep reading
xrGame.dll+1C6EE9 - 52 - push edx
xrGame.dll+1C6EEA - EB 0A - jmp xrGame.dll+1C6EF6 <-jump from here...
xrGame.dll+1C6EEC - 8B 44 24 14 - mov eax,[esp+14]
xrGame.dll+1C6EF0 - 68 0000B442 - push 42B40000 <- 42B40000 = 90.0 O_o
xrGame.dll+1C6EF5 - 50 - push eax
xrGame.dll+1C6EF6 - 8B CD - mov ecx,ebp <-...land there
xrGame.dll+1C6EF8 - E8 E3D70000 - call xrGame.dll+1D46E0 <- function call, this is actually the FoV setter | 2 pushs shortly followed by a call hints that the 2 pushs are likely arguments passed on to the function, so basically sometimes we are passing edx & WeaponFov to xrGame.dll+1D46E0. Moreover the code between the jump and the call is there because it is used sometimes, so sometimes we are passing whatever & 90.0 to xrGame.dll+1D46E0. Well, that 90.0 now awfully looks lika a zof, right? Best way to know for sure is to test, so add xrGame.dll+1C6EF0+1 to your cheat table as a float and tweak.
5-Profit.
Fun fact: once you edit the hud_fov you'll notice that the weapon fov still reads 55 when zoomed in regardless of what it actually looks like ingame.
| DigitalEpicness wrote: | | Any tips for a newbie? ^.^ | Not underestimating config files, doing the built-in tutorial (help->cheat engine tutorial) which covers the code finder aka the "find out what ***" menus.
_________________
DO NOT PM me if you want help on making/fixing/using a hack. |
|
| Back to top |
|
 |
DigitalEpicness How do I cheat?
Reputation: 0
Joined: 07 Oct 2015 Posts: 2
|
Posted: Fri Oct 09, 2015 3:53 am Post subject: |
|
|
Thanks to both of you, especially @Gniarf for that detailed workthrough!
I think I got it figured out now how to approach FoV in the stalker games.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|