• 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.
15
Posts
12
Years
  • Seen Mar 13, 2014
Nope, it hasn't changed. Try shifting things around and seeing if it will run the script on a different OW.

Alright, so I messed around with a few things and I'm just gonna restate some things that may not have been clear earlier...

- I need 3 of these scripts
- One of them works, the other two do not

So in my said messing around, I tried pointing the script events that weren't working to the same pointer as the script event that does work and the same thing happened, it didn't work. However, if I move the script events to another place on the map, it suddenly works! But since the script is not where it should be, it obviously doesn't work right. So the question now is why don't the scripts work where they're supposed to?
 
37
Posts
13
Years
  • Age 27
  • Seen Feb 7, 2014
I am having much trouble with the callasm command. I believe it's because I installed JPAN's hacked engine. callasm works with a clean ROM, but it doesn't work on my hacked ROM (the game crashes), which I've been working on for a very long time and have ZERO motivation to move to a new ROM.
I'd like to know if maybe the JPAN hacked engine requires something other than callasm for ASM scripts to play out. I know the engine uses specials for its asm scripts, but I don't understand why callasm isn't working for me.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I am having much trouble with the callasm command. I believe it's because I installed JPAN's hacked engine. callasm works with a clean ROM, but it doesn't work on my hacked ROM (the game crashes), which I've been working on for a very long time and have ZERO motivation to move to a new ROM.
I'd like to know if maybe the JPAN hacked engine requires something other than callasm for ASM scripts to play out. I know the engine uses specials for its asm scripts, but I don't understand why callasm isn't working for me.

The most common problem is adding 1 to the offset of the ASM routine. I have spent hours trying to fix routines when all it was, was that simple problem. I'm fairly certain it works the same since a friend of mine used callasm with JPAN's hack and there aren't any changes made to that command listed in his documentation.

Alright, so I messed around with a few things and I'm just gonna restate some things that may not have been clear earlier...

- I need 3 of these scripts
- One of them works, the other two do not

So in my said messing around, I tried pointing the script events that weren't working to the same pointer as the script event that does work and the same thing happened, it didn't work. However, if I move the script events to another place on the map, it suddenly works! But since the script is not where it should be, it obviously doesn't work right. So the question now is why don't the scripts work where they're supposed to?

My thoughts could be that the tiles you are standing on are conflicting. I have never seen this before.... Could you provide and image or a video of them both working and non-working?
 
Last edited:
37
Posts
13
Years
  • Age 27
  • Seen Feb 7, 2014
karatekid552, I have been adding 1. Again, it works on a clean ROM but not my hack. The ASM hex data is placed on an even address. It ends with a 0. So, the offset referenced in the XSE script ends with a 1.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
karatekid552, I have been adding 1. Again, it works on a clean ROM but not my hack. The ASM hex data is placed on an even address. It ends with a 0. So, the offset referenced in the XSE script ends with a 1.

I know it works in your hack, but sometimes, when you move things, you forget to do something. Trust me, it happens a lot.

Have you tried debugging it? Also, what is this routine and what does it do? Can I see it? It could be the routine itself since a lot was changed and shifted in JPAN's hack and references in the routine may no longer exist.
 
15
Posts
12
Years
  • Seen Mar 13, 2014
My thoughts could be that the tiles you are standing on are conflicting. I have never seen this before.... Could you provide and image or a video of them both working and non-working?

Definitely, here's a YouTube video: http://youtu.be/HblZ9n9HK8Y
The first part is the working script, the second one is the failing script.

I do also have a picture:
Spoiler:


The highlighted event is the one working script, and there is another script event directly under it for something completely different. The two script events on the side also have the same script events under them, and they also have a warp under that which serves no purpose. And I have tried moving the script events under the broken ones somewhere else, but no dice. Same thing with the warps.
 
37
Posts
13
Years
  • Age 27
  • Seen Feb 7, 2014
I know it works in your hack, but sometimes, when you move things, you forget to do something. Trust me, it happens a lot.

Have you tried debugging it? Also, what is this routine and what does it do? Can I see it? It could be the routine itself since a lot was changed and shifted in JPAN's hack and references in the routine may no longer exist.

Figured it out. The character I was using for the script wasn't working right for some reason. I'm fine now. Sorry if I wasted your time.

Edit (3rd time now, probably): My gender checker ASM script I wrote myself works! It was pointless because XSE already has a checkgender command, but I did it just for practice. Now I can sleep in peace, knowing I didn't waste the whole day learning ASM.

Definitely, here's a YouTube video: http://youtu.be/HblZ9n9HK8Y
The first part is the working script, the second one is the failing script.

I do also have a picture:
Spoiler:


The highlighted event is the one working script, and there is another script event directly under it for something completely different. The two script events on the side also have the same script events under them, but one of them also has a warp under that which serves no purpose. And I have tried moving the script events under the broken ones somewhere else, but no dice. Same thing with the one warp.

This is occurring because you cannot move a sprite that's off the screen. It has to be within 6 or less tiles from the player I believe. So, the sprite disappears when you have the script thing all the way down there and it is no longer loaded. You'll need to have the script run when you're closer to the rival. Or, what you could do is..
1. Put two rivals on that map
2. Give each of them flags
3. Put the sprite in the video in his position as it is now.
4. Put the second rival sprite somewhere where he can't be seen. Or, alternatively, you can use a setmaptile script on the map and use the hidesprite command in it so that the second rival sprite disappears before you enter.
5. On the script tile event, use setflag 0x[first rival event's flag number] to hide the first rival sprite. Then, use showspritepos 0x[event number of second rival sprite] and 0x[x coordinate] 0x[y coordinate] to show the second rival sprite at a designated position that is 6 tiles from your player. Then, have him walk down and do the script similarly as it initially had been.

Sorry this is kind of badly written. If you need me to clarify anything, I can.
 
Last edited:
15
Posts
12
Years
  • Seen Mar 13, 2014
This is occurring because you cannot move a sprite that's off the screen. It has to be within 6 or less tiles from the player I believe. So, the sprite disappears when you have the script thing all the way down there and it is no longer loaded. You'll need to have the script run when you're closer to the rival. Or, what you could do is..
1. Put two rivals on that map
2. Give each of them flags
3. Put the sprite in the video in his position as it is now.
4. Put the second rival sprite somewhere where he can't be seen. Or, alternatively, you can use a setmaptile script on the map and use the hidesprite command in it so that the second rival sprite disappears before you enter.
5. On the script tile event, use setflag 0x[first rival event's flag number] to hide the first rival sprite. Then, use showspritepos 0x[event number of second rival sprite] and 0x[x coordinate] 0x[y coordinate] to show the second rival sprite at a designated position that is 6 tiles from your player. Then, have him walk down and do the script similarly as it initially had been.

Sorry this is kind of badly written. If you need me to clarify anything, I can.

No, that was very helpful! Thanks to you and karatekid552, my scripts are now functioning correctly.
 
53
Posts
11
Years
  • Seen Feb 1, 2014
Hi,

in PKSV i write

compare PLAYERFACING DOWN
if == call 0x8741BD2 ' Equal To
compare PLAYERFACING LEFT
if == call 0x8741BDD ' Equal To
compare PLAYERFACING RIGHT
if == call 0x8741BC7 ' Equal To

but it enter always in DOWN, also when my player is pointing the right or the left. Why? Maybe an error in the PKSV variable translation and i have to put directly the value instead of RIGHT, LEFT? If yes, which are these values?

Thanks a lot
 

lemonzap

the 1337 lemonmeister
6
Posts
11
Years
  • Age 28
  • Seen Jun 23, 2013
This script is an S-tile script and only freezes the player for a split second and plays the exclamation sound. Any ideas whats wrong?
Spoiler:
 

Shadowraze

ur mum
794
Posts
10
Years
This script is an S-tile script and only freezes the player for a split second and plays the exclamation sound. Any ideas whats wrong?
Spoiler:

Yes you didn't 0x on 900000. It should be 0x900000

And also you didn't put a closeonkeypress command after the msgbox command but if you don't want to put that change 0x4 to 0x6. Also put a release and end to @yes and @no.

Oh and also didn't you said you were using an S tile? You have to put a variable in it. Try reading this tut I'm sure it will help you. http://www.pokecommunity.com/showthread.php?t=279345

Just put a setvar in the end of your script so for example setvar 0x4075 0x1 and then on A-map put in 4075 on the Var Number and it should work.
 

lemonzap

the 1337 lemonmeister
6
Posts
11
Years
  • Age 28
  • Seen Jun 23, 2013
Yes you didn't 0x on 900000. It should be 0x900000

And also you didn't put a closeonkeypress command after the msgbox command but if you don't want to put that change 0x4 to 0x6. Also put a release and end to @yes and @no.

Oh and also didn't you said you were using an S tile? You have to put a variable in it. Try reading this tut I'm sure it will help you.

Just put a setvar in the end of your script so for example setvar 0x4075 0x1 and then on A-map put in 4075 on the Var Number and it should work.

I moved the people who were being told to move closer and now that works but still no messages show up. I changed the message types to 0x6 and added a setvar but it didnt change anything. I've read through that tutorial before but have not been able to find any information on the s-tiles in there so I've just been trying things out. Also I don't know if this could be related but when I try to make a level script that displays a message it just displays

This is a test message
this is a signpost

over and over again. Everything else in the level script works fine, just not messages. just like my s-tile script.

Thanks for the help. I really appreciate the speedy reply.

I've been trying to make more scripts and I have not been able to make a message display yet. I have even tried copying example scripts directly from tajaros' tutorial and using them in both emerald and fire red. I cant figure out what I'm doing wrong.

I finally fixed my problem. I had to add

boxset <message type no.>

after each message. for instance this would not work

lock
msgbox @wait 0x6
release

but this does work

lock
msgbox @wait 0x6
boxset 6
release
 
Last edited:

Shadowraze

ur mum
794
Posts
10
Years
I moved the people who were being told to move closer and now that works but still no messages show up. I changed the message types to 0x6 and added a setvar but it didnt change anything. I've read through that tutorial before but have not been able to find any information on the s-tiles in there so I've just been trying things out. Also I don't know if this could be related but when I try to make a level script that displays a message it just displays

This is a test message
this is a signpost

over and over again. Everything else in the level script works fine, just not messages. just like my s-tile script.

Thanks for the help. I really appreciate the speedy reply.

I've been trying to make more scripts and I have not been able to make a message display yet. I have even tried copying example scripts directly from tajaros' tutorial and using them in both emerald and fire red. I cant figure out what I'm doing wrong.

I finally fixed my problem. I had to add

boxset <message type no.>

after each message. for instance this would not work

lock
msgbox @wait 0x6
release

but this does work

lock
msgbox @wait 0x6
boxset 6
release

Actually I am tajaros. :3

If that tut didn't helped you that much it try diegoisawesome's tutorial.

What it keeps doing it over and over again? Are you sure you put a setvar in your level script and have done the things I included in my tut?

Also the script before should be working fine if you followed my instructions. But I'm pretty sure you're having trouble putting the var in the S-tile Script.

Ok, so for example you're using var 0x4010. You put setvar 0x4010 0x1 in the end of your script and then put 0x4010 in the var number box in A-map when you click the S-tile.

Also are you sure you're compiling things properly?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I moved the people who were being told to move closer and now that works but still no messages show up. I changed the message types to 0x6 and added a setvar but it didnt change anything. I've read through that tutorial before but have not been able to find any information on the s-tiles in there so I've just been trying things out. Also I don't know if this could be related but when I try to make a level script that displays a message it just displays

This is a test message
this is a signpost

over and over again. Everything else in the level script works fine, just not messages. just like my s-tile script.

Thanks for the help. I really appreciate the speedy reply.

I've been trying to make more scripts and I have not been able to make a message display yet. I have even tried copying example scripts directly from tajaros' tutorial and using them in both emerald and fire red. I cant figure out what I'm doing wrong.

I finally fixed my problem. I had to add

boxset <message type no.>

after each message. for instance this would not work

lock
msgbox @wait 0x6
release

but this does work

lock
msgbox @wait 0x6
boxset 6
release

By this description, you are using an old version of XSE. V1.0.0 most likely. Go to Gamer2020's toolbox. There you will find his most recent version (just a couple of weeks ago, if that) which has had several bugs fixed.
 

kearnseyboy6

Aussie's Toughest Mudder
300
Posts
15
Years
  • Seen Jun 22, 2019
Where is the script for the mum when a player faints and warps back to home? I just want to edit the text!
 

kearnseyboy6

Aussie's Toughest Mudder
300
Posts
15
Years
  • Seen Jun 22, 2019
I think that that particular one is a map script in your home, but I could be wrong. Try searching for the text in A-text and editing it there.

Thanks heaps Karatekid! worked like a charm. FYI the offset is 1A5FDF. I had no idea you can add text and edit by searching for them!

2) Also I have a new problem with level scripts. When I use this script:

#org @busted
applymovement 0x01 @seen
waitmovement 0x01
msgbox @what 0x06
applymovement 0x02 @fight
waitmovement 0x02
msgbox @oak 0x06
trainerbattle 0x03 0x5B 0x00 @win
msgbox @pokedex 0x06
applymovement 0x02 @getit
waitmovement 0x02
hidesprite 0x03
setflag 0x204
applymovement 0x02 @return
waitmovement 0x02
msgbox @byebye 0x06
applymovement 0xFF @left
applymovement 0x02 @left2
waitmovement 0x02
hidesprite 0x02
msgbox @leaveyou 0x06
setvar 0x4022 0x0001
release
end

*I ignored the movements and messages.

When I enter the map the text goes funny, which is expected according to Tajaros tut, he said change the #raw 0xFFFF to 0x0.

Now this DOES fix the problem, but only when I take 2 steps in any direction upon entering the map!

I have given the script the correct flag and chosen option 2 (validates values thing). I have no idea why this glitch occurs :( any help would be appreciated!

Cheers again for the first question!

EDIT: I solved it !!! It was purely because I used var 0x4022. I read that in David(forgot his name) said that vars 0x4000-40FF are the only safe vars to use.

How ever this is either wrong because I have tried twice (0x4000 doesn't work, its a temp) so is there any guaranteed safe vars please?

I am using 0x8000 and greater now, I know this is bad but I have don't have time to waste. How likely will glitches occur if I continue using vars this high?
 
Last edited:
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
I know Doom Chaos already asked this but
how do you edit the script for wallace in emerald
i'm trying to edit what he says and all i'm getting is a bunch of setvar
can someone help me with this i'm a total noob
advanced text isn't working for me either
 
Last edited:
2
Posts
10
Years
  • Seen May 2, 2013
Could anyone please help me out? I've got two little problems.

I'm a beginner in hacking Pokemon games. There's a bug in my hack. When I'm on my re-designed "Route 1" battling wild Pokemon, after the battle a bug comes up. Suddenly I'm a walking cut-tree, and my character is frozen.

I've made a video of it to make it clear:
YouTube [ dot ] com /watch?v=c4fw76Vdo8M

It's a cut tree which I made on my own, but I copied all important information of another cut tree.



My second problem is that when I open the "PLAYER-button" in the MENU, the game restarts. The screen turns into black, and the opening scene of the game plays again.

Thanks in advance!
 
Status
Not open for further replies.
Back
Top