• 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.
124
Posts
12
Years

Have you tried making this with "warp" instead of warpmuted command?

Yeah, I tried a normal warp command.
I tested the warp on a normal NPC and it works perfectly.
But I do not understand why my warp isn't working in this script.
All it does is, make the sound but when I move the player (the screen is still black because of fadescreen) the movement permissions are removed and 1 NPC can be seen...

Here's a video:
http://www.youtube.com/watch?v=b2CIL0Tj2Ns

I do not know if I am allowed to post videos on these forums so please let me know. I am a forgetful person =/
 

Epitaph93

Intermediate Digidestined
120
Posts
12
Years
You go to a prof. Oak Aid. He checks if you have ExVeemon and Stingmon in your party. If you do, he gives you a level 20 Dinobeemon. Exveemon is in the place of Beedrill, Stingmon is in the place of Sandshrew, and Dinobeemon is in the place of Psyduck.

This script is working perfectly, up until I try to rename the Digimon. The Digimon pops up as the ???????? pokemon in the nickname screen. However, after receiving it I checked my party and it was the Digimon I wanted, except that it was level 32 rather than level 20.

I've been working on this script for 5 hours, and I really want to get this last little bug out of the way.

Spoiler:
 
124
Posts
12
Years
You go to a prof. Oak Aid. He checks if you have ExVeemon and Stingmon in your party. If you do, he gives you a level 20 Dinobeemon. Exveemon is in the place of Beedrill, Stingmon is in the place of Sandshrew, and Dinobeemon is in the place of Psyduck.

This script is working perfectly, up until I try to rename the Digimon. The Digimon pops up as the ???????? pokemon in the nickname screen. However, after receiving it I checked my party and it was the Digimon I wanted, except that it was level 32 rather than level 20.

I've been working on this script for 5 hours, and I really want to get this last little bug out of the way.

Spoiler:

You need to use hex.
So a Level 20 Psyduck would be:
givepokemon PKMN_PSYDUCK 0x14 ITEM_NONE 0x0 0x0 0x0
It's 0x14, Not 0x20.
Use XSE's HEX/DECIMAL calculator.
Using Level 20 as an example, the Decimal is 20, but Pokemon games use Hex so decimal 20 in hex 14.
 

hinkage

Everyone currently in an argument with this member
384
Posts
13
Years
  • Age 28
  • Seen yesterday
You go to a prof. Oak Aid. He checks if you have ExVeemon and Stingmon in your party. If you do, he gives you a level 20 Dinobeemon. Exveemon is in the place of Beedrill, Stingmon is in the place of Sandshrew, and Dinobeemon is in the place of Psyduck.

This script is working perfectly, up until I try to rename the Digimon. The Digimon pops up as the ???????? pokemon in the nickname screen. However, after receiving it I checked my party and it was the Digimon I wanted, except that it was level 32 rather than level 20.

I've been working on this script for 5 hours, and I really want to get this last little bug out of the way.

Spoiler:


I checked quickly in a Fire Red and Emerald ROM. They both use "setvar 0x8004 0x0" before going to the nickname screen. I'm guessing without it, there's nothing defined for the little sprite to the left of the name, and no Pokemon name. (Kind of like the msg_obtain needs copyvarifnotzero or else will give you ??????????s)

As for the level, it's in hex. Do 0x14 to get a level 20 Pokemon, or whatever the hell it is those abominations are.
 

Epitaph93

Intermediate Digidestined
120
Posts
12
Years


You need to use hex.
So a Level 20 Psyduck would be:
givepokemon PKMN_PSYDUCK 0x14 ITEM_NONE 0x0 0x0 0x0
It's 0x14, Not 0x20.
Use XSE's HEX/DECIMAL calculator.
Using Level 20 as an example, the Decimal is 20, but Pokemon games use Hex so decimal 20 in hex 14.

Oh okay *facepalm*. I should've known that. I was having the same problem when checking the Digimon in the party, then I checked diegoisawesome's script tutorial. Thanks.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years


Yeah, I tried a normal warp command.
I tested the warp on a normal NPC and it works perfectly.
But I do not understand why my warp isn't working in this script.
All it does is, make the sound but when I move the player (the screen is still black because of fadescreen) the movement permissions are removed and 1 NPC can be seen...

Here's a video:
http://www.youtube.com/watch?v=b2CIL0Tj2Ns

I do not know if I am allowed to post videos on these forums so please let me know. I am a forgetful person =/
That's pretty nice fail =D
Okay... try to repoint your script into another location, delete Groudon and put him there again with "No movement" movement and try again.
 
124
Posts
12
Years

That's pretty nice fail =D
Okay... try to repoint your script into another location, delete Groudon and put him there again with "No movement" movement and try again.

Still nothing. Even tried deleting all the sprites to see if they were interfering with the game. I am so confused to why this is happening =/
 
9
Posts
13
Years
  • Age 31
  • Seen May 8, 2014
Yes, I am very well aware that this has in fact been posted before. I am also very well aware that this has in fact not been answered. So have at you.

A friend and I are working on a Fire Red hack right now, and we've made several talking scripts and more complicated scripts already that work fine, but all of a sudden now when we're trying to make a generic talking script in XSE we're getting an error when we try to compile it, preventing us from doing so.

"Error 9: Subscript out of range", on the line the actual dialogue is. It works if I shorten the dialogue to ridiculous extents, but we've made plenty of dialogue longer than that in other scripts. Why is it randomly acting up now?

Just to show you that this is nothing other than a generic talking script I'll post it. Yes, it does hate -both- lines of dialogue.

Spoiler:


Combining the two lines of dialogue into one gigantic one doesn't work, by the way. And yes we used Free Space Finder, and the offset was, well, free. So it's not that.
 
124
Posts
12
Years
Yes, I am very well aware that this has in fact been posted before. I am also very well aware that this has in fact not been answered. So have at you.

A friend and I are working on a Fire Red hack right now, and we've made several talking scripts and more complicated scripts already that work fine, but all of a sudden now when we're trying to make a generic talking script in XSE we're getting an error when we try to compile it, preventing us from doing so.

"Error 9: Subscript out of range", on the line the actual dialogue is. It works if I shorten the dialogue to ridiculous extents, but we've made plenty of dialogue longer than that in other scripts. Why is it randomly acting up now?

Just to show you that this is nothing other than a generic talking script I'll post it. Yes, it does hate -both- lines of dialogue.

Spoiler:


Combining the two lines of dialogue into one gigantic one doesn't work, by the way. And yes we used Free Space Finder, and the offset was, well, free. So it's not that.

I believe it might be because of when your putting \n \p. When I tried compiling your script, XSE kept crashing.
Use this one, it's a lot more neat and it compiled.
Spoiler:


Also, always use #dynamic 0x800000.
XSE will always find a free offset without FSF.
 
Last edited:
20
Posts
12
Years
  • Seen Aug 5, 2014
What I want to do is have the screen fade in and then just having your player character stand there.

An NPC will then turn towards the character (from across the room), and then exchange dialog with the player.

I know how to do all the specifics (make the NPC face the character, fade in, talk) but I'm not sure what kind of script it needs to be. Like a flag or messagebox type thing.

Sorry I'm new at this xD

Any help would be appreciated :)
 

hinkage

Everyone currently in an argument with this member
384
Posts
13
Years
  • Age 28
  • Seen yesterday
What I want to do is have the screen fade in and then just having your player character stand there.

An NPC will then turn towards the character (from across the room), and then exchange dialog with the player.

I know how to do all the specifics (make the NPC face the character, fade in, talk) but I'm not sure what kind of script it needs to be. Like a flag or messagebox type thing.

Sorry I'm new at this xD

Any help would be appreciated :)

First off all, fadescreen hides all sprites. Second, you'd need a flag and a msgbox in the script, obviously...
So...
What are you asking? Do you mean "does it have to be a scriptbox and do I need a flag?"
 
20
Posts
12
Years
  • Seen Aug 5, 2014
I'm not sure to be honest.

The reason I'm thinking it needs to be a flag is because this script will happen at the very beginning of them game.

So basically, it would set the starting position of the player.

That is the part I am stuck on.
 
9
Posts
13
Years
  • Age 31
  • Seen May 8, 2014


I believe it might be because of when your putting \n \p. When I tried compiling your script, XSE kept crashing.
Use this one, it's a lot more neat and it compiled.
Spoiler:


Also, always use #dynamic 0x800000.
XSE will always find a free offset without FSF.


Well, that might have made it look prettier...had it worked. It didn't fix the problem, and it still gives the error. We've tried putting this line into another script, as well, and it gives the same exact error.

Apparently, moving things around doesn't help either. We moved "\p…\pMaybe I should stop button mashing?\p…\pNaaaaaahhhhhh…" to another line, and the rest of the text worked, but that line was rejected. Then we replaced the elipses with [.], and that line passed, but "What're you lookin' at, kid?\nGet to work!\pYou don't wanna play this\nembarrassment of a video game anyway!" didn't work.
 
Last edited:

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Is there a way to disable running in a wildbattle via XSE?

I'm not sure if there is any way to prevent you from running away while randomly walking around in tall grass, but you can kind of do it in a scripted event. The script will recognise if you ran away and then send you back into the battle - The wild Pokemon's HP and PP won't be restored, making it as if you never left the battle. Here is an example of such a script:

Code:
#dynamic 0x800000

#org @start
wildbattle 0x1 0x5 0x0
goto @Continue

#org @Continue
special2 0x800D 0xB4
compare 0x800D 0x4
if 0x1 goto @RanAway
msgbox @Win 0x2
release
end

#org @RanAway
msgbox @Coward 0x2
dowildbattle
goto @Continue

#org @Win
= You did it! Yay!

#org @Coward
= Why did you run away?\nFight it again!

The scripting that checks if you've run away starts with the line containing special2 which then branches off depending on what you did to end the battle. The 'dowildbattle' command then uses the data that was leftover in the RAM from the last battle you fought, making it so the Pokemon has the exact same status/ damage it had earlier. Here is an explanation of how the special2 command can be used:

Quilava's Master said:
"special2 LASTRESULT 0xB4
compare LASTRESULT 0x[insert number here]
if 0x1 goto @pointer"
after the wildbattle command. The special 0xB4 checks for the result of the battle then sets a value to the variable.

comparing 0x1 checks if the pokemon fainted
comparing 0x4 checks if you ran away
comparing 0x7 checks if you caught the Pokemon.

The only unresolved issue is that if you switched during the battle, the Pokemon that you were using last won't come out, the first usable Pokemon in your party will. Other than that, I think it is a solid script.
 

Epitaph93

Intermediate Digidestined
120
Posts
12
Years
I'm not sure if there is any way to prevent you from running away while randomly walking around in tall grass, but you can kind of do it in a scripted event. The script will recognise if you ran away and then send you back into the battle - The wild Pokemon's HP and PP won't be restored, making it as if you never left the battle. Here is an example of such a script:

Thank you so much. That's exactly what I was looking for, although I wasn't expecting it to leave the battle. It works just fine nonetheless.
 
19
Posts
12
Years
  • Seen Dec 28, 2011
I'm not sure if there is any way to prevent you from running away while randomly walking around in tall grass, but you can kind of do it in a scripted event. The script will recognise if you ran away and then send you back into the battle - The wild Pokemon's HP and PP won't be restored, making it as if you never left the battle. Here is an example of such a script:

Code:
#dynamic 0x800000

#org @start
wildbattle 0x1 0x5 0x0
goto @Continue

#org @Continue
special2 0x800D 0xB4
compare 0x800D 0x4
if 0x1 goto @RanAway
msgbox @Win 0x2
release
end

#org @RanAway
msgbox @Coward 0x2
dowildbattle
goto @Continue

#org @Win
= You did it! Yay!

#org @Coward
= Why did you run away?\nFight it again!

The scripting that checks if you've run away starts with the line containing special2 which then branches off depending on what you did to end the battle. The 'dowildbattle' command then uses the data that was leftover in the RAM from the last battle you fought, making it so the Pokemon has the exact same status/ damage it had earlier. Here is an explanation of how the special2 command can be used:



The only unresolved issue is that if you switched during the battle, the Pokemon that you were using last won't come out, the first usable Pokemon in your party will. Other than that, I think it is a solid script.

i wanted a script like this so i could make a pokemon that would run around the map and it would run away from you like in the safari zone and you had to keep battling it over and over until you caught it or beat it. and i didnt even ask for it!
thanks

does any one know what the flag is for if you have given the ruby to celio in FR?
i need it for a script that makes a person have a door open when you havnt given it to celio but when yoou do he blocks off that door and opens another?
HOW DO I DO THIS!?!?
 
Last edited:

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
cosmifox said:
does any one know what the flag is for if you have given the ruby to celio in FR?

It's actually a variable. Variable 4076 gets set to 0x5 when you give the ruby to Celio. Once the subplot is complete (Celio is able to connect with Lanette), 4076 will then be set to 0x6.
 

Chaotix

Love to test
59
Posts
17
Years
  • Age 34
  • Seen Jan 11, 2020
Game: Fire Red
Type: Person
Editor: PKSV
Script: Trying to buy a super potion from a person

Now my problem is that I'm not sure if this is correct:
Spoiler:


And my second problem is that when i compiled it and inserted the offset
into a person event this was the result..

Spoiler:
 
Status
Not open for further replies.
Back
Top