Looks like things are moving smoothly! I am still a little confused about your adjustment Ratio and plan and how an Imp and EvilMask would be next to nothing. An Imp's ratio at a Level 60 or so should give roughly 1200 Exp. per Imp? Or something like that? Whereas with an early EvilMask fought at level... say 10. it would decrease from 50000 Exp to... (50000 /10 =) 5000 Exp.
... Yeah, I'm not really sure what I was thinking there. I guess I was thinking that the average of, say 1/2 and 3/2 is 1, so if your adjusted APL is exactly between the base level of two enemies, their ratios will cancel each other out for EXP award, but I can't seem to actually make that happen with my calculator, so never mind.
Also will this plan allow for breaking of the 65535 limit on default Exp. assignments?
I don't know yet. I have to look at exactly how the exp award routine works. I have to figure that each monster can only have that as its base max, but the "total exp award" pool must be three bytes, because 7 monsters with 0xFFFF each would be 0x06FFF9. The questions I'd have to answer would be:
1) can I multiply numbers that are more than two bytes? (I don't think so, but three byte products are ok)
2) does the game add each monster's exp individually, or does it multiply
then add? (FFFF+FFFF+FFFF vs. 3*FFFF - it matters in this particular situation)
At any rate, I haven't even started that portion yet, but the new stat adjustment routine seems to be working great!
I'll refrain from making a patch until the whole shebang is done, but here's some code disassembly:
main routine:
$01/DE60 9D 24 20 STA $2024,x[$7E:22A4]
$01/DE63 5A PHY
$01/DE64 DA PHX
$01/DE65 FE 00 20 INC $2000,x[$7E:2280]
$01/DE68 C2 20 REP #$20
$01/DE6A A9 80 02 LDA #$0280
$01/DE6D 8D 90 22 STA $2290 [$7E:2290]
$01/DE70 7B TDC
$01/DE71 E2 20 SEP #$20
$01/DE73 22 20 E0 01 JSL $01E020[$01:E020]
$01/DE77 C2 20 REP #$20
$01/DE79 0A ASL A
$01/DE7A 0A ASL A
$01/DE7B 0A ASL A
$01/DE7C 0A ASL A
$01/DE7D 0A ASL A
$01/DE7E 0A ASL A
$01/DE7F 0A ASL A
$01/DE80 0A ASL A
$01/DE81 7A PLY
$01/DE82 BE 02 20 LDX $2002,y[$7E:2085]
$01/DE85 20 00 E1 JSR $E100 [$01:E100]
$01/DE88 99 12 20 STA $2012,y[$7E:2095]
$01/DE8B C9 00 01 CMP #$0100
$01/DE8E B0 11 BCS $11 [$DEA1]
$01/DE90 7B TDC
$01/DE91 E2 20 SEP #$20
$01/DE93 B9 70 20 LDA $2070,y[$7E:20F3]
$01/DE96 10 07 BPL $07 [$DE9F]
$01/DE98 4C B8 DF JMP $DFB8 [$01:DFB8]
$01/DE9B EA NOP
$01/DE9C EA NOP
$01/DE9D EA NOP
$01/DE9E EA NOP
$01/DE9F C2 20 REP #$20
$01/DEA1 B9 12 20 LDA $2012,y[$7E:2095]
$01/DEA4 BE 02 20 LDX $2002,y[$7E:2085]
$01/DEA7 86 E8 STX $E8 [$00:00E8]
$01/DEA9 48 PHA
$01/DEAA 20 70 E1 JSR $E170 [$01:E170]
$01/DEAD E2 20 SEP #$20
$01/DEAF 99 02 20 STA $2002,y[$7E:2085]
$01/DEB2 EA NOP
$01/DEB3 EA NOP
$01/DEB4 EA NOP
$01/DEB5 18 CLC
$01/DEB6 69 0A ADC #$0A
$01/DEB8 99 2F 20 STA $202F,y[$7E:20B2]
$01/DEBB C2 20 REP #$20
$01/DEBD B9 1B 20 LDA $201B,y[$7E:209E]
$01/DEC0 29 FF 00 AND #$00FF
$01/DEC3 85 E8 STA $E8 [$00:00E8]
$01/DEC5 68 PLA
$01/DEC6 48 PHA
$01/DEC7 20 70 E1 JSR $E170 [$01:E170]
$01/DECA C9 0E 00 CMP #$000E
$01/DECD 90 03 BCC $03 [$DED2]
$01/DECF A9 0D 00 LDA #$000D
$01/DED2 E2 20 SEP #$20
$01/DED4 99 1B 20 STA $201B,y[$7E:209E]
$01/DED7 C2 20 REP #$20
$01/DED9 B9 1D 20 LDA $201D,y[$7E:20A0]
$01/DEDC 29 FF 00 AND #$00FF
$01/DEDF 85 E8 STA $E8 [$00:00E8]
$01/DEE1 68 PLA
$01/DEE2 48 PHA
$01/DEE3 20 70 E1 JSR $E170 [$01:E170]
$01/DEE6 C9 AF 00 CMP #$00AF
$01/DEE9 90 03 BCC $03 [$DEEE]
$01/DEEB A9 AE 00 LDA #$00AE
$01/DEEE E2 20 SEP #$20
$01/DEF0 99 1D 20 STA $201D,y[$7E:20A0]
$01/DEF3 C2 20 REP #$20
$01/DEF5 B9 28 20 LDA $2028,y[$7E:20AB]
$01/DEF8 29 FF 00 AND #$00FF
$01/DEFB 85 E8 STA $E8 [$00:00E8]
$01/DEFD 68 PLA
$01/DEFE 48 PHA
$01/DEFF EA NOP
$01/DF00 20 70 E1 JSR $E170 [$01:E170]
$01/DF03 C9 00 01 CMP #$0100
$01/DF06 90 03 BCC $03 [$DF0B]
$01/DF08 A9 FF 00 LDA #$00FF
$01/DF0B E2 20 SEP #$20
$01/DF0D 99 28 20 STA $2028,y[$7E:20AB]
$01/DF10 C2 20 REP #$20
$01/DF12 B9 2A 20 LDA $202A,y[$7E:20AD]
$01/DF15 29 FF 00 AND #$00FF
$01/DF18 85 E8 STA $E8 [$00:00E8]
$01/DF1A 68 PLA
$01/DF1B 48 PHA
$01/DF1C 20 70 E1 JSR $E170 [$01:E170]
$01/DF1F C9 00 01 CMP #$0100
$01/DF22 90 03 BCC $03 [$DF27]
$01/DF24 A9 FF 00 LDA #$00FF
$01/DF27 E2 20 SEP #$20
$01/DF29 99 2A 20 STA $202A,y[$7E:20AD]
$01/DF2C C2 20 REP #$20
$01/DF2E B9 22 20 LDA $2022,y[$7E:20A5]
$01/DF31 29 FF 00 AND #$00FF
$01/DF34 85 E8 STA $E8 [$00:00E8]
$01/DF36 68 PLA
$01/DF37 48 PHA
$01/DF38 20 70 E1 JSR $E170 [$01:E170]
$01/DF3B C9 00 01 CMP #$0100
$01/DF3E 90 03 BCC $03 [$DF43]
$01/DF40 A9 FF 00 LDA #$00FF
$01/DF43 E2 20 SEP #$20
$01/DF45 99 22 20 STA $2022,y[$7E:20A5]
$01/DF48 C2 20 REP #$20
$01/DF4A B9 24 20 LDA $2024,y[$7E:20A7]
$01/DF4D 29 FF 00 AND #$00FF
$01/DF50 85 E8 STA $E8 [$00:00E8]
$01/DF52 68 PLA
$01/DF53 48 PHA
$01/DF54 20 70 E1 JSR $E170 [$01:E170]
$01/DF57 C9 00 01 CMP #$0100
$01/DF5A 90 03 BCC $03 [$DF5F]
$01/DF5C A9 FF 00 LDA #$00FF
$01/DF5F E2 20 SEP #$20
$01/DF61 99 24 20 STA $2024,y[$7E:20A7]
$01/DF64 BB TYX
$01/DF65 C2 20 REP #$20
$01/DF67 9E 09 20 STZ $2009,x[$7E:2289]
$01/DF6A B9 07 20 LDA $2007,y[$7E:208A]
$01/DF6D AA TAX
$01/DF6E 29 FF 00 AND #$00FF
$01/DF71 85 E8 STA $E8 [$00:00E8]
$01/DF73 68 PLA
$01/DF74 48 PHA
$01/DF75 20 70 E1 JSR $E170 [$01:E170]
$01/DF78 99 07 20 STA $2007,y[$7E:208A]
$01/DF7B 8A TXA
$01/DF7C 29 00 FF AND #$FF00
$01/DF7F EB XBA
$01/DF80 85 E8 STA $E8 [$00:00E8]
$01/DF82 68 PLA
$01/DF83 48 PHA
$01/DF84 20 70 E1 JSR $E170 [$01:E170]
$01/DF87 18 CLC
$01/DF88 79 08 20 ADC $2008,y[$7E:208B]
$01/DF8B C9 00 01 CMP #$0100
$01/DF8E 90 03 BCC $03 [$DF93]
$01/DF90 A9 FF 00 LDA #$00FF
$01/DF93 99 08 20 STA $2008,y[$7E:208B]
$01/DF96 B9 07 20 LDA $2007,y[$7E:208A]
$01/DF99 99 09 20 STA $2009,y[$7E:208C]
$01/DF9C B9 15 20 LDA $2015,y[$7E:2098]
$01/DF9F 29 FF 00 AND #$00FF
$01/DFA2 85 E8 STA $E8 [$00:00E8]
$01/DFA4 68 PLA
$01/DFA5 20 70 E1 JSR $E170 [$01:E170]
$01/DFA8 C9 00 01 CMP #$0100
$01/DFAB 90 03 BCC $03 [$DFB0]
$01/DFAD A9 FF 00 LDA #$00FF
$01/DFB0 E2 20 SEP #$20
$01/DFB2 20 90 E0 JSR $E090 [$01:E090]
$01/DFB5 99 15 20 STA $2015,y[$7E:2098]
$01/DFB8 BB TYX
$01/DFB9 7A PLY
$01/DFBA FE 00 20 INC $2000,x[$7E:2280]
$01/DFBD AD A5 28 LDA $28A5 [$7E:28A5]
$01/DFC0 5C FB 90 03 JMP $0390FB[$03:90FB]Determine Adjusted APL Routine:
$01/E020 C2 20 REP #$20
$01/E022 7B TDC
$01/E023 AA TAX
$01/E024 A8 TAY
$01/E025 85 A9 STA $A9 [$00:00A9]
$01/E027 E2 20 SEP #$20
$01/E029 B9 00 20 LDA $2000,y[$7E:2083]
$01/E02C F0 0B BEQ $0B [$E039]
$01/E02E B9 02 20 LDA $2002,y[$7E:2085]
$01/E031 C2 20 REP #$20
$01/E033 18 CLC
$01/E034 65 A9 ADC $A9 [$00:00A9]
$01/E036 85 A9 STA $A9 [$00:00A9]
$01/E038 E8 INX
$01/E039 C2 20 REP #$20
$01/E03B 98 TYA
$01/E03C 18 CLC
$01/E03D 69 80 00 ADC #$0080
$01/E040 A8 TAY
$01/E041 7B TDC
$01/E042 CC 90 22 CPY $2290 [$7E:2290]
$01/E045 90 E0 BCC $E0 [$E027]
$01/E047 A5 A9 LDA $A9 [$00:00A9]
$01/E049 20 00 E1 JSR $E100 [$01:E100]
$01/E04C A2 03 00 LDX #$0003
$01/E04F 20 00 E1 JSR $E100 [$01:E100]
$01/E052 0A ASL A
$01/E053 E2 20 SEP #$20
$01/E055 6B RTL Speed Adjusting Routine:
$01/E090 D9 15 20 CMP $2015,y[$7E:2098]
$01/E093 F0 2D BEQ $2D [$E0C2]
$01/E095 90 0B BCC $0B [$E0A2]
$01/E097 38 SEC
$01/E098 F9 15 20 SBC $2015,y[$7E:2098]
$01/E09B 4A LSR A
$01/E09C 18 CLC
$01/E09D 79 15 20 ADC $2015,y[$7E:2098]
$01/E0A0 80 20 BRA $20 [$E0C2]
$01/E0A2 C2 20 REP #$20
$01/E0A4 EB XBA
$01/E0A5 E2 20 SEP #$20
$01/E0A7 B9 15 20 LDA $2015,y[$7E:2098]
$01/E0AA C2 20 REP #$20
$01/E0AC EB XBA
$01/E0AD E2 20 SEP #$20
$01/E0AF 99 15 20 STA $2015,y[$7E:2098]
$01/E0B2 A9 00 LDA #$00
$01/E0B4 C2 20 REP #$20
$01/E0B6 EB XBA
$01/E0B7 E2 20 SEP #$20
$01/E0B9 38 SEC
$01/E0BA F9 15 20 SBC $2015,y[$7E:2098]
$01/E0BD 4A LSR A
$01/E0BE 18 CLC
$01/E0BF 79 15 20 ADC $2015,y[$7E:2098]
$01/E0C2 60 RTS Sorry, there's no commentary for now.
I'll repost with explanations at some point; but at least since I posted it I won't lose where I put it (like I did half the shadow party hack).