It is possible, but you don't know it for sure until you reverse engineer the whole file format.Is it possible that unknown data block inside NAM_1.dat contains size checks for these 3 chunks?
Help with The Godfather II .str files
- ikskoks
- Moderator
- Posts: 942
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 506 times
- Been thanked: 234 times
- Contact:
Re: Help with The Godfather II .str files
-
venixuc
- beginner
- Posts: 22
- Joined: Tue Aug 13, 2019 3:00 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Help with The Godfather II .str files
Alright. I'll see which option is better - doing this or simply keeping an eye on number of characters in Granados names block.you don't know it for sure until you reverse engineer the whole file format.
The latter is definitely going to be different than editing other 5 names blocks (located in NAM_1.dat) because I don't have spare zerobytes in NAM_2.bal; with NAM_1.dat's blocks and almost 3000 spare zerobytes created during compression, editing can be done (almost) without a care in this world (I have around 250 additional characters per block, so no worries here).
Unless I find a way to make the game read compressed NAM_2.bal content properly. This would've created 34130 extra zerobytes, but only if it can be done at all.
-
venixuc
- beginner
- Posts: 22
- Joined: Tue Aug 13, 2019 3:00 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Help with The Godfather II .str files
So, I couldn't figure out what's going on with the unknown data block inside decompressed NAM_1.dat - the only thing I found out was the fact that it contains font characters.
But I managed to create new Granados mobster names and keep the total number of characters (2787) intact. I'll have to do the same thing with Roth Syndicate mobsters, since their names are located in NAM_2.bal as well.
As for the NAM_1.dat blocks, I created new names for Corleones (generic mobsters and recruits), Rosatos (Carmine and Tony) and Manganos; only the Almeidas remain.
After that, I'll import these names into NAM_1.dat (for compressed strings) and .str archive (for NAM_2.bal strings), and adjust the pointer values; so everything about editing this text .str archive is pretty much clear.
______________________________________________________________________________________________________
In the meantime, I wanted to try something else. While changing character clothes (player or made men) there is an option for changing the clothes color. I'd like to edit that color palette by replacing several colors with shades of gray and red, and I'd also like to add the black color.
Here are some screenshots:
https://ibb.co/FBZBmWn
https://ibb.co/YtkJyKv
The problem is, I don't know the rgb values for those colors. I've been searching the ram with keywords such as "color", "rgb", "hsv" and "hsl" and looking up the neighboring values (using hex editor) but I couldn't find anything useful. I suspect that these values are stored in allcharacters.str or globals_global.str, but I don't know which values I should be looking for so I decided to find them in the active memory first.
The options in the clothes editor are highlighted; in the first screenshot, the color option is highlighted and the color is lighter, and in another one I highlighted the last option which made the color dimmer. This highlighter affects the displayed color, so I'm unable to simply take a screenshot and use the color picker to get the rgb value.
So, I'm trying to find something in the ram without knowing its value, or even the address. Could Cheat Engine be useful for this?
But I managed to create new Granados mobster names and keep the total number of characters (2787) intact. I'll have to do the same thing with Roth Syndicate mobsters, since their names are located in NAM_2.bal as well.
As for the NAM_1.dat blocks, I created new names for Corleones (generic mobsters and recruits), Rosatos (Carmine and Tony) and Manganos; only the Almeidas remain.
After that, I'll import these names into NAM_1.dat (for compressed strings) and .str archive (for NAM_2.bal strings), and adjust the pointer values; so everything about editing this text .str archive is pretty much clear.
______________________________________________________________________________________________________
In the meantime, I wanted to try something else. While changing character clothes (player or made men) there is an option for changing the clothes color. I'd like to edit that color palette by replacing several colors with shades of gray and red, and I'd also like to add the black color.
Here are some screenshots:
https://ibb.co/FBZBmWn
https://ibb.co/YtkJyKv
The problem is, I don't know the rgb values for those colors. I've been searching the ram with keywords such as "color", "rgb", "hsv" and "hsl" and looking up the neighboring values (using hex editor) but I couldn't find anything useful. I suspect that these values are stored in allcharacters.str or globals_global.str, but I don't know which values I should be looking for so I decided to find them in the active memory first.
The options in the clothes editor are highlighted; in the first screenshot, the color option is highlighted and the color is lighter, and in another one I highlighted the last option which made the color dimmer. This highlighter affects the displayed color, so I'm unable to simply take a screenshot and use the color picker to get the rgb value.
So, I'm trying to find something in the ram without knowing its value, or even the address. Could Cheat Engine be useful for this?
- ikskoks
- Moderator
- Posts: 942
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 506 times
- Been thanked: 234 times
- Contact:
Re: Help with The Godfather II .str files
Yeah, probably. You can scan for the unknown value first, then change the color, then scan again and repeat that until you find correct value.Could Cheat Engine be useful for this?
-
Jack Sparrow
- ultra-n00b
- Posts: 3
- Joined: Thu Sep 03, 2020 1:13 pm
-
venixuc
- beginner
- Posts: 22
- Joined: Tue Aug 13, 2019 3:00 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Help with The Godfather II .str files
The problem is, I'm unsure what data type I should scan for (binary, 4 bytes, 8 bytes, grouped etc.). When I scan the memory, the values aren't really helpful - I change the color and repeat the scan but I can't see anything that looks like rgb value. I'm definitely confused; also I can't find the way to run this game in windowed mode.You can scan for the unknown value first, then change the color, then scan again and repeat that until you find correct value.
You mean the .str archive? It's attached in my first post on this topic, along with its chunks extracted with QuickBMS (using dead_space_3.bms). I'm not trying to translate the game, I just want to change mobster names. Something like this:Send me language files I have a special tool
https://ibb.co/bXcqbKZ (original)
https://ibb.co/NYjSCx9 (edited)
And please, just post in this topic, no need for private messages - any valuable information should be publically available, in case anyone else needs help with this.
Anyways, if the attached files are somehow damaged or unavailable, let me know and I'll upload them again. Thanks for joining the discussion.
- ikskoks
- Moderator
- Posts: 942
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 506 times
- Been thanked: 234 times
- Contact:
Re: Help with The Godfather II .str files
That's never clear on the beginning. You need to guess it.I'm unsure what data type I should scan for (binary, 4 bytes, 8 bytes, grouped etc.)
I would start with 4 bytes int, then 2 bytes int, then float, then double, then any other.
Did you try to use DXWnd?also I can't find the way to run this game in windowed mode.
-
venixuc
- beginner
- Posts: 22
- Joined: Tue Aug 13, 2019 3:00 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Help with The Godfather II .str files
Ok, but when one of the following value types - "binary", "string", "grouped" or "array of byte" is selected, there is no option for "unknown initial value" scan. Obviously, the "string" type isn't the right one for this, but what about the other three? I checked the ram with hex editor, and rgb value isn't stored as rgb (r,g,b) (like carcols in gta games); I think it could be like this: B2 40 38 (just an example). Hypothetically, if the correct value type is "byte" or "2 bytes", and the rgb value is split, then this could be impossible to detect.That's never clear on the beginning. You need to guess it.
I would start with 4 bytes int, then 2 bytes int, then float, then double, then any other.
Yes, but it crashes very often with this game. I tested some other games (gta sa/vc, manhunt/manhunt2) and they run fine. BTW, is it necessary to use windowed mode? So far I've been minimizing the game in order to use Cheat Engine - can this affect the scan results?Did you try to use DXWnd?
- ikskoks
- Moderator
- Posts: 942
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 506 times
- Been thanked: 234 times
- Contact:
Re: Help with The Godfather II .str files
To be honest I'm not cheat engine expert, I did only few simple cheats in ASM :p
There is a forum about cheat engine when you could get better help than from me https://forum.cheatengine.org/
But I think that you could keep guessing with all types as I said or you could search for 1 byte and use "Value between" option to narrow your results.
For example if you will search for "R" byte from your RGB value and you choose red color or pink color in game's color picker, you will know that "R" byte will be high, so you can choose value between 170 and 255.
As for DXWnd, I had also lot of problems with it when I was using it with older games.
I can only tell you that there are many configuration options for DXWnd, you can see many hooks, hacks and fixes there, so maybe it's worth to try change some options.
And I think that you don't have to minimize the game, you can just use ALT+TAB (but it sometimes depends on the game).
There is a forum about cheat engine when you could get better help than from me https://forum.cheatengine.org/
But I think that you could keep guessing with all types as I said or you could search for 1 byte and use "Value between" option to narrow your results.
For example if you will search for "R" byte from your RGB value and you choose red color or pink color in game's color picker, you will know that "R" byte will be high, so you can choose value between 170 and 255.
As for DXWnd, I had also lot of problems with it when I was using it with older games.
I can only tell you that there are many configuration options for DXWnd, you can see many hooks, hacks and fixes there, so maybe it's worth to try change some options.
And I think that you don't have to minimize the game, you can just use ALT+TAB (but it sometimes depends on the game).
-
venixuc
- beginner
- Posts: 22
- Joined: Tue Aug 13, 2019 3:00 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Help with The Godfather II .str files
I was wondering if rgb values are stored similarly in GTA SA and GF2, so I checked GTA SA's ram (with hex editor) during mod garages visit to see how carcols.dat is written in memory there. For example, color no. 86 rgb value is 46,91,32; so I searched for 34 36 2C 39 31 2C 33 32 (surmising that character has its own hex value, decoded view 46,91,32) and 2E 2C 5B 2C 20 (surmising that entire numbers are stored as hex, decoded view .,[, ).
I couldn't find the color value with this type of search. So, if the rgb value isn't stored in ram like this, then how could it be stored? Before I try to find the unknown rgb value, I have to make sure that I can find the known one.
I couldn't find the color value with this type of search. So, if the rgb value isn't stored in ram like this, then how could it be stored? Before I try to find the unknown rgb value, I have to make sure that I can find the known one.
- ikskoks
- Moderator
- Posts: 942
- Joined: Thu Jul 26, 2012 5:06 pm
- Location: Poland, Łódź
- Has thanked: 506 times
- Been thanked: 234 times
- Contact:
Re: Help with The Godfather II .str files
As I said, I don't have enough knowledge about this topic to help you.So, if the rgb value isn't stored in ram like this, then how could it be stored?
Better check those topics
https://www.cheatengine.org/forum/viewt ... 15b5cc4bd3
https://reverseengineering.stackexchang ... s-beginner
or create a new one on cheat engine forum.
-
venixuc
- beginner
- Posts: 22
- Joined: Tue Aug 13, 2019 3:00 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Help with The Godfather II .str files
Ok. If I somehow get this done, i'll return to post the rgb values and (maybe) to analyze the .str archive that contains them.I don't have enough knowledge about this topic to help you.
Thanks for helping so far.
_____________________________________________________________________________________________________
And here's a small tip about NAM_2.bal text.
While it's not possible to make this chunk larger, it's still possible to make some strings longer, by "hijacking" bytes from text strings reserved for multiplayer mode (since it's dead anyways).

