Users browsing this thread: 1 Guest(s)
MMMMMagic 2.0

#11
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Hi there. Up till now, I've been just running the plug and play patch. However, there are portions of this patch that conflict with other changes I've already made, so I need to redefine some variables and re-run the ASM. (I also think I can fit the whole patch into C4 without expanding the rom.) However, everytime I run this in Asar 1.36, I get repeating errors to the following effect:

error: Lable "SpellDesc_loop" redefined [.loop]
error: Lable "SpellDesc_nextspell" redefined [.nextspell]
error: Lable "SpellDesc_exit" redefined [.exit]
error: Lable "SpellDesc_nextactor" redefined [.nextactor]
error: Lable "SpellDesc_magicmenu" redefined [.magicmenu]

and so on and so forth until I max out my errors and Asar aborts. I've made sure SpellDesc.bin and SpellDescPntr.bin are located in the same folder that I'm running the asm file from. Any tips?

EDIT: Note that when I started getting errors, I ran the unedited file straight from the zip on an expanded rom. I got the same errors.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#12
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(07-29-2018, 11:30 PM)PowerPanda Wrote: However, everytime I run this in Asar 1.36, I get repeating errors to the following effect:

Have you tried with xkas 0.06? Asar is supposed to be compatible for the most but there are differences. There is also a "xkas mode" with Asar enabled with some flag but it can only be input via command line I think. I'd check Asar documentation or try xkas 0.06.
  Find
Quote  

#13
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
At a quick glance, I suspect that asar doesn't handle the function() notation the same way that xkas does, so it's reading all of the sublabels (.loop, .nextspell, etc) as being under the SpellDesc: label at the top of the code. The 'redefined' error pops up when you use the same sublabel twice under one label -- sublabels can be used more than once in code, I do it all the time, but each use needs to be under a different label. xkas must read the function() notation as a label, while asar doesn't.


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

#14
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Thanks guys. That appeared to work with the default ASM file on an expanded rom. My edited file isn't working, but I think that's because Notepad is changing the encoding format. I'll try again in Notepad++ when I get some time later today.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#15
Posts: 17
Threads: 3
Thanks Received: 0
Thanks Given: 0
Joined: Jul 2018
Reputation: 0
Status
Aftermath
Aye, this will definitely help me. I'm doing a fully custom hack and definitely could use new spells for new espers.
  Find
Quote  

#16
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Okay. I have gotten the ASM file mostly to work, and I have moved the entire patch to an unexpanded rom in the free space in C4. Note that there is one portion of the ASM that does not respond to org re-assignment, and must be manually altered.
Code:
; (X) Fork: magic effect descriptions
org $C35BE3
ldx #$0400                ; F3/0400     <-----Should be set to the address (no bank) of !descriptions
STX $E7                    ; set ptr loc LBs
ldx #$0600                ; F3/0600     <-----Should be set to the address (no bank) of !descriptions + $200 bytes
STX $EB                    ; set text loc LBs
lda #$F3                ; Bank: F3    <-----Should be set to the bank of !descriptions
sta $E9                    ; set ptr loc HB
lda #$F3                ; Bank: F3    <-----Should be set to the bank of !descriptions
sta $ED                    ; set text loc HB
rts                        ; exit

It's still not working 100%, but that's probably due to a typo. I was editing this ASM while bouncing a crying baby on my lap, and I should have learned by now that that never really works out.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#17
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
it's been a while I have not used xkas but I think you could do this (someone correct me if I'm wrong). Assuming !description is a complete offset:

Code:
ldx.w !description         ; load offset as a word
ldx.w !description+0x200   ; load offset as a word + 200h bytes
lda.b !description         ; load offset bank

This is 100% supported in bass and I think byuu had it working in xkas..
  Find
Quote  

#18
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
Okay, I have MMMMMagic fully working in C4. There were a few more sections that did not respond to the org changes. There may be more, but I was hitting so many crashes that I decided to relocate my other code changes instead of continuing to fight with this one.

Code:
; <> learn Spell (from C2/620F, F3/032F)
org !freespaceF3+342
LearnSpell_C2()
php                        ; backup processor status
jsl $F301E0                ; reverse spell lookup (find index for spell number)  <-----This should just be the variable !freespacef3

Finally, this pointer table is all based off of the offsets from !freespaceC2
Code:
; (X) pointers for how to trim spell list (from C2/56F3)
org $C2575D
dw $67EF                ; gogo-esque magic
dw $67E4                ; no spells usable
dw $67C0                ; normal magic trimming


As one final note, the readme forgets to mention this VERRRRRY important table, that tells both the battle menu and the main menu how many spells of each type there are. You will need to edit this if you plan to make custom changes. Otherwise, depending on your config menu sort order, you'll either have gaps or missing spells... probably both. 
Code:
; byte order for table below:
; Healing, Attack, Effect (HAE)
; Healing, Effect, Attack (HEA)
; Attack, Effect, Healing (AEH)
; Attack, Healing, Effect (AHE)
; Effect, Healing, Attack (EHA)
; Effect, Attack, Healing (EAH)

; (X) first slot for black magic depending on config (pulled from C2/559E)
org $C2574B
db $09,$1E,$00,$00,$1E,$15
; (X) first slot for gray magic depending on config (pulled from C2/55A4)
org $C25751
db $21,$09,$18,$21,$00,$00
; (X) first slot for white magic depending on config (pulled from C2/55AA)
org $C25757
db $00,$00,$2D,$18,$15,$2D


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#19
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
(07-31-2018, 02:45 PM)PowerPanda Wrote: As one final note, the readme forgets to mention this VERRRRRY important table, that tells both the battle menu and the main menu how many spells of each type there are. You will need to edit this if you plan to make custom changes. Otherwise, depending on your config menu sort order, you'll either have gaps or missing spells... probably both. 
Code:
; byte order for table below:
; Healing, Attack, Effect (HAE)
; Healing, Effect, Attack (HEA)
; Attack, Effect, Healing (AEH)
; Attack, Healing, Effect (AHE)
; Effect, Healing, Attack (EHA)
; Effect, Attack, Healing (EAH)

; (X) first slot for black magic depending on config (pulled from C2/559E)
org $C2574B
db $09,$1E,$00,$00,$1E,$15
; (X) first slot for gray magic depending on config (pulled from C2/55A4)
org $C25751
db $21,$09,$18,$21,$00,$00
; (X) first slot for white magic depending on config (pulled from C2/55AA)
org $C25757
db $00,$00,$2D,$18,$15,$2D

readme.txt Wrote:These bytes determine which magic slot is the first slot for each kind of magic, in each kind of configuration setup. Below is the baseline, this puts all of the current Black/Gray/White magic where it existed in vanilla, while any additional spells added to the spell list via this patch goes automatically at the end of the list. Due to the way the configuration byte is setup, the fourth "unallocated" magic type will always be in a static location without additional ASM work. However, it is easy to add your new magic to the black/gray/white magic lists, and have them sort into those accordingly.

C2/55B0: A936 LDA #$36 ; load offset to start of unallocated magic
C3/4F49: A936 LDA #$36 ; load offset to start of unallocated magic

first slot for black magic depending on config (pulled from C2/559E)
C2/574B: 09 ; Healing, Attack, Effect (HAE)
C2/574C: 1E ; Healing, Effect, Attack (HEA)
C2/574D: 00 ; Attack, Effect, Healing (AEH)
C2/574E: 00 ; Attack, Healing, Effect (AHE)
C2/574F: 1E ; Effect, Healing, Attack (EHA)
C2/5750: 15 ; Effect, Attack, Healing (EAH)

first slot for gray magic depending on config (pulled from C2/55A4)
C2/5751: 21 ; Healing, Attack, Effect (HAE)
C2/5752: 09 ; Healing, Effect, Attack (HEA)
C2/5753: 18 ; Attack, Effect, Healing (AEH)
C2/5754: 21 ; Attack, Healing, Effect (AHE)
C2/5755: 00 ; Effect, Healing, Attack (EHA)
C2/5756: 00 ; Effect, Attack, Healing (EAH)

first slot for white magic depending on config (pulled from C2/55AA)
C2/5757: 00 ; Healing, Attack, Effect (HAE)
C2/5758: 00 ; Healing, Effect, Attack (HEA)
C2/5759: 2D ; Attack, Effect, Healing (AEH)
C2/575A: 18 ; Attack, Healing, Effect (AHE)
C2/575B: 15 ; Effect, Healing, Attack (EHA)
C2/575C: 2D ; Effect, Attack, Healing (EAH)
Maybe not the most clear, but not forgotten. Originally I had a video to overview all of the editing, but due to circumstances of that nights stream it got chopped up and the quality was bad. Incidentally, I think I might still have it somewhere. But yeah, this bit is crucial when adding new Black/White/Gray magic when not using the plug-and-play model.
  Find
Quote  

#20
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
I'll be looking into this by myself, but in the event that B-Run sees this and knows the answer offhand....

I would like to add a natural magic list for Relm, and I'd like to have a "starting set" of magic for a new character, Kappa, since Kappa isn't gained until the same point in the story where you can gain Gogo and Umaro. I have checked GrayShadow's patch, but it is completely incompatible with MMMMMagic. How would I modify this patch to add another natural magic list?


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite