Users browsing this thread: 1 Guest(s)
Giving another character Morph

#1
Posts: 471
Threads: 39
Thanks Received: 6
Thanks Given: 6
Joined: Aug 2010
Reputation: 3
Status
Runic
Would it be possible to give another character the Command Morph besides Terra?
  Find
Quote  

#2
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
The game engine uses only one counter for the morph timer. It is $1CF6 (RAM). If more than one character use the morph command, they will conflict over the use of the timer.

I consider difficult to implement multiple morph timers for multiple characters. It will require good hacking skills to modify the game engine. In my opinion, it isn't worth the effort. In comparison, it should be easier to rewrite the behavior of the morph command for something anew.

The morph duration is updated at the end of the battles, but it is hard coded with Terra's presence. It doesn't matter whoever has the morph command, only Terra can update the morph duration.
  Find
Quote  

#3
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
... I'm curious about this now. Give me a couple of hours and I'll see what I can find. (Thank you, C2, for being the best documented code bank.)

-----

Okay, at a quick glance, the code is set to allow only one character to be morphed at a given time.

Code:
C2/0B03: AD E2 3E     LDA $3EE2      (Which target is Morphed)
C2/0B06: 10 2B        BPL $0B33      (Exit function if someone is already Morphed)

I'll have to look at the RAM around that to see exactly what's going on with it, but I suspect there's only one byte set aside for denoting who's Morphed at any given time. Considering it's also a status, however, I'm not sure how that's dealt with.

Assuming that's fixable, I think the easiest way to code multiple people having Morph would be to use a modified version -- a toggled Morph rather than a timed one. That bypasses the issue of only one SRAM byte for the Morph timer and avoids having to code a string of CMP to figure out which character's SRAM byte we're supposed to be looking at.

Basically: short answer, no. As it exists, Morph only works with one character, although certain hardcoded to Terra parts are pretty easy to move around to a different character.

Long answer: still no, at least as it exists. Any kind of reasonable change to the Morph command that allows multiple characters to use it is going to require an overhaul of the underlying code in such a way that it will have to act differently. A toggled rather than a timed Morph is probably the easiest. It would prooooobably be an in-line hack, since a lot of the code governing the Morph timer could be overwritten if necessary.


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



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite