Welcome, Guest. Please login or register.
Did you miss your activation email?
2019-Jul-17 05:33

Login with username, password and session length

Recent

Shoutbox

break:
Mar. 24 2019 - 7:46pm
@Den Just finished 2nd playthrough and testing session. I really like the edits I have made. Going to take another week to look over things !!
break:
Mar. 11 2019 - 7:04pm
@Den Hey, thanks for all of the support. Finished with the changes and currently playing through the game !!
break:
Feb. 25 2019 - 7:31pm
@Den Yo, finishing up the bosses and will do some more testing before the big release !!
break:
Feb. 18 2019 - 10:42pm
@Den Hey, got the main bosses edited and working on the treasure chests. Getting close to finished my edits !!
break:
Feb. 10 2019 - 9:11pm
@Den Yo, got the shops edited now and will start work on the treasure edits. I bit confused on monster chests ATM...
break:
Jan. 29 2019 - 6:56pm
@Den Hey, really making progress with my Hex-Editing. Replied to my topic...a bit stuck again
break:
Jan. 23 2019 - 11:42pm
@Den  Yo, I am really getting the hang of this HEX editing stuff !! Working on figuring out the growth rate formula !!
break:
Jan. 17 2019 - 8:31pm
@Den I am starting get more understanding about Hex editing.  Thanks for taking time out for me !

Author Topic: How to edit / hack FFL2  (Read 1938 times)

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
How to edit / hack FFL2
« on: 2019-Jan-10 20:31 »
Hello there, just started playing your version 5102 hack of FFL2.

And was wondering what resources are available to hack / modify the original game ?

Really want to educate myself on how to do this...so thanks in advance !

Pokemon Red 3DS-XL friend code : 1864-9639-1699 (Zeheart)
http://steamcommunity.com/id/breaktube
http://www.youtube.com/user/breaktube

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #1 on: 2019-Jan-11 21:38 »
 just use hex editor, the spreadsheet where I log my findings about ROM data, and the combat script that was reverse engineered.
Support me on Patreon

I saw. I conquered. I came.

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #2 on: 2019-Jan-12 02:21 »
just use hex editor, the spreadsheet where I log my findings about ROM data, and the combat script that was reverse engineered.

@Den

Thanks for the share !!
Just noticed that it is under the utility files on your main page :
http://shenafu.com/ffl2/ffl2.php 
Hmm, this is a of information to analyze.
* some of the tab columns are a bit tricky to understand *
Also, when looking up hex editors what program would you recommend for windows 10 ?
* only once I have found was one called HxD *
What I would like to try out first would be editing a humans or mutants stat growth.
I recall they have a chance to gain stats after battle
But I want to learn more about it and then modify it a bit

**MERGE**

Oh, one other question
Is it possible to add more weapons / items to the game ?
Or can I only edit what is already there ?
Currently working on learning how to edit the starting stats of the party
* might need a little direction with this *

**MERGE**

Okay, after a weekend of reading how to hex edit
I think I am starting to understand a bit more.
So I am using HxD as my hex editor program
And I can open the "ROM" with this program

Here are my current goals, in order :
-- Change party starting stats
-- Change party starting inventory/skills
-- Change party stat growth rates
-- Change guest stats
-- Change guest inventory/skills


Currently working on the first one
From your excel sheet
I see that "Human M" is setup like this :

ID F0
Monster Human M
??/DS 10
Comba + Image 00
Type/Skill 01
HP 59
Str 6
Agl 5
Mana 3
Def 3
Skills 7e7f
0 Long Sword
1 Bronze Armor

Still learning about Offsets and such
Open to direction and advice
« Last Edit: 2019-Feb-02 10:02 by break »

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #3 on: 2019-Jan-14 04:24 »
HxD is what I use.

Max items are 255 (0xFF)

Memory banks are grouped by blocks of 0x4000 bytes. So offsets jumps are written from 0x4000 to 0x7fff, thus will tell you the relative offset within the same block. Find tutorials for GB hacking that explain it in details.

Ex. One of the tab in the spreadsheet gives info regarding the absolute location in the ROM pointing to the start of the skills list for monsters (which includes playable characters). So all skills lists will be stored inside the same block, and the offset gives relative location inside that block. Thus Human M skills offset 0x7e7f gives the relative location within that block.
« Last Edit: 2019-Jan-14 04:30 by Den »

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #4 on: 2019-Jan-15 18:44 »
@Den

First off, you are amazing
Thanks for taking the time to reply
I know I have been throwing a lot out there, but I am so happy to find a place that has resources about this game !!
Second, let me back up a bit
So with HxD, I believe I can edit my emulated save file to change a few things
With that said, can I use HxD to permanently modify the game ?
Or would I need some other tool to do that ?
Been hoping around for GB hacking tutorials
But most are just pokemon stuff on the GitHub website.
Will continue to look around...still don't feel very comfortable with it yet.
Yes, that is the difficult I am having using the excel file (finding the offsets)

From the "neoMonster" tab I see the :

ID
Monster
?? / DS
Combat Image
Type/#Skills
HP
Str
Agl
Mana
Def
Skills

But I am unsure where the Offsets are to change these values.
Am I looking at the correct tab, or is there another tab that contains the games offsets ?

**EDIT**

So I just found out about a feature in HxD
Under "Search" and "Goto…"
Which will let me type in the offset !!
Under the neoMonsters tab
I see that Monster Human M
Skills are listed as 7e7f
So what is the '0x' part of '0x7e7f' for ?
When I input it into HxD I get an error...I feel very close to understanding this
But I feel I am still missing something
« Last Edit: 2019-Feb-02 10:03 by break »

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #5 on: 2019-Jan-16 23:45 »
Hex editors are used to modify any file.

0x means the number that follows is hexadecimal.

"Addresses" tab in the spreadsheet has the start and end to the absolute locations in the ROM. in this case
startenddescription
3798037eb4monster abilities listing

Then the skills list values in the monster table point to the relative location within the same memory bank. So 0x7e7f will point to 37e7f absolute location in the ROM.

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #6 on: 2019-Jan-17 20:27 »
@Den

Thanks again for the swift reply !
Cool, I will take the ROM file and open it with the HxD program.
So HEX represents 16 values (0 ~ F)
And the '0x' shortens the 16 values ?
Like if I see 0x1234, it would be the same as 0000000000001234 ?
Okay, so for you example, the start would be 0x37980 and the end is 0x37EB4
Inside this range of data would be where the 'monster abilities' are listed ?
So the skills/attacks would then be under the ''Weapon" tab ?
Hmm...so the range is 0x37980 ~ 37EB4
And, from the "Monster" tab, Human M's skill list has a value of 7E7F
So 0x7E7F is really 0x37E7F ?
And would 0x37E7F be where Human M's equipment/skills are located ?
Again, thanks for taking the time to explain...I am learning so much in each exchange !!

« Last Edit: 2019-Feb-02 10:04 by break »

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #7 on: 2019-Jan-18 18:55 »
@Den

Oh man...I think I got a part, but will need you to verify
Starting to get a feel for your Excel sheet
First question, in a Hex Editor would this be correct ?

**Human M
Offset -- 0x37E7F
Long Sword
Offset -- 37E7F
Hex -- 01
Bronze Armor
Offset -- 37E80
Hex -- 35

**Human F
Offset -- 0x37E81
Rapier Sword
Offset -- 37E81
Hex -- 0F
Bronze Armor
Offset -- 37E82
Hex -- 35

Question 2, if this is correct
Is it possible to add more items or starting abilities to these characters ?
And if so, how would I add more with out erasing someone else's items ?

Question 3, where can I locate the starting stats (HP, STR, etc) for Human M ?


**EDIT**

Okay, trying to find the Offsets for Stats
Am I looking in the right place ?

Fungus ID = 0
Offset -- 0x36F80
Type/#Skills = 20
Offset -- 36F80 ~ 36F81 (read backwards)
Hp = 45
Offset -- 36F82 ~ 36F83 (read backwards)
Str = 5
Offset -- 36F84
Agl = 3
Offset -- 36F85
Mana = 5
Offset -- 36F86
Def = 6
Offset -- 36F87

Question 4, if this is correct
What do Offsets 0x36F88 ~ 0x36f8B do...or rather what are they used for ?

**EDIT 2**

Man, work hard since the break through !!
Can you check to see if these Offsets are correct ?

Human M
Offset -- 0x378E0
Type/#Skills = 01
Offset -- 378E0 ~ 378E1 (Backwards)
Hp = 59
Offset -- 378E2 - 378E3 (Backwards)
Str = 6
Offset -- 378E4
Agl = 5
Offset -- 378E5
Mana = 3
Offset -- 378E6
Def = 3
Offset -- 378E7

Question 5, Offset 0x378E8 = 7F and Offset 0x378E9 = 7E
What do these Offsets do/represent ?
I am really feeling it...but these two Offsets are a mystery to me
« Last Edit: 2019-Feb-02 10:07 by break »

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #8 on: 2019-Jan-19 17:25 »
1. looks about right

2. find unused space in the same memory bank

4. 2 bytes read backwards, instruction to jump to the relative location in the same memory bank. to find the skills list for that monster.

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #9 on: 2019-Jan-19 21:59 »
@Den

Awesome, it sounds like I am really doing this !!
Okay, so now I have correctly located :
-- Human M's starting items Offset
-- Human M's base/starting Hp, Str, Agl, Mana, Def

Question #1,

Can you explain a bit more about "Unused space in the same memory bank" ?
I will google and research this a bit more, in the mean time.
Very interested in giving party members and enemy monsters more skills/attacks. 

Question #2,

On the Excel sheet tab "Monster"
What does the values in the "Type/#Skills" column represent ?

Question #3,

I think I have found the offsets for the "human, mutant growth rates"
But a bit confused on how to interpret how the hex values are entered.
Under the "Magic" tab I can see the "Stat Up Rate"
Can you explain what these values are
Or rather what they represent ?
I am having problems understanding the math behind them.
Again, thanks for taking the time to assist me with this issues.
I am very happy to have found this site
And it is nice to learn something new each day !

**EDIT**

I think I have found what is up from my earlier question #5
On the excel sheet tab 'Monster'
Column K is marked as 'Skills List'
Human M's value is listed as '7E7F'
Which looks to be the values from
Offset 0x378E8 = 7F and Offset 0x378E9 = 7E

Question #4,

Does Offset 0x378E8 ~ 0x378E9 contain the range/pointers
From where the game reads that character's starting items/skills ?

Question #5,

If I change these HEX values on these offsets
Will the game read the values from another location ?
« Last Edit: 2019-Jan-20 10:47 by break »

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #10 on: 2019-Jan-22 19:06 »
1. Long, contiguous bytes of 0x00s usually mean unused space. So you can try to replace those empty bytes with new data. Make the proper jumps to the new offsets.

2. Type = race.
Human = 0
Mutant = 1
Monster = 2
Robot = 3

3. Human/Mutant growth rates
Pairs of bytes for different stats: spell learning (for Mutants), HP, S, A, M, D.
1st byte = base chance
2nd byte = bonus chance per DS level or equivalent, if fighting against stronger enemies

4. Pairs of bytes with values between 0x4000 to 0x7FFF usually mean jump/pointer to relative offset in the same memory bank. That leads to a table of data.

Usually safer to modify the data, not the pointer. Variable length data is tricky to modify either way.

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #11 on: 2019-Jan-23 23:36 »
@Den

Hey friend, sorry for the delayed reply.
Been under the weather these past few days.
Recovered now and ready to report in !

So far, I have been able to edit the starting stats of the 'Human M' party member :

**Human M
--Offset 0x378E2 ~ 0x378E3 (read backwards xE3 - xE2)
HP Value (DEC *HEX) 59 *3B 00 ~ 80 *50 00
--Offset 0x378E4
STR Value (DEC *HEX) 6 *06 ~ 9 *09
--Offset 0x378E5
AGL Value (DEC *HEX) 5 *05 ~ 7 *07
--Offset 0x378E6
MANA Value (DEC *HEX) 3 *03 ~ 5 *05
--Offset 0x378E7
DEF Value (DEC *HEX) 3 ~ 03 ~ 5 *05

Next, I was able to solve the problem I was having with the item/skill limit for 'Human M'

**Human M
--Offset 0x378E8 ~ 0x378E9 (read backwards xE9 - xE8)
Skills Pointer Value 7F 7E ~ B5 7E
Skill Pointer Update 0x37E7F ~ 0x37EB5
--Offset 0x378E0
Race & Number of Skill Slots Value 01 ~ 03 (0 = Human & 3 = 4 slots)
--Offset  0x37EB5
Item Slot 0  00 ~ 4F  Punch
--Offset  0x37EB6
Item Slot 1  00 ~ 17  Bronze Shield
--Offset  0x37EB7
Item Slot 2  00 ~ 35  Bronze Armor
--Offset  0x37EB8
Item Slot 3  00 ~ 1D  Cure Potion

Whew, going to work on editing the other party members this week.
Hmm...the growth rates are a little difficult to understand.
Can you give me the offsets for 'Human M' 
And an example of the values of their growth rate ?
From Offset 0x33F90 I see :
 00 00 0A 0F 0A 0F 0A 0F 0A 0F...but unsure what it points to
« Last Edit: 2019-Jan-24 00:07 by break »

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #12 on: 2019-Jan-29 18:55 »
@Den

**UPDATE**
Hello again, I have busy Hex-Editing away !!
So I have now completed 4 tasks :
--Updated party & guest members base/starting stats
--Updated party & guest items/skills

This took a bit of time to get working right, but I have tested the first world and things look right to me  ^_^"

Okay, need some help/direct for the next steps :
--Change what monster/group appears in boss/un-skippable battles
--Change the type of skills mutants learn at each "DS Level"
--Change what items are sold at shops 
--Change what items or monsters appear in treasure chests 

1.) I am having difficulty finding the correct Offsets for where boss battles are stored.
Can you point me to where the two from the 1st world are (babywrm & rhino) ?

2.) Also having trouble understanding the Offsets for the Mutant learned skills (based on DS Level).
Plus looking to expand the number of skill a mutant can learn for each DS Level.

3.) Comfortable it the item's Hex number, but unsure about which shop is which. 
Will need a bit of direction.

4.) This one is really important, but the most difficult to figure out.
I really want to learn the Offsets for each chest in the game.
Also to learn how monster chests work.
Looking to add some super-monsters to some chests in the game !

Anyhow, I hope you are staying warm out your way

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #13 on: 2019-Feb-02 09:58 »
@Den

Morning, still working away at this !
Okay, so I have figured out how to change which skills Mutants learn at each DS Level encounter.
Also, know understand how the shop items are programmed and how to edit them.

So, will need a little help with the following :

--Encounters

From your encounter page :
http://shenafu.com/ffl2/encounter.php
I am trying to understand how it works.
Can you go into a explanation or example of how the group or boss encounters work or even programmed in the game ?
I have been looking through the Excel file, but I am at a loss of how the Offsets and Hex values work with each other.

--Treasures

From your awesome Maps page :
http://shenafu.com/ffl2/maps.php
You do an excellent job of displaying where each treasure chest is located and what it's contents are.
However, when going through the Offsets where the treasures are located
I am having difficult understanding how the Hex values and Offsets relate to the treasure location.
Can you give me an example Offset range and explain what the Hex values mean regarding that treasure location ?

Again, I hope you and your family has been able to stay warm during the deep freeze we have been having.
And hope you have better weather over this super bowl weekend.
Looking forward to hearing back from you soon !!

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #14 on: 2019-Feb-04 04:42 »
256 encounters compressed into 128 groupings of 5 bytes.

1st 3 bytes = monster IDs.

4th bytes = 0x00 to 0x7F encounters, 5th bytes 0x80 to 0xFF encounters. determine group sizes and other flags.

Treasure X, Y bytes overlap with other flags, namely icon's direction facing and type.

if 6th byte = 0xF9 usually means gives item. Then item ID is at 5th byte.


break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #15 on: 2019-Feb-10 21:09 »
@Den

Back home now (was away for about a week)
Okay, so I have just finalized my Shop edits
Which took a little while with how the Offsets are ordered
But really happy to have that part done.

So next, I will look over your notes on the Treasure Chests
And try to start from there !
Hmm, so from Offset 0x1C8EF ~ 0x1F8F4
Would be the 'Cure Potion' in North Cave ?
I see the Hex : 80 00 2B E7 1D F9
And 1D would be the Item ID for 'Cure Potion'
Can you break down what the Hex value 80 00 2B E7 is doing ?

Hmm, encounters still seem tough to understand.
So for Offset 0x36C70 ~ 0x36C74
I see the Hex : FF FE 00 60 E1
So if the first three Hex are monster IDs
FF = Arsenal
FE = Apollo
OO = Fungus
For the Hex 60 & E1
Can you go in a little more detail about 'encounters' and 'group sizes' ?

Thanks in advance, once I clear these two hurtles I will be ready to a final test and release this hack !

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #16 on: 2019-Feb-14 03:07 »
@treasures and events

the 3rd and 4th bytes are X, Y coords. but may have additional bits set for other properties.

the entire Event system is complicated. so try to find some pattern between similar events.

@encounters

use the hex code for the corresponding group sizes. modify the first byte if certain flags or properties are wanted for that encounter.

1st encounter grouping is 0xFFFE0060E1. for encounters ID 0x00 and 0x80.
 FF  Arsenal
 FE  Apollo
 00  Fungus
 60  ID 0x00 : 0x00 group size + 0x60 for flags : 0x20 + 0x40 : can't run : boss
 E1  ID 0x80 : 0x01 group size + 0xE0 for flags : 0x20 + 0x40 + 0x80 : can't run : boss : extra flag for Apollo


« Last Edit: 2019-Feb-14 03:11 by Den »

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #17 on: 2019-Feb-18 22:39 »
@Den

Okay, so just finished updating the major boss enemies stats and abilities/equipment.
May edit some of the minor unrun-able enemies later.
Currently working on editing some of the treasure chest items.
Should have that finished this week (not messing with the X/Y coordinates, just what is inside).
Again, thanks for the heads up about how treasures work !

So for encounters, can you help me solve this example ?
I would like to change the first mini-boss encounter from a BabyWyrm (69) to a Wyrm Kid (6A).
Under the "Magic" tab, I see that BabyWyrm is listed as a boss encounter on Offset 0x36CB1
Where the values are 69EC002001

If I change the '69' to '6A', (6AEC002001), would the encounter change from pointing to a BabyWyrm to a Wyrm Kid ?
Thanks in advance, and look forward from hearing back from you !!

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1242
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to edit / hack FFL2
« Reply #18 on: 2019-Feb-19 08:47 »
If I change the '69' to '6A', (6AEC002001), would the encounter change from pointing to a BabyWyrm to a Wyrm Kid ?

Yes

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #19 on: 2019-Feb-25 19:30 »
@Den

Awesome, thank you so much for the heads up !!
Okay, so I am currently working on changing a few of these mini-bosses now.
About the Dragon-Race bosses...so the faster you dragon
The more mini-bosses you fight ?

I believe that the first one is "Adamant"
And the next one should be "Ghast"...but it looks like only a "Tortoise" encounter triggers.

Also, it appears you can run from this battle and still get the magi.
Will look more into your examples on how to set a "no run/boss battle" flag
Or even some way to repoint this Dragon-Race encounter to "Ghast" 

Well, once I get these mini-boss battles finished
I will give the human/mutant growth rates another try.
Still a bit unsure how the values and offsets calculate
But will do a little testing and then release what I have.
Also, at that point...would you be available to test the game out and give me some feedback ?

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #20 on: 2019-Mar-11 19:03 »
@Den

Hey friend, was offline for a few weeks
And I have now finished up with what I wanted to modify.
Currently going through the game and testing things out.
This should take about a week or so
Then I plan to release what I have.
Again, thanks for taking the time to help me get started on this project !!
I appreciate your patience with teaching me the ends and out of :

-- Hex values
-- Offsets 
-- Pointers 
-- And all the ends and outs of Hex-Editing this game

Though it took a while for me to understand
And get things working for me
This has really been a fun project
That I looked forward to working on each day !!

break

  • D-Sun called D-Moon
  • Member
  • **
  • Posts: 22
  • No.1 in tha' hood
    • View Profile
    • My Youtube
Re: How to edit / hack FFL2
« Reply #21 on: 2019-Mar-24 19:45 »
@Den

Hello again, I just finish my second run of the game
And made a lot of changes through out both play throughs.
While it has been a blast testing thing out
I am currently debating if I want to do a little more editing with the monsters.
With the latest edits, it should take 4~5 hours to beat the game instead of 2~3 hours.
Going to take this next week to review a few things
And then release what I have !!
Again, thanks for helping me get started on this project ^_^"

 

2 Guests, 1 User