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

#65
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
various observations and realizations that might be old news to you, and mostly don't go anywhere, but sort of do:

- 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.

- earlier in the thread, i'd said:
Quote:re C2/4F08 remedy: under .calculateSummon, i'd tend to do the Esper=>Spell ID conversion and verify the desired spell is in that first slot before proceeding, just to be robust.  extra space be damned.  but your assumption regarding Summons seems fairly sound.

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.

- but what dawned on me when you relayed issues with Interceptor and Desperation Attacks is that the $3084 list is a substitute for hardcoded bounds checking.  the whole damn thing up through $3183 must be filled with null FFs to start, which are used when Function C2/4F08 is called in those special cases.  i must've thought that many bytes ending with $3183 were simply never used.  the $3084 approach means if C2/5551 had been modified to put higher-numbered attacks in a spell list, C2/4F08 could handle them (possibly with a couple added instructions if these attacks are associated with a different command).

--------

weird how i can write working code without knowing all these things.

putting all of this together, i believe that if you are willing to do stricter bounds checking (you already introduced some with your >= F0h check) and forgo some of the $3084 flexibility, we can construct separate, shortened $3084 lists for every character, thus letting C2/4F08 run faster.  the C2/561E loop is easy enough to paste and tweak.

(78 * 4) = 312 > 256 , so no go.

but in vanilla, there's only a single Lore list, so the real equation is:
(54 * 4) + 24 = 240 < 256

for that matter, is the $3034 list ever used after Function C2/5551 completes?

C2/4F08 would need a command check to choose a personalized list or a generic list, depending on whether Magic/X-Magic or Lore is being used.

and whatever strict Attack ID bounds checking was put in place would need to be applied only to certain commands -- not to Control, for instance.

hardcoding is something i usually regard as lame -- just watch me tirelessly spew venom at the Zelda 3 assholes who built most of their game that way -- but the Attack ID ranges for different menus are pretty well-established.  (anybody who's editing C2/5551 to change them should be capable of editing your patch if they want coexistence.)  and the speed recovery might be enough to endure such lameness.

hell, if you're not concerned with regaining space along with speed, you can keep a fallback loop in calculateMPDeduction to manually track down exotic Spell IDs to accommodate hackers and hypotheticals.
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 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: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite