Author Topic: [FFVIII-PCSteam] Modify max Draw amount <Solved>  (Read 7388 times)

Hazedge

  • *
  • Posts: 115
    • View Profile
[FFVIII-PCSteam] Modify max Draw amount <Solved>
« on: 2018-08-23 03:47:27 »
So, as the title says, I wanted to modify the maximum amount of magic you get using Draw command. I know the max amount is 9, I really wanted to change it for a higher value.
Do I have to use hext for it? I really wanted to learn how to do it.
« Last Edit: 2018-08-25 16:00:58 by Hazedge »

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount
« Reply #1 on: 2018-08-24 13:05:05 »
I implemented a feature like this recently, so here's the hex for it + additional notes:

#Adjustment of in-battle Draw
#      09 7E 05 B8 09 (Default: 9 max per draw)
#      01 7E 05 B8 64 (Draw 100 so long as 1+ is drawn)
#      09 7D 05 B8 09 (Draw minimum of 9, no upper cap - changes jump type to greater/equal)
8FE00 = 09 7D 05 B8 09

So the first set of values is the default hex, what the game does is it checks if your Draw was over 9 and sets it to 9 if this check returns true. The 2nd set is to make the game draw 100 every time you draw successfully (changes check to 1, and sets value drawn to 100/64h).

The 3rd set is what I'm currently using for FF8 NT, it flips the check so that it looks for Draws below 9 and sets it to 9 as a minimum; this means that the player will always draw 9 but can draw above this (10-100) depending on how high their magic stat is.

So whichever you'd want to use, you'd replace the 8FE00 = ?? with the desired hex. I think for removing the upper cap you'd want to set the check value to 64 or something so:
8FE00 = 64 7E 05 B8 64

If that doesn't work, then use 01 7D 05 B8 01

For implementation, I'm using DLPB's Hexttools which contains a few methods of patching an .exe with new hex. I use Hextedit which involves putting a notepad file with valid hext instructions into the HE_IN folder and dropping a FF8.exe into the Hextedit folder. When I want to run the notepad and patch an .exe, I double-click the hextedit application and it'll read any notepad files contained within the HE_in folder.

Here's a sample of a hextedit notepad file, typically you'll have the target file name written at the top of it with notes/comments written with a # and actual .exe addresses with the desired hex written in: https://pastebin.com/wySn42YE

What the hex translates to can be seen if you have a tool like cheat engine to attach to the game process while it's running. Add +400000 to the address (so 48FE00) and you'll be able to look more directly at the assembly code for the Draw value check.
« Last Edit: 2018-08-24 13:07:45 by Sega Chief »

Hazedge

  • *
  • Posts: 115
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount
« Reply #2 on: 2018-08-24 19:02:42 »
I implemented a feature like this recently, so here's the hex for it + additional notes:

#Adjustment of in-battle Draw
#      09 7E 05 B8 09 (Default: 9 max per draw)
#      01 7E 05 B8 64 (Draw 100 so long as 1+ is drawn)
#      09 7D 05 B8 09 (Draw minimum of 9, no upper cap - changes jump type to greater/equal)
8FE00 = 09 7D 05 B8 09

So the first set of values is the default hex, what the game does is it checks if your Draw was over 9 and sets it to 9 if this check returns true. The 2nd set is to make the game draw 100 every time you draw successfully (changes check to 1, and sets value drawn to 100/64h).

The 3rd set is what I'm currently using for FF8 NT, it flips the check so that it looks for Draws below 9 and sets it to 9 as a minimum; this means that the player will always draw 9 but can draw above this (10-100) depending on how high their magic stat is.

So whichever you'd want to use, you'd replace the 8FE00 = ?? with the desired hex. I think for removing the upper cap you'd want to set the check value to 64 or something so:
8FE00 = 64 7E 05 B8 64

If that doesn't work, then use 01 7D 05 B8 01

For implementation, I'm using DLPB's Hexttools which contains a few methods of patching an .exe with new hex. I use Hextedit which involves putting a notepad file with valid hext instructions into the HE_IN folder and dropping a FF8.exe into the Hextedit folder. When I want to run the notepad and patch an .exe, I double-click the hextedit application and it'll read any notepad files contained within the HE_in folder.

Here's a sample of a hextedit notepad file, typically you'll have the target file name written at the top of it with notes/comments written with a # and actual .exe addresses with the desired hex written in: https://pastebin.com/wySn42YE

What the hex translates to can be seen if you have a tool like cheat engine to attach to the game process while it's running. Add +400000 to the address (so 48FE00) and you'll be able to look more directly at the assembly code for the Draw value check.
I wrote the notepad file inside the FINAL FANTASY VIII\HL_Files\Hext_in named drawhext.txt, when I open the game the log says: Line 9 (DrawHext.txt): Could not write to memory.
Line 9 would be the 8FE00 = XX XX XX.... and all the three codes present was Drawing 9 fixed amount each time
Am I doing something wrong? This is what I wrote inside the drawhext.txt:
Code: [Select]
A:\Steam\steamapps\common\FINAL FANTASY VIII\FF8_EN.exe
#Insert the name/location of the .exe to be patched above
#Example: D:\Steam\steamapps\common\FINAL FANTASY VIII\FF8_EN.exe

#Adjustment of in-battle Draw
#       09 7E 05 B8 09 (Default: 9 max per draw)
#       01 7E 05 B8 64 (Draw 100 so long as 1+ is drawn)
#       09 7D 05 B8 09 (Draw minimum of 9, no upper cap - changes jump type to greater/equal)
8FE00 = 09 7D 05 B8 09

EDIT:
But of course.... I was testing out with early game levels, when I tried with a LV40+ save it goes from 9 to 18 draw amount.
Its working, but the error Line 9 (DrawHext.txt): Could not write to memory. still shows up, it wont make any problems right?
« Last Edit: 2018-08-24 19:12:00 by Hazedge »

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount
« Reply #3 on: 2018-08-25 13:14:29 »
Seems a bit unusual, are you using hextedit or hextlaunch? Edit will change the .exe permanently, whereas launch injects the code when the game is run (I usually use hextedit and I typically target an .exe file in the hextedit folder then move it across to the game folder after modifications are made). But if it works then all good right?

Draw amount in FF8 uses the character's magic stat, so a higher magic stat = better Draw results. If you want a higher minimum draw floor then change the 09s to something else.

Hazedge

  • *
  • Posts: 115
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount
« Reply #4 on: 2018-08-25 16:00:34 »
Thanks, I've managed to make the minimum amount of 10 and it increases with MAG amount using: 8FE00 = 09 7D 05 B8 0A

gunner_1207

  • *
  • Posts: 121
  • If your upright an above ground,its a gd day
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount <Solved>
« Reply #5 on: 2019-07-20 00:32:13 »
Hi guys not new to the game or the normal mods, but modifying like this i am . i am stuck sumwhat you wouldn't mind telling me the exact code you put inside the  notepad file to go into the hext_in folder i get the dropping a ff8 exe into the HE_in folder and run as admin. all that but i cant get over this.
FF8_Launcher.EXE opened successfully.
Attempting to load by Process Name (FF8_EN.EXE)...
Still Waiting... Click "PLAY!"
Succeeded in loading by Process Name.

Delayed for 1000ms...

=============================================
Draw..txt

Changed: 0
Replaced: 0
Permissions: 0

Errors(1):
Line 16 (Draw..txt): Could not write to memory.
==================================================

Damage.dll was loaded successfully.
Hard.dll was loaded successfully.
HP.dll was loaded successfully.
Magic.dll was loaded successfully.
Publish.dll was loaded successfully.

20/07/2019, 01:17:09
_____________________________________________________________________________
Process is running. Scanning...

All i have managed so far is to make my magic unlimited somehow it never goes down. But i want a bigger draw amount what you've done sounds amazing time saving wise brilliant really help, please

Right its still error spamming the load window but its working . but only on a higher level save of mine. Why does it not work at the beginning of the game? and i still have unlimited magic :)...just realised i was having a brain fart with the whole unlimited magic thing...mcindus magic dll....didn't realise i feel silly on that bit.
« Last Edit: 2019-07-20 08:19:54 by gunner_1207 »

Divatox

  • *
  • Posts: 88
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount <Solved>
« Reply #6 on: 2019-07-23 05:33:36 »
Sega Chief i made the .txt file to make the 100 draw like you said:

D:\Steam\steamapps\common\FINAL FANTASY VIII\FF8_EN.exe

#Insert the name/location of the .exe to be patched above
#Example: D:\Steam\steamapps\common\FINAL FANTASY VIII\FF8_EN.exe

#Adjustment of in-battle Draw
#       09 7E 05 B8 09 (Default: 9 max per draw)
#       01 7E 05 B8 64 (Draw 100 so long as 1+ is drawn)
#       09 7D 05 B8 09 (Draw minimum of 9, no upper cap - changes jump type to greater/equal)
8FE00 = 01 7E 05 B8 64

but when i start the HL launcher this appear

=============================================
draw100.txt

Changed: 0
Replaced: 0
Permissions: 0

Errors(1):
Line 10 (draw100.txt): Could not write to memory.
=============================================
FF8_KeepMagic_EN.txt

Changed: 4
Replaced: 0
Permissions: 0

No errors.
==================================================

No DLLs detected.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount <Solved>
« Reply #7 on: 2019-07-24 13:13:25 »
Sega Chief i made the .txt file to make the 100 draw like you said:

D:\Steam\steamapps\common\FINAL FANTASY VIII\FF8_EN.exe

#Insert the name/location of the .exe to be patched above
#Example: D:\Steam\steamapps\common\FINAL FANTASY VIII\FF8_EN.exe

#Adjustment of in-battle Draw
#       09 7E 05 B8 09 (Default: 9 max per draw)
#       01 7E 05 B8 64 (Draw 100 so long as 1+ is drawn)
#       09 7D 05 B8 09 (Draw minimum of 9, no upper cap - changes jump type to greater/equal)
8FE00 = 01 7E 05 B8 64

but when i start the HL launcher this appear

=============================================
draw100.txt

Changed: 0
Replaced: 0
Permissions: 0

Errors(1):
Line 10 (draw100.txt): Could not write to memory.
=============================================
FF8_KeepMagic_EN.txt

Changed: 4
Replaced: 0
Permissions: 0

No errors.
==================================================

No DLLs detected.

I'm not sure, a possible cause might be having the '#' comments, I think I removed them from my hext document. Best thing to do is take the hext document from the FF8 NT mod or from Calisto's ragnarok mod and make your formatting exactly alike those ones.

Divatox

  • *
  • Posts: 88
    • View Profile
Re: [FFVIII-PCSteam] Modify max Draw amount <Solved>
« Reply #8 on: 2019-07-26 07:04:39 »
okey thanks  8)