• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

Help Thread: Script Help Thread

Status
Not open for further replies.
Yes, that would be a way to check if the Pokémon the player selected was in the first slot.

thanks ... thanks...
sorry if I'm asking this,
but I saw in Glazed version that the hacker uses the nicknaming function as its password...
How to do that?
 
Hello fellow community,

FIRE RED

I'm new here and I have a little problem with my "DAD" script. It's supposed to be a hack where you are a male trainer and you get a Pikachu. ATM im trying to prevent the player from entering his room by using his "dad" as a blockage with the cause, that the room isn't finished yet (they just moved in). I want him to go to the table where the "mom" sits (5x left and 2x down) when you have chosen your Pokémon and i want him to stay there, also when I reenter the house. I have 3 Problems:

1: I want the "dad" to stay on the said place no matter what

2: The player can't move everytime I triggered: "$done"

3: I have a problem while compileing the scrpit, it says: "Floating Pointer must be pushed" "Enter offset for dad.§att:"

Here is the "DAD" scrpit and the "trigger" scrpit to set flag 0x1200:
Spoiler:

Hope i got everything I needed for you.

Hope you can help me, thanks in advance. :)

FOUND RESOLUTIONS!

1: not found yet

2: i had a problem where the scrpit didn't stoped the movement of "DAD"

3: Stupid me put "§" instead of "$" <- EPIC FAIL
 
Last edited by a moderator:
Hello fellow community,

FIRE RED

I'm new here and I have a little problem with my "DAD" script. It's supposed to be a hack where you are a male trainer and you get a Pikachu. ATM im trying to prevent the player from entering his room by using his "dad" as a blockage with the cause, that the room isn't finished yet (they just moved in). I want him to go to the table where the "mom" sits (5x left and 2x down) when you have chosen your Pokémon and i want him to stay there, also when I reenter the house. I have 3 Problems:

1: I want the "dad" to stay on the said place no matter what

2: The player can't move everytime I triggered: "$done"

3: I have a problem while compileing the scrpit, it says: "Floating Pointer must be pushed" "Enter offset for dad.§att:"

Here is the "DAD" scrpit and the "trigger" scrpit to set flag 0x1200:
Spoiler:


Hope i got everything I needed for you.

Hope you can help me, thanks in advance. :)

FOUND RESOLUTIONS!

1: not found yet

2: i had a problem where the scrpit didn't stoped the movement of "DAD"

3: Stupid me put "§" instead of "$" <- EPIC FAIL

I moved your post to this thread because that's where it belongs, and also put the script in spoilers. Unfortunately I'm not familiar with the script editor you're using, I use XSE, but does the Dad NPC have a Person ID number? You can set that in Advance Map. If he doesn't then he'll go back to his initial place after you move him. Person IDs are actually flags, so setting the Dad NPC's flag would make him disappear, and clearing it would make him appear again. But in your case you just need the flag so that the NPC can keep its moved position.
 
Unfortunately I'm not familiar with the script editor you're using, I use XSE
,

I'm using XSE also, but I do it in another way i guess. I write the script down with Notepad, save it as .rbc and compile it into the game, using BufRite and PokeScript together.

but does the Dad NPC have a Person ID number? You can set that in Advance Map. If he doesn't then he'll go back to his initial place after you move him. Person IDs are actually flags, so setting the Dad NPC's flag would make him disappear, and clearing it would make him appear again. But in your case you just need the flag so that the NPC can keep its moved position.

The person-ID is 1202, the person number is 2 (you can see the person number in the script:

"applymovement 2"....

Sadly, I can't post a link already to show you the pic of Advance Map. I could send you a mail with it if needed.

How do I have to write the script, so the "DAD" will stay in the chair infront of "MOM"?
(infront means the chair in the top-left corner)
 
,

I'm using XSE also, but I do it in another way i guess. I write the script down with Notepad, save it as .rbc and compile it into the game, using BufRite and PokeScript together.



The person-ID is 1202, the person number is 2 (you can see the person number in the script:

"applymovement 2"....

Sadly, I can't post a link already to show you the pic of Advance Map. I could send you a mail with it if needed.

How do I have to write the script, so the "DAD" will stay in the chair infront of "MOM"?
(infront means the chair in the top-left corner)

If it has an ID then it should stay where you moved it. Try a different ID though. Flags over 1000 are said to be unstable though I've seen people use them without problems, but some flags might just not work.
 
Now that i have changed the flag from 1201 to 1202 (to the Person-ID) "DAD" disapears after i leave the room and isn't standing anywere. Do I need to write annother script to make a "DAD" appear using the flag 1202?
 
(I made the mistake of posting this as a new thread in the ROM Hacking Hub. Whoopsies. If any moderator sees it in there, go ahead and delete it.)


Okay, so, in my personal hack of Pokemon Fire Red to add just a couple enhanced features for myself, I installed the DayNightSeasons system and created a script that changes the music to the D/P Night Time Pokemon Center music if it detects that it's night time.

Spoiler:


I tested the script both on an NPC and on Route 1's Header, and it worked both times, so there's no problem with the actual base of the script.

However, when trying to use it as a level script in a Pokemon Center (where I meant to use it), nothing happens. The music does not change, and the game progresses.
Help would be greatly appreciated.
 
Does anyone know if you can insert a move tutor with a script? I'm not familiar with ASM but if it needs that I will have to do it. I'm better at PKSV, but any help is appreciated.
 
Guys, I need help for scripting a wild pokemon battle (like a legendary pokemon encounter). I want to make it so that IF the player loses to the wild pokemon, they are not immediately teleported to the pkmn center, but is thrown into another script instead. How do I script this? Thanks.
I use XSE and am hacking FR.
 
Last edited:
Does anyone know if you can insert a move tutor with a script? I'm not familiar with ASM but if it needs that I will have to do it. I'm better at PKSV, but any help is appreciated.

If you're using FRLG you can initiate a move tutor with the 0x18D special. The move you want to teach is determined by the value of the variable 0x8005, ranging from 0x0 to 0x15. If you want to change which move is taught depending on the variable you can use karatekid552's Gen III Hacking Suite. It will also let you change which tutor moves individual Pokemon can learn.

Here's a quick and dirty skeleton of a move tutor script in XSE so you'll have to translate it into PKSV if there are any differences in regard to commands:

Code:
#org @start

lock
faceplayer
checkflag 0x200
compare 0x800D 0x1
if 0x1 goto @AlreadyLearnt
msgbox @WantToLearn 0x5
compare 0x800D 0x0
if 0x1 goto @DontWant
setvar 0x8005 0x1 0x[Move number]
special 0x18D
setflag 0x200
release
end

Guys, I need help for scripting a wild pokemon battle (like a legendary pokemon encounter). I want to make it so that IF the player loses to the wild pokemon, they are not immediately teleported to the pkmn center, but is thrown into another script instead. How do I script this? Thanks.
I use XSE and am hacking FR.

You can't do that just through scripting as whiting out is a central mechanic to wildbattles. You can insert this ASM routine and its add-on if you want, but you'll need to read this post to learn how to insert it.
 
Another question: Does anyone know how to make a script trigger when you enter a map? Just now I realized an enter-map script freezes your game when it contains movement or text. A level script on the place of the warp doesn't work (when you enter the room) either. Anyone please help?
 
I've been looking around this forum and haven't found anything yet.

So I am trying to make a special kind of trainer script. This trainer script uses the 'Trainer flag Script Running' function of JPANs hack applier. I want to make a trainer battle script using that function. I made a script for it but it doesn't work the way i wanted it to.

Spoiler:


The only thing that doesn't work is the fact that the trainer doesn't run up to me, I have to walk up to him. Yes I also changed the unknown in advanced map to be something other than 0. Does anyone know of why this is happening or can point me to a tutorial that can help me with this?
 
I've been looking around this forum and haven't found anything yet.

So I am trying to make a special kind of trainer script. This trainer script uses the 'Trainer flag Script Running' function of JPANs hack applier. I want to make a trainer battle script using that function. I made a script for it but it doesn't work the way i wanted it to.

Spoiler:


The only thing that doesn't work is the fact that the trainer doesn't run up to me, I have to walk up to him. Yes I also changed the unknown in advanced map to be something other than 0. Does anyone know of why this is happening or can point me to a tutorial that can help me with this?

I don't know what this special trainer script is about, but since you say the trainer's not walking up to you, did you tick "Trainer" in Advance Map and give the NPC a view range other than zero?
 
I don't know what this special trainer script is about, but since you say the trainer's not walking up to you, did you tick "Trainer" in Advance Map and give the NPC a view range other than zero?

I'm such an Idiot! That did fix the solution thanks! However now I have another issue.

So I've set my first trainers 'Unknown Value' (the one under PERSONAL ID) to be 01. So I thought that made it so when you walked past the trainer, it should only activate the walking past animation once ever in the game. However once I leave the map and come back it completely resets and the guy comes back and he doesn't battle me but he does activate 'talking 3' in the script.

However I don't want him to walk up to me, after I battle him, I want him to stay there forever unless I talk to him, does anyone what's wrong? Here is my script

Spoiler:
 
FIRERED
I dont know what is the problem of XSE..
Spoiler:

It always shows this image
[PokeCommunity.com] Script Help Thread

In fact I dont have Line 28!
 
FIRERED
I dont know what is the problem of XSE..
Spoiler:

It always shows this image
[PokeCommunity.com] Script Help Thread

In fact I dont have Line 28!

If you look at your script in the spoiler you can see that the word 'receive' has been split in two by an enter, making XSE think you're trying to use a command rather than continue with your text string. You might not be able to see it in XSE, but it is definitely visible here.
 
If you look at your script in the spoiler you can see that the word 'receive' has been split in two by an enter, making XSE think you're trying to use a command rather than continue with your text string. You might not be able to see it in XSE, but it is definitely visible here.

weird, in XSE that was fine, that's receive
 
Status
Not open for further replies.
Back
Top