RelicNews Forums

Go Back   RelicNews Forums > Relic Games > Company of Heroes
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Reply
 
Thread Tools
Old 26th Jul 09, 12:39 PM Forum Rules   # 1
YurdleTheTurtle
Senior Member
 
YurdleTheTurtle's Avatar
 
Join Date: Jun 2008
Location: GTA, Ontario, Canada

Tutorial Guide: How to create Object ID Lists for CoH Replay Analyzer (Upd Jul 27 09)

Tutorial Guide: How to create Object ID Lists for Company of Heroes Replay Analyzer

Note:
This is a work in progress. Please be patient while the guide is updated over time.


Introduction


For the uninitiated, Company of Heroes Replay Analyzer (CoHRA) is exactly what the title implies - it is a program that basically gives you many details on CoH replays. By using this program, you can see how all players behaved during a game, as it notes the time of commands and what commands they were, among many other things.

Recently, the creator of Replay Analyzer, known as "dyxtra", has released some tools and instructions on how users can edit CoHRA in order to fix incorrect or missing commands, as he can no longer fix all the errors on his own (time constraints, etc.). In its current state, CoHRA works great, but unfortunately it will display many incorrect (or miss some completely) commands.

In order to do this, users must find errors, then edit a file so CoHRA will now recognize the new ID list you have provided. It's a lot easier said than done, however.

That's because these tools were never intended for public release, so they are not very user-friendly. If you've had experience with some sort of coding, the cryptic-like series of text and lack of any easy-to-use interface should not be new to you. If you've never had experience though, it can be incredibly tedious/daunting to learn how to fix something so seemingly simple.

Working to fix up errors (or customize messages, if you like) is quite tedious to learn, so this tutorial guide will hopefully make it easier for you learn how to start creating your own object ID lists. These ID lists can also be shared with others.

I don't think I'll be able to create my own ID list. Are there any shared ones I can use?

There does not seem to be many, if any, shared lists right now. I am currently working on fixing as many errors as I can, but obviously this is a tedious process, as you will soon find out.

It could be quite a while before I get my list ready to share, and the same will probably apply for others.

Tutorial Guide: How to create Object ID Lists for Company of Heroes Replay Analyzer

Fixing Simple Errors (Misnamed Object ID):

Simple errors refers to an incorrect command for something you already know. In the below example, I know its incorrect because I remember getting G43 upgrades, but not the MP44. The time of the upgrade also reinforces this - you can't get an MP44 within the first minute!

Since you already know what the command is incorrectly replacing, all you have to do is a simple text change. This is fairly easy to do. CoHRA Helper is not used in this case.

1. Acquire the Tools
You will need:
-Company of Heroes Replay Analyzer
-COHRA Helper
-readme_external.txt (Inside the archive for CoHRA)
-readme.txt (Inside the archive for COHRA Helper)

Head on over to http://dyxtra.com/coh/ and download the COH Replay Analyzer if you don't already have it. Next, download the "COHRA Helper" program. The link is near the right hand side of the screen, below the dancing banana.

Be sure to keep the readme_external.txt and readme.txt text files handy. They are the instructions provided by dyxtra, and you'll need them for reference.


Important:
Put your COHRA.exe in an empty folder. You will need this folder later on.

2. Read the Instructions

The instructions provided in both text files are fairly clear about explaining how things work. I will, however, elaborate on one vaguely explained thing that confused me initially.
Note: If the instructions provided by dyxtra are still too confusing, leave a comment and I may include more instructions in this guide.

CoHRA can be influenced by a custom external ID list. This is what users can customize in order to fix errors and create their own messages.

This file is called cohra.dat. Note that this file does not exist initially.

Using a text editor, such as Notepad, create cohra.dat by making a new file and saving it as cohra.dat. Put this file inside the same folder where your cohra.exe is located.

Whenever you want to open the cohra.dat file (and you will need to), right click on it, select "Open with", and select your text editor.

Do not worry about using COHRA Helper yet. Keep on reading for further instructions.

3. Find an Error

Okay, hopefully we now understand how CoHRA works and we have everything in place.

Now we need an incorrect/missing command to fix. There are quite a lot of these. Here's an example that you can follow through with on your own.



In this example, the Gewehr 43 (G43) upgrade used during the replay is incorrectly called the MP44 upgrade in CoHRA's display.

4. Fix the Error

In order to fix the above error, we need to:
-Find out the ID CoHRA identifies as the MP44 upgrade.
-Fix this error by changing the text string to the correct command (in this case, the G43 upgrade).

First, in order to find the ID CoHRA identifies as the MP44 upgrade, we need to use some of the tools provided.

This is where things can get confusing, so follow along carefully.


1. Boot up COH Replay Analyzer, and choose a replay to view. You can find replays in your C:\Documents and Settings\<Your Username>\My Documents\My Games\Company of Heroes\playback folder.

If you want to follow along with this example, download the replay that I used, here: http://forums.relicnews.com/showthread.php?t=230794

2. In COH Replay Analyzer, go to Options > Export ID Data. This will export out a complete ID list called cohra_ids.txt that CoHRA uses to recognize things. Save it wherever is most convenient.

3. Open the cohra_ids.txt file. Press "ctrl+F" (press ctrl and f at the same time) and search for MP44.

4. Assuming you read the instructions, you'll should know how the parameters work. Seeing as we're in version 2.6, the first parameter should be 9. The second parameter should be 0, denoting Classic Multiplayer. The text string is what we're looking for.

So, you would search for an item, then keep searching until you found the right version/mode. If you search for "MP44", you'll hit the first one in version 1.0-1.2. It should be called something like "0, 0, UPGRADE...."

You would have to keep hitting the search button until you got to version you want. In this case, we're looking for the MP44's ID in version 2.6 or later. Keep searching until you find 9,0,UPGRADE,"MP44 Sturmgewehr (Assault Rifles)",0xe4,0

We now know what COHRA identifies the Panzer Elite MP44 upgrade as, in version 2.6.


5. Head to the folder where your cohra.exe and cohra.dat files are located. Remember, the cohra.dat file does not exist at first- you have to create it by using a text editor and saving it as cohra.dat. Open cohra.dat with a text editor, like Notepad.

This is where your custom external ID list actually is, or in other words, "where the magic happens".

Since we found out the full ID of the MP44 earlier, paste 9,0,UPGRADE,"MP44 Sturmgewehr (Assault Rifles)",0xe4,0 into the blank .dat file.

Now, change the text string of the MP44. Whatever is written between those two quote (") signs is what will appear whenever CoHRA sees the object ID. Obviously, I named it "Gewehr 43 Package" for easy identification.

6. You're done! Save the cohra.dat file. If you want to test your changes, close CoH Replay Analyzer and open it up again. Any replays that incorrectly called the G43 upgrade an MP44 upgrade, will now be called whatever you put in the text string.



The above picture shows you what the cohra.dat file looks like, as well as what the new change brought about.

Please note that this was a simple example. There are more complicated errors, which is where COHRA Helper comes into play.

Fixing Incorrect Commands

Something abundant in the latest version of CoHRA, there are quite a lot of missing commands due to version 2.600 changing the ID's of almost everything.

Missing commands are a bit more complicated to fix as you first have to find out what's missing, which means having a keen eye and some memory to realize what's missing. It uses the same steps as the simple error, but now with some additional CoHRA Helper related steps.

1. Find an Error



In this example, I noticed an upgrade was missing. Remembering what happened during the game, and comparing to other upgrades, I realized it must have been the Hetzer's Spotting Scope upgrade. This also led to the discovery of the Hetzer call-in ability also mising from CoHRA's display.

2. Fix the Error

Recall in the last example, in order to fix an incorrect command, we had to find to the ID of said command, then replace the text string with so it will display correctly.

In this case though, we don't know the ID of the missing upgrade and ability. If you search for the Spotting Scope upgrade in cohra_ids.txt, you'll find it, but this is not the incorrect command that you need to fix.

What we need to do is find the command's ID in the replay, then correct the error by editing the cohra.dat file.

This is where CoHRA Helper comes into play, and this is also where things start to get a bit more tedious.

1. Open up CoH Replay Analyzer and open a replay.

If you want to follow along with this example, download the replay that I used, here: http://forums.relicnews.com/showthread.php?t=230794

2. "Drag-and-drop" the same replay into the cohra_helper.exe.

3. CoHRA Helper should now pop up, allowing you to see lots of cryptic, colourful text. Assuming you read the readme.txt, you should know what the buttons at the top do. They toggle what player ID/commands you are viewing. E8 measures the first player (by position in map), E9 measures the second, etc.

You should also know how to interpret the stuff. The only important thing to look at is the blue coloured text on the right hand side. These are their ID's.

Since CoHRA Helper goes by fixed positions, in a 1vs1, if an Axis player starts on the "#1" side, they would appear in E8. Likewise, if the Allied player started on the first starting position, they would appear in E8.

A good way to distinguish which player commands are which is to look up the IDs of certain units in cohra_ids.txt. For example, 0x141 is Kettenkrad and 0x121 is Panzer Grenadier. Only a PE player would have these at the top of the list.

The replay I used here has my commands in E9.

4. Once you're viewing the correct player commands, your next step is to find the IDs that CoHRA did not display.

Since we don't know what they are, we have to figure it out through the process of elimination (hence, why this can get tedious).

I recommend finding a reference point. This means find the ID of something you know, that occured near the time of the incorrect/missing command ID you are trying to find.

In this example, I noticed that the missing upgrade at 15:59 is just below a Panzer Grenadier reinforcement. Of course, finding the right "0x121" can be a bit troubling, so I need another reference point.

I noticed I obtained the "Hetzer Tank" command ability above. This is unique and only occurs once in a game (obtaining a Command ability permanently by spending CP's), so this will make a good first reference point.

5. Of course, we don't know the ID of the Hetzer Tank command ability, but this is easy to find. Open up cohra_ids.txt, and do a search (ctrl + F) for "Hetzer Tank" (without the quotes).

Remember the parameters. We're looking for the ability in version 2.6, so the first and second parameters are 9 and 0 respectively. However, you must notice that this is the Command Tree ability, and not the missing call-in ability. Thus, you want to look for 9,0,COMMANDTREE,"Hetzer Tank",0x137,0.

6. We now know the object ID of the command tree Hetzer Tank is 0x137. Since this only occurs once in a game, you should be able to find it within COHRA Helper.

7. Look in COHRA Helper for a blue 0x137 ID on the right hand side. If you're following along this example, it should be within the last 1/4 of a scroll away from reaching bottom.

Now, we want to move down to find the ID of the missing upgrade, as well as the missing special ability. As mentioned before, the missing upgrade is right below a Panzer Grenadier reinforcement. Since there were several other PG reinforcements before this one, simply follow along the pattern. If you're following this guide's example, it should be the 6th "0x121" counting from below "0x137".

8. We have now found the ID of the Spotting Scope uograde. It is "0xd8".

But what about that missing call-in ability? In COHRA Helper, you'll notice an ID tag that stands out from the rest of the ID, and is located several lines above the "0xd8" tag. It is "0x11c". If you search for this tag in cohra_ids.txt, you won't find it linking to any Hetzer call-ins, which explains why its completely missing from the display.



9. Like the last example, now it is a simple matter of copying and pasting the commands into the cohra.dat files, and editing the ID or text string appropriately.

To fix the missing Spotting Scope, search for "Spotting Scope" (without the quotes) in cohra_ids.txt. Remembering the parameters, you should find 9,0,UPGRADE,"Spotting Scope",0xd7,0.

Paste this into cohra.dat, but correct the ID. As we saw in COHRA Helper, it should be "0xd8". Thus, the end result will be
9,0,UPGRADE,"Spotting Scope",0xd8,0.

To fix the missing command for the Hetzer Tank call-in ability, we must correct the ID for it so CoHRA will recognize it. Search for "Hetzer Tank" in cohra_ids.txt, but note that we are looking for the special ability, not the command tree.

Thus, you are looking for 9,0,SPECIALABILITY,"Hetzer Tank",0x11e,1.

Paste this into cohra.dat, and correct the ID by changing it to what it actually is; "0x11c".

Therefore the end result will be:
9,0,SPECIALABILITY,"Hetzer Tank",0x11c,1.

10. Save cohra.dat and you are done! To see the changes, close CoHRA and open it up again. Any replays that were missing commands for the Spotting Scope or the Hetzer Tank call-in ability, will now display properly.

Don't forget that you can edit the text string to your liking. Since I prefer more informative, formal writing, as well as to distinguish things from other similar commands, I have these displayed as "Spotting Scope (Hetzer)" and "Hetzer Tank Call-in".



This was obviously a more complicated problem, but with these basics down, you should be set to go on other errors.

Basically, in general the steps are:
1. Find an error
2a. If you know what command is being incorrectly replaced, simply find the ID of the incorrect command being displayed, and change the text string.
2b. If you don't know what command is being incorrectly displayed, you have to figure out what it is using logic. Sometimes you may have to view the replay too. This applies to missing commands as well.
3. Solve the error by finding the ID of the incorrect command, paste it into cohra.dat, and replace the text string or ID as appropriate.

-----------------------

This is a work in progress. Please be patient while the guide is updated over time.
__________________

Last edited by YurdleTheTurtle : 27th Jul 09 at 3:05 PM.
YurdleTheTurtle is offline  
Old 26th Jul 09, 2:04 PM Forum Rules   # 2
Maniac
Trying to wake up
 
Maniac's Avatar
 
Join Date: Dec 2006

I'll check it out tomorrow, I like using this tool, good work Yurdle.
__________________
Maniac is online now Send a message via MSN to Maniac  
Old 27th Jul 09, 2:52 PM Forum Rules   # 3
YurdleTheTurtle
Senior Member
 
YurdleTheTurtle's Avatar
 
Join Date: Jun 2008
Location: GTA, Ontario, Canada

Updated the guide with info on how to fix missing commands. This requires CoHRA Helper and makes things more complicated.

Looking for feedback on the guide, although it seems likely a lot of people are not interested in fixing up CoHRA on their own. I bet you're all waiting for me to make a complete list to share!

Would be willing to get help/help others who want to speed up the process of fixing up all the object ID's. There's a lot to fix and it would be a lot easier if I had someone else doing the other factions.

Anyways, leave comments/feedback, I want to know if this guide has helped or if its confusing, etc.
YurdleTheTurtle is offline  
Reply



Go Back   RelicNews Forums > Relic Games > Company of Heroes
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 4:53 AM.

Page generated in 0.29331994 seconds (93.31% PHP - 6.69% MySQL) with 11 queries

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.