• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
275
Posts
13
Years
  • Seen Oct 9, 2019
In XSE, what is the differences among pokemart, pokemart2 and pokemart3?
No one seems to know. I may take a look at it in FireRed later.


I want to make a shop which sells the decoration for secret bas only, but I can only find the list of items in the XSE script tutorial, not the decoration list. Where can I find the list of decoration?
To the best of my understanding, the standard "pokemart" commands are not compatible with Secret Base decorations. I think you'd have to script up something else, like a multichoice. I'm really not sure, though.
 
18
Posts
15
Years
I notice that pokemart3 is used for decoration, but I can't find the list of decoration and so can't work on them.
Still I can't figure out what pokemart2 does...
 

Truality

Left for good
1,006
Posts
12
Years
  • Age 32
  • Seen May 17, 2013
I notice that pokemart3 is used for decoration, but I can't find the list of decoration and so can't work on them.
Still I can't figure out what pokemart2 does...
Searching this very thread is no easy task, is it...
The pokemart command gives analizes the data and, if a TM is present, treats all items a TMs. But because normal items don't have TM number or attack, a glitched response appears instead.

The pokemart2 command, however, always presents pictures, so if really necessary to have both normal items and TMs in the same display, use it instead.
 

Innocence

PC Lurker: I'm watching you...
1,041
Posts
19
Years
So. I'm basically creating a script that involves checking trainer flags.
Without giving too much away, after battling the trainers, the trainer check initially works fine. After the first time that you choose not to reset the flags, however, my npc still behaves as if the flags are set, UNTIL I talk to one of the trainers in question again, whereupon he repeats this behavior. Can anyone tell me what's up?
 

EdensElite

No0b, but getting there.
190
Posts
12
Years
  • Age 28
  • UK
  • Seen Jul 4, 2014
When I post this, it tells me no #org/#seek directives were found, cannot compile.

Code:
@dynamic 0x800000
@org Bulbastarter
checkflag 0x7
if 0x1 goto @end
checksound
cry 0x1 0x0
showpokepic 0x95 0xA 0x1
msgbox @sAskPlayer 0x05
waitcry
hidepokepic
compare LASTRESULT 0x0
if 0x1 goto @end
goto @giveStarter

#org @giveStarter
givepokemon 0x1 0xA 0x168 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @end
releaseall
end

#org @sAskPlayer
= Do you want Bulbasaur?

Can someone tell whats wrong?
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Change "@dynamic 0x800000" to "#dynamic 0x800000" and "@org Bulbastarter" to "#org @Bulbastarter". '#' is the symbol for preprocessing directives (like dynamic, org, seek, etc.) and '@' is the symbol for dynamic addresses.
 

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
Ok, two questions:

1). I'm a little unsure of how to use JPAN's hacked engine Special 0x7e – Get Tile Number. Yes, I know it says tile number, but: Does this special get the tile number or the block number? Block number really seems to make more sense to me...

2). Is there a way to mute the clicking noise made when pressing "A" to select something (temporarily and only in specific instances)?

Thanks in advance.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Ok, two questions:

1). I'm a little unsure of how to use JPAN's hacked engine Special 0x7e – Get Tile Number. Yes, I know it says tile number, but: Does this special get the tile number or the block number? Block number really seems to make more sense to me...

2). Is there a way to mute the clicking noise made when pressing "A" to select something (temporarily and only in specific instances)?

Thanks in advance.

1) Yeah, it gets the block number.

2) Not without an ASM hack.
 

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
Darthatron said:
1) Yeah, it gets the block number.

2) Not without an ASM hack.

1). Thanks :)

2). I don't know any ASM...but out of curiosity, how difficult of a hack would this be to implement (could it be done fairly quickly by someone who does know ASM)?
 
18
Posts
15
Years
I have some questions about trainerbattle.
For trainerbattle 0x1, it can be used for both rival and GYM leader? What about the music during the battle? How can I change it?
For trainerbattle 0x3, it seems that it's for elite four, but some said that for 0x3, the script will continue even if you've lost in the battle. So what is the exact function for 0x3?
And for other kinds of trainerbattle, what are their functions?
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I have some questions about trainerbattle.
For trainerbattle 0x1, it can be used for both rival and GYM leader? What about the music during the battle? How can I change it?
For trainerbattle 0x3, it seems that it's for elite four, but some said that for 0x3, the script will continue even if you've lost in the battle. So what is the exact function for 0x3?
And for other kinds of trainerbattle, what are their functions?
Type 0 is an ordinary battle. Script execution stops after the battle, regardless of its outcome.

1 and 2 are identical, and run scripts after the battle ends (but only if the player won). They except one extra argument: the offset of the script to run. (The script with "trainerbattle" stops running, and the offset you specify starts running.)

3 is a continue-battle. The script that calls "trainerbattle" keeps running after the battle (but only if the player won).

4 is a double battle. It accepts one extra argument: the offset of some text to display if the player does not have two or more usable Pokemon (and hence can't start the battle).

5 is a rematch battle. It's almost identical to 0, but it will actually check the trainer number and do a lookup, to see if you're supposed to battle one of their rematch battles instead. To use this to its fullest potential, you would need to learn more about the rematch functionality.

6 is a special kind of double battle that accepts two extra arguments. I have no idea what the second extra argument is.

7 is a double rematch battle.

8 is a clone of 6.

9 is a tutorial battle. So far as I know, it functions identically to 0 except that the player will not whiteout if they lose the battle. Passing in 0x0003 instead of 0x0000 (as the unknown halfword argument) enables Oak's mid-battle narration.

All other values are treated as type-0 battles.

Note that if the trainer you specify has already been defeated, "trainerbattle" does nothing and the script that calls it will keep running unless you used a rematch battle type. And I think you need an ASM hack to change the music.
 

M.L

Invisible
761
Posts
13
Years
  • Seen Dec 21, 2017
Help me please i took the daycare script from Firered and used it so the player must give in a poke but i cant get it so that the player can recall the pokes i have done this...
#dynamic 0x800000

#org @start
lock
countpokemon
compare 0x800D 0x1
if 0x1 goto @stop
special2 LASTRESULT 0x84
compare LASTRESULT 0x1
special 0xBC
waitstate
compare 0x8004 0x6
special2 LASTRESULT 0x85
compare LASTRESULT 0x0
special2 0x8005 0xBA
special 0x176
cmdc3 0x2F
goto 0x81BF541
special 0xBC
special2 LASTRESULT 0x85
compare LASTRESULT 0x0
special2 LASTRESULT 0x179
compare LASTRESULT 0x0
special2 LASTRESULT 0x178
compare LASTRESULT 0x1
special2 0x8005 0xBA
special 0x177
special 0x176
cmdc3 0x2F
special2 LASTRESULT 0x17A
call 0x81A6675
release
end

#org @stop
release
end
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Help me please i took the daycare script from Firered and used it so the player must give in a poke but i cant get it so that the player can recall the pokes i have done this...

Spoiler:
You're not using "compare" properly.

Code:
special2 LASTRESULT 0x84
 compare LASTRESULT 0x1
 special 0xBC
You're doing a comparison, but you're not checking the result (with an "if" command). You make the same mistake with every comparison in the script except for the first one, which is why it's broken.
 
120
Posts
15
Years
  • Seen Mar 15, 2024
rocket grunt music

hi im trying to make all team rocket grunts use the RSE trainer battle music in pokemon leaf green. What script command can do this?
 

SupahNinja

Scripting Ninja
34
Posts
12
Years
  • Seen Dec 23, 2011
Changing player sprite mid-game?

Hello.
I was wondering how to change the character's sprite at will.
I know it's possible, because that's what happens every time the player rides their bike or goes fishing, but I don't know the proper commands to use in XSE.
This is for FRLG, by the way.

Help would be greatly appreciated, as I'm using this for a puzzle in my hack.
Thanks.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I know it's possible, because that's what happens every time the player rides their bike or goes fishing, but I don't know the proper commands to use in XSE.
Those aren't implemented with script commands. There are no script commands that can change the player's sprite...

This is for FRLG, by the way.
...unless you're modding FireRed and you've applied JPAN's Hacked Engine.
 

SupahNinja

Scripting Ninja
34
Posts
12
Years
  • Seen Dec 23, 2011
I know it's possible, because that's what happens every time the player rides their bike or goes fishing, but I don't know the proper commands to use in XSE.
Those aren't implemented with script commands. There are no script commands that can change the player's sprite...

This is for FRLG, by the way.
...unless you're modding FireRed and you've applied JPAN's Hacked Engine.
Hmm...

How is it done in the game?
ASM? Because I was planning on learning that soon, and I might as well start here.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Hmm...

How is it done in the game?
ASM? Because I was planning on learning that soon, and I might as well start here.
It's ASM, but that knowledge alone wouldn't be enough to reverse-engineer it. I'd imagine that the code for that particular sprite-change is buried deep in the game engine. It'd be hard to find, let alone reverse-engineer -- unless someone already has, that is.

JPAN's FireRed Hacked Engine adds functionality that allows you to change the player's overworld sprites from a script. His patch is meant to be applied only to a clean FR ROM (it deletes a lot of stuff), but he also has a hack tool that can apply the changes to a hack-in-progress (it's trickier, though).
 

SupahNinja

Scripting Ninja
34
Posts
12
Years
  • Seen Dec 23, 2011
Hmm...

How is it done in the game?
ASM? Because I was planning on learning that soon, and I might as well start here.
It's ASM, but that knowledge alone wouldn't be enough to reverse-engineer it. I'd imagine that the code for that particular sprite-change is buried deep in the game engine. It'd be hard to find, let alone reverse-engineer -- unless someone already has, that is.

JPAN's FireRed Hacked Engine adds functionality that allows you to change the player's overworld sprites from a script. His patch is meant to be applied only to a clean FR ROM (it deletes a lot of stuff), but he also has a hack tool that can apply the changes to a hack-in-progress (it's trickier, though).
I've looked up some videos of it in action, and some of them do state that it's an ASM hack. But no one gives details.

http://www.youtube.com/watch?v=FKJM4L7xP84
http://www.youtube.com/watch?v=WteLk6tXwDA
http://www.youtube.com/watch?v=25JQ08zfp2M

Which means that if none of them reply to their YouTube messages, I'll check out JPAN's Hacked Engine.

Thank you, David.
 
Last edited:
18
Posts
12
Years
  • Seen Mar 15, 2015
Hi, member's of Pokemon community , I was wondering if there is a script for the ROM Pokemon firered To make Whichever one you don't choose [Boy ,Girl ] become your rival like pokemon Emerald . Including pokemon overworld sprite changing gender.
 
Status
Not open for further replies.
Back
Top