• 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.

Shaymew

likes when Dunsparce Glares
101
Posts
15
Years
Line Splicing?

I have encountered a strange error that happens whenever I edit elite four or gym leader scripts, trying to completely change what they say.
here is an example of what happens....

Also, just in case if it helps solve the problem, im using XSE on Ruby

#org 0x190728
= Gah! A person!\p Oh... Sorry...\l I'm not good with people.\n I am sort of a shut-in.\p However, spending my days playing \n Touhou has taught me that dodging \nand grazing are very important skills\n to have. \pHow long can you last on bombs\n when you can't dodge the bullets?\p Now! NIMUSAN--!

#org 0x190823
= Ayayayayayayayayayayayayayayaya...

When I compile and save, it comes out as
#org 0x190728
= Gah! A person!\p Oh... Sorry...\l I'm not good with people.\n I am sort of a shut-in.\p However, spending my days playing \n Touhou has taught me that dodging \nand grazing are very important skills\n to have. \pHow long can you last on bombsAyayayayayayayayayayayayayayaya...
#org 0x190823
= Ayayayayayayayayayayayayayayaya...

When I shorten the script it doesn't happen, but I am trying to figure out why this happens. Does it have to do with the offsets not offering enough bytes or something?
 
Last edited:
33
Posts
13
Years
  • Seen Dec 12, 2020
This is probably because you put a bigger text than the older one so that is happenning in the rom:

older text [end of text1] ayayayaya... [end of text2]
then the compilator arrive to the msg box
new text which is bigger[end of text1] ayayayaya [end of text2]
here it overwrited a part of the ayayayaya because ther was'nt enough space

then the compilator arrive to the second message box
but the hex command which means [end of text] is BEHIND the offset of the second msgbox so it is overwritten

new text which is bayayayayayaya[end of text]

so in the rom, the first text is read until it reaches the [end of text]


to solve the problem, you just have to pick new offsets for the msgboxes

and sorry for the bad english, I don't know technical terms because I'm belgian
 
Last edited:
190
Posts
14
Years
  • Seen Apr 14, 2016
ive been trying to make a level script to occur right as the game starts, and i followed diegoisawesome's tutorial about level scripts but i had a problem. first here's the script
Spoiler:


and the video showing the problem is in the attachment below

anyways, it seems to skip the msgboxes and im not sure why. while going thru the steps made by diegoisawesome, he says " In the second part[script], there should be a pointer to your script. Under it, there should be a #raw word 0x(random number). Replace the random number with 0. Compile it and test it out in the game." But when i did it the random number was already 0, im not sure if thats the cause of the problem. can someone plz help me?
 
Last edited:

Kaylene

Hmm.
18
Posts
16
Years
  • Age 29
  • Seen Sep 21, 2023
I'm not all too sure what I did, but for whatever reason the wildbattle script is not agreeing with me. I'm fiddling with a rather simple script that creates a Rotom-esque encounter, but whenever I compile the script, the wildbattle part is never included (upon re-opening the script) and the script acts as if I had pressed the 'no' option, even when I hit yes. My script editor is XSE, and I'm using the person event type.

Spoiler:


It worked at one point, and at another I re-opened the script and put the missing wildbattle line in and it worked, but I can't seem to replicate that effect. Thank you in advance, to anyone who decides to help.
 

pokeguy9000

Ghost Ralts
43
Posts
15
Years
I'm trying to set up a scipt so that when you press A on a certain tree you find your first pokemon, i just dont know wht kind of tutorial to look for (like give item or pokemon etc) and whether to set this up as a script or if i can use a signpost in A-map?
im hacking ruby using a-map and pokescript
 
228
Posts
13
Years
I'm trying to set up a scipt so that when you press A on a certain tree you find your first pokemon, i just dont know wht kind of tutorial to look for (like give item or pokemon etc) and whether to set this up as a script or if i can use a signpost in A-map?
im hacking ruby using a-map and pokescript

You should use a signpost. A script is executed upon stepping on a script or upon interacting with a signpost/person.
You could use givepokemon (it works in XSE, I'm not sure it works in pokescript) and then set a flag to make sure you'll only receive it one time.
 
228
Posts
13
Years
Okay i think it's going to take a lot of learning before i can write this script but thank you!

It isn't that hard. You should first find an empty flag, then do a checkflag at the beginning, and check or it's false, if it's false, then do a givepokemon and a setflag to make sure that you won't get another Pokémon.
 

adhdguitar

Newbie Pokémon Hacker
210
Posts
13
Years
  • Seen Jan 16, 2015
Hi, I put this script on a person event in the beginning of the game that is supposed to give you your first Pokemon. Just for the sake of experimentation I made it a Mew on Level 35. However, it won't obey the player for some reason. Also, the Person Event won't disappear, and I set it's ID to 0x11. I tried posting in the Simple Questions Thread, but thought I might have more luck here.

Spoiler:
 
228
Posts
13
Years
Hi, I put this script on a person event in the beginning of the game that is supposed to give you your first Pokemon. Just for the sake of experimentation I made it a Mew on Level 35. However, it won't obey the player for some reason. Also, the Person Event won't disappear, and I set it's ID to 0x11. I tried posting in the Simple Questions Thread, but thought I might have more luck here.

Spoiler:

The reason Mew doesn't obey is because it's programmed in the games that Mew normally doesn't obey. If you use another Pokémon it should work.

About that it doesn't disappear, people only disappear because of their ID upon entering a map. To make it disappear right after the script, you can use the movesprite or the disappear commands.
 
6
Posts
16
Years
  • Seen Jan 8, 2016
Anyone know the hex of oldale pokemart? I want to change the items being sold there through hex. Thanks in advance.
 

pokeguy9000

Ghost Ralts
43
Posts
15
Years
Thanks to all for their eariler advice
Is there a way i can remove the level scripts of route 101 on ruby so that the prof and dog are not there but his bag remains?
also so that i can edit the script so that i can add text before the contents of birch's bag is seen?
 
228
Posts
13
Years
Thanks to all for their eariler advice
Is there a way i can remove the level scripts of route 101 on ruby so that the prof and dog are not there but his bag remains?
also so that i can edit the script so that i can add text before the contents of birch's bag is seen?

You could remove the scripts at the bottom of the map that show Birch and Poochyena running, and move both of them away and set their movement behavior to hidden.
And yes, you could edit the script, but you'll have to find free space, or it will overwrite a different part of the script and totally mess up the script.
 

Andrut

Collecting dust since 1898
284
Posts
14
Years
What was the National Pokedex special for Emerald? I want to make it National from the beggining. Do i have to replace a certain special with the Regional Dex one?
 

adhdguitar

Newbie Pokémon Hacker
210
Posts
13
Years
  • Seen Jan 16, 2015
What was the National Pokedex special for Emerald? I want to make it National from the beggining. Do i have to replace a certain special with the Regional Dex one?
special 0x1F3 activates the National Dex in Emerald, but I'm not sure replacing the Regional Dex code with it will work, you might want to seek further clarification. In all honesty, you may have to repoint the whole script to a different offset and add a line, but like I said, I might be wrong.



The reason Mew doesn't obey is because it's programmed in the games that Mew normally doesn't obey. If you use another Pokémon it should work.

About that it doesn't disappear, people only disappear because of their ID upon entering a map. To make it disappear right after the script, you can use the movesprite or the disappear commands.
Okay, it sorta worked. The Pokeball disappears when you talk to it, but if you leave and come back, it's still there. I could have sworn that if a flag was set that was the same as the person event's ID, it wouldn't appear.
 
Last edited:
228
Posts
13
Years
special 0x1F3 activates the National Dex in Emerald, but I'm not sure replacing the Regional Dex code with it will work, you might want to seek further clarification. In all honesty, you may have to repoint the whole script to a different offset and add a line, but like I said, I might be wrong.




Okay, it sorta worked. The Pokeball disappears when you talk to it, but if you leave and come back, it's still there. I could have sworn that if a flag was set that was the same as the person event's ID, it wouldn't appear.

Try using movesprite2. It moves the person definately. I almost always use that. You could use for example:
movesprite2 LASTTALKED 0xFF 0xFF
and you will never see it again :)
 

Andrut

Collecting dust since 1898
284
Posts
14
Years
Where is the script where i'm given the Pokedex in Emerald? I searched the map and couldn't find anything....
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
What commands would be necessary for me to have in a Nicknaming script? I know specials play a role in it, but what else?
 
Status
Not open for further replies.
Back
Top