Poll: What should be prioritized (multiple choices allowed)
This poll is closed.
Events 6.82% 3 6.82%
Monster Graphics 6.82% 3 6.82%
Maps (FF6LE clone) 6.82% 3 6.82%
Sprites (characters) 4.55% 2 4.55%
Monster AI 11.36% 5 11.36%
Strings / Dialogues / Names 6.82% 3 6.82%
Spell data 9.09% 4 9.09%
Item data 6.82% 3 6.82%
Monster Data 13.64% 6 13.64%
Chest data 6.82% 3 6.82%
Animations data 0% 0 0%
Tilesets / Tiles Graphics 0% 0 0%
Shop Data 4.55% 2 4.55%
Monster Formation / Packs 9.09% 4 9.09%
Other misc data (see easy stuff) 6.82% 3 6.82%
Total 44 vote(s) 100%
* You voted for this item. Show Results

Users browsing this thread: 1 Guest(s)
FF6AE

#11
Posts: 81
Threads: 4
Thanks Received: 6
Thanks Given: 6
Joined: Nov 2009
Reputation: 14
Status
Weakness
With Monster AI scripts, you just have one pointer table to look up and see where they start (of course you have to run until you hit the second FF after that to know where it ended). Also, each command has a fixed length in bytes, from one to 4, and there's a table for that also. The command is the first byte, and there's no change-of-context to worry about; if it's F1 = target type here, then it's F1 = target type there. It's relatively straightforward, but yes, variable in length which is of course harder than something like Shop data or something which is just straight up fixed numbers of bytes.

On the other hand, Event scripts are a real bugbear. You have a lot of different issues. First off, there is no central lookup table for events. They can be called from Tile Triggers (most common), NPCs (also fairly common), other events (subroutines), hard coded assembly when using certain items (tent, anyone?), and map entrance events (which, when coded correctly, have to have various branches for any changes you may have made to the map-specific temporary event bits).

And there's nothing stopping one event from starting in the middle of another one. That can happen, and I'm pretty sure it does in at least one case.

To make matters worse, event commands are not fixed in length. MOST of them are, but some of them are not. For the ones that are not, you don't know until you read some of the parameters for the command. Which means you can't just arbitrarily read a few bytes ahead and reliably know the commands. If you've tried to write a disassebler for the SNES's processor, you know what a pain the REP/SEP tracking can be, and how easy it is to get incorrect results. The event code is the same way.

Oh yeah, and event code is chock-full of context switches. That's because some of its commands actually spawn a whole other script. Not just one other script, either. There's a script for character event queues, which most people know. There's also a vehicle script, which tells it how to move the airship (or Terra sprite, or bird, or whatever) or a camera pretending to be an airship over the world map. It can also load other maps, but it uses a different byte to do so. Then there's another script, which is rarely used but simulates walking on the world map as a character (this is distinct from non-world-map walking a la the charcater event queue).

To fully handle events properly, you have to, at a minimum, know how to detect all of the above issues. And oh yeah, one other thing: Sometimes an event (or branch within an event) will start off in one of these odd contexts. This is why my event dump has a few hard-coded points where it just had to 'know' that it's in a different context, and if you get an older copy of that dump you'll see that I missed a few before I figured that out.

Seriously, it would almost be easier to pass the whole event system through a separate lookup table (that is, recode it so that instead of addresses you just get an index to a pointer table). It would add a lot of bulk, yes, but it would be so so much easier to maintain.


I appreciate the prayers and good wishes. Those who don't know, I was diagnosed with stage 4 melanoma in 2019, and I have done well with the treatment, but eventually treatments stop working and you change.  I recently had a seizure at work, now I am healing but not able to work or really do much at all. The focus is just to get better. Again, thanks for the support and if I can help you I will.  I've forgotten more about this game than most people should ever learn, lol.
  Find
Quote  



Messages In This Thread
FF6AE - by madsiur - 02-13-2016, 09:59 PM
RE: FF6AE - by Lockirby2 - 02-14-2016, 10:42 AM
RE: FF6AE - by Catone - 02-14-2016, 12:22 PM
RE: FF6AE - by madsiur - 02-14-2016, 01:52 PM
RE: FF6AE - by Catone - 02-14-2016, 03:05 PM
RE: FF6AE - by madsiur - 02-14-2016, 07:52 PM
RE: FF6AE - by Catone - 02-14-2016, 09:21 PM
RE: FF6AE - by madsiur - 02-15-2016, 12:27 AM
RE: FF6AE - by dn - 02-15-2016, 02:54 AM
RE: FF6AE - by Catone - 02-15-2016, 12:04 PM
RE: FF6AE - by Imzogelmo - 05-06-2016, 03:05 AM
RE: FF6AE - by madsiur - 05-06-2016, 09:48 AM
RE: FF6AE - by Imzogelmo - 05-06-2016, 09:45 PM
RE: FF6AE - by madsiur - 05-07-2016, 02:59 PM
RE: FF6AE - by Imzogelmo - 05-08-2016, 06:38 AM
RE: FF6AE - by madsiur - 02-27-2017, 05:27 PM
RE: FF6AE - by Deus - 10-03-2017, 11:10 AM
RE: FF6AE - by madsiur - 10-04-2017, 09:15 AM
RE: FF6AE - by Gi Nattak - 10-04-2017, 02:12 AM
RE: FF6AE - by FenixElite - 01-22-2018, 02:33 PM
RE: FF6AE - by madsiur - 01-22-2018, 04:03 PM
RE: FF6AE - by SSJ Rick - 01-22-2018, 03:50 PM
RE: FF6AE - by alleycat18 - 07-19-2022, 10:06 PM
RE: FF6AE - by madsiur - 07-20-2022, 11:05 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite