Users browsing this thread: 1 Guest(s)
Adding Lores in an event
01-11-2020, 03:27 PM
Here's what the code does:
Known Lore are at $1D29-$1D2B, meaning there is 1 bit per Lore on 3 bytes (24 Lores). You would need to set the good bit knowing your first Lore is spell ID $8B. The command would only need one parameter ($EB), the spell ID and with that you set the good bit in $1D29-$1D2B. You'd need to rewrite most of that function, I'm kinda unsure what would be a good way to do it though..
Code:
C0/AE0D: A5EB LDA $EB ; load character ID
C0/AE0F: 8D0242 STA $4202 ; save it for multiplication
C0/AE12: A936 LDA #$36 ; number of spell slots per character (54)
C0/AE14: 8D0342 STA $4203 ; save it for multiplication
C0/AE17: A5EC LDA $EC ; load spell ID
C0/AE19: C221 REP #$21
C0/AE1B: EA NOP ; wait for multiplication to be done
C0/AE1C: 6D1642 ADC $4216 ; spell ID + (character ID * 54)
C0/AE1F: AA TAX ; transfer result to X
C0/AE20: 7B TDC ; clear accumulator
C0/AE21: E220 SEP #$20
C0/AE23: A9FF LDA #$FF ; spell is learned
C0/AE25: 9D6E1A STA $1A6E,X ; set spell as learned
C0/AE28: A903 LDA #$03
C0/AE2A: 4C5C9B JMP $9B5C ; advance the event code of 3 bytes
Known Lore are at $1D29-$1D2B, meaning there is 1 bit per Lore on 3 bytes (24 Lores). You would need to set the good bit knowing your first Lore is spell ID $8B. The command would only need one parameter ($EB), the spell ID and with that you set the good bit in $1D29-$1D2B. You'd need to rewrite most of that function, I'm kinda unsure what would be a good way to do it though..
The following 3 users say Thank You to madsiur for this post:
• C-Dude (01-11-2020), Morendo (01-12-2020), Robo Jesus (01-11-2020)
• C-Dude (01-11-2020), Morendo (01-12-2020), Robo Jesus (01-11-2020)
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)