Miscellaneous Forums > Gameplay

[WIP] Custom Game Settings (FF7)

(1/30) > >>

Wutai Clan:
This project is an attempt to add easy to configure settings, that will allow for easy modifications to how the game works. (That are normally not easy, or require external tools like trainers\hacking of the .exe, etc,.)

For example, I'm trying to add settings that will allow you to easily change how much HP get's restored by various healing items.

The project uses a dll file called "GameSettings.dll", and will read values from an .ini file. (It will require Aali's Custom Graphic Driver to run.)


--- Code: ---Example GameSettings.ini

#HP Restoring Items
Potions = 100

#MP Restoring Items
Ether = 100 (I don't know the real value right off hand.)

# Lot's of other settings will be added as I work on the project, but for now, I'm working on HP\MP restoring items.

An example, MP regeneration, is something I always thought might be interesting.

MP_Regen = Enabled
MP_RegenRate = 6 [ie, Every six seconds]

--- End code ---

Wutai Clan:
Functions Found\Hooked

IncreaseHP = 0x006CBA6A [DWORD formationIndex, WORD amount]
DecreaseHP = 0x006CB9D2 [DWORD formationIndex, DWORD amount]
IncreaseMP = 0x006CBBBF [DWORD formationIndex, WORD amount]
DecreaseMP = 0x006CBB27 [DWORD formationIndex, DWORD amount]
RestoreHPMP = 0x0061F793 [] // Full Heal Party

AddItems = 0x006CBFFA [DWORD item:amount]
RemoveItems = 0x006CBE5F [DWORD item:amount]

IncreaseGil = 0x006CBCB9 [DWORD amount]
DecreaseGil = 0x006CBC7C [DWORD amount]
GetCurrentGil = 0x006CBCE9 []

GetCharacterData = 0x006CB98E [DWORD formationIndex]
DebugOutput = 0x00664E30 [char* string]

IsMenuOpen = 0x0063BC9D []
CurrentMenu = 0x006C6AEE [DWORD menu] // Not sure exactly what this is doing yet, but I can get the currently opened menu by intercepting it's argument. (Materia\Spell\Equipment\etc,.)

Custom Functions: Created\Patched

SetRandomBattleRate [BYTE rate] [Options: Enabled\Disabled | Rate]

Found WIP\Untested

ShowMessage = 0x00631586 [WORD unk1, WORD unk2] -Tested\Hooked\Still needs work. (Shows empty window, no matter what parameters I feed it, it definitely depends on a file for it's entries, whether on disk, or in memory.)

SaveGame = 00720F6E [DWORD unk1:slot? filename?] - Completely untested
LoadGame = 007210BC [DWORD unk1:slot? filename?] - Completely untested

GetCharacterBySlot [Derive from GetCharacterData?]

GetItemCount = 0x006CBF57 [DWORD index] - Needs adjusted to return counts. (Going to have to create a wrapper function, that converts the data to other formats, ItemID, and Counts, I already have the formulas to do so.)

GetRandomBattleRate = 0x00767C55 []

Misc Addresses

Battle Timer Variable = 0x009AE17C // Times how long each battle took.

Turn Timer Variable = 0x009AE180 // Measures how long each battle participants turn took. (Enemies, and allies.. This only accounts for the time the animations, etc, take to play out, it doesn't count time spent in the menu's, etc,.)

Battle IsTargeting Variable = 0x009A8B08 // This is equal to 0, if you aren't targeting something, 1 if you are. ie, if you select a command, and a target icon appears, this will be equal to 1.

Battle Escape Variable = 0x009AAD06 // This is the counter that determines when you escape, the longer you try, the larger this number gets, after it hits a certain value, you escape. (This value will slowly decrease after you stop trying to escape.)

Pressed Key Variable = 0x009A85D4 // Works with keys the game actually uses, doesn't seem to register other keys. (This also responds to gamepad input.)

Menu Open Variable = 0x00CFFB8C // Equals 1 while the menu is open. (Triangle menu.)

Ideas

E. Skill materia: Expand the list of learn-able skills.

Improve battle targeting: Make items\spells target relevant party members. (ie, phoenix down, will target a KO'd member.)

New Hotkeys [To trigger various functions. Example: Custom Option Menu->RenamePartyMember.]

Note: These are just notes to myself, so I don't forget anything, but they are also here so you can offer feedback on the ideas, etc,.

Progress Notes\Issues

Hooked the game's internal debug messages. (Tells me all kinds of stuff, like when the engine is loading different modules(WorldMap\Menu\Battle), etc,.)

Setup a debugging console, so I can watch log entries as they occur. (Much nicer than using the .log file, though it still exist, it's a shared function.))

GameLoop hooked. (This hook isn't working in battle mode, but works pretty much everywhere else, I need to find a function that get's called no matter what mode the game is in.)

BattleLoop hooked.

MP Regen: Implemented. (Doesn't work in battle, the hook doesn't run, and the values are stored different.)

Infinite Item Usage: Implemented. (Doesn't work in battle, the hook doesn't run, and it probably stores the values differently.)

Custom Random Battle Rates: Implemented.

Battle Reward Multipliers: Implemented.

Sense Materia Fix: Implemented.

Better 3rd Person Camera Patch: Implemented.

INI File: Implemented.

Here are the current .ini options. (All of them are fully implemented.)


--- Code: ---[Debug Console]
Enabled = false

[Infinite Item Use]
Enabled = true

[MP Regeneration Settings]
Enabled = true
Rate = 6

[Random Battle Settings]
Enabled = true
Rate = 4

[Battle Reward Multipliers]
Enabled = true;
EXP = 1
GIL = 1
AP = 1

--- End code ---

Dark_Ansem:
I like the idea of MP regen as well, maybe attached to items and of variable intensity. think the BIN expander could do you some help?

Wutai Clan:
Yeah, there are lot's of possibilities, for now it's probably best to stick to the basics, but, the more functions I hook, the more control I'll gain over how the game works.

Mp regen will probably be global at first, just restoring 1mp every x seconds that pass to all the party members. But I like your idea too, so maybe, depends on how far I get with hacking the .exe..

Vgr:
I think that Potion restore must be 64 to be 100 because this is in hexa. Well, looking forward for the first release.

Navigation

[0] Message Index

[#] Next page

Go to full version