• 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.
72
Posts
12
Years
  • Seen Sep 30, 2017
This problem is very common and the way to fix it is in here:

http://www.pokecommunity.com/showthread.php?t=191500&highlight=cooley

Go to the header tab in A-Map, click Ctrl + H, copy the map script offset, paste it into XSE and decompile it with "level script" checked. If you look down from there a few lines, you should see something like this:

#raw 0xFFFF

Change it so that it shows this:

#raw 0x0

From there, click compile and test it out in-game.
Aaaaah. I knew this, but I was under the dumb impression that I had to change it to #raw 0x2, since it was a 02 Validate values-type level script. Thanks, it works now!
 

thor348

That's Oak to You
137
Posts
11
Years
Hey i've made my own script for an Item called the Codec. I put it in the Scripts.rxdata and in the Items PBS. It was all made and I clicked 'Save'. It acted as if it saved. When I took out my flash drive containing both my RPG maker xp and Pokemon essentials stuff, then put it into another computer, my scripts.rxdata reverted back to the original info from the starter kit. What happened to my modified scripts? Please help:(
 

SK3

Pokemon Hacking Company™ CEO
276
Posts
12
Years
Spoiler:


This script always stops after the first applymovement....what's wrong?
 
61
Posts
11
Years
I'm no expert but try putting the playsong before the textbox command. Also fadedefault unless you're trying to make it fade to a different song than the original.

Also make the text #org's before the movement #orgs.

That might help. :)
(Sorry I can't help more, but I'm just getting into this and making my creepypasta)
 

Renegade

Time for real life...
995
Posts
12
Years
Spoiler:


This script always stops after the first applymovement....what's wrong?

After all of your movement strings, you need a #raw 0xFE.
So after every one of your @walk #raw commands, you need #raw 0xFE.
That tells the game that the movement is over.

I'm no expert but try putting the playsong before the textbox command. Also fadedefault unless you're trying to make it fade to a different song than the original.

Also make the text #org's before the movement #orgs.

That might help. :)
(Sorry I can't help more, but I'm just getting into this and making my creepypasta)

Please try not to post solutions if you don't think they are valid... It's kinda annoying.
 
Last edited:
8
Posts
11
Years
  • Seen Mar 29, 2013
How do I make a trigger script?
Im not sure if this i the right place to post this and I hope im not requesting a script, but I want to know the basics of making a trigger script like one that prevents you from advancing in an area until a certain flag is set.
 

itman

Back to ROM hacking. :D
98
Posts
16
Years
  • Age 30
  • Seen Feb 5, 2014
How do I make a trigger script?
Im not sure if this i the right place to post this and I hope im not requesting a script, but I want to know the basics of making a trigger script like one that prevents you from advancing in an area until a certain flag is set.

Basically, in a part of your trigger your script, you are going to want to check if a separate event happened first before it activates: then it goes to the right script depending on whether the event happened or not.

So somewhere in your trigger script, you'll need to put a:
checkflag 0x200 (or any other flag number)
if 0x1 goto @done (or any pointer)


It'll make the script check if another event has happened yet. Therefore, in a separate event, you'll need to put a:
setflag 0x200 (the same flag number we are checkign for above)
When that flag is set, the trigger script will check and see that the event already happened, and allow you to do anything you want (advance into next area, etc..)
 

SK3

Pokemon Hacking Company™ CEO
276
Posts
12
Years
Thanks, the script finally continued! However, the hidesprite command doesn't seem to work?
 
8
Posts
11
Years
  • Seen Mar 29, 2013
Basically, in a part of your trigger your script, you are going to want to check if a separate event happened first before it activates: then it goes to the right script depending on whether the event happened or not.

So somewhere in your trigger script, you'll need to put a:
checkflag 0x200 (or any other flag number)
if 0x1 goto @done (or any pointer)


It'll make the script check if another event has happened yet. Therefore, in a separate event, you'll need to put a:
setflag 0x200 (the same flag number we are checkign for above)
When that flag is set, the trigger script will check and see that the event already happened, and allow you to do anything you want (advance into next area, etc..)

Ok so I tried doing that and came up with this script.
Spoiler:


It made the game freeze as soon as I stepped on the tile :(
Do you know what I did wrong?
 

itman

Back to ROM hacking. :D
98
Posts
16
Years
  • Age 30
  • Seen Feb 5, 2014
Ok so I tried doing that and came up with this script.
Spoiler:


It made the game freeze as soon as I stepped on the tile :(
Do you know what I did wrong?

Try it now.

Spoiler:


You can't put "lock" in a trigger script: it'll lock everything.
Also, at the end of your movements, you need to put "#raw 0xFE"

Lastly, just use "waitmovement 0x0", it's the "perfect pause".

Also in A-map, you need to set a variable and an unknown.
So set the first unknown to 0003 and teh first variable to 4052 (it can be anything really, but that's just what I use).
 
50
Posts
12
Years
Game: FireRed
Type: BPR

I've been having some problems with my scripts, and there is one that I haven't been able to fix. Here's the script in the spoiler:
Spoiler:

That's my script for entering into the first town, type 03 On entering map/not on menu close. I'm not sure if the problem is that one or this one:
Spoiler:


Okay here's what happens:
The 'on entering map' script is supposed to make prof. oak walk to the player, take him halfway to his lab, tell the player about the journey and ask him to tell his mother, and then oak goes to his lab (and his sprite disappears), however this only happens after flag 0x258 is set, which is set when you talk to Roberta (second script, she is inside). But when I leave Roberta's house, the screen just turns black. The music continues normally, but the screen is completely black, making it unplayable. Any ideas as to what the problem is? Not totally sure if it's the scripts or something wrong with my rom, but this doesnt happen before the flag 0x258 is set. I've tried it with different flags and it still won't work. Does anyone know how to fix this?
 
8
Posts
11
Years
  • Seen Mar 29, 2013
Thank you so much for this, I finally got it to work!
One last question, what are the move player commands, and how do you get them to work at the same time as the move NPC commands?
Also what is the best hiding NPC command? I heard hidesprite was buggy.
 

Logan

[img]http://pldh.net/media/pokecons_action/403.gif
10,417
Posts
15
Years
Game: FireRed
Type: BPR

I've been having some problems with my scripts, and there is one that I haven't been able to fix. Here's the script in the spoiler:
Spoiler:

That's my script for entering into the first town, type 03 On entering map/not on menu close. I'm not sure if the problem is that one or this one:
Spoiler:


Okay here's what happens:
The 'on entering map' script is supposed to make prof. oak walk to the player, take him halfway to his lab, tell the player about the journey and ask him to tell his mother, and then oak goes to his lab (and his sprite disappears), however this only happens after flag 0x258 is set, which is set when you talk to Roberta (second script, she is inside). But when I leave Roberta's house, the screen just turns black. The music continues normally, but the screen is completely black, making it unplayable. Any ideas as to what the problem is? Not totally sure if it's the scripts or something wrong with my rom, but this doesnt happen before the flag 0x258 is set. I've tried it with different flags and it still won't work. Does anyone know how to fix this?
You seem to be having problems with your level scripts, follow this tutorial:

http://www.pokecommunity.com/showthread.php?t=191500

If you're still having problems, don't hesitate to post again.
 
2
Posts
12
Years
  • Seen Apr 16, 2019
Alright. Kinda frustrated here. I am attempting to hack Pokemon Gold. I am using JohtoMap, PKSV, and Translhextion. I am attempting to do things through hex editing, not scripting. Here's my question: Why is it that I can edit pre-placed events text and functions for the most part, but whenever I try to edit in another event of my own, the game just melts down? For example:

Selected: 3
Picture: 1
Face/Type: 3
Movement: 10
Time Type: FF
Time Value: FF
Sight Range: 0
Palette: 0
Type: 0
Script: 65A0
Flag Index: FF
Flag Bit: FF

This is the info that JohtoMap shows for my person that I added to New Bark Town that I want to say "Hi." Next is a my hex editing that I did to make this happen. On the start of offset x1225A0:

51 A4 65 00 87 A8 E8 57 00 00 00 00 00 00 00 00

That is all that I've edited. That is starting at the beginning of offset x1225A0, and finishes halfway through. All i want him to do is turn to you and say "Hi." And then let the game resume. This is what his script looks like in PKSV:

#org 0x1225A0
'--------------------------------------------
jumptextfaceplayer 0x65A4 ' 0x1225A4


#org 0x1225A4
#raw 0x87
#raw 0xA8
#raw 0xE8
#raw 0x57
= \h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00

It repeats the \h00 part over and over forever. I don't understand. Whenever I try to do anything text related, the infinite \hoo comes up, along with the #raw. I just have no idea what to do. I've tried tutorials, but I guess I'm just inept. Any help please? Thanks in advance.
 

The1337Spriter

Pokemon Master
14
Posts
11
Years
Pokemon Firered
Guys,for some reason,my script wont insert into the game,I cant find the offset in it and everytime I try to insert it with xse,it says:Too less paremeters on line 1.The correct is 2.Here is my script to make a person give you a lugia,talk to you,then run away:
#dyn 0x740000
#org @start
lock
checkflag 0x200
if 0x1 jump :end
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
addpokemon LUGIA 0xA EONTICKET 0 0 0
setflag 0x200
storepokemon 0 LUGIA
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
:end
release
end

#org @noroom
msgbox @noroom-msg
callstd MSG_NOCLOSE
release
end

#org @noroom-msg
= You don't have enough room in your party.
#org @get-msg
= ???:Oh no,it's the fuzz!It's your curse now!It'll
probably kill you!!!
m walk_up walk_up walk_up walk_up walk_up walk_up

walk_up walk_up walk_up walk_up walk_up walk_up walk_up

walk_up walk_up walk_up walk_up end




What is wrong with the script?
 
Last edited:

MrElephant

Pokemon Researcher
80
Posts
12
Years
I just have two quick questions. First I don't know which flags are available in emerald and secondly I want to create a give pokedex script, but I dont even know where to begin. I use pokescript, not XSE so can anyone give me any advice?
 

Renegade

Time for real life...
995
Posts
12
Years
I have a question. Hope someone can answer.

I don't understand the "spriteface" command. I understand that after it you need to put which person you want to use (0xFF) but after that you need to put which way the person faces. What are the values of the positions? Such as "look left" and "look up". I tried 0x3 but nothing happened.

EDIT: Nevermind, I figured it out.
 
Last edited:
Status
Not open for further replies.
Back
Top