јAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1751.msg17385e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexdc66.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;sa=topics;u=20e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexdc66.html.zxih^џџџџџџџџџџџџџџџџџџџџШр•ЄчьOKtext/htmlISO-8859-1gzip0|жчьџџџџџџџџWed, 11 Mar 2020 04:45:15 GMT0ѓАА Ў0ЎPЎ€ЇВ№Ўih^џџџџџџџџВ"чь A question about Job editting

Author Topic: A question about Job editting  (Read 4835 times)

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
A question about Job editting
« on: September 04, 2012, 02:49:05 AM »
I've noticed in the editor by Samurai Goroh that you can't add more abilities to a job that has less than the max number of abilities filled. Has anyone ever successfully expanded all the jobs to allow for the max number of abilities to be added?

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #1 on: September 04, 2012, 03:14:46 AM »
http://slickproductions.org/docs/FF5/jobs%20and%20abilities.txt

The engine allows for more, but some work is required. You have to change the 1st ability pointer table, Number of abilities per job and Job levels.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #2 on: September 06, 2012, 04:09:34 AM »
Are these addresses for an unheadered ROM, for the SNES version?  I could whip something up in a few days, maybe..
Yes, and yes.

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #3 on: September 06, 2012, 05:24:38 AM »
Sweet. I have yet to have ever beaten FF5. Since I've already played up to nearly the end several times I'd love to mix things up a bit so I'm not bored to death when I go at it again.

On a side note, adding more jobs would be a far more difficult thing, right?

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #4 on: September 06, 2012, 09:16:20 AM »
On a side note, adding more jobs would be a far more difficult thing, right?
It would be somewhat more difficult. The engine limitation is 256 jobs, unless there is something I'm missing. However, the real problem is space. The data for jobs is located in the D1 bank, which is more or less filled to the brim. It would be necessary to relocate some data to a different bank.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #5 on: September 07, 2012, 01:13:52 AM »
When hex editing SNES ROMs, D1 means 11. If the address is D1/52C0, go to 1152C0 in your hex editor. You should be able to find the answers to your questions by examining the data.

Here are most of the common lists in FF5:
http://slickproductions.org/docs/FF5/common%20lists.txt

You can find the rest of my docs here:
http://slickproductions.org/forum/index.php?topic=491.0

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #6 on: September 07, 2012, 10:03:29 AM »
What about adding graphics for these hypothetical new jobs? Is there space for that? Would they have to be placed elsewhere?

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #7 on: September 08, 2012, 02:59:16 AM »
What about adding graphics for these hypothetical new jobs? Is there space for that? Would they have to be placed elsewhere?
Graphics take up a lot of space, so ROM expansion would probably be necessary. Keep in mind that the English ROM uses space in banks E0-E7 (but not all of it).

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: A question about Job editting
« Reply #8 on: November 12, 2012, 04:51:50 PM »
Sorry for the thread necromancy.

Adding additional sprites, while not trivial and would require ROM expansion, is relatively straightforward.  IMO the cleanest way to do it would be to move *all* sprite data to an expanded section and then change all the references in the code to point to the new section.  You'd also need to change the references to the number of jobs.  In fact, this approach also works well for job data, although there's more buffer room to play around with there.

The actual hard part is finding the bytes in RAM to save any additional job/ability data.  There's almost no free space in the RAM area to manage it.  Keep in mind that many areas of RAM function as temp storage, especially for battles, and get overwritten.  I was working on a couple of workarounds before life got in the way and I lost most of my free time (also why I've been absent).

The saved data for jobs/abilities is really only accessed in one place - loading the menu (ie, changing jobs/abilities).  The known abilities are essentially a function of the job/ABP combo; if you have 30 ABP in Black Mage, you know the character knows !Black L1 and L2.  Therefore, one idea I toyed with was coding a function in ROM that took the job/ABP data as an input and reconstructed the full list of known abilities in RAM used for temp battle space.  That reduces the amount of space needed in RAM for each character by 34*4 = 136 bytes (+4 if you remove the # abilities variable).  The downside to this approach is that it would require a non-trivial amount of non-trivial assembly coding.

Another approach I looked at (and favored) was reducing the number of item slots.  Item data in the RAM is right next to the job/ability data, so the resulting changes would be cleaner.  There are 256 item slots, each of which takes up two bytes (ID, quantity).  Halving the number of item slots frees up 256 bytes in RAM, more than enough for storage purposes!  The downside to this approach is that you have to change all of the references the item system, which is not an insignificant undertaking.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #9 on: November 13, 2012, 12:46:57 PM »
That's some useful input. Don't worry about the necromancy, 2 months is hardly a long time here.  :tongue:

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #10 on: November 19, 2012, 01:21:02 PM »
Indeed! A little necromancy is negligible in the face of useful information. Thanks!

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: A question about Job editting
« Reply #11 on: November 21, 2012, 01:23:52 PM »
No problem!  Actually, posting got me looking at some of my work (on expanding abilities and some other stuff) again.  Of course, in a week I'm going to be moving roughly 2700 miles to a new place.  Needless to say that's impacting my productivity.   :sad:

The Ability Expansion project has (thus far) three major components aside from general design (via expanded ROM space).  The first was to create more space for ability coding.  I don't have time to type up the full details at the moment, but the basic method was to cut/paste/re-reference essential functions into expanded ROM.  The second was to modify the animation code in C1 to allow a broader range of inputs (utilizing a lookup table based on input).  The third part was modifying the item system to create more RAM; this is basically where I was at before I stopped. 

As a side project stemming from this, I was investigating the window system.  I believe that any serious expansion (especially creating more jobs) would have to alter the menus, requiring hacking the menu system.  It's this area I've managed a couple of breakthroughs.  In retrospect I got overly focused one component, and essentially missed the forest for the trees.  It's still a work in progress, but I can at least alter window layout and rudimentary cursor behavior.  The relevant code starts at C2/C16A and most of the data is in C3.

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: A question about Job editting
« Reply #12 on: November 25, 2012, 12:03:45 AM »
Intriguing. I would encourage you to complete what you started time permitting. Completing this project would open things up to a greater degree of hacks for FF5. I don't have a hell of a lot of time myself, but if you pick this back up I'll help any way I can. Good luck with the move.