Users browsing this thread: 1 Guest(s)
Restrict espers by character.

#21
 
Status
None
Wow, this would've been really useful when I was making my hack. A lot better then clunky equipment juggling.

I was actually thinking about downloading it and putting it in, but the download seems to be down. Is there anywhere I could get it? (The IPS that you can then edit the values of, preferably. I know nothing about ASM.)

Thanks, and awesome work.
 
Quote  

#22
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(10-02-2012, 10:39 AM)matthewcarter50 Wrote: I was actually thinking about downloading it and putting it in, but the download seems to be down. Is there anywhere I could get it? (The IPS that you can then edit the values of, preferably. I know nothing about ASM.)

If you are in a hurry you can compile the following code with xkas or SnesStuff and the result will be the same as applying a patch. Synchysi will probably post a valid link when he sees your message.

Code:
hirom   ; Don't change this.
header  ; Comment out if your ROM has no header.

; Restricts espers to be equippable only by certain characters set in the tables at the bottom.
; All locations have only been tested in FF3us ROM version 1.0, although it should work in version 1.1.
; This will probably not work on the Japanese version.

; Uses 1034 bytes of free space at the end of bank C3.
; Address range utilized: C3/F091 to C3/F49B


; Loads the skills menu and gets the character ID. We interrupt this routine in order
; to store the character ID in $1CF8 (formerly Bushido names in the Japanese version;
; unused in FF3us).
; This is why it likely won't work in FF3j, although I suppose you could just find
; another unused location.

org $C31B61

JSR StChr


; Checks if any espers are already equipped. We come here just to create a label for
; ease of use and readability.

org $C35576

ChkEq:


; Sets text color to grey if an esper is unequippable. As above, we only come here to
; create a label.
; The game will later use the text color to determine whether to allow a character to
; use a particular esper.

org $C35593

GreyEsp:


; This prints out the name of the person currently using the esper you're trying to
; equip, which was originally the only thing stopping someone from equipping a certain
; esper. We need to change this, as the name will be blank if the character simply
; can't equip it.

org $C355B2

JSR Uneq


; The following lines originally jumped to the subroutine for checking if espers were
; already equipped (C3/5574). This check obviously isn't necessary if the character is
; unable to equip the esper anyway.
; There is one other place this check is called from (C3/59B1), but it doesn't need to
; be touched (and in fact shouldn't be) as it's only executed when viewing an esper's
; specifics.

org $C35524

JSR ChkEsp

org $C358E1

JSR ChkEsp


; Custom functions follow.

org $C3F091            ; Start of free space in bank C3.

StChr:                ; Gets the ID of the current character and stores it for later use.
TAX
LDA $69,X
STA $1CF8
RTS

ChkEsp:                ; Checks if a character can use an esper before checking if someone else has it equipped.
PHX                    ; Preserve X. May or may not be necessary, but better safe than sorry.
STA $E0                ; Stores the esper ID for later use. Could use the stack, but the esper ID needs to go into $E0 anyway.
LDA $1CF8            ; Character ID, from above.
ASL
TAX                    ; Used as the following table's index, hence doubling it previously.
LDA $E0
ASL                    ; Double A (which now holds the current esper's ID) for indexing use in the next table.
JMP (ChrTbl,X)


; These two code blocks are jumped to from the tables at the bottom.
; Their main purpose is to make sure X is restored from the stack.

Eq:
PLX
JMP ChkEq

NoEq:
PLX
JMP GreyEsp


; Handles error messages in the case of trying to equip a grey esper.

Uneq:
LDA $1602,X            ; Character's name.
CMP #$80            ; If the first letter isn't blank, then someone has the esper equipped and we can go back to tell the player as much.
BCS Exit
PLX                    ; Else, the character can't equip the esper at all and we need to tell the player as much.
LDX $00                

; Above: PLX because we no longer need to RTS to where this subroutine was called from.
; Sloppy, I know. BCS alone (instead of branching to an RTS) won't work because the branch is just too long.
; I'm looking for a way to streamline it.
; LDX $00 because it's necessary anyway as a counter for the next block.

; The following is identical to the code that prints "<Char> has it!",
; just altered slightly so it reads "Can't equip!"

LoadNoEqTxt:
LDA NoEqTxt,X
BEQ Null            ; If the character (letter) being written is null ($00), end the line.
STA $2180            ; Print the current letter.
INX                    ; Go to the next letter.
BRA LoadNoEqTxt
Exit:
RTS

Null:
STZ $2180            ; End this string.
JMP $7FD9


; "Can't equip!" text.
NoEqTxt:
DB $82,$9A,$A7,$C3,$AD,$FF,$9E,$AA,$AE,$A2,$A9,$BE,$00


; Character pointer table.
ChrTbl:
DW Terra
DW Locke
DW Cyan
DW Shadow
DW Edgar
DW Sabin
DW Celes
DW Strago
DW Relm
DW Setzer
DW Mog
DW Gau
DW Gogo
DW Umaro
DW Slot15
DW Slot16            ; These last four are probably unnecessary, but better safe than sorry, I suppose.


; The following is probably unnecessary, but will remain until I can figure out a way to streamline it.

; From above, A holds the esper ID (doubled) for use in the table indexing that follows.

Terra:
TAX
JMP (TerraTbl,X)

Locke:
TAX
JMP (LockeTbl,X)

Cyan:
TAX
JMP (CyanTbl,X)

Shadow:
TAX
JMP (ShadowTbl,X)

Edgar:
TAX
JMP (EdgarTbl,X)

Sabin:
TAX
JMP (SabinTbl,X)

Celes:
TAX
JMP (CelesTbl,X)

Strago:
TAX
JMP (StragoTbl,X)

Relm:
TAX
JMP (RelmTbl,X)

Setzer:
TAX
JMP (SetzerTbl,X)

Mog:
TAX
JMP (MogTbl,X)

Gau:
TAX
JMP (GauTbl,X)

Gogo:
TAX
JMP (GogoTbl,X)

Umaro:
TAX
JMP (UmaroTbl,X)

Slot15:
TAX
JMP (Slot15Tbl,X)

Slot16:
TAX
JMP (Slot16Tbl,X)


; Character esper tables follow. They should be pretty self-explanatory.
; Eq = can equip
; NoEq = can't equip

TerraTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW Eq        ; Maduin
DW Eq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW Eq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW Eq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW Eq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW Eq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW Eq        ; Phoenix

LockeTbl:
DW NoEq        ; Ramuh
DW Eq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW Eq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW Eq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW Eq        ; Phoenix

CyanTbl:
DW Eq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW Eq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW Eq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

ShadowTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW Eq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW Eq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

EdgarTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW Eq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW Eq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW Eq        ; Golem
DW Eq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

SabinTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW Eq        ; Terrato
DW NoEq        ; Shoat
DW Eq        ; Maduin
DW NoEq        ; Bismark
DW Eq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW Eq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

CelesTbl:
DW Eq        ; Ramuh
DW NoEq        ; Ifrit
DW Eq        ; Shiva
DW Eq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW Eq        ; Alexander
DW Eq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW Eq        ; Phantom
DW Eq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

StragoTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW Eq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW Eq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW Eq        ; ZoneSeek
DW Eq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

RelmTbl:
DW NoEq        ; Ramuh
DW Eq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW Eq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW Eq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW Eq        ; Starlet
DW NoEq        ; Phoenix

SetzerTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW Eq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW Eq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW Eq        ; Starlet
DW NoEq        ; Phoenix

MogTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW Eq        ; Terrato
DW Eq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW Eq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

GauTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW Eq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW Eq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

GogoTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

UmaroTbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

Slot15Tbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

Slot16Tbl:
DW NoEq        ; Ramuh
DW NoEq        ; Ifrit
DW NoEq        ; Shiva
DW NoEq        ; Siren
DW NoEq        ; Terrato
DW NoEq        ; Shoat
DW NoEq        ; Maduin
DW NoEq        ; Bismark
DW NoEq        ; Stray
DW NoEq        ; Palidor
DW NoEq        ; Tritoch
DW NoEq        ; Odin
DW NoEq        ; Raiden
DW NoEq        ; Bahamut
DW NoEq        ; Alexander
DW NoEq        ; Crusader
DW NoEq        ; Ragnarok
DW NoEq        ; Kirin
DW NoEq        ; ZoneSeek
DW NoEq        ; Carbunkle
DW NoEq        ; Phantom
DW NoEq        ; Seraph
DW NoEq        ; Golem
DW NoEq        ; Unicorn
DW NoEq        ; Fenrir
DW NoEq        ; Starlet
DW NoEq        ; Phoenix

; EOF
  Find
Quote  

#23
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
I've actually modified it a bit so equipped espers show up with a blue shadow for the characters that can use that esper as well. As far as the hex editing instructions I had, I would need to go back through it and get the specific addresses that need modifying. Really, it's quite simple to edit even if you know no assembly at all.

http://synchysi.firefish.org/ff6h/restrict_espers.rar

Make sure to read the readme.txt over; all the instructions should be in there. Let me know if you have any questions that the readme doesn't cover.

If you still can't get it to work I can throw together some hex editing instructions, but I doubt I'll have the time to do so for a few days.


GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite