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

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
But if i use a script tile, and i want a trainer with view radius = 7, i need to apply seven different movement depending on where the hero is...or is there a better way to do this?

Yes, that is how it would need to be done, or you could simply put some obstacles in the way and limit the amount of places the player could be when he/she is seen by the trainer.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Anyone help me with this scripting problem? I put this script on a 'script' in advanced map

Spoiler:


and when I add the var value and var number, I just walk through it and the script doesn't activate. I made sure I was using the right variable and such, but no matter what the script doesnt activate. (the var number is 4010 and the var value is 4)

Why isn't the script activating?
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
This is a problem because variable 4010 Does not equal 4. You need a script to setvar 4010 To 4 before this could run.
 
Last edited:
69
Posts
11
Years
  • Seen Nov 17, 2013
I've been experimenting with a few scripts and I was wondering what numbers should I use for the var number? Like in flags I can use 200 and up.
 
Last edited:
1,309
Posts
12
Years
  • Age 31
  • Seen Nov 24, 2023
In my hack I want to include a sort of tournament type thing, but I want only certain pokemon to be able to be used in it.

Would I just do this by repeating a lot of checkpokemon commands containing the desired pokemon's hex numbers? I didn't know if this would work because you can only have six in your party, and I want more than just six pokemon to be eligible to enter.

I'm (obviously) new to this. I have read all the scripting tutorials out there and tried to write a script for this myself but when I test it it doesn't work. I'm not requesting a script, I just want to know IF it can be done and if so, how.

Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I've been experimenting with a few scripts and I was wondering what numbers should I use for the var number? Like in flags I can use 200 and up.

I wrote a tutorial on this. Google "Flags, Vars, & Script Tiles".

In my hack I want to include a sort of tournament type thing, but I want only certain pokemon to be able to be used in it.

Would I just do this by repeating a lot of checkpokemon commands containing the desired pokemon's hex numbers? I didn't know if this would work because you can only have six in your party, and I want more than just six pokemon to be eligible to enter.

I'm (obviously) new to this. I have read all the scripting tutorials out there and tried to write a script for this myself but when I test it it doesn't work. I'm not requesting a script, I just want to know IF it can be done and if so, how.

Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks

Checkpokemon, is, unfortunately, not a real command. You will need to use a series of specials to do this. (Now that I think about it, how freaking useful would that be? I think I may just write a new command for that.) I can't remember exactly which specials, but I know that I found them by breaking down the script used in HackMew's remove specific pokemon tutorial/research.

I can't help with your second problem unless I see what's going on.
 
Last edited:
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks

I am assuming you changed the room at the start of the game, if this is the case,
you probably put a warp on a tile that was not a "door"... a screenshot would help the diagnosis tho... or atleast some more info
 
48
Posts
13
Years
  • Seen Feb 13, 2016
I'm having a problem with a map connection. Going through is fine, then if I try to go back, the connection is blocked off as if there is a 1 movement permission there, but there isn't. It also shows a block of tiles to the left on the original route that are the border block for both maps. I do not have any tiles in either map, within the first 7 of the connection, that are not present in the tileset of both maps.
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
Your map connections are messed up do to am 1.95. That's why you should NOT use am 1.95. Plus this is the script help thread, so only scripting problems go here.
 
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
I'm having a problem with a map connection. Going through is fine, then if I try to go back, the connection is blocked off as if there is a 1 movement permission there, but there isn't. It also shows a block of tiles to the left on the original route that are the border block for both maps. I do not have any tiles in either map, within the first 7 of the connection, that are not present in the tileset of both maps.

go to the header tab... hit ctrl+h then scroll down to the "connection" offset... and overwrite it with all 00000s...

change maps and make sure you save the maps changes

go back to the map with the issues...

then make all new map connections...

I had similar issues in the past and just clearing them out and redoing them always worked... :)
 
48
Posts
13
Years
  • Seen Feb 13, 2016
Thank you, terribly sorry I posted in the wrong thread, for some reason I thought I was in the simple questions thread.
 
53
Posts
11
Years
  • Seen Feb 1, 2014
Hi all,

i still have problems with do something after trainerbattle...actually i have put my script into a script tile, so the problem of use a trainer itself is avoided.

this is the part of my script do some problem:

#org 0x8742315
'-----------------------------------
trainerbattle 0x0 0x275 0x0 0x8186881 0x81BC163
clearflag 0x3C6
jump 0x8151004

#org 0x8151004
'-----------------------------------
msgbox 0x8170D66
callstd MSG_SIGN ' Signpost-style message
compare PLAYERFACING LEFT
...

After the battle end nothing happen and the hero can do some other things...when return to the script tile the script resume from that point and the rest of the part happen...why?

NB. At the start of the script i call a lockall, and in the various exit point i always call a releaseall end

Thanks a lot
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Hi all,

i still have problems with do something after trainerbattle...actually i have put my script into a script tile, so the problem of use a trainer itself is avoided.

this is the part of my script do some problem:



After the battle end nothing happen and the hero can do some other things...when return to the script tile the script resume from that point and the rest of the part happen...why?

NB. At the start of the script i call a lockall, and in the various exit point i always call a releaseall end

Thanks a lot

You need to set the script up to continue. I believe this should fix it:

#org @start
'-----------------------------------
trainerbattle 0x1 0x275 0x0 @msg1 @msg2 @next
clearflag 0x3C6
jump @jump

#org @next
'-----------------------------------
msgbox @msg
callstd MSG_SIGN ' Signpost-style message
compare PLAYERFACING LEFT
....


Also, judging by the fact that you are using callstd, that means you are using an old version of XSE that has some bugs. I would advise going and getting the version that Gamer2020 just put out about a month ago.
 
6
Posts
11
Years
  • Seen Jun 10, 2014
This is a noob question but when I finish writing a script and then save it to the desktop I cant figure out how to insert the new script into the ROM, i have pressed compile script but the original still takes effect and is what shows up when the script is edited again.

Please help so I can continue hacking
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
This is a noob question but when I finish writing a script and then save it to the desktop I cant figure out how to insert the new script into the ROM, i have pressed compile script but the original still takes effect and is what shows up when the script is edited again.

Please help so I can continue hacking

What script editor are you using? If you are using XSE, saving it unlinks it from the game and therefore won't compile. If you are using any type of dynamic insertion (#dynamic 0xXXXXXX, #org @start), it will put the script at a brand new location, not even touching the original.

If you are using Pokescript, don't come back until you are using PKSV or XSE. We don't serve Pokescript here anymore because it is very old and outdated and has a very different syntax.
 
1,344
Posts
14
Years
  • Seen Dec 10, 2021
So this is the first time I've touched scripting in about a year or so, and I'm trying to do it off my memory and I have no idea what I'm doing wrong:

Code:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2
msgbox @1 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!
when I compile that it turns into this:
Code:
'---------------
#org 0x8039E5
lock
faceplayer
checkflag 0x820
if 0x1 goto 0x8803A4C
msgbox 0x88039FB MSG_NORMAL '"You're getting your first Pokemon\..."
release
end

'---------------
#org 0x803A4C
warpteleport2 0xE3 0xEB 0xB8 0xED00 0xE9E3
givecoins 0xD9EA
nop

'---------
' Strings
'---------
#org 0x8039FB
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

I haven't done scripting in a long time so there are probably 20 mistakes in there but I'm confused as to why this is happening ;_;
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
So this is the first time I've touched scripting in about a year or so, and I'm trying to do it off my memory and I have no idea what I'm doing wrong:

Spoiler:
when I compile that it turns into this:
Spoiler:

I haven't done scripting in a long time so there are probably 20 mistakes in there but I'm confused as to why this is happening ;_;

It's not bad, you just have no msgbox calling the @2, which is why it is compiling as code instead of text.

Here:

Code:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2msgbox
msgbox @1 0x6
release
end

#org @2msgbox
msgbox @2 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!
 
1,344
Posts
14
Years
  • Seen Dec 10, 2021
It's not bad, you just have no msgbox calling the @2, which is why it is compiling as code instead of text.

Here:

Code:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2msgbox
msgbox @1 0x6
release
end

#org @2msgbox
msgbox @2 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!
Alright, thanks for your help. I knew I'd forgotten something obvious. :P
 

Bug.Catcher.Nakata

Alert but not Alarmed
6
Posts
10
Years
Hi everyone,
I'm new to scripting, and I've been reading lots of tutorials and picking a few things up. I'm having a problem actually inserting a script onto the map and getting it to run. I can get people to say things/give me pokemon, set flags, and all of that, but the game freezes whenever I try to run even the simplest script event (by that I mean, in advancemaps where you place the 'S' on the screen). I'm using XSE. I even tried copy-pasting other scripts from the game and it still freezes. It compiles and is added to the ROM with no problems.

It seems that most (all?) of the tutorials start from the point of being able to make scripts work, and then explain what to type, which is very helpful, but not exactly the help that I need
Thanks in advance
 
Status
Not open for further replies.
Back
Top