I guess here you find, what you're looking for: https://kiwi.ds.googlepages.com/sdat.html
Hi there! I was designing a berry tree system for my game (Firered), and while I figured out a way to make a tree give a berry a day, I realized that there was something else in the game that does pretty much the same thing; the regenerating berries in Berry Forest, and regenerating trinkets on treasure beach. Does anyone have any info on these regenerating items, and how I might be able to expand the list to cover all my berry trees? Additionally, does anyone know where I might find the offsets for the flags/variables for hidden items?
Well, i only took a quick look into this issue (3 minutes) because i'm very busy now, and i don't want to discourage you, but there's a limit for those items.
The routine at 080CC44C is the one who gets the flag associated with the hidden item, based on Hidden ID + 0x3e8. This means no repoint+add items without overwriting other game flags.
Thats the only thing i found out by now.
Props
Well, plan B is to make a script that just clears all the hidden item flags to zero at midnight, which is simple enough. I assume the hidden item flags are stored somewhere in memory, so I'd just have to write 0 to all the bytes I need to clear it out. Does anyone have the offset for this location in the memory?
#dynamic 0x800000
'----------------
#org @start
setvar 0x8000 0x3E8 'Base flag
setvar 0x8001 0x0 'Counter
goto @loop
#org @loop
compare 0x8001 0xBE
if B_> goto @end
addvar 0x8001 0x1
clearflag 0x8000 ' Clear flag in var 8000
addvar 0x8000 0x1
goto @loop
#org @end
setvar 0x8000 0
setvar 0x8001 0 'Reset vars
release
end
Well, actually, they are normal flags, like 0x800 etc..., but are Hidden ID + Flag 0x3E8. (E.g: Hidden item 0x10 would be flag 0x3F8. Clear the flag to be able to get the item again)
The script is somewhat easy. There are 0xBE hidden items. Here's a script made now for the purpose:
I made this in 5 minutes and didn't test it. Test it and please warn me if there's an inconvenience with this.Code:#dynamic 0x800000 '---------------- #org @start setvar 0x8000 0x3E8 'Base flag setvar 0x8001 0x0 'Counter goto @loop #org @loop compare 0x8001 0xBE if B_> goto @end addvar 0x8001 0x1 clearflag 0x8000 ' Clear flag in var 8000 addvar 0x8000 0x1 goto @loop #org @end setvar 0x8000 0 setvar 0x8001 0 'Reset vars release end
(to @redriders180: I saw your PM, i just hadn't the time to answer it because its a little complex for my current time available)
.align 2
.thumb
main:
push {r0-r4, lr}
ldr r0, =0x3E8 @flag base
ldr r1, =0x0 @counter
loop:
cmp r1, #0xBE
bhi end
add r1, r1, #0x1
bl clearflag
add r0, r0, #0x0 @next flag
b loop
end:
pop {r0-r4, pc}
clearflag:
ldr r4, =0x0806E6A8+1 @clearflag routine offset
bx r4
I figured out how to edit the Hoenn Dex order in Ruby, without editing the National Dex. The offset is at 0x1FC84C. It does not list by Pokemon index number, it lists by dex entry index number. Treecko's index number is 277, but Treecko's dex entry number is 252. Which is why the byte at the offset I listed is FC. Changing the bytes here will change the Hoenn Dex while keeping the National Dex intact.
I suspect the same table exists in Emerald, and the bytes should be exactly the same.
EDIT: Hacked the Hoenn Dex to something similar (but not exactly the same) to a listing I'm planning on using in a future hack:
![]()
Do you know where the limiter that limits the Hoenn Dex to 202 entries is though? It would be nice if we could expand it. It shouldn't require any ram repointing because the maximum amount of entries that the ram allows is 386.
Yup, that table exists in Emerald, it's located at 0x31DFB8
For any ruby/firered to emerald equivalents, you can ask me, as i'm a emerald hacker.
So glad I found this, thank you! I've been thinking of figuring out how to make my own callasm command for battle scripting, but you've just saved me some work!stuff
.align 2
.thumb
/*This routine does all the hard work in retrieving your current
money and stores it in vars 0x8000 and 0x8001.
0x8000 - Lower half
0x8001 - Upper half
*/
main: push {r4-r6, lr}
ldr r6, .DMA_MAP
ldr r0, [r6, #0x0]
mov r5, #0xA4
lsl r5, r5, #0x2
add r0, r0, r5
ldr r1, .OTHER_RAMLOC
ldr r1, [r1, #0x8]
bl get_amount /*Does the actual decrypting*/
ldr r1, .VAR_8000
str r0, [r1]
pop {r4-r6, pc}
get_amount: ldr r4, .DO_CALC
bx r4
.hword 0x0000
.DMA_MAP: .word 0x03005008
.OTHER_RAMLOC: .word 0x02039934
.VAR_8000: .word 0x020370B8 /*Var 0x8000-0x8001*/
.DO_CALC: .word 0x0809FD59
Did someone ever thought about more characters than the two genders in FR? For example 2 boys and 2 girls?
In my eyes it would need a change of the choice in the intro and a modification of the scripts that renders the trainerbattles (backsprite) and the maps (OW) as like some minor things.
My Question is: Would it be possible with a small amount of work? I don't know how the routines that differ the gender work, but thinking about the checkgender command gives me the feeling that the game only allows 2 Values.
Does anyone know sth. about it?