Users browsing this thread: 1 Guest(s)
Item Drop Rate idea

#1
Posts: 378
Threads: 94
Thanks Received: 17
Thanks Given: 26
Joined: Jul 2013
Reputation: 11
Status
Charmed
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?


Step forward, spriters! We are also responsible to make hacks look new and fresh, we are no less important than code or ASM hackers! CHARGE!!
Quote  

#2
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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).
  Find
Quote  

#3
Posts: 281
Threads: 18
Thanks Received: 13
Thanks Given: 8
Joined: Mar 2014
Reputation: 8
Status
None
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
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite