Sign Up
Romhack.me connects you to ROM Hackers around the world.

Starter flags - Pokemon Ruby


0 Votes
Ness
Posted May 13, 2013 by Ness
Category: Scripting
Total Views: 1230

Are there flags that determine which starter you've picked in Pokemon Ruby?
I want to make scripts where you get rest of starters in the game, without giving the player a Pokemon he already choose at the beggining.

Tags: starter, flags, pokemon, ruby, br, hue

This solved the problem


1 Vote
Hoenn Starlight
Posted May 13, 2013 by Hoenn Starlight

Uh, I don't think they're flags, but var values stored on 8000.

Like if var value of 8000 is 0, then it's a Treecko that you chose.
If it's 1, then it's a Torchic that you chose.
And finally, 2 means you chose Mudkip.

So if you want to check if you chose Treecko, then you put this :

compare 0x8000 0x0
if 0x1 goto @youchosetreecko
OR
if 0x0 goto @youdidnotchosetreecko

Hope this helps.


Other Answers



1 Vote
giradialkia
Posted May 13, 2013 by giradialkia

I haven't gone and looked in a ROM to make sure of it, so don't take this as absolutely-correct!

There would have to be flags; when you battle your Rival in any Pokémon game, they'll have the starter that is strong against yours. I'd imagine the scripts for all Rival battles check what starter the Player chose in order to choose the right trainer battle to execute.

In Ruby, the Rival's gender varies, so there's probably something in a Level Script to determine whether to show the male Rival sprite or the female one. If there's no flags in the actual person-event for the Rival that suggest the starter chosen by the player, then check in the level scripts too.

Again this is mostly assumption.


0 Votes
Ness
Posted May 13, 2013 by Ness

Here's a part of the Route 119 rival script.

#org 0x1511DB
lockall
showsprite 0x19
checkgender
compare 0x800D 0x0
if 0x1 call 0x8151254
compare 0x800D 0x1
if 0x1 call 0x8151259
pause 0x41
compare 0x4001 0x1
if 0x1 call 0x81513A6
compare 0x4001 0x2
if 0x1 call 0x81513B1
applymovement 0xFF 0x81A0845
waitmovement 0x0
pause 0x1E
compare 0x4001 0x1
if 0x1 call 0x81513D2
compare 0x4001 0x2
if 0x1 call 0x81513E1
hidesprite 0x19
showsprite 0x10
pause 0x1E
checkgender
compare 0x800D 0x0
if 0x1 goto 0x815125E
compare 0x800D 0x1
if 0x1 goto 0x81512D8
releaseall
end


I guess that compare 0x800D and 4001 stand for gender, and 0x0, 0x1 and 0x2 stand for starters. Guess I'll have to check that out myself, thanks.

0 Votes
Ness
Posted May 13, 2013 by Ness

Oh, I didn't see Hoenn Starlight's post while writing my own. Thank you for making my job easier.