#### Hello!

It looks like you're new here. If you want to get involved, click one of these buttons!

# [Guide] Hitman 2016

edited December 2016

Hitman (2016) Screenshot Guide

Cheat Engine Table

[Camera]

Insert to enable the camera (only have to do this once)
Home to enable custom FOV
End to toggle freecam on and off

Numpad 2/8 = move camera forward\backward
Numpad 4/6 = move camera side to side (strafe)
Numpad 3/9 = move camera up and down
(Hold ALT for faster movement, CTRL for slower movement)

Numpad + and - to increase\decrease FOV
F5 to lock mouse movement (see high-res screenshots section for more details)

[Timestop]

F3 to enable
F3 again to pause
F4 to resume

High Resolution Screenshots

Hitman supports dynamic resolution switching in windowed mode (aka, "Hotsampling"). This allows you to easily switch to different aspect ratios and resolutions on the fly.

Switching resolutions with SRWE can be tricky in Hitman as you need to alt-tab back into the game for the new resolution to kick in. However, mouse movement outside of the game is still being recorded inside the game. As a result, you must lock the mouse movement with F5 while the freecam is enabled before alt-tabbing to change resolutions. Otherwise you will lose your camera angle when you alt-tab back in.

I've zipped up my SRWE profiles (organized in folders from narrow to wide) if anyone wants them.

• Hopefully Otis will throw up a better table with normalized camera movement. In the meantime, I wanted to get this guide up =)
• edited November 2016
Nice!

I think I can finish the camera movement table today. Had a lot of problems with calling windows functions from x64 asm yesterday as you need to reserve space on the stack but how much is unclear, and CE also caused problems because a 'jmp newmem' is converted to 'jmp qword ptr [address]' if 'newmem' is in globalalloc-ed memory, and [address] is the address right after the jmp statement. the latter is more bytes but I didn't realize that, game crashed every time. But! it now stays alive and 'all' I have to do is fix the alignment of the vector in the SSE instructions, as you currently move in the wrong direction ;).

That mouselock is a great idea, it should be in every camera table :)

(edit) I think the camera matrix starts at [camera]+40. 16 floats form the matrix. Bottom row is camera coords x, y, z, 1.0, as by D3D convention (row major matrices).
m11, m12, m13, m14m21, m22, m23, m24m31, m32, m33, m34m41, m42, m43, m44
m41 is x, m42 is y, m43 is z coordinates. Lookat vector is [x, y, z, w]: m31, m32, m33, m34 (where m34 is not used, but intel's SSEs read 128 bytes at a time).

So that's usable for the table to move relative to a vector. Will use that to soup up the table today. The matrix is usable for a better camera altogether with tilt, will try to do that later as I already wanted to implement that but never had a good game to test it with, now I do 8) The lockmouse disables writing the entire matrix (as SSE instructions can write 128 bytes at a time so the code uses the same code for each row) so that can be used to do our own matrix manipulation like Hatti does too, including tilt and translation (movement) and rotation. This is a PITA in asm though (but not in C where you can even call into D3D helper functions to do it for you).

(edit) I have it working now with the movement related to the lookat vector (the 3rd row see above). Some cleaning up to do to the code, adding the mouselock and then it's good to go :) It also moves a bit too fast so some tweaking is in order, but that's minor. Will have it ready later today. No AOB scanning in this table, so if that's required an additional init step is needed.
• You can use this hud toggle to get rid of button prompts:

• edited November 2016
Here it is :) https://gist.github.com/FransBouma/6b41665b14d006be32d081ff69ded3a4

Smooth as butter. I commented a lot of the code, so it should be reasonably easy to understand, and re-use for other games too: after all. The main thread's functionality is controlled by subscripts which simply set flags on/off so the user has proper feedback whether e.g. mouse lock is enabled or not in CE.

Keys:

Enable: INS. You have to do this once.
Fov enable: HOME: you can then inc/dec fov with num+/- and reset it with num *. Separated out for widescreen so you don't need to enable the camera for fov changes during gameplay
Camera enable: END. Movement: Num 4/6: X, Num 8/2: Y, Num 9/3: Z. Pressing movement key with alt moves faster, with Ctrl moves slower.
Mouse lock: F5. Works when camera is enabled. Movement still works with keys, not with mouse/Right stick.

Timestop: F3 enable once. then F3 stop/F4 continue.

Happy screenshotting, y'all!
• edited November 2016
So I loaded up the Bangkok level and enabled your camera. Flying boats. They fall back down when the camera is disabled :P

I noticed a few other oddities.

If you look up and then strafe the camera right\left, it also moves up and down (Z coordinate). That seems wrong.

Other than that, I changed it to be more like WASD (8456 on numpad). 7 and 9 for Z coordinate. That frees up 1 and 3 if you ever manage to get tilt working. I think that's how Hattiwatti sets his up.
• edited November 2016

So I loaded up the Bangkok level and enabled your camera. Flying boats. They fall back down when the camera is disabled :P

Hmm. I used the same interception code to grab the camera struct address from your table. It's at line 49. Loading 'bangkok' indeed gives a flying boat at the start... hmm. Your table doesn't have that. Weird. Will look into that!

I noticed a few other oddities.

If you look up and then strafe the camera right\left, it also moves up and down (Z coordinate). That seems wrong.
That's a bug, I see it now too. Will look into that.

Other than that, I changed it to be more like WASD (8456 on numpad). 7 and 9 for Z coordinate. That frees up 1 and 3 if you ever manage to get tilt working. I think that's how Hattiwatti sets his up.
I could change these indeed, I kept them the same as the original camera. Personally I'd like to have tilt elsewhere, like pageup/down as I often press the wrong key with hatti's camera, tilting the camera. Anyway, that's minor.

I'll look into these issues.

(edit) Fixed the flying boat issue, was a bug in the address intercept code, I forgot to jump to the original code if the check failed.
It then showed issues with the movement, so it's definitely not right. :/ Weird thing is, I used it for an hour or so this afternoon without any issues. The vector is definitely right, but it appears something's off. What's particularly weird is that when you enable the camera, you should simply stay at the same point and move the look vector around with the mouse, but you're then also moving the camera to a different location. That's odd. As if the overwrites are messed up :/
• edited November 2016
Fixed the flying boats and the movement issue that I ran into after that. The issue about Z getting update when moving left/right with a vector pointing up/down is not fixed yet. Updated the gist.

(edit) bug about Z getting updated when strafing sideways is a bug in the shuffle instruction at line 270 and 292: it should set the Z factor to 0 there, but ... it doesn't. Very odd I never noticed this in the darksiders II table, or it 'happened to work' there perhaps by accident. Anyway, this is on paper a simple bug to fix, but these shuffle instructions are a serious PITA to get right. Will try.
• FIXED :) See updated gist.
• edited November 2016
... and the game updated to 1.7.0, and no table works anymore.

*sigh*. Luckily 'all' we now have to do is find back the bloody addresses. Will try. (note to self, don't do camera coord scans when you ran an old table and disabled it, so the old code gets inserted on top of a random spot in the exe).
(edit) Timestop still works. Looking at their news page, https://hitman.com/updates/november-update-release-notes, they also plan a december update. Gawd, in a world where no game ever gets a patch, they're patching like mad. don't know whether I should be happy or sad. ;)

(edit) With assembly search I was able to correct the camera code in the table for v1.7.0. Lock mouse and FoV still don't work... stay tuned.
• edited November 2016
FIXED. https://gist.github.com/FransBouma/6b41665b14d006be32d081ff69ded3a4#file-hitman_2016_final_smoothcamera_1-7-0-ct

Solely by searching asm. I'll see if I can find time to AOB scan it, will be later this week. Should be doable.
• Searching ASM? How's that work?
• Searching ASM? How's that work?

In memory view you can do 'Search' -> Find assembly code. You can then specify one or more statements and the range of addresses. It will then find all the occurrences and list them for you. Doubleclicking them will bring you to the address the statement is at :)
• OtisInf said:

FIXED. https://gist.github.com/FransBouma/6b41665b14d006be32d081ff69ded3a4#file-hitman_2016_final_smoothcamera_1-7-0-ct

Solely by searching asm. I'll see if I can find time to AOB scan it, will be later this week. Should be doable.

I've been testing it for the past hour and here's some feedback :)

- playing with freecam crashes the game after about 30sec of usage
- I've only tested it in Paris, Sapienza and Bangkok but it seems freecam isn't working properly in Bangkok level. I can get the mouse movement going but no control over numpad coordinates
- timestop isn't working for me at all. It only seems to slow down the game very slightly and that's about it..and it was the same with Jim's previous version of the table

• never047 said:

OtisInf said:

FIXED. https://gist.github.com/FransBouma/6b41665b14d006be32d081ff69ded3a4#file-hitman_2016_final_smoothcamera_1-7-0-ct

Solely by searching asm. I'll see if I can find time to AOB scan it, will be later this week. Should be doable.

I've been testing it for the past hour and here's some feedback :)

- playing with freecam crashes the game after about 30sec of usage
- I've only tested it in Paris, Sapienza and Bangkok but it seems freecam isn't working properly in Bangkok level. I can get the mouse movement going but no control over numpad coordinates
- timestop isn't working for me at all. It only seems to slow down the game very slightly and that's about it..and it was the same with Jim's previous version of the table
The table is for v1.7, you're sure you're using v1.7? I used it for over half an hour, worked fine. Also tested bangkok where it worked fine too. timestop has worked for a while now. Strange you have problems with it though. I use the steam version.
• Yup, 1.7 Steam version
6.6 CE version