Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=2043.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexfedc.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2043.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexfedc.html.zxCh^@>OKtext/htmlISO-8859-1gzip0|Wed, 11 Mar 2020 02:05:30 GMT0 0PCh^< Print Page - FFVA research notes and projects

Board of Slick

Library of the Ancients => Final Fantasy V Research & Development => Topic started by: x0_000 on May 09, 2015, 12:40:57 AM

Title: FFVA research notes and projects
Post by: x0_000 on May 09, 2015, 12:40:57 AM
Slightly less than a year ago, I had the idea to hack and mess around with FFV to rebalance the game and make new content, but being more experienced with GBA assembly (and playing the advance version of the game) I did all my work on that version. I have a lot of notes, although not very well organized and a proof of concept patch for a new job (everything complete, i.e. abilities, descriptions, graphics, etc.) With the 2015 FJF looming around soon I'm hoping to get some renewed motivation with the project (although lots of other things keep me busy) so in the meantime I'll post the various things I've found about the game.

Credits: Pretty much all this research was kickstarted thanks to samurai goroh's GBA offset references, Greiga Master's FFV editor/this site's SNES notes for crossreferencing purposes and Jeff Ludwig's FFVA Custom Classes mod, which gave the inspiration for making new jobs and helped locate ROM tables (by crossreferencing patch data.)

Notes
Pointer tables (http://slickproductions.org/forum/index.php?topic=2043.msg23098#msg23098)
Berserk notes (http://slickproductions.org/forum/index.php?topic=2043.msg23119#msg23119)
Magic level notes (http://slickproductions.org/forum/index.php?topic=2043.msg23154#msg23154)
Regen status notes (http://slickproductions.org/forum/index.php?topic=2043.msg23460#msg23460)

Unprocessed notes

These notes are various work in progress research I've done; I'm uploading it to give an idea of what I'm aware of regarding the inner workings of FFVA. The notes are in general very brief and will probably confuse you if you don't have prior experience hacking FFVA; Honestly I wouldn't be surprised if they are confusing even if you have hacked FFVA before.

If you have any questions about them feel free to ask about it, I'll try to explain whatever I can remember (some of this stuff I haven't touched in over a year...!!!)

https://www.dropbox.com/sh/7rg03umyeilivuf/AAAaQr-aFw-bQqnK6-mdUtMKa?dl=0

Projects

All patches (just one for now haha) can be patched with this patcher (http://www.romhacking.net/utilities/606/).

Hero Job + misc. (https://www.dropbox.com/s/h4myvno5tfx86lt/ffvamod0.2.ups?dl=0)
(http://i.imgur.com/9q1HYP0.png)(http://i.imgur.com/k2l2Vg0.png)(http://i.imgur.com/zDWWnnx.png)
The main feature of this patch is the addition of a new job, the Hero. It currently replaces Gladiator, and borrows ability slots from Cannoneer and Oracle, so those two jobs can't level up. The Hero is a primary weapons user, specializing in esoteric forms of weaponry, but unable to use any form of swords. Their basic ability is !Power Up, which improves their combat prowess in an unpredictable way, and as they level up they can unlock special abilities: Super Strength, Super Armor, Super Speed, and even... !Heat Vision and !Ice Breath?!

The patch also includes various changes to the main engine and gameplay, listed in this changelog (https://www.dropbox.com/s/g52xshu0juaa2c7/ffvamod-doc.txt?dl=0).
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 09, 2015, 12:52:42 AM
Pointers

Monsters

Monster Table - 0x14d228
Stores most enemy stats. I believe the data should be similar the SNES version, although it might be rearranged differently. Each entry is 36 bytes long.
Monster Item Table - 0x147fbc
Stores the items you get from stealing/drops. Each item is a halfword, and the order is rare steal, common steal, rare drop, common drop.
Monster Release Table - 0x147D14
Determines what spell is cast when a monster is released. Uses a byte ID for spells.

Jobs

Skill Stat Table - 0x155fac
Determines the stats that get passed for !Skills. This does not cover Equip skills, where are in a different table. The stat order is Strength, Agility, Vitality, and Magic, making each entry 4 bytes.
Equip Stat Table - 0x155e10
The table for Equip skills (i.e. any skill that doesn't have !) Order is the same as above.
Job Stat Table - 0x156e04
Determines the stats for a given job. The order is the same as above.
Skill List Table - 0x155484
Determines the skill progression of a job. Each entry is a pointer, pointing to a list. The list is of the form <ABP requirement>,<Skill gained>, each one is represented by a halfword. There is no terminator needed, because the number of skills is determined by...
Skill Count Table - 0x14b1fc
Determines the number of skills are in a job's skill progression. Each entry is a byte.
Job Base Skills Table - 0x15616c
Determines the ! skills that the job can use initially. Four bytes representing skills, with 0 representing an empty slot. Note that this does not affect how many skills you can equip; you can do things like put a skill in slot 3 and then the job can temporarily overwrite it, or remove !Item from slot 4 and then the job can never get a 4th skill.
Job Innates Table - 0x156138
A table that determines what innate abilities a job can learn. Each entry takes two bytes, for a total of 16 possible innate skills. (which can be mixed and matched!)
Job Equipment Table - 0x156E6C
Determines what items a job can equip. Each entry is a word bitflag (4 bytes), with the flags being:
Code: [Select]
0x00000001 - knives
0x00000002 - ninja knives
0x00000004 - swords
0x00000008 - knight swords
0x00000010 - lance
0x00000020 - axe
0x00000040 - hammer
0x00000080 - katanas
0x00000100 - rods
0x00000200 - staves
0x00000400 - ? unused?
0x00000800 - bows
0x00001000 - harps
0x00002000 - whips
0x00004000 - bells
0x00008000 - ? unused?
0x00010000 - shields
0x00020000 - heavy helmets
0x00040000 - light helmets
0x00080000 - dancer helmets
0x00100000 - heavy armor
0x00200000 - light armor
0x00400000 - mage armor
0x00800000 - general armor
0x01000000 - heavy accessories
0x02000000 - diamond/power/silver
0x04000000 - thief gloves
0x08000000 - angel robe
0x10000000 - mage helmets
0x20000000 - not used?
0x40000000 - not used?
0x80000000 - not used?

Items

Weapon Table - 0x155810
Basic stats of weapons. Each entry is 12 bytes long, and the data mostly matches the SNES notes (although the order is changed.) Weapons *must* have ID < 128. The new byte order is 8 9 A B 0 1 4 2 3 5 6 7 (See this doc (http://slickproductions.org/docs/FF5/item%20data.txt) for the meaning of each index.)
Accessory Table - 0x1468d0
Basic stats of any equippables that aren't weapons. Each entry is 12 bytes long, and I think (need to double check) that the order is the same as weapons. Accessories *must* have ID between 129 and 223.
Item Table - 0x148fbc
Basic stats of consumable items. Unlike the previous two, each entry is 8 bytes long. Consumables can have any ID above 224.

Miscellaneous

Shop Table - 0x1572fc
Determines what shops sell. I don't have what entry corresponds to what shop documented yet, but a person can eventually figure it out with crossreferences. I think they are listed in order of appearance in the game? Each entry is 20 bytes, with 10 halfword entries. The first entry is the shop type. 0 = Spells, 1 = Weapons, 2 = Accessories, 3 = Consumables, 4-7 are not fully documented yet. 4 is used by both Flame/Coral/Angel Ring shops (the one in World 1 and the Mirage Village one that sells additional stuff), 5 is used by the Ninja supply shop (in Lix?) and 6 is used by the Chemist Drink shops. There is also one shop that uses ID 0x83, it seems to be a copy of the basic comsumables shop (selling potions/ethers/status cures and so forth.) I think the 8 part is actually a flag, but I don't know what it does if it is.

The remaining entries are just what the shop sells, with 0 being an empty slot. I'm don't remember if the last entry *has* to be 0 as a terminator, but none of the shops seem to have a 9th item for sale.

Note that there are 5 empty shop entries (they don't sell anything.)
RNG Seed Table - 0x141ab8
This is a array of 256 bytes (all values between 0 and 255 in a randomized order) that is used by at least one of the RNGs (the game uses at least 2 RNGs, one for battles and one for map events.) The basic idea is the game gets a number and looks it up in this table. I vaguely recall looking in a few other Final Fantasy ROMs for this table, and found the bytes in the same order but it's a very vague recollection so it might be incorrect, but it's easy to check.
Gaia Spell Table - 0x1497dc
Determines what spells get used by !Gaia for each possible terrain. Each entry is 4 bytes, one for each possible spell.
Text Pointer Table - 0x36DD54
Points to text data in the ROM. This table is formatted unusually, each entry is a word long which indicates how far (relative to the offset 36dd54) the text begins. Note that the word at 36dd60 is the size of the combined text data. Editing text is very annoying; the next entry indicates when the first entry ends, so editing a text to be longer than the original entry would require repointing everything after, and then fixing all the offsets.
Level Up Table - 0x145A28
Determines the base HP/MP (before modifiers) a character gets, along with EXP requirements for each level. Each entry is 8 bytes long. The first 4 bytes is the amount of EXP required to get to that level, and the next 4 bytes are the HP and MP you get for the level, with 2 bytes for each.
Item Cost Table - 0x1561d4
Determines how much an item sells for at a shop. Each entry is 12 bytes long. I haven't documented this yet, but if you take a glance at it you can determine where the data is located exactly. It's mostly 0s, although there's some nonzero data too?
AI Routine Table - 0x241384
Determines where to find AI Routine blocks. Like the Text table, each entry points to a location relative to an offset (in this case, the offset is 0x241edc.) I don't remember if the next ID is also a terminator for the previous.
Chest Event Table - 0x142000
Determines when you can examine a chest. 8 bytes per entry, the first 2 are the X/Y position of the chest on the map. The 3rd byte determines what kind of reward you get from the chest: 0x0 is Z gold, 0x1 is 50*Z gold, 0x2 is 100*Z gold, 0x3 is 1000*Z gold, 0x4 is 10000*Z gold, 0x20, 0x30 is magic, 0x40 is an item, and values above 0x60 indicate the chest is trapped.

Trapped chests are handled as follows: The encounter from the chest  is a value from 0x0 to 0x3f, and then either 0x60, 0x80, 0xa0, 0xc0, 0xe0 can  be added to indicate if you get an item or magic from the chest. I don't remember which is which, but 0x60, 0xc0, 0xe0 should give the same type and 0x80, 0xa0 should give the other type.

The 5th byte is the ID/value that determines what you get; if the chests gives money it's the Z value, otherwise it's the ID of the spell/item. I haven't determined what the other bytes do yet, if anything.
Trapped Chest Encounter Table - 0x13a474
Determines what fights you get from a trapped chest. Each entry  is 4 bytes, 2 halfword (2 bytes) per chest encounter ID. The two bytes are just the encounter ID that's used for battles.
Chest Location Table - 0x141bb8
Determines which rooms each chest in the Chest Event Table appears in. Each entry is 2 bytes long, and indicates which chest entry to start at. The starting point of the following room determines when to stop, similar to how text is formatted. If the starting point of the following room doesn't appear after the current starting point, no chests will appear (e.g. if room 1 has starting point 2 and room 2 also has starting point 2, room 1 will have no chests.)
Gold Multiplier Table - 0x13c912
Determines the multipliers used for chest gold; the default values are 1, 10, 100, 1000, 10000 (see Chest Events above.) Each entry is 2 bytes long.
Title: Re: FFVA research notes and projects
Post by: Jorgur on May 09, 2015, 08:06:58 AM
Welcome to our forums! :happy:

I vaguely remember your hack from before. The hero job is interesting, but for the most part the changes are a bit too radical for my taste.

A lot of good information here. You might want to consider using the wiki, as it is more suitable for storing and displaying information.
http://slickproductions.org/slickwiki/index.php/Final_Fantasy_V_Hacking
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 09, 2015, 02:58:53 PM
Alright, I copied all the pointer data so far into the wiki! I'll keep posting things here too for redundancy.
Title: Re: FFVA research notes and projects
Post by: samurai goroh on May 10, 2015, 07:54:21 AM
Hi there x0_000, I remember you from WWN forums :)

It's always a pleasure for me when people find useful my codes, albeit that the GBA ones are a little lackluster compared to the SNES ones... I think I remember seeing that image with the characters dressed as super heroes, although I've never tried the patch before.

It's always nice to see new faces working in this game, welcome aboard :)
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 10, 2015, 11:57:11 PM
Hopefully as my patch evolves I can encourage more people to try it :o

Berserk notes

There are two ATBs used by the game, one for controlled characters and one for uncontrolled characters. According to my notes, the ATB data for uncontrolled characters starts at 02020a2f.

080ED40A - sets the ATB at the start of the fight for uncontrolled characters. (Primarily berserked, but I suspect Zombified characters also go here.) Defaults to 60 ticks, which is why Berserkers seem to take so long before they act. I guess the developers didn't want zombified hasted characters to murder your party.

080e5f2e - the assembly code around this area sets the ATB when a character gets berserked.

080F1DC0 - sets the action ID for a berserked unit. This is 5 by default, better known as !Fight. If you change this, berserked units do different things, e.g. setting it to !Rapidfire's ID makes berserked units !Rapidfire constantly(!!!) This notably means with enough assembly one can teach berserked units to use !Command skills...
Title: Re: FFVA research notes and projects
Post by: Jorgur on May 11, 2015, 08:19:19 AM
There are two ATBs used by the game, one for controlled characters and one for uncontrolled characters.
Ah, so that's why the Berserker slots patch has this problem.
http://slickproductions.org/forum/index.php?topic=1222.msg23050#msg23050
Quote
Agility/Footwork doesn't seem to do anything, as if the job is locked to a low Agility setting.

This notably means with enough assembly one can teach berserked units to use !Command skills...
That would be awesome indeed.
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 11, 2015, 12:07:38 PM
I should be a bit more specific and mention that the 60 tick ATB is only set at the start of a fight, after the first action the ATB's value is what it should be. For example, if you give a Berserker Running Shoes/Hermes Sandals (so it starts the fight hasted) it still takes at least as much time as a non-hasted character before the Berserker takes an action, but afterwards the Berserker will take twice as many actions.
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 11, 2015, 08:20:39 PM
Magic levels

The game records what level of magic mastery a character has when the job and/or secondary skills are picked. The main assembly routine that handles this is at 080FE180; it's a very basic case-by-case check. The only flexibility available without some assembly coding is a table located at 0x157855. This dictates what school and level each skill gives (starting from 0x2c, which is Spellblade.) Each byte records information in halfbytes, i.e. XY means the skill gives level Y in school X. The schools are 0 = Spellblade, 1 = White, 2 = Black, 3 = Time, 4 = Summon.

Red, Dualcast and Dark Arts are hardcoded in the assembly routine.
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 18, 2015, 08:54:54 PM
Did an update to my Hero job patch, download here (https://www.dropbox.com/s/h4myvno5tfx86lt/ffvamod0.2.ups?dl=0) or in the first post! The full changelog is in the first post; the additions are:
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 25, 2015, 02:22:01 PM
Another patch update, although mainly to fix a bug I accidentally introduced that messed up Mind Blast... I took the oppurtunity to add some new stuff though! The additions in this version are:


I also updated the byte order for weapon data after sitting down and figuring it out.
Title: Re: FFVA research notes and projects
Post by: x0_000 on June 26, 2015, 09:01:01 PM
Some notes about the Regen status:

080E1AA4 - sets the ATB for Regen (possibly other time based status effects too?) At 0xe1aac there is a 0x6e (110), this value minus magic is the ATB for Regen for the character (so high magic characters regenerate HP faster than low magic characters.) At 0xe1ab0 and 0xe1ab4 there are 0x1e values (30), this is the minimum ATB allowed, so even if you have more than 80 magic the game will limit your regen rate to 30 ticks.

080E12A4 - the game calculates the amount of HP to heal every time the regen ATB hits 0 here.

0xe1266 - the value here is 1 less than the min regen ATB value (so 0x1d in the game.)
0xe126a - the value to set if the regen ATB is less than or equal to the value at 0xe1266.

0201fbd1 - Holds the regen ATB for the character in position 1.
0201fc55 - Holds the value to set regen ATB after it reaches 0 for the character in position 1.
Title: Re: FFVA research notes and projects
Post by: Zanerus on August 21, 2015, 05:58:38 PM
Just looking at these notes is making me want to get back into hacking.

Well i was messing around with some of the offsets to see how your notes worked, and while i learned nothing useful from the Jobs or skill notes I did learn that treasure has a pool of around 64 fights, 60-9F with each version rewarding either an item or spell, and the other version A0-FF rewarding the other. I will admit to not being the best at finding pointer lists however.
Title: Re: FFVA research notes and projects
Post by: x0_000 on August 23, 2015, 11:07:02 PM
The game handles the byte data starting at 080AFA3A; It's a branch table that uses the upper 7 bytes to determine what happens. I started disassembling it (I pasted my notes here (http://pastebin.com/WtZDmPdp), the relevant code starts at line 186) but I haven't looked into the trapped section yet.

Edit: After doing some debugging, it looks like the exact format is that you use 0x6,0x8,0xa,0xc or 0xe to indicate if it's trapped, and then the lower 6 bits (a value from 0x0 to 0x3f) determines the encounter you get. The game does a branch depending on whether 0x40 is a raised bitflag (i.e. it separates 0x6, 0xc and 0xe from 0x8 and 0xa), which I would guess is the item in the chest. If I recall correctly there aren't any trapped money chests so it probably determines if the chest gives magic or an item.

Each chest can have at most 2 encounters, with 190/256 odds separating the two. I haven't confirmed it yet, but it's likely that 0x13A374 is the table for the encounter IDs (4 bytes per entry, 2 bytes per encounter.)

Edit 2: Confirmed, 0x13a374 is indeed a table for encounters. The game adds 0x40 to chest encounter IDs, so if the ID in the table is 0x4, the game would consider it 0x44, so the encounter data for chests starts at 0x13a474.

For reference purposes, 0x13a504 are the 2 encounters for the Greenhorn trapped chest in Tule (Fight against a single Goblin.)
Title: Re: FFVA research notes and projects
Post by: x0_000 on August 24, 2015, 05:48:42 PM
Added the location where the game stores job equipment restrictions (as well as the corresponding flags) and updated yesterday's notes to the pointer post.
Title: Re: FFVA research notes and projects
Post by: Zanerus on August 24, 2015, 07:05:13 PM
Here's some early area chests offsets.

Code: [Select]
08142038
Cave-level two chest
08142010
Greenhorn club chest (right)
08142008
Greenhorn club chest left
08142030
Greenhorn club second floor
08142080
Tule brown barrel
08142088
Tule box in town
08142058
Windshrine 2nd floor
08142060
Windshrine 3rd floor single room
08142000
windshrine floor 3 by boss

0813a4f4 battles in chests start here from 60, I messed around with it and loaded every battle with ease. My test fiile was not max stats so i didn't kill the final boss to see if the ending would play.
Title: Re: FFVA research notes and projects
Post by: delta534 on October 09, 2015, 03:42:37 PM
Alright, here are some of my research notes so far fit for human consumption. All offsets, unless noted otherwise, assume that the rom has been mapped to 0x8000000 and is based on the US version of the game.

Using the the documentation on the "sappy" audio engine and some of my own research[1] here is a brief overview of the sound data.
 
0x83F070C : Instrument Data start/start of audio data
0x83F2CB4 : Song Table start
0x8704F33 : End of Audio Data

I think that the data between 0x83F0434 and 0x83F070B is also audio engine related.

Here is some other data I've found
0x83ED9AC : The first of three fonts [3]
0x83ED9AC : The second of three fonts
0x83EF850 : The third of three fonts

0x8704F34 : Save ID string [2]
0x8705528 : Start of the codes virtual tables.

0x8705150 : start of standard lib related stuff.
0x8705528 : end of standard lib stuff
0x8708678 : start of 40864 bytes of data that is copied to 0x2000000 when the game is started.
0x870AE60 : start of empty space in the rom.

references
[1] http://www.romhacking.net/documents/462/
[2] http://problemkaputt.de/gbatek.htm#gbacartbackupids
[3] http://www.romhacking.net/documents/435/

Now to figure out how to best format this for the wiki/continue to figure out the graphics information.
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 01, 2017, 03:22:59 PM
Four Job Fiesta is returning... it's time to hack again...

I started off with a quick change to Geomancers. Nothing fancy, just giving them some extra equipment options since Geomancers are very underdeveloped. They get all Heavy Armour (but not shields) and Axes, Hammers and Flails for weapons. I might remove Axes if it makes them too similar to Berserkers. I'll update the patch with it once I get some more features in.

On a more technical note, I started documenting the ATB calculations. The main ATB calculator is at 080E16C4, and it looks like everything that calculates ATB references it. I'm going to be looking at it more closely to see if I can cleanly implement several ideas that involve the ATB values, like:

I'm also going to be looking at the counter code to expand the functionality (e.g. the Monk's physical counter effects and the Magic Knight's Shell skill.) Someone suggested buffing the Geomancer by giving it an ability from the Tactics game, apparently they can counter with !Gaia. That would definitely be a funny buff to give them, but there are some other possibilities to (like making Red Mages counter with -aras...)
Title: Re: FFVA research notes and projects
Post by: Squall on May 09, 2017, 02:24:52 AM
Hey x0_000, its good to see you back in action and kicking it  :happy:

About ATB, I think LightPhoenix notes for SNES would be very helpful to you, although some of it may not apply for GBA (since I think some of the coding is due the SNES processor limitations).

BTW I had a plan to implement FFV ATB system and together with Damage Calculator to make arena like - you choose your team, equipment, skills and fight monsters as it would happen in FFV. Do you do some programming on C/Pascal?
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 10, 2017, 05:27:14 PM
Nope, only Python.
Title: Re: FFVA research notes and projects
Post by: thepatirckinator on May 12, 2017, 06:07:10 AM
It may be off topic of this, but sorry we had to lose Galuf after the one battle where one character defeats Exdeath in vain and dies afterwards.
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 28, 2017, 11:24:09 PM
Did some more work on my patch and gave Red Mages access to time with Red Magic. Still need to iron out a small kink to  make sure that Time Magic actually appears in the menu when selecting Red Magic,  but otherwise it looks like it works!
Title: Re: FFVA research notes and projects
Post by: Squall on May 30, 2017, 01:47:20 AM
x0_000 could you share some screen shots?
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 30, 2017, 11:21:11 PM
It's not really something that can be conveyed in screenshots, Time Magic just appears in the spell list when you use Dualcast.
Title: Re: FFVA research notes and projects
Post by: x0_000 on May 31, 2017, 04:56:32 PM
Doublepost, but I just started a small secondary project that I *can* show off in screenshots:

(http://i.imgur.com/0N7X3v1.png)
Title: Re: FFVA research notes and projects
Post by: Squall on June 01, 2017, 01:59:00 AM
Since there is no description, my guess is: in this mod we can change Job Command???
Title: Re: FFVA research notes and projects
Post by: x0_000 on June 01, 2017, 04:50:03 PM
Not quite! I actually made it so that Job data can be assigned on a per character basis. I had some ideas for a hack with that idea, but currently it's being used to support a new randomizer (https://www.dropbox.com/s/jq1vdp650j0bf8d/ffvarandomizer.zip?dl=0) (use an FFVA US rom on it!) The per character randomization is almost done, there are just a bunch of things that reference the skill tree data that I need to edit.
Title: Re: FFVA research notes and projects
Post by: x0_000 on December 12, 2017, 02:45:59 PM
I finally got a playable alpha of my FFVA ancient cave idea working, but it's still in very early alpha so I don't have a patch ready for it yet. You can find it if you hop on the Discord, though. I'll do some cleanup work and post a patch once the holidays kick in and I get the time for it.
Title: Re: FFVA research notes and projects
Post by: Squall on December 12, 2017, 02:56:11 PM
Good luck m8! If there is something we can do to help?
Title: Re: FFVA research notes and projects
Post by: x0_000 on December 12, 2017, 11:00:45 PM
Not at the moment, I still need to get some basic stuff working and polish the random generation first.
Title: Re: FFVA research notes and projects
Post by: Squall on December 17, 2017, 04:41:34 PM
x0_000, you are probably the only person that I know with extended knowledge on GBA version, and one of the few that know really a lot about it. Please let your work don't sunk as many before us - all their finding, knowledge has been burred with them (after they stop to be active). That's why PLEASE, take some time and write tutorials, or simply write down what you have found addresses, tables, constant,.. with short explanation!

You never know how a tiny bit of info could lead to something bigger. When I started your paragraph of how text is organized helped me so much, that almost everything I show in my Viewer as a text is based on your tiny paragraph ... and that is like hundreds line of code in the Viewer concerning the GBA.

BTW I got crack on fonts for GBA. If you are interested I can share what I have found!
Title: Re: FFVA research notes and projects
Post by: x0_000 on December 21, 2017, 01:49:16 AM
Well, the problem is that actually converting my notes into something that isn't completely confusing takes some time, especially since a lot of my research deals with actual assembly which requires a lot of notes to explain to someone that's unfamiliar with how FFVA's code works, and a lot of my research is partial so even if I wanted to write documentation there would be a lot of missing holes. So, in the meantime I'm just going to upload my notes in raw format (note that they are very scribbly) and if anyone has questions I'll try to answer them. Also .asm files are just text files, the extension just lets certain text editors like Notepad++ add flourishes that makes the text easier to parse.

https://www.dropbox.com/sh/7rg03umyeilivuf/AAAaQr-aFw-bQqnK6-mdUtMKa?dl=0
Title: Re: FFVA research notes and projects
Post by: Squall on December 21, 2017, 03:23:17 PM
Wooah x0_000, there is so much ... I feel like a boy in a candy shop :D

 :edit:
do you know where this table is (from ffva text - abilities.txt):
Code: [Select]
1 byte per character
00 - space
01 - e
02 - t
03 - a
04 - o
05 - n
06 - s
07 - r
08 - i
09 - h
0a - l
0b - .
0c - d
0d - . (terminator?)
0e - u
0f - m
10 - g
11 - y
12 - c
13 - w
14 - f
15 - p
16 - !
17 - b
18 - :
19 - k
1a - '
1b - ,
1c - v
1d - T
1e - I
1f - S
20 - C
21 - G
22 - W
23 - ?
24 - F
25 - L
26 - -
27 - B
28 - P
29 - M
2a - K
2b - H
2C - A
2D - D
2e - E
2f - R
30 - x
31 - O
32 - Y
33 - N
34 - z
35 - j
36 - q
37 - 1
38 - V
39 - U
3a - 2
3b - X
3c - J
3d - * (?)
3e - "
3f - 0
40 - 3
41 - Z
42 - 4
43 - 5
44 - Q
45 - 6
46 - 8
47 - 7
48 - %
49 - 9
4a - +
4b - ;
4c - /
4e - space
4f - &
50 - (
51 - )
52 - =
53 - .
54 - ..
55 - japanese period
56 - -
57 -
58 -
59 -
5a -
5b -
5c -
5d -
5e -
5f -
60 -
61 -
62 -
63 -
64 -
65 -
66 -
67 -
68 -
69 -
6a -
6b -
6c -
6d -
6e -
6f -
Title: Re: FFVA research notes and projects
Post by: x0_000 on December 22, 2017, 09:25:19 PM
I didn't get that from a table, when I was figuring out how to edit text I just took a specific text string and changed the characters to get the list.
Title: Re: FFVA research notes and projects
Post by: x0_000 on December 31, 2017, 09:31:45 PM
I just did some work on !Release related stuff and found a really funny bug so here's a post summarizing it:

So first of all I just added support for weapons to proc !Release; the game already allows !Release (and pretty much every !Action command) but unlike the normal behaviour for release, my added coded doesn't remove the monster from the player. It turns out there is a bug related to implementing this!!!

If you've never used the Necromancer job in FF5A (which makes sense, since you can only use it after beating literally everything the game has) then what you need to know is that it has an ability called !Oath which summons a monster and casts a spell. If this sounds suspiciously like !Release, that's because !Oath is a carbon copy of !Release: It pulls from four possible monsters, and those monsters use their !Release spell. But when I say !Oath is a carbon copy of !Release, what I really mean is...



!Oath has code that tells the game to replace the !Release command with !Catch after it's used, which is copied verbatim from !Release's code.



The only impact this has is that if you have both !Release and !Oath available, and you use !Oath, you will no longer be able to !Release whatever monster you have caught; instead you'll have to catch a new monster if you want to use !Release in the same fight. If you catch a new monster, it will just overwrite the previous monster and then allow you to !Release the new monster. If you finish the fight without catching a new monster, you'll have access to !Release again in the next fight.
Title: Re: FFVA research notes and projects
Post by: Squall on January 01, 2018, 04:29:44 AM
Very interesting, so that mean you will have unlimited !Release (without a need to catch). I wonder is it the same monster or it is different?
Title: Re: FFVA research notes and projects
Post by: x0_000 on January 01, 2018, 10:48:22 PM
I coded it so that if you don't have a caught monster then !Release can't proc, otherwise you always !Release the caught monster.
Title: Re: FFVA research notes and projects
Post by: Squall on January 15, 2018, 03:45:20 AM
x0_000, looking trough your notes I hoped to see how the new Damage Formula (for GBA, index >= $80) works, but I found this:
Code: [Select]
0805ce94 - attack type 80 (unused?)
0805b850 - attack type 81 (unused?)
0805ce30 - attack type 82 (unused?)
0805b8dc - attack type 83 (unused?)
0805ba1c - attack type 84 (unused?)
0805bb50 - attack type 85 (unused?)
0805ce2c - attack type 86 (unused?)
0805bf14 - attack type 87 (unused?)
0805bfac - attack type 88 (unused?)
0805c044 - attack type 89 (unused?)
0805c0dc - attack type 8a (unused?)
0805c190 - attack type 8b (unused?)
0805c228 - attack type 8c (unused?)
0805c398 - attack type 8d (unused?)
0805c4ac - attack type 8e (unused?)
0805ce28 - attack type 8f (unused?)

Actually they are used. Only 1 weapon Demon's Rod use $8E, the rest are used by skills. If you open my Viewer on Action tab you might see them all. If you ever decide to delve in this code, please tell me what params they use and their meaning.

Demon's Rod uses 3 params: Param 1 - % hit; Param 2 - % for action (FX); Param 3 - Action index
Title: Re: FFVA research notes and projects
Post by: samurai goroh on January 25, 2018, 11:28:05 PM
I know what some of the new skills use for Attack Formula:

0x81 = Finisher
0x82 = Predict
0x83 = Condemn
0x84 = Cannoneer: Open Fire
0x85 = Cannoneer: Combine
0x86 = ?
0x87 = Dark Arts: Drain Touch
0x88 = Dark Arts: Evil Mist, Hellwind
0x89 = Dark Arts: Chaos Drive
0x8A = Dark Arts: Deep Freeze
0x8B = Dark Arts: Meltdown
0x8C = Dark Arts: Curse
0x8D = Dark Arts: Doomsday
Title: Re: FFVA research notes and projects
Post by: x0_000 on February 23, 2018, 11:33:38 PM
0x80 is definitely unused (i.e. it's an empty function), dunno about the rest. 0x8f is similarly unused and you can tell by the offsets because it's 4 bytes before 0x86, which would be 2 assembly instructions (and 0x86 is similarly unused.)