Does anyone know a way to modify the odds of a rare item dropping without expanding the monster data? Is it possible? I know the program ff6exped exists that expands the monster drop list and can change the odds, but I don't really want to expand the data this late in my testing phase and potentially break the mod with real hardware (which is a huge priority of mine). I was hoping there would be a simple hack to modify the odds of one or two monster/item drops.
Rare Item Drop Odds
|
08-23-2018, 05:35 PM
It's on my TODO list as well but I haven't checked yet other than a quick glance. The code about item drop seems to be located around here:
C2/5F1C: F0 30 BEQ $5F4E (if not, skip this enemy) C2/5F1E: 20 5A 4B JSR $4B5A (random, 0 to 255) C2/5F21: C9 20 CMP #$20 (carry=0 if A = 20h) C2/5F23: C2 30 REP #$30 (Acc and Index regs 16-bit) C2/5F25: 7B TDC (clear A) C2/5F26: 6A ROR (put carry in highest bit of A) C2/5F27: 79 01 20 ADC $2001,Y (enemy number $2001 is filled by code handling F2 script command, which handles enemy formation) C2/5F2A: 0A ASL (multiply enemy # by 2, as Dropped Item block is 2 bytes) C2/5F2B: 2A ROL (put carry into lowest bit. Rare when bit is 0, Common for 1) C2/5F2C: AA TAX (updated index with enemy num and rare/common slot) C2/5F2D: BF 02 30 CF LDA $CF3002,X (item dropped - CF3002 is rare, CF3003 is common) C2/5F31: E2 30 SEP #$30 (Acc and index regs 8-bit) C2/5F33: C9 FF CMP #$FF (does chosen enemy slot have empty FF item?)
Vanilla odds are 1/8 for rare drop and 7/8 common drop. You need to change that CMP at $C25F21. #$20 is 1/8, if as an example you do CMP #$40, odd will be 1/4 for rare and 3/4 for common.
08-23-2018, 09:43 PM
(08-23-2018, 07:44 PM)madsiur Wrote: Vanilla odds are 1/8 for rare drop and 7/8 common drop. You need to change that CMP at $C25F21. #$20 is 1/8, if as an example you do CMP #$40, odd will be 1/4 for rare and 3/4 for common. I'm guessing you are talking about a universal number here, and not per monster, right?
08-23-2018, 10:34 PM
(08-23-2018, 09:43 PM)Lightning Wrote: I'm guessing you are talking about a universal number here, and not per monster, right? Yes, if you want per monster you would need a table with as an example one byte for each monster (or if you really want to optimize divide that total by 2 or 3 depending what is your maximum rare odd) and get from that table with the monster ID the odd to check the random number against. |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Rare Steal always fail? | doofenH | 6 | 4,460 |
04-24-2022, 11:36 AM Last Post: doofenH |
|
Looking for patch that fix item loss when dying before using said item | Warrax | 4 | 3,561 |
08-03-2018, 09:49 AM Last Post: Warrax |
|
Item Drop Rate idea | Kugawattan | 2 | 3,212 |
06-28-2017, 12:35 PM Last Post: seibaby |
|
Item + Throw. Is it possible? | Denis Colli | 6 | 6,300 |
03-08-2016, 09:06 PM Last Post: Denis Colli |
|
Can't be sold item | tsushiy | 8 | 7,391 |
02-18-2015, 09:39 PM Last Post: Catone |
|
Item Arrange | tsushiy | 0 | 1,996 |
12-27-2014, 09:55 PM Last Post: tsushiy |
|
New rare/key items | fedorajoe | 2 | 3,380 |
10-08-2013, 10:13 PM Last Post: fedorajoe |
Users browsing this thread: 1 Guest(s)