Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,482,691
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-25-24 05:29 PM
Guest: Register | Login

0 users currently in Secret of Mana Hacking | 1 guest

Main - Secret of Mana Hacking - Question about game mechanics New thread | New reply


Nilthy
Posted on 07-11-15 12:29 AM (rev. 2 of 07-11-15 12:29 AM) Link | Quote | ID: 160394


Micro-Goomba
Level: 8

Posts: 1/11
EXP: 2067
Next: 120

Since: 07-11-15

Last post: 3140 days
Last view: 3132 days
So, i'm a little confused on how some of the mechanics work after looking at weapon stats.
The first thing, every weapon except the Mana Sword has a 75% hit chance. What does that mean exactly? Is it when you attack the enemy but do no damage?

Also i noticed most weapons have a 0 Critical chance, is it pointless to add critical chance? Does it actually do anything, or does it depend on characters stats?

Thanks for reading, i hope to see more content on SomEdit is added in the future!

zhaDe
Posted on 07-18-15 02:34 PM (rev. 2 of 07-18-15 03:21 PM) Link | Quote | ID: 160427


Goomba
Level: 12

Posts: 1/23
EXP: 6243
Next: 1678

Since: 07-18-15
From: Québec

Last post: 2579 days
Last view: 2578 days
The hit % is the chance the attack will do damage, if it misses the enemy will do a dodging animation if it has one and receive no damage, it is calculated in a very weird way... afaik it depends on the character hit%, the power of the attack, the enemy evade% and its defense.I think the evade and hit% are both calculated from the agility. I guess the weapon hit % affects the character hit% because it doesnt seem to be read when calculating evasion/hit% so it must be applied before. If you can read asm here are the evasion/hit% routines that are used when for each hit:


[Evade/Defense handler]
C0/4FED: BDA4E1 LDA $E1A4,X [Load Evade]
C0/4FF0: 858E STA $8E [Store into TempEvade]
C0/4FF2: 4A LSR A [Divide it by 2]
C0/4FF3: 4A LSR A [Again, by 2]
C0/4FF4: 85A6 STA $A6 [Store into TempEvade/4]
C0/4FF6: BDB0E1 LDA $E1B0,X [Load stat buff flags]
C0/4FF9: 8904 BIT #$04 [Check for Speed Up(Evade)]
C0/4FFB: F009 + BEQ $5006 [Branch past evade addition if not present]
C0/4FFD: A58E LDA $8E [Load TempEvade]
C0/4FFF: 18 CLC [Clear Carry]
C0/5000: 65A6 ADC $A6 [Add TempEvade/4]
C0/5002: 858E STA $8E [Store back into TempEvade]
C0/5004: 800B ++ BRA $5011 [Branch past Tangle crap]
C0/5006: + 8908 BIT #$08 [Check for Tangle]
C0/5008: F007 ++ BEQ $5011 [Lower Evade if it's present, otherwise skip ahead]
C0/500A: A58E LDA $8E [Load TempEvade]
C0/500C: 38 SEC [Set Carry]
C0/500D: E5A6 SBC $A6 [Subtract TempEvade/4]
C0/500F: 858E STA $8E [Store back into TempEvade]
C0/5011: ++ A963 LDA #$63 [Load 99]
C0/5013: C58E CMP $8E [Compare it with TempEvade]
C0/5015: B002 + BCS $5019 [If > (also equal to?) 99, branch ahead rather than just storing it]
C0/5017: 858E STA $8E [Store it in TempDef otherwise]
C0/5019: + C220 REP #$20 [8-bit emulation mode disabled]
C0/501B: BDA5E1 LDA $E1A5,X [Load Defense]
C0/501E: 8587 STA $87 [Store into TempDef]
C0/5020: 4A LSR A [Divide it by 2]
C0/5021: 4A LSR A [Again, by 2]
C0/5022: 85AE STA $AE [Store into TempDef/4]
C0/5024: BDB0E1 LDA $E1B0,X [Load stat buff flags]
C0/5027: 890100 BIT #$0001 [Check for Defender]
C0/502A: F009 + BEQ $5035 [Branch past defense addition if not present]
C0/502C: A587 LDA $87 [Load TempDef]
C0/502E: 18 CLC [Clear Carry]
C0/502F: 65AE ADC $AE [Add TempDef/4]
C0/5031: 8587 STA $87 [Store back into TempDef]
C0/5033: 800C ++ BRA $5041 [Branch past Acid Storm crap]
C0/5035: + 890200 BIT #$0002 [Check for Acid Storm]
C0/5038: F007 ++ BEQ $5041 [Branch ahead if not present]
C0/503A: A587 LDA $87 [Load TempDef]
C0/503C: 38 SEC [Set Carry]
C0/503D: E5AE SBC $AE [Subtract TempDef/4]
C0/503F: 8587 STA $87 [Store back into TempDef]
C0/5041: ++ BD91E1 LDA $E191,X [Load Status Effects high byte]
C0/5044: 890200 BIT #$0002 [Check for Pygmized]
C0/5047: F006 + BEQ $504F [Branch ahead if it's not present]
C0/5049: A587 LDA $87 [Load TempDef]
C0/504B: 4A LSR A [Divide it by 2]
C0/504C: 4A LSR A [Again, by 2]
C0/504D: 8587 STA $87 [Store it back into TempDef]
C0/504F: + A9E703 LDA #$03E7 [Load #$03E7 (999)]
C0/5052: C587 CMP $87 [Compare 999 with TempDef]
C0/5054: B002 BCS $5058 [Branch ahead if 999 > TempDef]
C0/5056: 8587 STA $87 [Else, store 999 into TempDef]
C0/5058: E220 SEP #$20 [8-bit mode enabled]
C0/505A: 60 RTS [Exit Subroutine]

[Hit % chance handler]
C0/505B: B997E1 LDA $E197,Y [Load Hit %]
C0/505E: 858D STA $8D [Store into TempHit%]
C0/5060: B990E1 LDA $E190,Y [Load Status Effects]
C0/5063: 8904 BIT #$04 [Check for #$04 (Barreled)] {What is the point of this?}
C0/5065: F00F + BEQ $5076 [Branch ahead if it's not present]
C0/5067: A58D LDA $8D [Load TempHit%]
C0/5069: 4A LSR A [Divide by 2]
C0/506A: 4A LSR A [Again, by 2]
C0/506B: 4A LSR A [And again, by 2]
C0/506C: 4A LSR A [And yet again, by 2]
C0/506D: 85A4 STA $A4 [Store into TempHit%/8]
C0/506F: A58D LDA $8D [Load TempHit%]
C0/5071: 38 SEC [Set Carry]
C0/5072: E5A4 SBC $A4 [Subtract TempHit%/8]
C0/5074: 858D STA $8D [Store into TempHit%]
C0/5076: + 4A LSR A [Divide by 2]
C0/5077: 4A LSR A [Again, by 2]
C0/5078: 85A6 STA $A6 [Store into TempHit%/4]
C0/507A: B9B0E1 LDA $E1B0,Y [Load stat buff flags]
C0/507D: 8910 BIT #$10 [Check for #$10 (Speed Up(Hit %))]
C0/507F: F009 + BEQ $508A [Branch ahead if it's not present]
C0/5081: A58D LDA $8D [Load TempHit%]
C0/5083: 18 CLC [Clear Carry]
C0/5084: 65A6 ADC $A6 [Add TempHit%/4]
C0/5086: 858D STA $8D [Store back into TempHit%]
C0/5088: 800B ++ BRA $5095 [Branch ahead
C0/508A: + 8920 BIT #$20 [Check for #$20 (?)]
C0/508C: F007 ++ BEQ $5095 [Branch ahead if it's not present]
C0/508E: A58D LDA $8D [Load TempHit%]
C0/5090: 38 SEC [Set Carry]
C0/5091: E5A6 SBC $A6 [Subtract TempHit%/4]
C0/5093: 858D STA $8D [Store back into TempHit%]
C0/5095: + A963 LDA #$63 [Load #$63 (99)]
C0/5097: C58D CMP $8D [Compare with TempHit%]
C0/5099: B002 + BCS $509D [Branch ahead if 99% > TempHit%]
C0/509B: 858D STA $8D [Else, store 99 into TempHit%]
C0/509D: + B9EDE1 LDA $E1ED,Y [Load...Niceness in enemies. Huh]
C0/50A0: F005 + BEQ $50A7 [Branch ahead if it's 0]
C0/50A2: A58D LDA $8D [Load TempHit%]
C0/50A4: 4A LSR A [Divide it by 2]
C0/50A5: 858D STA $8D [Store it back into TempHit%]
C0/50A7: + 229C38C0 JSR $C0389C []
C0/50AB: 8F024200 STA $004202 []
C0/50AF: A58E LDA $8E
C0/50B1: 4A LSR A
C0/50B2: 8F034200 STA $004203
C0/50B6: 85A4 STA $A4
C0/50B8: EA NOP
C0/50B9: EA NOP
C0/50BA: EA NOP
C0/50BB: EA NOP
C0/50BC: AF174200 LDA $004217
C0/50C0: 18 CLC
C0/50C1: 65A4 ADC $A4
C0/50C3: 85A4 STA $A4
C0/50C5: A58D LDA $8D
C0/50C7: C5A4 CMP $A4
C0/50C9: 60 RTS


For the critical chance:
Some weapons have special effects like balooning or stats boost depending on the weapon level, I would guess that the weapon critical hit value is only on the weapons which increase your critical hit chance as a special effect.

Nilthy
Posted on 07-19-15 03:45 AM Link | Quote | ID: 160431


Micro-Goomba
Level: 8

Posts: 2/11
EXP: 2067
Next: 120

Since: 07-11-15

Last post: 3140 days
Last view: 3132 days
Ah, cool. Thank you so much!

zhaDe
Posted on 07-19-15 04:33 PM Link | Quote | ID: 160436


Goomba
Level: 12

Posts: 5/23
EXP: 6243
Next: 1678

Since: 07-18-15
From: Québec

Last post: 2579 days
Last view: 2578 days
If you want more of this, the routines and comments I showed you was taken from this site : http://www.darkwoodinc.com/~enker/banks.php

I have no idea who did this, but its the best source of info I have found about SoM hacking.
It has the whole rom disassembly and alot of it is commented.

Main - Secret of Mana Hacking - Question about game mechanics New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (331KB of memory used)
MySQL - queries: 52, rows: 64/65, time: 0.016 seconds.