New Version of Shared Item Code
#1
Hello,

I have created my own version of the Shared Item Code. It is a mix of the Standard Shared Item Code created by Guru and the Perfect Item Code created by Vega.

Here is the source:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

###### 1st ASM - Item Probability Store ASM #######
Adresses:
807ACBC8  ## NTSC-U
807BB628  ## PAL
807BAC94  ## NTSC-J
807A99E8  ## NTSC-K

add r11, r4, r3 ## Add r3 and r4 together. You are now at the green shell halfword for your current position on the game's item table.
li r12, 0xVV ## Load Users Item Value VV into r12.
add r11, r12, r11 ## Add r11 and r12 (Item value) to get exact item's halfword prob. location on the game's table.
lhz r12, 0 (r11) ## Load the Probability from the game's Table into r12.
lis r11, 0x8000
stw r12, 0x1578 (r11) ## Store Probability to Memory Adress 80001578.
cmpwi r0, 0 ## Default instruction.

###### 2nd ASM - Shared Item ASM #########
Adresses:
807AB704  ## NTSC-U
807BA164  ## PAL
807B97D0  ## NTSC-J
807A8524  ## NTSC-K

lis r11, 0x8000
lwz r12, 0x1578 (r11) ## Load the Item Probability from Memory Adress 80001578.
cmpwi r12, 0
beq- no_go ## If Item's Probability is 0, we know you cannot get the item for that position for the current in-race room size. Jump to no_go.

li r3, 0xWW ## Load Item WW in r3,  typical Shared Item code.

no_go:
stw r3, 0x0020 (r23) ## Default instruction.


--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now my Question: Is it good enough to post it. If yes, how should I name this code. It can be a new version of the "In Race Room Size and Position based Shared Item Code"
or you can call it "Perfect Shared Item Code", I don't have an Idea.

Thank you already for the Answer  Smile .
Reply


Messages In This Thread
New Version of Shared Item Code - by Unnamed - 01-23-2020, 12:53 PM
RE: New Version of Shared Item Code - by Vega - 01-23-2020, 02:10 PM
RE: New Version of Shared Item Code - by Unnamed - 01-23-2020, 06:25 PM
RE: New Version of Shared Item Code - by Vega - 01-23-2020, 07:02 PM
RE: New Version of Shared Item Code - by Unnamed - 09-14-2020, 10:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)