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

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Im having problems with my givepokemon script.
Every time i talk to the sprite i hear a click and they just look at me.
When I warp back into the area, it does the same thing over again.
Spoiler:

Also, I am using XSE 1.0.0 (because i cant get the newest one)

While your question has already been answered, here is an alternate link to XSE 1.1.1 - XSE 1.0.0 tends to be quite buggy and isn't really suitable for scripting.

Spoiler:


It's barely working. No text boxes show up at all.

Admittedly this is the first time in a long time that I'm scripting (and I never was too good at it to begin with), so I have no idea what's wrong here. Is it the order? I am using JPAN's hacked engine for FR, if that may cause trouble, but I doubt it. Any help would be immensely appreciated.

edit: okay, so I just tried to make another script, a simple sign, and no textbox showed up there either. I'm starting to think that it is this hack, but I didn't have any trouble with it before.

I believe that it may have something to do with your version of XSE as script should be working just fine. In addition, if something as simple as a sign won't activate properly then I'm fairly sure it has to do with your editor. Try downloading XSE 1.1.1 from the link earlier in this post.
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
I believe that it may have something to do with your version of XSE as script should be working just fine. In addition, if something as simple as a sign won't activate properly then I'm fairly sure it has to do with your editor. Try downloading XSE 1.1.1 from the link earlier in this post.
Cool, updating XSE makes it work! Thanks mate.

Though now my script still sucks. Just says player and doesn't give the player the option to nickname.

edit: nevermind about the player bit, I figured out what I did wrong, haha. silly me.
 
Last edited:

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Cool, updating XSE makes it work! Thanks mate.

Though now my script still sucks. Just says player and doesn't give the player the option to nickname.

Awesome, I'm glad that part worked out :3

For your new problem, add this this to the start of '@name', replacing the 'call 0x1A74EB' command.

Code:
setvar 0x8004 0x0
fadescreen 0x1
special 0x9E
waitstate

One of the features of JPAN's engine is that it has deleted all of the scripts that are in the original FR (Not just the events that hold them, but the actual scripts themselves). As such, you're actually trying to use data that used to be there but now isn't with the advent of the engine.

I added the setvar command because from the way the script seems to be set up, the player is getting their first Pokemon, right? Setting 0x8004 to 0x0 will let the game know that it is nicknaming the first party slot (If it isn't then you'll have to do some other stuff to let the game know that) so now everything should be in shape :D
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
Awesome, I'm glad that part worked out :3

For your new problem, add this this to the start of '@name', replacing the 'call 0x1A74EB' command.

Code:
setvar 0x8004 0x0
fadescreen 0x1
special 0x9E
waitstate

One of the features of JPAN's engine is that it has deleted all of the scripts that are in the original FR (Not just the events that hold them, but the actual scripts themselves). As such, you're actually trying to use data that used to be there but now isn't with the advent of the engine.

I added the setvar command because from the way the script seems to be set up, the player is getting their first Pokemon, right? Setting 0x8004 to 0x0 will let the game know that it is nicknaming the first party slot (If it isn't then you'll have to do some other stuff to let the game know that) so now everything should be in shape :D
Cheers mate, it does all work now.

That said, while I sort of new those changes were made, I just was unaware they ran that deep. Was this mentioned in the documentation? I didn't notice such a thing.

Looking over it now, I see that there are specials for random grass and water battles. Does that mean those no longer occur? Do I have to create a script for that?

Maybe I shouldn't have hacked the engine, haha.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Cheers mate, it does all work now.

That said, while I sort of new those changes were made, I just was unaware they ran that deep. Was this mentioned in the documentation? I didn't notice such a thing.

Looking over it now, I see that there are specials for random grass and water battles. Does that mean those no longer occur? Do I have to create a script for that?

Maybe I shouldn't have hacked the engine, haha.

Haha, it was one of the main features of the engine as it gives a lot of new free space to work with :P

Nope, random battles of all types and other tile-based scripts should run properly - Only the scripts assigned to person events, signposts and green script tiles should have been removed. If you need to see what these scripts said then just open up a separate (unpatched) FR ROM and read the scripts from there. Believe me, the benefits the patch provides far outweigh any downsides XD
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
he didn't exactly list everything that was deleted or changed, how was I, a simple ROM hacking noob, supposed to know?! :P

Yeah I thought it was a much better deal as well. Thanks for the clarification.

Anyway dude, thanks for all the help today. It was greatly appreciated. Actually made a fair bit of progress in scripting, something I've never done before in my previous attempts at ROM hacking, haha.
 
5
Posts
12
Years
  • Seen Jun 24, 2013
I need some help with the hidesprite and showsprite command.

I'm trying to set a var, and when that is set, have a sprite be shown and then do some stuff. However, when I put in the showsprite command, it doesn't work. I tried some testing using very basic hide/show sprite scripts, but it didn't work where I wanted to (Viridian City) I tried it in one of the houses in Viridian city and it worked just fine, but when I try to do it to a player in Viridian city, it has no effect.

I have all the person event #s lined up just fine, but it just won't work in Viridian City. Is there something else that I have to change to make it work?
 
6
Posts
12
Years
  • Seen Jul 21, 2015
Im not asking for a script but how would i make a script so that i have a 3 way choice between the starters like in the beginning of every pokemon game?
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
Im not asking for a script but how would i make a script so that i have a 3 way choice between the starters like in the beginning of every pokemon game?

well your best answer would lie at looking at the actual scripts themselves for the event, but basically you want 3 givepokemon scripts, each with their own flag, so when you pick own you make the Pokeball disappear, and at the same time use setflag to prevent the player from getting the other Pokemon.

If you do a search you will most likely find an example of such a script on the forums as well.

I created a simple level script for my hack, following this tutorial.
Code:
#dynamic 0x800000

#org @start
special 0x161
setvar 0x4033 0x1
release
end
Works fine the first time I enter the map, but not the second time. I realise that it's setvar 0x4033 0x1 that prevents it from repeating, but I want it to repeat. How do I do this and get the level script to function properly?
 
Last edited:

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I created a simple level script for my hack, following this tutorial.
Code:
#dynamic 0x800000

#org @start
special 0x161
setvar 0x4033 0x1
release
end
Works fine the first time I enter the map, but not the second time. I realise that it's setvar 0x4033 0x1 that prevents it from repeating, but I want it to repeat. How do I do this and get the level script to function properly?

The best way to get a level script to repeat is to use another one of the level script types open to you. Types 3 and 5 don't have to fulfil any variable conditions in order to activate (ie 4033 can be set to anything) and you can actually use a larger range of commands with them like checkflag. You can insert your level script as it stands now, with or without the setvar and it should be able to run smoothly and repeat when you re-enter the map.
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
The best way to get a level script to repeat is to use another one of the level script types open to you. Types 3 and 5 don't have to fulfil any variable conditions in order to activate (ie 4033 can be set to anything) and you can actually use a larger range of commands with them like checkflag. You can insert your level script as it stands now, with or without the setvar and it should be able to run smoothly and repeat when you re-enter the map.
I just tried using those but the game freezes as soon as you enter the map (and the special isn't activated anyway).
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I need some help with the hidesprite and showsprite command.

I'm trying to set a var, and when that is set, have a sprite be shown and then do some stuff. However, when I put in the showsprite command, it doesn't work. I tried some testing using very basic hide/show sprite scripts, but it didn't work where I wanted to (Viridian City) I tried it in one of the houses in Viridian city and it worked just fine, but when I try to do it to a player in Viridian city, it has no effect.

I have all the person event #s lined up just fine, but it just won't work in Viridian City. Is there something else that I have to change to make it work?

Can you show us the scripts you are using for both Viridian City and the house?

I just tried using those but the game freezes as soon as you enter the map (and the special isn't activated anyway).

That's strange, I tried it using a 05 level script and the sprite changed perfectly fine.

I guess you could try using a second (almost) identical level script on any connecting maps that sets the variable back to 0x0 instead of 0x1. Its a bit more unwieldy and may not be suitable for what you're doing depending on your circumstances, but it should be able to work if you're unable to use 03 and 05 for some reason.
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
That's strange, I tried it using a 05 level script and the sprite changed perfectly fine.

I guess you could try using a second (almost) identical level script on any connecting maps that sets the variable back to 0x0 instead of 0x1. Its a bit more unwieldy and may not be suitable for what you're doing depending on your circumstances, but it should be able to work if you're unable to use 03 and 05 for some reason.
Well now it doesn't freeze, but am I doing something wrong with the script then? I compile it as usual, go to the header tab, add a map script, select 3 or 5, paste my script offset into the box... and that's it, right?

Is it because I'm using A-Map 1.95?

I'd rather do it this way then going the unwieldy way, since I plan on using it a lot.

Edit: I see, 5 does work, but the surf sprite only appears after a battle or if I use something in the menu, which I suppose is a given. It's an odd fit, but I suppose I'll have to deal with it for now. Best not to get bogged down in this sort of thing, it's often quite discouraging.
 
Last edited:
29
Posts
12
Years
Hello guys, I'm new to hacking pokemon, have some programming knowledge but I'm rusty and haven't been playing with ASM (though I have some limited basic knowledge from my programming C++, C#, LUA, ect, ect).

Was hoping someone could help me get started on how to actually apply some ASM to Pokemon Fire Red, any help would be appriciated.

Also, if you reply to me, send me a PM with a LINK to your post, so that I don't miss it.

Thanks in advance 8-)

Yours truly
Zilvereyes
 
3
Posts
12
Years
  • Seen Jan 14, 2017
I dont know if this question was asked before but...
How can I make an NPC initially hidden?
Just like professor Oak in Pallet Town, he's initially hidden until you step before the grass.
 
18
Posts
18
Years
Hey guys,

I'm having a problem with the FR/LG National Dex enabling script. I've followed instructions as set out on a Youtube video by "Ez3OsO", yet when I come to talk to the guy, the game freezes.

Screenshot:
72zhio.png


Here's the code I am using.
Spoiler:


This is the link to the video tutorial that I followed;
http://youtu.be/9_RGwVHVIoY

If anyone could help me out here that'd be much appreciated!
 
5,854
Posts
17
Years
  • Age 34
  • Seen Dec 8, 2023
Hey guys,

I'm having a problem with the FR/LG National Dex enabling script. I've followed instructions as set out on a Youtube video by "Ez3OsO", yet when I come to talk to the guy, the game freezes.

Screenshot:
72zhio.png


Here's the code I am using.
Spoiler:


This is the link to the video tutorial that I followed;
http://youtu.be/9_RGwVHVIoY

If anyone could help me out here that'd be much appreciated!
Wow that video is from 2009. Have you got the most recent version of XSE?

anyway, this is how I'd write up the script.
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x10A
if 0x1 goto @end
special 0x16F
setflag 0x10A
fanfare 0x13E
msgbox @2 0x6
waitfanfare
release
end

#org @end
msgbox @1 0x6
release
end

#org @1
= Like your new POKéDEX?

#org @2
= Your POKéDEX was upgraded!
With XSE, you don't have to asign hex codes yourself, and rather than using hex codes to refer to different parts of the script, you can just use @whatever.

I suggest you read one of the script tutorials in the tutorials section. It's much better than watching a video.
 
18
Posts
18
Years
Thanks! I'm sorry but I'm a complete noob so would you be able to recommend a certain tutorial that'd help me get this done? Bear in mind I've never scripted ANYTHING prior to this, so I need the very basic nuts and bolts of it.
 
30
Posts
14
Years
  • Seen Jul 27, 2012
So it's been a while since I've hacked, about 2-3 years, and the other day I decided to get into it again.

So I downloaded the tools I usually use, pokescript, and and advanced map, and went to town.

Problem is, the version I downloaded quits if you ask a yes/ no question to the player. Regardless of what they pick, the script ends.

So I have a few questions.

1. Does anyone have a download link to a working version of pokescript that isn't that stupid 4shared one.
2. Is pokescript out dated? Is there something else I should use that's similar?

I love to hack, but I'd hate to have to learn a whole new scripting language.

Anyway, thanks.
Oh, and added a youtube video so you all know I sort of know what I'm doing, and I'm not some noob that took fire red and turned all the houses into caves or something.
http://www.youtube.com/watch?v=XyfwplS1E6o
 
Last edited:
Status
Not open for further replies.
Back
Top