• 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 fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
54
Posts
15
Years
  • Seen May 21, 2011
Well, you could either search for the string in Advance Text, or, the less buggy option, use a table and hex editor and search for the string of text there.

I don't mean to sound desperate or anything but... I've never used a hex editor, and how would I go about searching for a string of text in hex workshop let alone edit it?

Sorry about all the questions
 

Atterny

Pokemon Scarlet Head Hacker
5
Posts
14
Years
  • Age 28
  • Seen Nov 17, 2013
Activate pokemenu

How to you turn on the pokemenu, the thing that allows you to view your pokemon? I cant ever seem to turn it on in a script, so does anyone know the script for it?
 

Atterny

Pokemon Scarlet Head Hacker
5
Posts
14
Years
  • Age 28
  • Seen Nov 17, 2013
Getting anything to appear to work

Ok, this has prbably been answered, but i couldnt find it, how do you get anything (like text ) to appear, no matter what my script, text never appears, the menu activates and i get the pokemon with a semi working start menu, but there is never text. Any ideas? (is that the same menu command for ruby too, or just fr?)
 

Andrew McKenzie

Supporting Pokemon Since 1999
356
Posts
17
Years
Okay, so it's my first time scripting.
I'm using Score_Under's PSKV_UI tool.

And so far, my scripts work except for one.

Below is a script for an "Earthquake" shake that has a strength of 5 both horizontally and vertically.
And has a camera delay of 3.

Code:
#dyn 0x740004
#org @740A4F
lockall
setvar 0x8004 0x3
setvar 0x8005 5
setvar 0x8006 5
setvar 0x8007 6
special 0x136
waitspecial
releaseall
end

Next thing I did was apply the #org offset to the script offset on the script event in Advance Map, as I did with my other scripts that worked.
As for the other script values in Advance Map, I left them as is, at 0, because I thought
the game would just read the var values and numbers from the script itself without changing these in A.M.

Stepping on the tile with the script causes the game to freeze.

It'd be appreciated if someone can correct what is wrong or tell me how to do so myself for future references.
Even if the error is in the script itself or in that I didn't change the values in Advance Map other than the script offset.
 

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
Okay, so it's my first time scripting.
I'm using Score_Under's PSKV_UI tool.

And so far, my scripts work except for one.

Below is a script for an "Earthquake" shake that has a strength of 5 both horizontally and vertically.
And has a camera delay of 3.

Code:
#dyn 0x740004
#org @740A4F
lockall
setvar 0x8004 0x3
setvar 0x8005 5
setvar 0x8006 5
setvar 0x8007 6
special 0x136
waitspecial
releaseall
end
Next thing I did was apply the #org offset to the script offset on the script event in Advance Map, as I did with my other scripts that worked.
As for the other script values in Advance Map, I left them as is, at 0, because I thought
the game would just read the var values and numbers from the script itself without changing these in A.M.

Stepping on the tile with the script causes the game to freeze.

It'd be appreciated if someone can correct what is wrong or tell me how to do so myself for future references.
Even if the error is in the script itself or in that I didn't change the values in Advance Map other than the script offset.

For the script put 0300 in the Unknown, and 4050 in the Var Number. This is in the script tab of Advance Map. Hope it helps.
 

Andrew McKenzie

Supporting Pokemon Since 1999
356
Posts
17
Years
For the script put 0300 in the Unknown, and 4050 in the Var Number. This is in the script tab of Advance Map. Hope it helps.

That made it work and fixed the freezing problem.
Thanks, Bolens! =D

I'll be sure to use this thread more often (hopefully not D=) if I run into any scripting problems.
I'm just glad that we have such a helpful community here.
Other forums I visit elsewhere, the people are nice, and will comment on your work.
But they never seem to want to help, even if you ask nicely.

Thanks again! =D
 

deoxys121

White Kyurem Cometh
1,254
Posts
13
Years
Early National Dex

Hello, hackers. I need help with creating a script in my Ruby hack that will allow an early National Pokedex, preferably when you first receive your Pokedex. I have tried including the command "special fr_national_dex" in a script, but the game freezes when I reach the script in the game. I also cannot find the existing script in the game that gives the National Pokedex, or even the one that gives the first Pokedex. Any help here would be appreciated. An early National Dex is a must, as I have added the ability to acquire all 386 Pokemon.

Additional script help I would appreciate is adding legendary battle scripts. I can never get them to work properly with the PKSV Script Generator.
 
Last edited:

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Hello, hackers. I need help with creating a script in my Ruby hack that will allow an early National Pokedex, preferably when you first receive your Pokedex. I have tried including the command "special fr_national_dex" in a script, but the game freezes when I reach the script in the game. I also cannot find the existing script in the game that gives the National Pokedex, or even the one that gives the first Pokedex. Any help here would be appreciated. An early National Dex is a must, as I have added the ability to acquire all 386 Pokemon.

If you are having problems with instantanious freezing, look at the post above yours and make sure that everything is in order.

Additional script help I would appreciate is adding legendary battle scripts. I can never get them to work properly with the PKSV Script Generator.

I'm not very familiar with PKSV, but I opened one of my own scripts with it to see how it works. You need the command 'wildbattle' followed by three values: The number of the Pokemon you want to battle, the level the Pokemon is at and the item it is carrying.

Code:
wildbattle 0x6D 0x7 0x0

This example is done in HEX and will allow you to fight a Koffing (0x6D = 109) at level 7 with no item attached to it.
 
Last edited:

Andrew McKenzie

Supporting Pokemon Since 1999
356
Posts
17
Years
Hello, hackers. I need help with creating a script in my Ruby hack that will allow an early National Pokedex, preferably when you first receive your Pokedex. I have tried including the command "special fr_national_dex" in a script, but the game freezes when I reach the script in the game. I also cannot find the existing script in the game that gives the National Pokedex, or even the one that gives the first Pokedex. Any help here would be appreciated. An early National Dex is a must, as I have added the ability to acquire all 386 Pokemon.

Additional script help I would appreciate is adding legendary battle scripts. I can never get them to work properly with the PKSV Script Generator.

Best I can help you with hear is to check the Quick-Starter in the script generator.
It sets the flag for the POKEDEX first and then uses the special fr_national_dex so that the NatDex is enabled.

example:
Code:
setflag FR_POKEDEX
special FR_NATIONAL_DEX
 

FireFox

Dialga Fangirl
58
Posts
19
Years
  • Age 37
  • UK
  • Seen Feb 24, 2018
[Fire Red] Hey folks, got an issue hiding sprites. Basically I'm trying to set a scene up similar to the S.S. Anne part where your Rival appears. Natually the sprite is invisible and when you step over the script tile, poof! He appears. My problem is, with my scene, I cannot hide the sprite, it's always there when I enter the map. I checked around the S.S. Anne Rival script but could not find an initial "hidesprite 0xRIVAL". I've tried making more script tiles and doing "hidesprite" on them but it still won't vanish.

What am I missing?
Thanks in advance.

-FireFox
 
Last edited:

Rayce

Nooo0000OOB
99
Posts
13
Years
  • Age 27
  • USA
  • Seen Aug 23, 2014
I have a simple and probably stupid question. I'm using XSE and cannot find the way to save my scripts to the game. Any help please?
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
[Fire Red] Hey folks, got an issue hiding sprites. Basically I'm trying to set a scene up similar to the S.S. Anne part where your Rival appears. Natually the sprite is invisible and when you step over the script tile, poof! He appears. My problem is, with my scene, I cannot hide the sprite, it's always there when I enter the map. I checked around the S.S. Anne Rival script but could not find an initial "hidesprite 0xRIVAL". I've tried making more script tiles and doing "hidesprite" on them but it still won't vanish.

What am I missing?
Thanks in advance.

-FireFox
I don't know which script you're talking about (I haven't been playing any Pokemon games lately, and have a bad memory ><) and I haven't really looked at the script. Try assigning the Movement Type of the Rival OW to Hidden. Then use an applymovement at the beginning of the script and include a #raw 0x61 before any of the other movements. #raw 0x61 is basically a Show Sprite movement. You can also use #raw 0x61, which is a Hide Sprite movement raw.
Should work. :/
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
[Fire Red] Hey folks, got an issue hiding sprites. Basically I'm trying to set a scene up similar to the S.S. Anne part where your Rival appears. Natually the sprite is invisible and when you step over the script tile, poof! He appears. My problem is, with my scene, I cannot hide the sprite, it's always there when I enter the map. I checked around the S.S. Anne Rival script but could not find an initial "hidesprite 0xRIVAL". I've tried making more script tiles and doing "hidesprite" on them but it still won't vanish.

What am I missing?
Thanks in advance.

-FireFox

The two ways I do it are to use person IDs. If you put 2C as the person ID, the sprite will be hidden on the map until you use the showsprite command on it in a script (for FireRed, anyway). The sprite will only appear during the course of the script, and will be hidden any time you enter that map.

If you need to have the sprite reappear permanently after the script, but be hidden before it, you can set the person ID of the sprite to an unused flag, then use the header in A-Map to create a script that hides the sprite and sets the sprite's flag when you enter the map when the variable for the script event is set to 0x0, and clears the flag and shows the sprite when it's not.

I've never tried Binary's method ... maybe that would be better/easier.
 

Shukumei

Teh Haxxorz
27
Posts
14
Years
The two ways I do it are to use person IDs. If you put 2C as the person ID, the sprite will be hidden on the map until you use the showsprite command on it in a script (for FireRed, anyway). The sprite will only appear during the course of the script, and will be hidden any time you enter that map.

Excuse me but that seems a little sloppy. For one thing you can only use it on one sprite per rom. My advice would be to experiment in a clean rom with flags, variables, and person IDs until you feel comfortable hiding and showing sprites. That way you're doing it the way the programmers do and you can do it on more than one sprite per rom. Of course it's been over a year since I last hacked a rom so I may be wrong.
 

FireFox

Dialga Fangirl
58
Posts
19
Years
  • Age 37
  • UK
  • Seen Feb 24, 2018

I don't know which script you're talking about (I haven't been playing any Pokemon games lately, and have a bad memory ><) and I haven't really looked at the script. Try assigning the Movement Type of the Rival OW to Hidden. Then use an applymovement at the beginning of the script and include a #raw 0x61 before any of the other movements. #raw 0x61 is basically a Show Sprite movement. You can also use #raw 0x61, which is a Hide Sprite movement raw.
Should work. :/

That worked like a charm, thank you! Got a bit confused at 1st as there were 3 hidden sections in the list in A-Map. The 1st one resets the ROM when the sprite should be on screen (quite funny actually!). The 2nd one only hid the bottom half of the sprite and the 3rd was a total hide. Thank you once again. :)

I have another one now.

Is it possible to change the trainer battle music for a specific battle? EG, play the Champion music for trainer ID 004?
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Excuse me but that seems a little sloppy. For one thing you can only use it on one sprite per rom. My advice would be to experiment in a clean rom with flags, variables, and person IDs until you feel comfortable hiding and showing sprites. That way you're doing it the way the programmers do and you can do it on more than one sprite per rom. Of course it's been over a year since I last hacked a rom so I may be wrong.

You're definitely wrong about that. You can use it on many, many sprites, in one map, in many maps. It works very well, imho, for sprites you only need to show for one event or script, and never need to see again on the map. Maybe it's lazy (not sloppy, because you'd still have the same sprite on the map, with a different ID anyway), but it's also more convenient and works like a charm to do what you need it to do.

EDIT: Also, I just realized Binary's method might not be the optimal way to do it, because setting the Movement Type to Hidden only makes the sprite invisible - it's still on the map, you can still bump into it, and you can still interact with it, you just can't see it. So you would probably really want to use either 2C, or use Map Scripts in the header and the hidesprite command.

Yay, I just proved I'm not sloppy. :)

EDIT 2: Also, the script FireFox is referring to on the SS Anne has the rival sprite set to 3D, which I would believe provides the same function as 2C - that's why she couldn't figure out how the sprite was hidden - it was done with a special ID #, similar to 2C. If you used Hidden as the Movement Type in this script, you'd never be able to go up the stairs, because you'd be bumping into an invisible sprite.
 
Last edited:
Status
Not open for further replies.
Back
Top