øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2364.msg27350e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd5a3-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;sa=topics;u=337e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd5a3-2.html.zx±Ih^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ z ¿OKtext/htmlISO-8859-1gzip8:Ö¿ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 02:31:38 GMT0ó°° ®0®P®€§²ð®±Ih^ÿÿÿÿÿÿÿÿ/!¿ New Ability Info

Author Topic: New Ability Info  (Read 666 times)

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
New Ability Info
« on: May 25, 2017, 03:04:45 AM »
at least I didn't find it on the wiki

$C1/5F17 has a table with the called up menues for abilities, 1 byte per ability
0 for abilities that don't use a magic menu, 1 = Spellblade, 2 = white, 3 = black, etc.
called from $C1/52A8


$D0/ED02 has a table with the "action types" that are executed
04 = normal attack and variants like aim
0C = jump start
16 = X-Fight (4x fight)
2B = value for all spell menues and monster attacks
called from $C2/49EA


$D1/5DA0 has a table with the delays before actions are executed
$80 or higher - instant
otherwise that many atb ticks
called from $C2/1AAA

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: New Ability Info
« Reply #1 on: May 25, 2017, 08:24:07 PM »
D0/ED02 is a mapping table that correlates an ability index with a function address.  For obvious reasons, these are sometimes the same.  For example - all spells use the function at c2/5b9f to run.  This doesn't actually have anything to do with menus at all; this is purely to queue effects and animations when you use an ability.

Almost all menu code can be found in C1.  If you're interested in animations, C1 is also where most of that code is found.  "Effect" is my terminology for checking/setting/getting values, and with regards to battle is almost entirely within C2.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Ability Info
« Reply #2 on: May 26, 2017, 03:56:25 AM »
Great findings Praetarius5018! Are you currently working on FF5?

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: New Ability Info
« Reply #3 on: May 26, 2017, 11:07:44 AM »
Sort of. It will be my follow-up project once SD3 is done, which should be about 2-3 weeks.
I worked a bit on it over the last year but not much.


I'm currently mostly interested in creating a few "physical spells".
Weapon attacks currently too binary in my taste; you either have the not-too-exciting default attack or use a command slot for a single "overpowered" move but still have not much variety. While on the magic side you can pick e.g. white and solve 20 problems at once.
Ideally I could make a "new" spell menu for some physical techs, 4-5 would already be enough;
can I move both black and white into the mixed menu of Red and use the now free white menu for my purpose?
Spells F0-FF look free and usable, so I might be able to use that?

Just some ideas, I'm not that far yet.

thepatirckinator

  • Tunnel Armor
  • *
  • Posts: 159
  • Gender: Male
  • God bless you all!
    • View Profile
Re: New Ability Info
« Reply #4 on: May 26, 2017, 10:31:35 PM »
I hope you find the correct mapping table for your Final Fantasy V hack.

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: New Ability Info
« Reply #5 on: May 27, 2017, 09:47:41 AM »
doesn't look that hard

$D83316 has 8 bytes per menu, and I've only seen the first used which tells that "menu" what id has is the first spell.
the second byte looks like the last spell "id" of each menu but that value doesn't seem to be used at all.
ok, not that simple.
$0 to $5E are the same number as the spell ids used.
$5F to $7C map to $82 to $9F (blue magic).
of course they are only loaded if you "know" that spell, by spell level, buying/finding/learning, etc.
$80 or higher read from wrong data so the shown spells are more or less random.
at least white and red have completely separate entries and then used asm routines.

In case of white it comes from $C1/37BA BF 16 33 D8 LDA $D83316,x[$D8:331E]

I may not even have to move !white at all to the red menu table.
$7E:41B2 tells which ability is currently used, so just smuggle a little if in there...


also, another table at $C0EEF4, 3 bytes per entry, unless the first byte is $ff, that is the signal for list ends
this tells the game which spells are usable in the menu and what they do
first byte is the spell id
called from $C2/DEDE

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: New Ability Info
« Reply #6 on: May 28, 2017, 01:33:16 PM »
Not sure if any of this will be helpful, but here are my notes on menu drawing.  No guarantees anything is correct though.  I haven't had time to do anything with it, so hopefully other people can.

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: New Ability Info
« Reply #7 on: May 28, 2017, 03:05:39 PM »
Well, I had to interject about a dozen calls to get it working properly.
Partially because MP costs and targetting by mapped spell index is loaded at battle start and any value > $80 isn't expected...

At least I got 2 menus of 8 skills (rather 5 + 3shared between both) each out of that adventure.

Except there's still a scrolling bar on a menu that can't scroll...
!Sing has that too, so whatever.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: New Ability Info
« Reply #8 on: May 30, 2017, 01:46:23 AM »
Woah Praetarius5018, impressive work!

What are these new icons next to monsters' name?

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: New Ability Info
« Reply #9 on: May 30, 2017, 01:13:27 PM »
the creature's element.
though I'm not good as an artist.

I wanted to keep non-element to a minimum, since it feels omnipresent in vanilla.
Both on the attacking side and the defensive side.
Does it matter if a monster casts fire2 or ice2 or lightning2? Normally not.
On the flipside it feels like 80% of the enemies are just neutral to all enemies - I haven't counted but a ton of entries are just empty element wise.

So almost everything now has an element; be it enemy, spells or equipment.
Weapons have an element by their category; swords are generally fire now and axes earth.
Every class has access to all weapon types, so hitting a weakenss via weapon is - if !Item is available - about as easy as hitting the weakness via magic.
Though that is not the same "element" as the one used for the vanilla elemental weapons, that is a separate entry.
And to keep guesswork to a minimum, I just display those icons there.

Ok, the honest reason is I'm lazy, so I just wrote a routine that reads the enemies name upon creation and uses that to set weakness and resistance flags.
Exceptions for immunity and absorption have still to be set manually...

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: New Ability Info
« Reply #10 on: August 26, 2017, 09:36:17 AM »
115CE0, 2 bytes per active ability
lists the status effects that disable an ability

btw, when all 4 abilities of a character are disabled at the same time, the game crashes.
!Black + 3 choosable slots was not a great idea, nope.