FF6 Hacking
Item Drop Rate idea - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Item Drop Rate idea (/thread-3484.html)



Item Drop Rate idea - Kugawattan - 05-24-2017

The way the vanilla Item Drop rate works is 7/8 common item drop and 1/8 rare item drop. This results in the common items dropping at an incredible rate, and likewise it can be frustrating to get a rare item from a single enemy. However, this allows for a guaranteed item drop if both the common and rare slots are the same item (or different).

My idea was to have the following rates: 50% the common item, 25% the rare, 25% nothing, but 100% if both the rare and common item are the same. However, I am unaware of how to perform this, and so far I have been only able to change the item drop rates (which I currently have set up as 65% common and 35% rare, which is less than an ideal set). Anyone can help me on this ordeal?


RE: Item Drop Rate idea - madsiur - 05-24-2017

One way to do it (on battle end for each monster):

1) Compare both drops, if same go to 4 else continue.
2) if common drop occurs, go to 4 else continue.
3) if rare drop occurs, give rare drop else go to 5.
4) give common drop and go to 5.
5) exit (or continue w/e was going on before 1).


RE: Item Drop Rate idea - seibaby - 06-28-2017

Try this:

Code:
hirom
;header
!freespace = $C2A65A


;Change Rare/Common drop chances to be equal
org $C25F1E
JSR $4B53      ;random carry set or clear
NOP #2

;Hook
org $C25F2D
JSR newfunc
NOP #3

org !freespace
newfunc:
TXA             ;bit 0 of X is 1 if we're getting the common item
LSR             ;Shift bit 0 of X into carry
LDA $CF3002,X   ;item dropped - CF3002 is rare, CF3003 is common
SEP #$30        ;Accumulator and index regs 8-bit
BCS .exit       ;Exit if we're getting the common item
XBA
STA $10
XBA
CMP $10         ;Compare top and bottom bytes of A
BEQ .exit       ;Exit if same
JSR $4B53       ;random carry set or clear
BCC .exit       ;Exit 50% of the time
LDA #$FF        ;Set Empty item
.exit
RTS