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

#8
Posts: 3,971
Threads: 279
Thanks Received: 237
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(04-05-2012, 11:46 PM)Synchysi Wrote: I mainly just used the routine that checks if someone has an esper equipped every time the esper list is loaded. This is my first in-depth ASM hack so I'm sure it could be made more efficient, but for now it's at least functional.

Yeah efficiency and optimization are for some people very important. I always think that there is a better way to do my ASM hacks or a better place to put the code. Keep in mind that except for C1 and C2, there is still unused space for tweaks like that in other banks (C0, C3, C4) that isn't being taken by other patches. I think your idea was pretty good.

(04-05-2012, 11:46 PM)Synchysi Wrote: My first idea was to write a quick Visual Basic program that would alter an IPS patch directly with whatever changes the user wanted, but I was hoping there was an easier way that I'm overlooking, since I'm not too familiar with IPS patch formatting at the moment.

There is always the possibility of a ASM file. You write your code and leave the tables blanks in the file. Anyone who can read comments should be able to edit the tables. The only thing is that you need an assembler such as xkas to assemble the file to the ROM.

Here'S an example of assembly file with tables, for a FFIV style stat growth system in FFVI, courtesy of Lenophis:

Code:
hirom   ; don't change this
header  ; comment out if your rom has no header

org $C260D0  ; location in both SNES versions
; org $C260B8  ; location in SFC/Japanese version
JSL $C0D814

org $C0D814
PHX
PHY
REP #$20
LDA $08,S  ; get our original index, we need it to look at the right stat for the right character
TAY
SEP #$20
LDA $161A,Y  ; time for a strength boost
CLC
ADC str_table,X  ; add the value for this level
CMP #$81  ; 129 or higher?
BCC str_skip
LDA #$80  ; cap at 128
str_skip:
STA $161A,Y  ; new strength
LDA $161B,Y  ; time for an agility boost
CLC
ADC agi_table,X  ; add the value for this level
CMP #$81  ; 129 or higher?
BCC agi_skip
LDA #$80  ; cap at 128
agi_skip:
STA $161B,Y  ; new agility
LDA $161C,Y  ; time for a stamina boost
CLC
ADC sta_table,X  ; add the value for this level
CMP #$81  ; 129 or higher?
BCC sta_skip
LDA #$80  ; cap at 128
sta_skip:
STA $161C,Y  ; new stamina
LDA $161D,Y  ; time for a magic boost
CLC
ADC mag_table,X  ; add the value for this level
CMP #$81  ; 129 or higher?
BCC mag_skip
LDA #$80  ; cap at 128
mag_skip:
STA $161D,Y  ; new magic
PLY
PLX
TDC
LDA $E6F500,X  ; get MP growth
RTL

; the four tables for strength, magic, agility, and stamina. change these zeroes to your heart's content
; if you wish to subtract for whatever reason, just think of these as signed values.

str_table:
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 0-19
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 20-39
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 40-59
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 60-79
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 80-99

agi_table:
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 0-19
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 20-39
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 40-59
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 60-79
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 80-99

sta_table:
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 0-19
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 20-39
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 40-59
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 60-79
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 80-99

mag_table:
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 0-19
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 20-39
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 40-59
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 60-79
DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; levels 80-99
  Find
Quote  



Messages In This Thread
Restrict espers by character. - by Synchysi - 04-04-2012, 02:32 AM
RE: Restrict espers by character. - by Angelo26 - 04-05-2012, 08:12 AM
RE: Restrict espers by character. - by m06 - 04-05-2012, 01:20 PM
RE: Restrict espers by character. - by madsiur - 04-05-2012, 02:11 PM
RE: Restrict espers by character. - by SSJ Rick - 04-05-2012, 07:01 PM
RE: Restrict espers by character. - by Synchysi - 04-05-2012, 11:46 PM
RE: Restrict espers by character. - by madsiur - 04-06-2012, 12:23 AM
RE: Restrict espers by character. - by Synchysi - 04-06-2012, 01:09 AM
RE: Restrict espers by character. - by Synchysi - 04-20-2012, 12:03 PM
RE: Restrict espers by character. - by madsiur - 04-21-2012, 02:31 PM
RE: Restrict espers by character. - by Synchysi - 04-21-2012, 04:56 PM
RE: Restrict espers by character. - by Synchysi - 05-16-2012, 06:31 PM
RE: Restrict espers by character. - by Synchysi - 05-17-2012, 06:13 AM
RE: Restrict espers by character. - by Synchysi - 05-17-2012, 04:46 PM
RE: Restrict espers by character. - by Synchysi - 05-18-2012, 07:40 AM
RE: Restrict espers by character. - by matthewcarter50 - 10-02-2012, 10:39 AM
RE: Restrict espers by character. - by madsiur - 10-02-2012, 12:22 PM
RE: Restrict espers by character. - by Synchysi - 10-02-2012, 06:33 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite