-
First and foremost: where does the game handle the minimal and maximum battle accuracy?
-
On another note, where does the game tell which weapon types to subtract con from weight and which ones not to?
-
Lastly, where does the game handle Leif and Linoan’s class change events? They aren’t in the promotion editor, so it seems like it’s handled elsewhere.
Here’s the process:
[details=Coding stuff]83d38b sep #$20
83d38d stz $0b <-- default 0 or $0B
83d38f lda $0f50
83d392 bit #$08
83d394 bne $d39b <-- Branches if $0F50 (I’ll have to check if it’s $7E0F50) has the 4th bit from the right on–I’m guessing this relates to magic stuff
83d396 lda $0011,x <-- Build stat
83d399 sta $0b <-- Build stat gets stored in $0B
83d39b lda $0f3e <-- Weapon Weight
83d39e sec
83d39f sbc $0b <-- subtracts Build stat from Weapon Weight if 1st Branch didn’t happen
83d3a1 bpl $d3a5 <-- non-negative result results in Branch
83d3a3 lda #$00 <-- minimizes result to 0
83d3a5 sta $0b <-- Surplus Weight gets stored in $0B
83d3a7 lda $000e,x <-- Speed stat
83d3aa sec
83d3ab sbc $0b <-- subtracts Surplus Weight from Speed
83d3ad bpl $d3b1 <-- non-negative result results in Branch that seems to skip a lda #$00 (minimizes result to 0 again)
83d3b1 sta $0046,x <-- Fight Speed gets stored in $7EA535
83d3b4 rep #$30
83d3b6 rts
[/details]
If you’re aiming to change the used stat from Con/Body/Build to Strength, you can set the “11” at I would believe to be 83D397 to “0B.” However, I’d be more for multiplying the influence of Surplus Weight.
Addendum (8:30 PM PST): here’s the HEX on the ROM, found at 01D38B:
[details=Chemical…HEX]E220 <-- Set Processor Status Bits $20
640B <-- Store 0, [$0B]
AD500F <-- Load A, [$0F50]
8908 <-- BIT A, $08 (I guarantee this is a tome check)
D005 <-- Branch NZ +5
BD1100 <-- Load A, [X+$0011]
850B <-- Store A, [$0B]
AD3E0F <-- Load A, [$0F3E]
38 <-- Set Carry
E50B <-- Subtract Carry A, [$0B]
1002 <-- Branch NN +2
A900 <-- A = 0
850B <-- Store A, [$0B]
BD0E00 <-- Load A, [X+$000E]
38 <-- Set Carry
E50B <-- Subtract Carry A, [$0B]
1002 <-- Branch NN +2
A900 <-- A = 0 (I was right!)
9D4600 <-- Store A, [X+$0046]
C230 <-- Reset Processor Status Bits $30
60 <-- Return from Subroutine[/details]
So now we have an idea of how to ASM hack Thracia 776. Maybe we can eventually get rid of healing wands missing.
That’s a very good start. However, I’m looking to have it set to strength when the weapon is magic and constitution when it isn’t.
I was also looking in HxD for these values but didn’t find them. It appears assembly is a different beast. What’s the best way to find those values?
Oh I used Hex Workshop to dig up the Hex. I also found instructions here:
http://www.defence-force.org/computing/oric/coding/annexe_2/index.htm
The 0001C000-00020000 codeblock has its FFs start at 0001FCD3 (right after a 6B, which is a Return From Subroutine Long instruction), which means a total of 557 bytes to work with for additional ASM hacking in the codeblock. I doubt it’s a bad amount of room for making use of JSR functions like what I like to do, but it’s definitely recommended to avoid being complacent.
Come to think of it, though, Strength playing more of a role against Weight when tomes are used is actually a good idea. I’m going to try to calculate what would work best and how the Hex could be modified.
are you a god if yes i love you if no i stil love you pls teach me senpai