How to edit monster/boss values?
#1
22 January 2016 - 08:32 AM
#2
22 January 2016 - 09:12 AM
1) an hex-editor (a program which displays and allows to modify the raw data of a file),
2) some basic knowledge of hexadecimal,
3) luck and/or patience and/or cleverness.
Once you've opened you game file with your hex-editor, you need to search where the number corresponding to an enemy is stored. Usually, all the informations about an enemy are stored near each other, so if you find something related to an enemy, its HP should not be far away.
The simplest try would be to use the "Find" feature of your hex-editor to directly search for the HP of the enemy that you seek, modify that number and then check in-game if it worked. However, you will likely not find the right data on the first try. Let's say you seek for Penance's 12,000,000 HP : every single "12,000,000" number used in the raw data of the game could be found instead of finding exactly the one corresponding to Penance's HP.
Actually, since HP can be pretty big numbers in FFX, I'd bet this "naïve" method will be quiet efficient. I don't think there are so many instances of "12,000,000" in the whole game file. It can even be sharpened if you try concatenated datas. For instance, if you know that the HP and MP are always one next to the other, you can search for "12,000,000 999" and have less chances to fall on something unrelated to Penance's HP and MP.
That's what is the best solution : if you know (or guess right) the structure of the data file, you'll know what to search and how to search it. An incredibly useful thing to know about the structure of the data is : how are texts stored. Your hex-editor may be displaying raw datas as ANSI or UNICODE (UTF-8) texts, but FFX likely uses its own text format. The first thing you should try to learn is the "alphabet" of the game (it's also called the charmap for "character map").
I don't know the charmap for FFX but it might be something like
0x10 -> A
0x11 -> B
0x12 -> C
...
0x30 -> a
0x31 -> b
0x32 -> c
...
(that's the charmap for FF IX)
A good way to guess the charmap is to try hex-editing a memory card save file instead of the game. Since they can be modified by the player, the names "Tidus", "Valefor", "Ifrit"... should be written in some way in memory card saves. And since those files are much smaller than the whole game, it'll be easier to locate them.
This is especially true since there exists a tool (FFXED) that allows to edit memory card saves for FFX.
Once you know the alphabet, all you have to do is to search in the game file for "Penance" or whatever boss you want and search its HP somewhere around that name ("somewhere around" can be quiet large for a PS2 game though, so it can still be a bit tedious to find).
As a final note, all the "searches" I advised you to do should be done using "hexadecimal searches". That's why you need to know how to count in hexadecimal. Something else you should find out is whether FFX is little-endian encoded or big-endian encoded (in one case, "12,000,000" is written 0x00B71B00 in hexadecimal, in the other case, it's written 0x001BB700).
Hope it helped. Good luck
#3
22 January 2016 - 10:12 AM
Tirlititi, on 22 January 2016 - 09:12 AM, said:
1) an hex-editor (a program which displays and allows to modify the raw data of a file),
2) some basic knowledge of hexadecimal,
3) luck and/or patience and/or cleverness.
Once you've opened you game file with your hex-editor, you need to search where the number corresponding to an enemy is stored. Usually, all the informations about an enemy are stored near each other, so if you find something related to an enemy, its HP should not be far away.
The simplest try would be to use the "Find" feature of your hex-editor to directly search for the HP of the enemy that you seek, modify that number and then check in-game if it worked. However, you will likely not find the right data on the first try. Let's say you seek for Penance's 12,000,000 HP : every single "12,000,000" number used in the raw data of the game could be found instead of finding exactly the one corresponding to Penance's HP.
Actually, since HP can be pretty big numbers in FFX, I'd bet this "naïve" method will be quiet efficient. I don't think there are so many instances of "12,000,000" in the whole game file. It can even be sharpened if you try concatenated datas. For instance, if you know that the HP and MP are always one next to the other, you can search for "12,000,000 999" and have less chances to fall on something unrelated to Penance's HP and MP.
That's what is the best solution : if you know (or guess right) the structure of the data file, you'll know what to search and how to search it. An incredibly useful thing to know about the structure of the data is : how are texts stored. Your hex-editor may be displaying raw datas as ANSI or UNICODE (UTF-8) texts, but FFX likely uses its own text format. The first thing you should try to learn is the "alphabet" of the game (it's also called the charmap for "character map").
I don't know the charmap for FFX but it might be something like
0x10 -> A
0x11 -> B
0x12 -> C
...
0x30 -> a
0x31 -> b
0x32 -> c
...
(that's the charmap for FF IX)
A good way to guess the charmap is to try hex-editing a memory card save file instead of the game. Since they can be modified by the player, the names "Tidus", "Valefor", "Ifrit"... should be written in some way in memory card saves. And since those files are much smaller than the whole game, it'll be easier to locate them.
This is especially true since there exists a tool (FFXED) that allows to edit memory card saves for FFX.
Once you know the alphabet, all you have to do is to search in the game file for "Penance" or whatever boss you want and search its HP somewhere around that name ("somewhere around" can be quiet large for a PS2 game though, so it can still be a bit tedious to find).
As a final note, all the "searches" I advised you to do should be done using "hexadecimal searches". That's why you need to know how to count in hexadecimal. Something else you should find out is whether FFX is little-endian encoded or big-endian encoded (in one case, "12,000,000" is written 0x00B71B00 in hexadecimal, in the other case, it's written 0x001BB700).
Hope it helped. Good luck
Wow thanks a lot I didn't know where to start but this is great
#4
22 January 2016 - 11:13 PM
#5
23 January 2016 - 03:29 AM
But there are a bunch of different hex-editors out there. There are none which is especially above the others, but it's up to you to find one you get used to.
However, there are several ones that are made specifically for ROM editing there :
http://www.romhackin...ies&category=13
Some of them surely have a few handful features for that.
#6
24 January 2016 - 03:31 AM
Second, if I was doing it correctly then I found some monster names in hexdecimal format. I used the program "FFX String Converter" which converted the boss name "Klikk" into "5A7B787A7A" and found two addresses. After that I found his 1500HP in Hex few long lines underneath. Very likely that this is the boss' HP, BUT I'm having difficulty testing it because the game crashes on startup due to the file size being changed by 1 kb. ATM trying to figure out a solution.
#7
24 January 2016 - 06:51 AM
That's why you shouldn't use programs such as Power ISO to re-import your modifications back inside the file. It'll likely screw up everything. You can use them to figure out the top-level structure of the file (where are the file datas, where are the CGI cutscenes...) but not a lot more.
Why did you need to change the file size?
#8
24 January 2016 - 02:47 PM
Oh yeah the power iso was not used at all. I just mentioned it because I didn't know if it could be helpful or not due to my limited knowledge.
#9
19 April 2016 - 09:27 AM
Any help would be greatly appreciated.
#10
19 April 2016 - 03:16 PM
#11
19 April 2016 - 11:23 PM
Hart-Hunt, on 19 April 2016 - 03:16 PM, said:
Hmm... FF7 and FF8 were easy for me to mod cause I didn't have to use hex editor at all. I tried to find the 'Klikk' monster's HP which should be 1500 but the next value of 1500 from the monster's name started really far from it. So I can't really tell if that's the HP value or just some other 1500 value. I assume I have to look for the values using hex, instead of the values FFX String converter gives me?
Sorry for sounding like a total newbie cause that's what I kinda really am when it comes to hex editing.
#12
20 April 2016 - 01:21 PM
30 – 0
31 – 1
32 – 2
33 – 3
34 – 4
35 – 5
36 – 6
37 – 7
38 – 8
39 – 9
3A – [space]
50 – A
51 – B
52 – C
53 – D
54 – E
55 – F
56 – G
57 – H
58 – I
59 – J
5A – K
5B – L
5C – M
5D – N
5E – O
5F – P
60 – Q
61 – R
62 – S
63 – T
64 – U
65 – V
66 – W
67 – X
68 – Y
69 – Z
70 – a
71 – b
72 – c
73 – d
74 – e
75 – f
76 – g
77 – h
78 – i
79 – j
7A – k
7B – l
7C – m
7D – n
7E – o
7F – p
80 – q
81 – r
82 – s
83 – t
84 – u
85 – v
86 – w
87 – x
88 – y
89 – z
FFX Enemy Stats
HP – 4 bytes
MP – 4 bytes
Overkill – 4 bytes
Str – 1 byte
Def – 1 byte
Mag – 1 byte
Mag Def – 1 byte
Agi – 1 byte
Luck – 1 byte
Evasion – 1 byte
HP is stored 108 bytes before the enemy name. In the International version there are two encodings of enemy stats. One with the English names, and one with the Japanese names. The game uses enemy stats from the one with the Japanese names.
A small side note, 70000 HP would be written 70 11 01 00.
#13
20 April 2016 - 05:28 PM
#14
21 April 2016 - 03:00 AM
LandonRay, on 20 April 2016 - 01:21 PM, said:
30 – 0
31 – 1
32 – 2
33 – 3
34 – 4
35 – 5
36 – 6
37 – 7
38 – 8
39 – 9
3A – [space]
50 – A
51 – B
52 – C
53 – D
54 – E
55 – F
56 – G
57 – H
58 – I
59 – J
5A – K
5B – L
5C – M
5D – N
5E – O
5F – P
60 – Q
61 – R
62 – S
63 – T
64 – U
65 – V
66 – W
67 – X
68 – Y
69 – Z
70 – a
71 – b
72 – c
73 – d
74 – e
75 – f
76 – g
77 – h
78 – i
79 – j
7A – k
7B – l
7C – m
7D – n
7E – o
7F – p
80 – q
81 – r
82 – s
83 – t
84 – u
85 – v
86 – w
87 – x
88 – y
89 – z
FFX Enemy Stats
HP – 4 bytes
MP – 4 bytes
Overkill – 4 bytes
Str – 1 byte
Def – 1 byte
Mag – 1 byte
Mag Def – 1 byte
Agi – 1 byte
Luck – 1 byte
Evasion – 1 byte
HP is stored 108 bytes before the enemy name. In the International version there are two encodings of enemy stats. One with the English names, and one with the Japanese names. The game uses enemy stats from the one with the Japanese names.
A small side note, 70000 HP would be written 70 11 01 00.
Wow thanks man. I've been trying hard to figure out the structure. I even thought the str, mag, vit, spr stats were after the actual names but this really clears it up! I managed to change the monsters' names but not anything else. But this will help me out a bunch I'm sure.
#15
21 April 2016 - 05:51 AM
Thanks a bunch.