• 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
Hey guys,

Really nooby question here but...

My Hidesprite command doesn't work. The sprite vanishes, then as soon as I walk in a direction it reappears. Here's the script if anyone could help me out.

Spoiler:



Thanks in advance for any help.
 
Last edited:
2
Posts
13
Years
  • Seen Sep 1, 2010
Hello im new to rom hacking and i cant figure this out... i cant figure out how movement scripts work... i cant understand the coding to movement scripts, and i dont now how to put it on advance map, cuz i thought you need a person and a script event... can someone help me figure out how this movement script coding works? i watch tons of tutorials on it and i still cant understand how it all works, and yes call me a noob lol, im just hoping someone can tell me how to understand everything about movement scripting and also putting it on Am, oh and just to let you know, my scripting type is pksv-ui, i would do pokescript but whenever i try to install pkmadv it just has this pop up: "run time error '429': activeX component can't create object" can someone also help me with that? cuz i saw a tutorial on youtube on movement scripts on pokescript and i understand that, but i cant get pokescript to work... so if anyone can help me with anyone of these that would be great! thanks, and idk if i can find this forum and my comment again so if you can, plz pm me how, if not, ill just try to find this, anyway thanks again :)
 

dizzyKitty

The Confuzzled Coding Cat
16
Posts
13
Years
Mmk guys. I'm trying to take this movement script I'm working on one step at a time using PKSV. Seems like there are multiple ways of coding this with different programs (I suppose it all depends on the compiler you're using, whether you input raws or score_under's shortcuts like the one I have here, say_!) and it's confuzzling my already confuzzled brain.

First thing's first. Exclamation point over the player's head. Simple? Yes. Making sense to me? Nope. At least, not my result. Here's what I have:

Spoiler:

It dumps the following code back out:

Spoiler:
...which is all garbage code from what I can tell and doesn't really tell me anything. Why does it dump random code like this? Should I try using another offset? Another flag? What's up?
 
Last edited:
45
Posts
16
Years
  • Seen Oct 8, 2010
Rom - Pokemon Fire Red
Script editor - PKSV
Script - Simular to the sign post girl in pallet town

What [COLOR=blue! important][COLOR=blue! important]im[/COLOR][/COLOR] trying todo is a script simular to the script in pallet town with the sign post girl. When you talk to her she will move but if yu talk to her on the right side she will move to the left if you talk to her on the left she will move to the right. does anyone suggest how to make this happen?
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
@Newpkmnhack:
Well..um. You could use vars (variables). You set a script tile to the right of her and any other direction you want. Then you set a var using 'setvar' on the basis of direction. Then you use comparevar in the main script, and depending on the variable set, you can have different movements.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Hey guys,

Really nooby question here but...

My Hidesprite command doesn't work. The sprite vanishes, then as soon as I walk in a direction it reappears. Here's the script if anyone could help me out.

Spoiler:



Thanks in advance for any help.

To hide a sprite, you need to give it a flag number also. Put the flag number (say, 1000) in the Person ID of the sprite, and put setflag 0xflag# (or, if using 1000, setflag 0x1000) in your script after the hidesprite command. The sprite will then stay hidden unless you clear the flag again.

Mmk guys. I'm trying to take this movement script I'm working on one step at a time using PKSV. Seems like there are multiple ways of coding this with different programs (I suppose it all depends on the compiler you're using, whether you input raws or score_under's shortcuts like the one I have here, say_!) and it's confuzzling my already confuzzled brain.

First thing's first. Exclamation point over the player's head. Simple? Yes. Making sense to me? Nope. At least, not my result. Here's what I have:

Spoiler:

It dumps the following code back out:

Spoiler:
...which is all garbage code from what I can tell and doesn't really tell me anything. Why does it dump random code like this? Should I try using another offset? Another flag? What's up?

I don't use PKSV (and you shouldn't either - use XSE) but the most likely cause of your problem is simply that the offset you're using is already being used in your game for something and that's why it's not being written.

In XSE you would use #dynamic 0x800000 to search for the free space when writing your script, don't know how you do it in PKSV, but my suggestion is to find an offset with enough free space for your script and use that instead, and your script should be written.
 
Last edited:
45
Posts
16
Years
  • Seen Oct 8, 2010
@Newpkmnhack:
Well..um. You could use vars (variables). You set a script tile to the right of her and any other direction you want. Then you set a var using 'setvar' on the basis of direction. Then you use comparevar in the main script, and depending on the variable set, you can have different movements.

Thank you, Im good a basic scripting and i wanna progress so im gunna do a bit of playing around and see if i can get it to work thanks very much ;]].
 

dizzyKitty

The Confuzzled Coding Cat
16
Posts
13
Years
I don't use PKSV (and you shouldn't either - use XSE) but the most likely cause of your problem is simply that the offset you're using is already being used in your game for something and that's why it's not being written.

In XSE you would use #dynamic 0x800000 to search for the free space when writing your script, don't know how you do it in PKSV, but my suggestion is to find an offset with enough free space for your script and use that instead, and your script should be written.

Mkay. I tried another offset that I found with FSF and rewrote the code to suit XSE. Here it is:

Spoiler:

It debugs just fine, but when I try to compile it, I get this error:
Error 63 "Bad record number" on line 1.
I've read around about this bug and all I can come up with is that I'm using an incorrect ROM version. What does that mean? Am I going to have to find another copy of the ROM and start coding all over again? I've made quite a bit of progress up to this point with other scripts and mapping and it'd be quite a disappointment to have to start from scratch. Is there another explanation for this bug? Is it yet another offset issue?
 

Zeffy

g'day
6,402
Posts
14
Years
  • Age 27
  • Seen Feb 7, 2024
Mkay. I tried another offset that I found with FSF and rewrote the code to suit XSE. Here it is:

Spoiler:

It debugs just fine, but when I try to compile it, I get this error:
I've read around about this bug and all I can come up with is that I'm using an incorrect ROM version. What does that mean? Am I going to have to find another copy of the ROM and start coding all over again? I've made quite a bit of progress up to this point with other scripts and mapping and it'd be quite a disappointment to have to start from scratch. Is there another explanation for this bug? Is it yet another offset issue?
Try to remove the characters after dynamic 0x82D533F. If that doesn't work, then just find a new free offset.
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
@dizzykitty:
Spoiler:

Open FSF, Open your rom. Search for enough bytes. Copy the first offset and paste it after the '#dynamic 0x'.
 

dizzyKitty

The Confuzzled Coding Cat
16
Posts
13
Years
@dizzykitty:
Spoiler:

Open FSF, Open your rom. Search for enough bytes. Copy the first offset and paste it after the '#dynamic 0x'.

Thank you Binary. =3 I think I figured out what I was doing wrong -- extra digit in the offset. *facepalm*

Though now my game freezes in-game when I trigger the script. Why might that be?

Spoiler:
 
54
Posts
15
Years
  • Seen May 21, 2011
Alright, so another nooby question coming up.

How do you stop a level script from repeating??

Here's mine, as soon as I get past the last applymovements, it repeats...


Spoiler:
 
Last edited:
5
Posts
14
Years
  • Seen Feb 23, 2014
I'm having something of a serious (game breaking) problem with a script on my hack. Its a ruby hack and its to do with the 5th gym leader (norman). All I did with the script was edit the name of the badge in the text he speaks and it ruined everything about the leader.

Initially this just made it so that he wouldn't initiate the catching tutorial with wally when you first speak to him, which I "fixed" by just removing the guy that stops you from moving on until you view the event. After playing even further though, to the point when you are supposed to battle him, it turns out that part of the script was also somehow corrupted, as he still just sits in the front of the gym and won't battle when spoken to, and the doors to his gym's trainers are also locked.

I am a complete newb when it comes to script (literally all i have done is changed text) and this is the first thing that's really gone wrong so far. Can anyone here give me some preliminary suggestions/advice on how to fix this, or if more is needed (like the script) I can certainly provide it.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Alright, so another nooby question coming up.

How do you stop a level script from repeating??

Here's mine, as soon as I get past the last applymovements, it repeats...


Spoiler:

Assuming you've set 0x5649 as the var number for you scrip in A-Map and the var value is 0000, instead of having setvar 0x5649 0x0, it should be setvar 0x5649 0x1.

The reason being that with 5649 as the var # and 0000 as the var value, the script will activate whenever you are standing on that block, as long as variable 5649 is set to 0000. If you set it to 0x1 in the script, it won't activate again, because the var value of 5649 is now set at 0001.
 
54
Posts
15
Years
  • Seen May 21, 2011
Assuming you've set 0x5649 as the var number for you scrip in A-Map and the var value is 0000, instead of having setvar 0x5649 0x0, it should be setvar 0x5649 0x1.

The reason being that with 5649 as the var # and 0000 as the var value, the script will activate whenever you are standing on that block, as long as variable 5649 is set to 0000. If you set it to 0x1 in the script, it won't activate again, because the var value of 5649 is now set at 0001.

Ahhhhh ;) thanks so much :D

Alright so another easy one that I can't find the answer to...

This is a regular script event, yet the tile freezes when I step on it. Do I have to change the unknowns or var values etc... in Advance Map? or is it the script its-self?

Spoiler:
 
Last edited:

Zeffy

g'day
6,402
Posts
14
Years
  • Age 27
  • Seen Feb 7, 2024
Ahhhhh ;) thanks so much :D

Alright so another easy one that I can't find the answer to...

This is a regular script event, yet the tile freezes when I step on it. Do I have to change the unknowns or var values etc... in Advance Map? or is it the script its-self?

Spoiler:
Yes, you need to change the Unknown and Var Numbers. As long as you have movements, you need to AFAIK.
 
202
Posts
14
Years
  • Seen Jan 6, 2017
I'm having something of a serious (game breaking) problem with a script on my hack. Its a ruby hack and its to do with the 5th gym leader (norman). All I did with the script was edit the name of the badge in the text he speaks and it ruined everything about the leader.

Initially this just made it so that he wouldn't initiate the catching tutorial with wally when you first speak to him, which I "fixed" by just removing the guy that stops you from moving on until you view the event. After playing even further though, to the point when you are supposed to battle him, it turns out that part of the script was also somehow corrupted, as he still just sits in the front of the gym and won't battle when spoken to, and the doors to his gym's trainers are also locked.

I am a complete newb when it comes to script (literally all i have done is changed text) and this is the first thing that's really gone wrong so far. Can anyone here give me some preliminary suggestions/advice on how to fix this, or if more is needed (like the script) I can certainly provide it.

You probably made the next larger than it originally was, in which case it would have overwrote another part of the script, or another script in the area. Not much you can really do about it tbh unless you re-write the whole script into a new, dynamic offset.

You should back-up often, and keep at least 5 back-ups at a time.
 

Darksun

triple rainbow, yo
123
Posts
15
Years
Where can I edit what Oak says at the start in the lab? In his script in the lab I can only edit some of it, and not all. It's not in any of the other scripts/person events on that map either?

To be more exact; the first few lines he and Gary is saying ("Gramps, I'm fed up with waiting","Be patient [insert rival name]" ++) aren't showing in his person-event-script-thingy..

The whole Oak-script seems kinda complicated (with level scripting and all)..
 
Last edited:
Status
Not open for further replies.
Back
Top