[WIP] Custom Game Settings (FF7)

  • Thread starter Thread starter Wutai Clan
  • Start date Start date
Status
Not open for further replies.
Here, this package contains three debug versions, try them all, and let me know which if any works. (Run in windowed mode for the test.)

http://www.mediafire.com/?d3apd6xwex9yc7g

Basically, I've disabled several features in each version, to try to narrow down where it's going wrong.

Here are the test descriptions.

DLL Load Test:

This test does nothing but show a messagebox, every other feature is disabled, if this doesn't work, it's a runtime\compile issue.

Console Only Test:

This test will just load the debug console, this will tell me if that's somehow causing issues. (Though it was disabled by default.)

No Logging Test:

This test will load everything, but disables all logging features, to determine whether the logging method is an issue.

---

I forgot to include the .ini file, just put this in a .txt file, and name it GameSettings.ini, if you don't still have a copy..

Code: [Select]
Code:
[Debug Console]Enabled = true[Infinite Item Use]Enabled = true[MP Regeneration Settings]Enabled = trueRate = 6[Random Battle Settings]Enabled = trueRate = 2[Battle Reward Multipliers]Enabled = trueEXP = 2GIL = 2AP = 2
 
Last edited:
In other news, I think I know how to fix this sense issue...

edit.  Not so easy.  Probably going to take a lot of messing.  I know what is wrong but to fix takes a bit more work :) I will send what I have learned in PM.
 
Last edited:
Works fine with me!  It seems that EXP and AP multiplier is a bit off, it sets too high values in game.
 
Works fine with me!  It seems that EXP and AP multiplier is a bit off, it sets too high values in game.
Which version did you try, the one from the last page, or the debug builds from this page, it's kind of important, I need to solve the issue of it not working for some people.

About the battle rewards, yeah, I thought they seemed kinda high, the code must loop, and apply the multiplier multiple times, or the code I used doesn't work as intended, I'll try to get some debug output on original values vs. modified values for Exp\Gil\AP, to figure out what's wrong.
 
Last edited:
So, no one intends to try the test builds?

Then let me lay it out plainly, this only effects some users, and whether it gets fixed or not, depends on whether or not you are cooperative and help me find the cause, it's your choice, it runs great for me. I'm trying to help you out.

Here are some possible causes. (In order of highest likelihood.)

1. You are missing some required file.

This could be my fault, it could be yours, or it could be Microsofts. (Hard to tell, until we figure out what if any required DLL's are missing.)

http://www.dependencywalker.com/

To find out if you are missing something required, download that tool, and click "File", choose "Open", and select my DLL, it will tell you if you have everything required to run my DLL installed.

This link will help you use the tool. (It's really easy.)
http://www.techerator.com/2010/05/resolve-missing-dll-errors-with-dependency-walker/

If you are missing a required file, report it, so I can track down the required library, and link the installer for others to use.

2. It's possible that something about one of libs, or my code is causing the issue, I have supplied a debug package above which will tell us where the issue might be, but, that requires you to run it, and report your results. (I left instructions above, on what needs to be done, and I need the results for all three DLL files.)

3. Some stray setting in VC++, is causing it to compile in such a way, that's incompatible with certain systems for some unknown reason. (I won't know until I rule out the other possibilities, and changing settings for no good reason, is more likely to break the project for everyone, than it is to fix it for you.)

4. If you got this far, and still can't run my project. It tells me numerous things, you have all the required files, my code isn't at fault, and the VC++ IDE isn't the issue. It's voodoo magic, or God himself smiting you, because it should be working, pure witchery, no doubt about it. ;)

But seriously, it should be one of the first three options, the test I've provided, will take no more than 10 minutes to complete.

It's up to you, these are the possible causes, I've given you the tools to help solve the issue, but I can't make you do anything.
 
Last edited:
It was the one from page 4, and i have unmodified ff7.exe

I'll try those test builds later today.
 
It was the one from page 4, and i have unmodified ff7.exe

I'll try those test builds later today.
If the one on page 4 worked for you, then you don't have to worry about this, this is only for people that can't run the regular build. (On page 4.)

Thanks though. :)

-------

Finally got around to testing GetCharacterData, and trying to decode it's return value.

Slot 0 = 0x00DBA498
Slot 1 = 0x00DBA8D8
Slot 2 = 0x00DBAD18

These were already known values(to me anyways.), I need to figure out where to go next, and I should be able to start getting the stats, etc,.

---

Edit: I don't know, I've tried various things to get the data out of those, I've cast the data to arrays in every way I could think of, it never seems to be correct.

I used inline ASM, and accessed the values like that, and it does return data, but, it doesn't seem to relate to the info found on the wiki. (ie, I checked the indexes, using exact byte counts listed to store the values, and it was all wrong.)

NFITC1, can you shed some light on this, that is the stats, etc, correct? It should be the same as the character map on the wiki, right?
 
Last edited:
One tip - character records are 132bytes (0x84) long in the savemap - check if it's actually a savemap you're looking at (IIRC, savemap address for FF7 Save begins with 0x00DBxxxx, but don't remember the exact number). Savemap is the best place to modify data.
 
One tip - character records are 132bytes (0x84) long in the savemap - check if it's actually a savemap you're looking at (IIRC, savemap address for FF7 Save begins with 0x00DBxxxx, but don't remember the exact number). Savemap is the best place to modify data.
Thanks. :)

I'm thinking the data isn't an array, but a bunch of loose globals, and those are the starting indexes for the character records. So, I should be able to check the next byte after each one, and get the character ID. (I think that was the first byte of character record(ID), I'll have to double check the wiki, to see what order the data is in.)

I'll check it out here in a bit, I gotta get woke up.

----

Well, the data I'm getting seems to be character data, so I was right about it being loose globals, however, the wiki has it listed in a very different order. (Which doesn't mean the wiki is wrong, it just means it gets sorted different in the save.)

Here is the order I'm finding it in..

ID (Maybe, it was a 0 with Cloud, I'll have to test it out..)
Strength
Vitality
Magic
Spirit
Dexterity
Luck
Attack
Defense
Magic Attack
Magic Defense
Current HP
Max HP
Current MP
Max MP
Unknown = 0 // Don't think they are sources used..
Unknown = 0 // SAA
Etc.. (There are several unknowns, then it get's kind of weird, perhaps equipment\materia data, etc,.)

I'll have to keep checking the values, to get the rest. (I know these are correct, I've already tried modifying them, and the stats change.)

--

I know this, this game has too many representations of the same data, I think I'm going to map them all to the same globals once I decode the game enough to do so. (Relics from the PSX version no doubt.)

What I can do, is create a C++ module, that has variable representations of all the games data, then anytime the game accesses a value, point it at my new module(and the appropriate value), that way all the data get's handled uniformly, and only by one variable. (And will always stay in synch, and be easier to work with.)
 
Last edited:
I hope I'm able to clear some of this up because I think I know what you're talking about.

There are two sets of character data.

One is part of the save map which is always kept in memory at 0xDBFD38 and is identical in form to the savemap on the wiki.

The second is what I call Active Party Data. This is what battles use to do their manipulation of and stuff. That starts at 0xDBA498 and has three entries of 1088 bytes. My notes has it following this structure:

Char ID
Level
Attack (Str + Str Bonus)
Defense (see above)
Magic (see above)
MDef (see above)
Speed (see above)
Luck (see above)
word: Temp_Attack (Attack + weapon strength; can be halved in the battle arena)
word: Temp_Def (Like above)
word: MagicAtk ( just Magic stat )
word: MagicDef (just Spirit stat without MDef fix )
word: HP
word: MHP
word: MP
word: MMP
word: Limit (looks like limitbar value)
word: Unknown
word: Counter Attack Command
word: Counter Attack Chance
...
+0x3C: OR'd with 0x418 when recalculating stats; unknown effect
...
+0x44: Statuses that can be inflicted by attacking
...
+0x4C: Battle Command Menu. Structure of six bytes and sixteen entries
..
+0x108: Enabled Magics: eight bytes * 56 magics (magic index, MP cost, ?, ?, ?, ?, ?, ?)
+0x2C8: Might be enabled Summons: eight bytes * 16 summons.
+0x348: Some other command-related thing: eight bytes * 24 entries
+0x408: I believe this is the first 11 bytes of equipped weapon data the character is using. This will prevent the necessity of continually checking the weapon part of the KERNEL for everything. Follows weapon data from wiki. Only cares about status attack (0x40D) and accuracy (0x410)
+0x418: Status Defenses?
+0x41C: byte list of four statuses to increase ( four bytes )
+0x420: amount to increase those stats by (four bytes)
+0x424 - 0x440: unused?

That's what I have. There's lots of blanks there that I don't know. Rarely does the game point at these address individually. Most of the time it gets the head of the map, increases it by formationID * 440h, then adds the amount it wants to look for. The map's offset is loaded LOTS of times and I don't have the time to look through them all.
 
I hope I'm able to clear some of this up because I think I know what you're talking about.

There are two sets of character data.

One is part of the save map which is always kept in memory at 0xDBFD38 and is identical in form to the savemap on the wiki.

The second is what I call Active Party Data. This is what battles use to do their manipulation of and stuff. That starts at 0xDBA498 and has three entries of 1088 bytes. My notes has it following this structure:

Char ID
Level
Attack (Str + Str Bonus)
Defense (see above)
Magic (see above)
MDef (see above)
Speed (see above)
Luck (see above)
word: Temp_Attack (Attack + weapon strength; can be halved in the battle arena)
word: Temp_Def (Like above)
word: MagicAtk ( just Magic stat )
word: MagicDef (just Spirit stat without MDef fix )
word: HP
word: MHP
word: MP
word: MMP
word: Limit (looks like limitbar value)
word: Unknown
word: Counter Attack Command
word: Counter Attack Chance
...
+0x3C: OR'd with 0x418 when recalculating stats; unknown effect
...
+0x44: Statuses that can be inflicted by attacking
...
+0x4C: Battle Command Menu. Structure of six bytes and sixteen entries
..
+0x108: Enabled Magics: eight bytes * 56 magics (magic index, MP cost, ?, ?, ?, ?, ?, ?)
+0x2C8: Might be enabled Summons: eight bytes * 16 summons.
+0x348: Some other command-related thing: eight bytes * 24 entries
+0x408: I believe this is the first 11 bytes of equipped weapon data the character is using. This will prevent the necessity of continually checking the weapon part of the KERNEL for everything. Follows weapon data from wiki. Only cares about status attack (0x40D) and accuracy (0x410)
+0x418: Status Defenses?
+0x41C: byte list of four statuses to increase ( four bytes )
+0x420: amount to increase those stats by (four bytes)
+0x424 - 0x440: unused?

That's what I have. There's lots of blanks there that I don't know. Rarely does the game point at these address individually. Most of the time it gets the head of the map, increases it by formationID * 440h, then adds the amount it wants to look for. The map's offset is loaded LOTS of times and I don't have the time to look through them all.
That's probably what I'm looking at then. :)

As far as I can tell, the game has at least three different sets of values for managing the same data.

Savemap
World\Field
Battle

These values(Active Party Data) get loaded with the battle module, but, they pass their data into local variables, ie, if you change them in world mode, it works fine(changes in stats menu), but not in battle mode. (I was trying to make mp regen work in battle mode, since I finally found the main battle loop, and quickly found changing them had no effect.)

It works kinda like this.

1. Active Party: P1 Current MP -> Stored to local.
2. Local MP manipulated.
3. Local returned to Active Party Data MP
4. Loop

You can see the Active Party MP change during battle, but changing it yourself, seems to have no effect, since the locals(take control) and overwrite it anyways.

---

Edit: Okay, I got the random battle rate patch fixed up, it no longer breaks Chocobo Lure. I should be able to get the "Sense" materia fix implemented too. (I have a new method for patching data, that can target single lines of ASM.)

----

Edit: Alright, got those patches done, now I'm working on a camera patch, it basically gives you a real nice 3rd person view in world mode. :) The game looks much better from this perspective, you can see more details, the LOD doesn't look as bad, etc,.

Edit: Man, that camera patch was a pain, it took a lot of patching to make it work, but I think it's worth it. The only issue, is that it breaks the overhead view, the camera system is way too complicated to do it properly at this time. (After I decode it a bit more, I should be able to fix it.)

I couldn't get a screenshot, it just came out black, but, it's like a whole new game, driving the vehicles, like the buggy feels much better too. It will take a bit of testing to make sure it doesn't cause any issues, like not being able to see something you could with the original view, but it should be fine. (It will be optional anyways, so you can always turn it on\off as needed.)

Edit: Here, I had to take it in windowed mode.
http://i51.tinypic.com/kcl3yu.png
 
Last edited:
Did any of the Q-Gears folks write their info down?

They decoded a lot of the same stuff I'm working on to figure out the opcodes for that project, which means they knew were the functions were located in the disassembled code.

I can find this stuff again, but it's going to take forever, and it's already been done, and should be well documented, so are there any post that I've overlooked, or sources of info? (I'll keep searching the forums, but the more time I waste on stuff like this, and doing work that's already been done, the less new features I can get coded. I've decoded maybe 30 functions, out of hundreds, probably close to thousands.)

Btw, did anyone see my last post, I hacked the world view camera, there is a screenshot. I thought it was pretty cool, no one else?
 
I think Kranmer recently did something similar to the world map camera.  But if my memory serves me correctly he was only able to adjust the level of zoom.  Is that what you can do, or can you actually move yours around?

Also, this seems obvious, but check the QGears forum for information.
 
I think Kranmer recently did something similar to the world map camera.  But if my memory serves me correctly he was only able to adjust the level of zoom.  Is that what you can do, or can you actually move yours around?

Also, this seems obvious, but check the QGears forum for information.
I can adjust it however I want, zoom\angle\etc. /snip

---

Edit: Decoding is going to be slow now that I've got most the easy stuff located. I've got a few tricks up my sleeve thanks to MHS, but, I expect the next few days to yield little in the way of results, going to be spending most of my time decoding, trying to find some of the more elusive stuff.

I've been trying to nail down a general flow for a number of systems. For example, I found\decoded part of the damage formulas.

From what I can see so far, it works something like this.. (Rough draft formula. This was a monster attacking me, btw,.)

Base Attack = 12 // Monster base damage?
Attack Multiplier(?) = 25 // Weapon? Stat? (Not sure where this value came from.)
Damage = 300

// Not sure how it calculated this part, but the value 240 is correct.
Damage / Defense Factor = 240 // Final Damage

I found the rest(or a lot of it.), but I haven't decoded it at all yet. (The above can be modified by several factors\functions, so it may be a real pain to fully decode. There were about ten functions called, and no telling how many branching functions could be called based on different factors, etc,. Special materia factors, equipment bonuses, etc,. ?)
 
Last edited:
Akaris work and most (if not all) of Q-Gears is based on the PSX version.

The call table for field script opcodes is at 0x9055A0.
 
Akaris work and most (if not all) of Q-Gears is based on the PSX version.

The call table for field script opcodes is at 0x9055A0.
I found that, but honestly, don't know what to do with it?

Any tips?

(My guess, is that it's a structure, based on how it looked, but that's about all I know about it so far. Too tired to think about it, I'm going to bed, I'll mess with it some more after I get some sleep.)
 
Last edited:
That's probably what I'm looking at then. :)

As far as I can tell, the game has at least three different sets of values for managing the same data.

Savemap
World\Field
Battle
Where's that located? I've been looking for that for a while now.
 
Where's that located? I've been looking for that for a while now.
Starts here. [0x00DBA498] - (Returned by GetCharacterData[0])

That's just an index(structure), the next byte is ID, followed by Level, etc, but it doesn't follow the savemap exactly.
 
Starts here. [0x00DBA498] - (Returned by GetCharacterData[0])

That's just an index(structure), the next byte is ID, followed by Level, etc, but it doesn't follow the savemap exactly.
...That was the battle structure I was just telling you about. What, then, do you have as the Battle stat location?
 
Status
Not open for further replies.
Back
Top