• 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.
10
Posts
14
Years
  • Seen Nov 10, 2016
@Dr.Fuji :

Here's what I got from tajaros's guide

Spoiler:


EDIT : I did make it work

Spoiler:


but still I don't make out the 'setvar' part ? Why does it have to be '0x8004' (for 0x1 I understand it as '2nd position in the team')
and 'waitstate' is for ?

P/s : I'm quite new at this so apologize for my slow understanding :"(
 
Last edited:
10
Posts
14
Years
  • Seen Nov 10, 2016
Spoiler:


Here's what I got from breaking down a script of a tree for CUT

I searched for #raw 0x5B but couldn't find it ?

What is that for ? Is it an animation for 'tree being cut down' ?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Spoiler:


Here's what I got from breaking down a script of a tree for CUT

I searched for #raw 0x5B but couldn't find it ?

What is that for ? Is it an animation for 'tree being cut down' ?


You are correct, if you look in OWRE, you can see that the tree animation is just frames like your hero uses, and therefore can be controlled with a simple applymovement. Not all raw movements are completely documented, which is why you couldn't find it.
 
154
Posts
11
Years
  • Seen Jan 8, 2017
Hey guys, I have a few questions, and please don't make a big deal and say I'm asking for scripts, I know how to script perfectly fine, I would just like to know what is needed to be done to make these happen:
a script for a door that opens when the player has a key.
a script for a trainer battle using the vs seeker (where they continue to get stronger)
a script for a mart that progressively sells more items as the game goes on. (not over time, through set points in the story)
help for any of these would be much appreciated. Thank you.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Hey guys, I have a few questions, and please don't make a big deal and say I'm asking for scripts, I know how to script perfectly fine, I would just like to know what is needed to be done to make these happen:
a script for a door that opens when the player has a key.
a script for a trainer battle using the vs seeker (where they continue to get stronger)
a script for a mart that progressively sells more items as the game goes on. (not over time, through set points in the story)
help for any of these would be much appreciated. Thank you.

I don't know how to do the second one, but I have done the first and third.

For the first one, just place a hidden character on the door and remove the warp. Then write a script that will open the door, have the player walk forward, and then warp. Then set up a script that will check your player for the key, using the check item command, and if he has it, it will jump to the first script. If not, it just says that the door is locked.


The second one is a little more complicated. You can use flags or vars, though vars will simplify it. First, find a tutorial or figure out how to make a mart in the first place. Now, make several different mart scripts with the mart you want for each point in the story. Put all of these marts as differet dynamic offsets in your script.

Now, I'm going to use vars for this explanation, place a script or add to a script at key points in the story that will set a specific var, let's say 0x5000 +1 at each event.

Then, go back to your old script and using the compare comand, check your var for the different values and have it jump to the different mart offsets based on the value in the var 5000.
 
154
Posts
11
Years
  • Seen Jan 8, 2017
I don't know how to do the second one, but I have done the first and third.

For the first one, just place a hidden character on the door and remove the warp. Then write a script that will open the door, have the player walk forward, and then warp. Then set up a script that will check your player for the key, using the check item command, and if he has it, it will jump to the first script. If not, it just says that the door is locked.


The second one is a little more complicated. You can use flags or vars, though vars will simplify it. First, find a tutorial or figure out how to make a mart in the first place. Now, make several different mart scripts with the mart you want for each point in the story. Put all of these marts as differet dynamic offsets in your script.

Now, I'm going to use vars for this explanation, place a script or add to a script at key points in the story that will set a specific var, let's say 0x5000 +1 at each event.

Then, go back to your old script and using the compare comand, check your var for the different values and have it jump to the different mart offsets based on the value in the var 5000.
Sounds great, I had a few ideas about how they might've worked out, I just needed a bit of clarification. Thanks a lot!
 
241
Posts
11
Years
If I want to make a sprite disappear on a different map than a script I'm writing, do I just add a setflag to my script and use the same flag number as the Person ID on the sprite?

That's just what I gleaned from looking at the Giovanni script in Silph, making all the Rockets in Saffron disappear with setflag 0x3E and all the rockets having 3E be their ID number...
 

tajaros

Hi I'm dawg
855
Posts
11
Years
If I want to make a sprite disappear on a different map than a script I'm writing, do I just add a setflag to my script and use the same flag number as the Person ID on the sprite?

That's just what I gleaned from looking at the Giovanni script in Silph, making all the Rockets in Saffron disappear with setflag 0x3E and all the rockets having 3E be their ID number...

Yes, just use a setflag and have that flag in the person ID of the sprite in the different map.
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
Hey guys, I have a script that doesn't seem t work in my FR rom

Spoiler:


Also the rom uses the Jambo Trainer Mugshot Hack so that is why the 3rd trainerbattle value is 0x500

Anyway, the problem is that, I placed it in Viridian City in front of the Pokemon Centre. I open the game, and I try to walk into Viridian, but the game restarts. If someone could help explain why this is, this would help a lot.

Also the script box only has the Var Number filled in which is 5000
 

kj3400

Wants a Magneton for a Charger
53
Posts
11
Years
  • Seen May 11, 2014
This question might be a simple thing, I think.

I have a script that starts just after the game intro and requires a sprite to be hidden before I activate it (to simulate them coming up the stairs). Problem is I can't get the sprite to disappear before the map loads. Does it involve a level script? This has been bugging me for a while now.
 

tajaros

Hi I'm dawg
855
Posts
11
Years
This question might be a simple thing, I think.

I have a script that starts just after the game intro and requires a sprite to be hidden before I activate it (to simulate them coming up the stairs). Problem is I can't get the sprite to disappear before the map loads. Does it involve a level script? This has been bugging me for a while now.

You can edit the movement type of the OW and set it to hidden that way it will be hidden. But you have to put a showsprite in your script.

But, if you're not using Jpan's Engine then pick something that the game uses for flags so the OW's would be hidden. Perhaps 2C try putting that in your person ID and your good.

Hey guys, I have a script that doesn't seem t work in my FR rom

Spoiler:


Also the rom uses the Jambo Trainer Mugshot Hack so that is why the 3rd trainerbattle value is 0x500

Anyway, the problem is that, I placed it in Viridian City in front of the Pokemon Centre. I open the game, and I try to walk into Viridian, but the game restarts. If someone could help explain why this is, this would help a lot.

Also the script box only has the Var Number filled in which is 5000

Try removing 0x500 and make it 0x0 if everything worked then maybe it's how you inserted the Mugshot Hack.

Or for starters try using the 1st Pallete in the table so it will be 0x100.

And remove those release scripts at the end of your scripts since you didn't put a lock at the opening of your script.
 
Last edited:

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
Try removing 0x500 and make it 0x0 if everything worked then maybe it's how you inserted the Mugshot Hack.

Or for starters try using the 1st Pallete in the table so it will be 0x100.

And remove those release scripts at the end of your scripts since you didn't put a lock at the opening of your script.

I tried doing these actions, and I also compiled the script into a backup of the rom, and even a fresh new rom, but I still freeze before getting into town, so it dismissed my idea that the rom was bad.
Again, here's the script, with the appropriate changes.

Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I tried doing these actions, and I also compiled the script into a backup of the rom, and even a fresh new rom, but I still freeze before getting into town, so it dismissed my idea that the rom was bad.
Again, here's the script, with the appropriate changes.

Spoiler:

I compiled your script and it works beautifully without sprite 0xA. It also works great when sprite 0xA isn't hidden. However, as soon as I hide it, and it comes into view, the game crashes. In fact, any hidden sprite on screen in Viridian City causes the game to crash. Why? I have no clue! I will keep looking into this.

Edit: This happens in more places than Viridian City... Could the hidden option be corrupt??

Edit2: Confirmed. This happens everywhere with hidden option number 1, the other two hidden options on the movement list work and don't crash the game, however, they refuse to obey the showsprite command or the raw show command used with an applymovement.

Edit3: haha, I made it work. Okay, you need to use the 3rd Hidden option in the list and type 4B in the movement box below. Now, remove the showsprite command from your script and instead add "#raw 0x61" to the top of the movement @whoops. This is the show command foe FireRed. (I was using Ruby commands for edit 2, wrong list)

A couple of notes. A green s-tile script will not run on entering the map. You are going to have to turn this into a level script somehow if you want it to happen when leaving the pokecenter. Also, if you don't open the door for sprite 0xA, it's going to be weird. I have some ideas on how to do both, so if you can't figure it out, pm me.
 
Last edited:

thizzman

PKMN rom maker and hacker
32
Posts
11
Years
  • Age 33
  • Seen Jun 9, 2022
Hi,
I need help with one of my scripts.
First things first, I am working on a Pokemon hack!
(Pokemon XD gale of darkness remake for gba)
And I've come across something I've never dealt with b4...
How would I make shadow Pokemon appear in my game When one of
my trainer battles that Need Shadow Pokemon?
Would I change the shiny sprite into a shadow sprite?
I dunno?
Then in a trainer battle how could i make Shadow Pokemon catch-able?
Thx a whole bunch guys (;
pls pls pls get this to work ;)
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Hi,
I need help with one of my scripts.
First things first, I am working on a Pokemon hack!
(Pokemon XD gale of darkness remake for gba)
And I've come across something I've never dealt with b4...
How would I make shadow Pokemon appear in my game When one of
my trainer battles that Need Shadow Pokemon?
Would I change the shiny sprite into a shadow sprite?
I dunno?
Then in a trainer battle how could i make Shadow Pokemon catch-able?
Thx a whole bunch guys (;
pls pls pls get this to work ;)

Just an idea. Learn how to expand the number of ingame pokemon, but not the dex, to twice as many pokemon as you need. Then, take all of the new slots and duplicate every pokemon, or just the ones you want to make shadow. Then, recolor their regular sprite to shadow ones. Lastly, make them evolve into the regular form by the machine that purify's the pokemon.

For catching a shadow pokemon from a trainer, you would need to set it up so that when the battle begins, the changes that a catch trainer's pokemon gameshark code are applied. I don't know much about gameshark codes, but from what I understand, it's just modifying the ram which you can do in a script.
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
I compiled your script and it works beautifully without sprite 0xA. It also works great when sprite 0xA isn't hidden. However, as soon as I hide it, and it comes into view, the game crashes. In fact, any hidden sprite on screen in Viridian City causes the game to crash. Why? I have no clue! I will keep looking into this.

Edit: This happens in more places than Viridian City... Could the hidden option be corrupt??

Edit2: Confirmed. This happens everywhere with hidden option number 1, the other two hidden options on the movement list work and don't crash the game, however, they refuse to obey the showsprite command or the raw show command used with an applymovement.

Edit3: haha, I made it work. Okay, you need to use the 3rd Hidden option in the list and type 4B in the movement box below. Now, remove the showsprite command from your script and instead add "#raw 0x61" to the top of the movement @whoops. This is the show command foe FireRed. (I was using Ruby commands for edit 2, wrong list)

A couple of notes. A green s-tile script will not run on entering the map. You are going to have to turn this into a level script somehow if you want it to happen when leaving the pokecenter. Also, if you don't open the door for sprite 0xA, it's going to be weird. I have some ideas on how to do both, so if you can't figure it out, pm me.

Sir, I officially love you. Thank you so much for helping me fix my script. You are the greatest.
 

thizzman

PKMN rom maker and hacker
32
Posts
11
Years
  • Age 33
  • Seen Jun 9, 2022
Just an idea. Learn how to expand the number of ingame pokemon, but not the dex, to twice as many pokemon as you need. Then, take all of the new slots and duplicate every pokemon, or just the ones you want to make shadow. Then, recolor their regular sprite to shadow ones. Lastly, make them evolve into the regular form by the machine that purify's the pokemon.

For catching a shadow pokemon from a trainer, you would need to set it up so that when the battle begins, the changes that a catch trainer's pokemon gameshark code are applied. I don't know much about gameshark codes, but from what I understand, it's just modifying the ram which you can do in a script.


Thx so much!
However i dont get the "expand the number of ingame pokemon" Do you know any gd tutorials on how to change ingame data?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Thx so much!
However i dont get the "expand the number of ingame pokemon" Do you know any gd tutorials on how to change ingame data?

I don't know how to personally, but several hackers have.

Here is what Chaos Rush did in his 649 patch:
*Re-point Pokémon names table
*Re-point Base stats table
*Re-point front sprites table
*Re-point back sprites table
*Re-point normal palettes table
*Re-point shiny palettes table
*Re-point TM-compatibility table
*Re-point evolution table
*Re-point moveset table
*Re-point Icon table
*Re-point Icon Palette table
*Re-point battle positioning tables
*Re-point footprint table

I believe this is the thread he used to do it. I haven't read the whole thing but it looks promising:
http://www.pokecommunity.com/showthread.php?t=185257&highlight=65536

It looks like it is just a bunch of re-pointing.


However, I just thought of something. XD didn't feature all of the Pokemon, so if you're going to make it exactly like XD, just replace some of the pokemon that won't appear, then reorder the pokedex and put the shadow pokemon either right next to the normal one, or all clumped together at the end. There is a tool in PGE for doing that.


Just a note that this discusion has left the topic of scripting and that if you need any more info, it would be best to take it to the simple questions thread just so that noone gets annoyed.
 
Last edited:
Status
Not open for further replies.
Back
Top