Users browsing this thread: 1 Guest(s)
Changing a characters equip ID?

#1
Posts: 136
Threads: 12
Thanks Received: 0
Thanks Given: 12
Joined: Oct 2013
Reputation: 0
Status
None
Would it be possible to make it so Leo has Celes' equip ID? Like, could you make it so that Leo can equip whatever Celes can?

CoverHitKungfu!


If you ever feel useless, just remember that Umaro has an MP stat.
  Find
Quote  

#2
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
The check of the menu access for equipment is at C3/1E5F and C3/1E74. C3/1E5F is related with normal equipment and C3/1E74 is related with relics. Specifically, the CMP opcode in the functions are worth of interest:

Code:
C3/1E6B BD 00 00 LDA $0000,X  char ID
C3/1E6E C9 0D    CMP #$0D     (Umaro or higher?)
C3/1E70 B0 3F    BCS $1EB1
C3/1E72 80 28    BRA $1E9C

Code:
C3/1E80 BD 00 00 LDA $0000,X  char ID
C3/1E83 C9 0E    CMP #$0E     (Leo or higher?)
C3/1E85 B0 2A    BCS $1EB1
C3/1E87 80 13    BRA $1E9C

The equipment which can be equipped is the issue. At C3/9C41 function, the code converts the char ID from its numeric value to its bit value. The first character is the first bit, the second character is the second bit, the third character is the third bit, etc. For this purpose, it uses the C3/9C67 table. It has only 16 indexes and characters ID higher than 16 will bypass the table boundary and garbage will be loaded.

You can try to track down the use of the C3/9C67 table to find the other codes related with equipment. If you want to use characters ID beyond 16, you must reconstruct the code(s) to load a valid value from inside the table based on the character ID. How exactly it can be done is debatable. Options are:
  • Move and expand the table
    Remap from a character ID to another character ID
    Kill and recycle the “imp based” and “merit award” flags

Unfortunately, you can't do it without assembly modifications, and I fear it may not be easy. You probably must deal with other codes as well...
  Find
Quote  

#3
Posts: 136
Threads: 12
Thanks Received: 0
Thanks Given: 12
Joined: Oct 2013
Reputation: 0
Status
None
I just replaced a bunch of those with EA and now guests can equip anything.


If you ever feel useless, just remember that Umaro has an MP stat.
  Find
Quote  

#4
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
Quote:I just replaced a bunch of those with EA and now guests can equip anything.

Yes, they equip almost everything because the equipment bytes loaded from beyond the C3/9C67 table generally has more than one bit set. The code expected only one bit by character, but multiple bits are found instead. The guest can equip the sum of all equipment which bit is set, one bit by character. Multiple bits allows to equip the equipment of multiple characters.

Specifically for Leo, his character ID is 15 and he uses the merit award flag as its equipment flag. If you don't care about the symbiotic relationship between the merit award effect and Leo, you only need to restrict the access to equipment menu for the default characters and Leo only. The merit award flag will determine Leo's available equipment and the merit award equipment.

As a note, Banon ID is 14 and his equipment flag is the imp equipment flag. Because of its special effect, the items he can equip are only imp equipments and they are only useful with the imp status. For the other guests equal or beyond the ID 0f 16, the code won't work correctly and it loads garbage for the guests equipment bits.
  Find
Quote  

#5
Posts: 136
Threads: 12
Thanks Received: 0
Thanks Given: 12
Joined: Oct 2013
Reputation: 0
Status
None
But wait, they can both equip anything, not just Leo.


If you ever feel useless, just remember that Umaro has an MP stat.
  Find
Quote  

#6
Posts: 2,550
Threads: 98
Thanks Received: 148
Thanks Given: 160
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Yeah because you NOP'd the part of the code that tells it to restrict the equipment.


We are born, live, die and then do the same thing over again.
Quote  

#7
Posts: 136
Threads: 12
Thanks Received: 0
Thanks Given: 12
Joined: Oct 2013
Reputation: 0
Status
None
Ah, that makes sense


If you ever feel useless, just remember that Umaro has an MP stat.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite