|
Post by Forsaken on Jul 19, 2014 16:54:44 GMT
Hi everyone!I've been working on a simple program to keep track of all the statistics in real-time while playing Hitman 2 and Hitman Contracts. It allows me to understand better how the game works and try new things with an instant feedback, which is really useful to plan routes. It's now ready to use and working pretty well so I'm sharing it with you in case you're interested in this. Just run the .exe while playing, select the game in the menu and all the values will be updated automatically when you're doing a mission. I'm playing in windowed mode so it doesn't overlap with the game. Values tracked: - Current mission name & number
- Timer with 3 decimals (H2SA only, coming soon for HC)
- Shots fired
- Close encounters
- Headshots
- Alerts
- Enemies killed
- Enemies harmed
- Innocents killed
- Innocents harmed
- Silent Assassin rating
Please let me know if you have any questions/suggestions.
|
|
|
Post by Forsaken on Jul 19, 2014 16:55:45 GMT
Things I found out by messing around with this: - A close encounter happens as soon as a guard pulls out his gun, even if he doesn't fire at you.
- Alerts are counted when the guard is investigating a dead body and not when he's seeing it and running at it, so you can do things like placing a body to make a guard come and sedate him before he investigates it.
- When an enemy is accidentally killed by another enemy, it doesn't count as an enemy killed for you. I believe it's the same thing for innocents.
|
|
lanayru
Member
What are you poking around here for?
Posts: 18
|
Post by lanayru on Jul 19, 2014 16:56:31 GMT
this looks awesome, any plans for contracts version or no?
|
|
|
Post by Forsaken on Jul 19, 2014 16:57:59 GMT
this looks awesome, any plans for contracts version or no? If enough people like it I'll probably do one for other Hitman games.
|
|
Virgilia
Member
The Witch of Rewrites
Posts: 5
|
Post by Virgilia on Jul 19, 2014 18:40:51 GMT
I'm quite curious as to how you found the memory addresses of the tracked values to begin with. Unless my understanding of the process is completely wrong.
Basically explain everything, thanks.
|
|
|
Post by Forsaken on Jul 19, 2014 19:20:36 GMT
I'm quite curious as to how you found the memory addresses of the tracked values to begin with. Unless my understanding of the process is completely wrong.
I used Cheat Engine to find the addresses. Basically you need to start by looking for the variable you want . If you want to get the number of shots fired, you fire like 3 shots in the air and scan for all the variables equal to 3. You will get a huge list of addresses all equal to 3 and one of them is the one you want so you need to keep scanning until you find it. You fire 2 shots more then scan for 5, you'll get less addresses, just continue doing that until you have only one address left. Now you found the address for this variable but if you change the mission or restart the game for example you'll notice that the value of this address is no longer linked to the number of shots fired. This is because the variables are stored in different places in the memory when you restart everything, so now the variable you're looking for is located somewhere else and you have to start from the beginning if you want to find it again. To prevent this, you need to use pointers. Since you're a game developer I guess you already know what a pointer is, a variable containing the address of another variable. Some pointers have static addresses, which means that they will always be located at the same address in the memory no matter what happens in the game, if you restart it or anything. These are the ones you need and once you found your variable, Cheat Engine allows you to do a pointer scan on this variable to found all the pointers referencing this variable. It's kind of the same process as finding the variable because you have a huge list of pointers and you need to find one that always contains your variable. There are other ways to find them, but this is the general idea. You have to find the static pointers referencing your variable and use them in your program to track the values.
|
|
Virgilia
Member
The Witch of Rewrites
Posts: 5
|
Post by Virgilia on Jul 19, 2014 20:03:45 GMT
I'm quite curious as to how you found the memory addresses of the tracked values to begin with. Unless my understanding of the process is completely wrong.
Cheat Engine allows you to do a pointer scan on this variable to found all the pointers referencing this variable. That explained everything. I did not actually know CheatEngine had that. Many thanks.
|
|
Kotti
Administrator
Posts: 55
|
Post by Kotti on Jul 19, 2014 22:01:07 GMT
Consider me extremely impressed and interested, that's a very useful tool! Since ratings are tied to the statistics, would it be possible to get the tracker to display the rating based on the current stats mid level? It could be useful to see exactly where the game draws the line between Silent Assassin and Professional - at least to someone like me who doesn't fully understand the rating systems in the older games. I'm also interested in possibly seeing something like this for the other games.
|
|
|
Post by Forsaken on Jul 19, 2014 23:00:07 GMT
Since ratings are tied to the statistics, would it be possible to get the tracker to display the rating based on the current stats mid level? I tried and I couldn't find any variable related to the rating during the mission, so I guess the rating is only calculated at the end. I'll keep messing around to see if I can figure out a way to know exactly how this rating is calculated but it's going to be tough.
|
|
|
Post by Forsaken on Jul 20, 2014 17:53:29 GMT
I have updated the program, the Silent Assassin rating is now tracked in real-time as well.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 20, 2014 18:40:24 GMT
I have updated the program, the Silent Assassin rating is now tracked in real-time as well. Good job!
|
|
|
Post by Forsaken on Jul 21, 2014 14:23:08 GMT
Another update, I fixed the bug where the number of shots fired was a bit glitchy during the mission and was reseting to 0 at the score screen. Everything should be working fine now.
I bought Contracts and will look into it, I'm planning to make this tool work for Hitman 2, Contracts and Blood money. It will probably take some time to make.
|
|
|
Post by Forsaken on Jul 21, 2014 22:18:35 GMT
It should now work for Hitman Contracts as well. The timer and the Silent Assassin rating aren't available yet, I'll look into it later.
The HC version is a bit dirty right now but I wanted to make it available before going to bed in case someone wants to play around with it. Every value tracked should still work, I will improve it tomorrow to hopefully add the timer and then I'll have to figure out if the SA rating is similar to H2SA.
|
|
HitGod47
Member
Nothing is impossible.
Posts: 57
|
Post by HitGod47 on Jul 22, 2014 0:23:14 GMT
Damn fine job I'm sure this will come in handy for a lot of people.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 23, 2014 17:46:04 GMT
Well, it doesn't work for Hitman Contracts for me.
|
|
|
Post by Forsaken on Jul 23, 2014 18:08:14 GMT
Well, it doesn't work for Hitman Contracts for me. Damn, can you tell me what's wrong?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 23, 2014 18:40:31 GMT
Well, it doesn't work for Hitman Contracts for me. Damn, can you tell me what's wrong? I wish I could. It certainly realizes that the game running, but it seems like it's not tracking levels (and with it shots etc.). Maybe it's something about the settings? I think pointer may be pointing to a wrong address (I think, but it doesn't mean it's like this - I only today even realized there is something called a pointer, playing with Cheat Engine, trying ti figure it out).
Also - I'm using Steam, non-modified version (aside from adding lines that start the game in windowed mode).
I've deleted my config files and now suddenly it works. Don't really know what was it about. Sorry, if I've just made you loose some time. -- EDIT -- Apparently, if you set Texture Filtering to Anisotropic (requires restarting a game), then it doesn't work.
|
|
|
Post by Forsaken on Jul 23, 2014 19:48:58 GMT
It certainly realizes that the game running, but it seems like it's not tracking levels (and with it shots etc.). Yes it's probably because the pointers aren't working. Basically, when you do a pointer scan for a specific value you can filter them and end up with a list of working pointers, but they may only work on your machine so it's best to load this list on another machine and take one that is working on this one as well. Since my old PC died last week I couldn't do it so I used a virtual machine and I thought I would be enough but it seems like it's not. Did you test it on Hitman 2?
|
|
|
Post by Forsaken on Jul 23, 2014 20:53:21 GMT
The pointer to get the map name for Hitman Contracts was indeed wrong, I fixed it using another virtual machine.
Can someone test it and tell me if it works now?
|
|
Kotti
Administrator
Posts: 55
|
Post by Kotti on Jul 23, 2014 21:05:54 GMT
The new version doesn't work for me, it shows that HC is running but doesn't track the level or any values. The old version, at least based on a quick test, worked as it should.
|
|