- 252
- Posts
- 12
- Years
- Seen Jul 6, 2019
Ah, sorry. I'm using LSA's item editor atm, so I'm used to that. In other editors, you'll probably want to edit the first special byte. Should be the same for KDS's routine as well; he said mystery byte, but I think he meant the first special byte, since that's if I'm not mistaken, the 18th byte in the item data structure that we all love. You'll want to use an unused number of course; don't give Heat Rock the special byte 22 in hex for example, or you'll end up with a second Soul Dew. For your second question, its .routine: .word 0x08myoffset. Don't reverse the order btw.Hello, I've got another problem and I still don't understand basic things. Help would be appreciated.
So, I tried to insert [S-HIGHLIGHT]this routine[/S-HIGHLIGHT]. Now, the routine consists of two parts. I inserted the first one, the item check routine, to offset 0x78D310. However I had some trouble with the other one. Here's the codeSpoiler:.text
.align 2
.thumb
.thumb_func
.global heatrock
main:
ldr r1, .address
mov r0, #0x4
strb r0, [r1, #0x5]
push {r0-r3}
bl itemcheck
cmp r0, #0x4A @change this number to your desired held item effect number.
bne original
pop {r0-r3}
ldr r0, .weatherturns
mov r1, #0x8
strb r1, [r0, #0x0]
b return
itemcheck:
ldr r0, .routine
bx r0
original:
pop {r0-r3}
ldr r0, .weatherturns
mov r1, #0x5
strb r1, [r0, #0x0]
return:
ldr r0, .return
bx r0
.align 2
.address: .word 0x02023E82
.routine: .word 0x08800001
.weatherturns: .word 0x02023F48
.return: .word 0x0802B313
@ insert 00 49 08 47 XX XX XX 08 at 0802B304
The first thing is I tried many item editors, but there's no such thing as "effect number". There's mystery bytes, index, special, but no effect number. So, my question is what do I write here?
Another thing is that the author of the routine wrote I thought I knew what I should do however I was wrong.
The problem is my offset was 0x78D310. And that would mean that there's one digit missing. So, my second question is how do I write the offset here. Do I write it "0x8myoffset" or "0xmyoffset"? Oh and also do I reverse the order or is reversing only necessary to pointers?
There's something else. Let's assume I inserted both routines. Where is this item? Does the place depend on the "effect number"? Also, what's the index of this new item? How would I give it to player if I don't know the index? Besides, do I have to write a script to make this item work or is it unnecessary?
Also, I think you're a bit confused. It's not really "Where is this item?", because you're making a new one :p. What you want to do is open up your item editor, find an unused item index (the ????? slots) and make your new item. Name it Heat Rock, give it your desired special byte, etc. Also, you don't need to write a script for this item, because my ASMAGIX will automatically make it work. Enjoy your 8 turns of Sunny Day :D.
EDIT: Also, XX XX XX is just the reversed pointer to the location of your heat rock routine. For example, if you inserted it at 0x800000, you'd put 01 00 80.