Users browsing this thread: 2 Guest(s)
Condensing Spell List in Battle

#66
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
Quote:loading $3084,X for the Esper position in C2/4F08 should still work.  the Esper slot is one of the few things that ISN'T condensed, so most of the $3084 list being worthless doesn't matter.  now, there's not much point to using the variable, when C2/5554 just sets all in the range to 0 anyway, but we can.

While it would still work, I don't know that it's worth using the additional space. I could make it fit in the standard version if I borrow some of the optimisations from the Control MP fix, but as it is there's only one extra byte in the combined version, so I'd have to off-load it to freespace, and there's little enough of that as it is. 


Quote:to be sure..  this would match your patch's level of robustness used for spells.  but vanilla is less robust than i was probably thinking when making the post.  because there's only a single $3084 list (which is why you had to edit C2/4F08 in the first place), vanilla's not actually verifying that the current character has the spell in their menu before fetching its MP cost; it's just verifying that at least one character does.



Huh, yeah, you're right. I suppose the thinking there is that there "shouldn't" be a way to reach this point with a character unless they do know the spell, because the menu is drawn from their personal list, but you're that it lacks a certain robustness.

It's interesting, because I'm not actually finding anywhere that sets $3084 through $3183 to null/FFh. Espers (starting at $30BA) are zeroed out at the start of C2/5551, whether or not anyone has it equipped, because they're always at position 0 on the list, and then Lore locations are stored directly to an array at $310F. but there doesn't seem to be anything that nulls the rest of the list that I can see.

That said, looking at this C2/5551, I definitely see some bits that can be removed in the interest of both saving space and speeding things up; while we still need the temporary list at $11A0 for reordering White/Black/Effect, we don't need to section at C2/55ED that deletes lines from the list of 'everybody knows' spells. (Even if that were properly changed for the US version with two spells per line.) You'd need to replace later instances of reading from $3034 with $11A0 instead, that's all. (Or write the initial 'everyone knows' to $11A0 and then the reordered list to $3034, but either way.)

On an even better note, my project doesn't need to use $11A0 at all, since I'm not reordering spells/each character with magic only HAS one type. (Which reminds me that I need to disable that in the Config menu. I should find something to replace it with.)

Quote:weird how i can write working code without knowing all these things.
Ohgod, tell me about it, I don't know how I manage 90% of the things I do with this code.
Quote:but in vanilla, there's only a single Lore list, so the real equation is:

(54 * 4) + 24 = 240 < 256


Realistically, the bounds check necessary for this would actually be really simple, at least with vanilla commands. Summon's already taken care of by hardcoding the 0-entry with the Summon command; you could hardcode Lore to pull from a specific section of the list. If it's Magic/X-Magic, do a bounds check to make sure it's <=#$35, since nothing else using the Magic command should be using MP, exit if it's greater. Coming into this, X is our actor ID (0, 2, 4, or 6 for PCs), so if A is our attack ID:

Code:
PHX
.loop
DEX #2
BMI .exit
CLC
ADC #$36
BRA .loop
.exit
TAX
LDA $3084,X
PLX

 then this should exit with A = position in character's individual spell list, assuming that we manage to turn $3084 into four individual 'position in list' lists.
The problem there is I have no idea where the best place to BUILD those individual $3084 lists would be. We can't do it at C2/5551 because we don't have the individual spell lists yet, and after that we're dealing with the longer 4-byte entry lists which I can only think makes it much more complicated.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  



Messages In This Thread
Condensing Spell List in Battle - by GrayShadows - 09-14-2017, 06:27 PM
RE: Condensing Spell List in Battle - by madsiur - 09-14-2017, 07:22 PM
RE: Condensing Spell List in Battle - by Warrax - 09-14-2017, 08:09 PM
RE: Condensing Spell List in Battle - by assassin - 09-14-2017, 08:42 PM
RE: Condensing Spell List in Battle - by Warrax - 09-15-2017, 12:33 AM
RE: Condensing Spell List in Battle - by assassin - 09-15-2017, 04:33 AM
RE: Condensing Spell List in Battle - by assassin - 09-17-2017, 04:01 AM
RE: Condensing Spell List in Battle - by assassin - 09-17-2017, 05:34 PM
RE: Condensing Spell List in Battle - by BTB - 09-17-2017, 04:05 AM
RE: Condensing Spell List in Battle - by assassin - 09-18-2017, 04:28 AM
RE: Condensing Spell List in Battle - by assassin - 09-18-2017, 12:45 PM
RE: Condensing Spell List in Battle - by assassin - 09-18-2017, 10:15 PM
RE: Condensing Spell List in Battle - by BTB - 09-19-2017, 08:32 PM
RE: Condensing Spell List in Battle - by Warrax - 09-20-2017, 11:16 AM
RE: Condensing Spell List in Battle - by Warrax - 09-21-2017, 01:06 AM
RE: Condensing Spell List in Battle - by seibaby - 09-20-2017, 06:00 PM
RE: Condensing Spell List in Battle - by assassin - 09-20-2017, 10:39 PM
RE: Condensing Spell List in Battle - by assassin - 09-21-2017, 12:59 PM
RE: Condensing Spell List in Battle - by Warrax - 09-21-2017, 04:35 PM
RE: Condensing Spell List in Battle - by Warrax - 09-23-2017, 12:12 AM
RE: Condensing Spell List in Battle - by assassin - 09-23-2017, 01:21 AM
RE: Condensing Spell List in Battle - by Warrax - 09-23-2017, 07:45 AM
RE: Condensing Spell List in Battle - by Warrax - 09-23-2017, 03:04 PM
RE: Condensing Spell List in Battle - by seibaby - 09-23-2017, 05:38 PM
RE: Condensing Spell List in Battle - by assassin - 09-23-2017, 05:50 PM
RE: Condensing Spell List in Battle - by Warrax - 09-23-2017, 06:04 PM
RE: Condensing Spell List in Battle - by Warrax - 09-24-2017, 01:47 PM
RE: Condensing Spell List in Battle - by Warrax - 10-04-2017, 05:29 PM
RE: Condensing Spell List in Battle - by assassin - 10-04-2017, 06:43 PM
RE: Condensing Spell List in Battle - by assassin - 10-04-2017, 08:44 PM
RE: Condensing Spell List in Battle - by Warrax - 10-04-2017, 10:01 PM
RE: Condensing Spell List in Battle - by Warrax - 10-04-2017, 11:11 PM
RE: Condensing Spell List in Battle - by assassin - 10-04-2017, 11:46 PM
RE: Condensing Spell List in Battle - by assassin - 10-05-2017, 03:51 AM
RE: Condensing Spell List in Battle - by assassin - 10-05-2017, 09:27 PM
RE: Condensing Spell List in Battle - by assassin - 10-05-2017, 09:51 PM
RE: Condensing Spell List in Battle - by assassin - 10-06-2017, 08:20 PM
RE: Condensing Spell List in Battle - by GrayShadows - 10-07-2017, 12:42 AM
RE: Condensing Spell List in Battle - by assassin - 10-07-2017, 01:08 AM
RE: Condensing Spell List in Battle - by seibaby - 10-24-2017, 03:36 PM
RE: Condensing Spell List in Battle - by assassin - 10-30-2017, 07:38 PM
RE: Condensing Spell List in Battle - by assassin - 10-31-2017, 01:23 AM
RE: Condensing Spell List in Battle - by assassin - 10-31-2017, 02:42 PM
RE: Condensing Spell List in Battle - by BTB - 11-23-2017, 11:42 PM
RE: Condensing Spell List in Battle - by Warrax - 11-24-2017, 12:15 AM
RE: Condensing Spell List in Battle - by fw4210 - 07-23-2021, 03:48 AM
RE: Condensing Spell List in Battle - by fw4210 - 07-24-2021, 02:05 PM
RE: Condensing Spell List in Battle - by fw4210 - 07-25-2021, 06:32 PM
RE: Condensing Spell List in Battle - by fw4210 - 07-25-2021, 08:58 PM
RE: Condensing Spell List in Battle - by Warrax - 07-25-2021, 08:43 PM
RE: Condensing Spell List in Battle - by fw4210 - 08-02-2021, 08:13 PM
RE: Condensing Spell List in Battle - by fw4210 - 08-10-2021, 02:51 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite