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

PKSV scripting Tutorial/Script Thread

ContestTrainer

YamiiVance
7
Posts
12
Years
Hey does anyone have any idea on how to fix my script I can't get Ethan to say the start of it and all he does is give me the egg (repetitively if i keep talking to him) and says please take care of it... also how do I get his text to fit in the box, all it does is mush over the first words! (What I want to happen with this is him say these lines msgbox 0x87558A1 msgbox 0x87558DE msgbox 0x8755910 then give egg then say #org 0x8755961 on repeat without saying anything else or giving me the egg)

#org 0x8755880
'-----------------------------------
lock
faceplayer
msgbox 0x87558A1 ' Ethan: O-Oh! Your \v...
msgbox 0x87558DE ' Then why are you her...
msgbox 0x8755910 ' Then take this Egg I...
giveegg 0x74
msgbox 0x8755961 ' Take good care of it...
callstd MSG_LOCK ' Built-in lock command
release
end


#org 0x87558A1
= Ethan: O-Oh! Your \v\h01, right? U-Uh... Hi! U-Um? Are you lost?

#org 0x87558DE
= Then why are you here? Just exploring? Well um...

#org 0x8755910
= Then take this Egg I found, My Mom said it needs to be with a trainer anyways...

#org 0x8755961
= Take good care of it ok? Please vist so I can see it!

~Thank You in advance!~
 
6,355
Posts
18
Years
  • Seen Apr 16, 2020
Hey does anyone have any idea on how to fix my script I can't get Ethan to say the start of it and all he does is give me the egg (repetitively if i keep talking to him) and says please take care of it... also how do I get his text to fit in the box, all it does is mush over the first words! (What I want to happen with this is him say these lines msgbox 0x87558A1 msgbox 0x87558DE msgbox 0x8755910 then give egg then say #org 0x8755961 on repeat without saying anything else or giving me the egg)

#org 0x8755880
'-----------------------------------
lock
faceplayer
msgbox 0x87558A1 ' Ethan: O-Oh! Your \v...
msgbox 0x87558DE ' Then why are you her...
msgbox 0x8755910 ' Then take this Egg I...
giveegg 0x74
msgbox 0x8755961 ' Take good care of it...
callstd MSG_LOCK ' Built-in lock command
release
end


#org 0x87558A1
= Ethan: O-Oh! Your \v\h01, right? U-Uh... Hi! U-Um? Are you lost?

#org 0x87558DE
= Then why are you here? Just exploring? Well um...

#org 0x8755910
= Then take this Egg I found, My Mom said it needs to be with a trainer anyways...

#org 0x8755961
= Take good care of it ok? Please vist so I can see it!

~Thank You in advance!~

You're going to need a "callstd" command after each msgbox command, otherwise the text won't show.
As for the text, you can use \n, \l and \p to divide it in lines, and boxes, check the first post for more information on that.

Now, for the egg to only be given to you once, you'll have to set a flag after the egg is given, and then check for the flag at the beginning of the script, so that it skips the giveegg part.

For example:
Code:
#org 0x800000
lock
faceplayer
checkflag 0x254
if 0x0 goto 0x[your script with a [B]setflag 0x254[/B] command in it]
msgbox 0x[text for the NPC when you talk to him again]
callstd MSG_NORMAL
release
end
 

The Void

hiiiii
1,416
Posts
13
Years
Hi guys!

Great tutorial!

Anyway,
I've found out how to change music for any battles I set
(example playsound 0x228 0x228),

But is there any way to change music for random wild battles.

(I intend to use to "load map" script).

I couldn't find it, even after using google. Thanks!

AdvanceMap has this option in the Header option of any map.
 
29
Posts
9
Years
i need help i put followed every tutorial down to the t and when i talk to my person nothing happens it just beeps please help

nevermind i just need to update my programs this is getting easier just take time i guess i really need to
want to get this down
 
Last edited by a moderator:

Whitney's Shaymin

Creator Of Pokemon Grace
596
Posts
11
Years
Hey guys, ive been trying to get a roadblock in the starting town but he won't talk to me. (all I hear is a beep) Here's my script.

#org 0x8740000
'-----------------------------------
#raw 0xFF
lockall
checkflag 0x291
if true jump 0x8740048 ' Flag is set
message 0x8740014 ' I'm sorry, the road ...
showmsg
waitbutton
releaseall
end

#org 0x8740048
'-----------------------------------
message 0x874005C ' I'm sorry, th-\pOh r...
showmsg
waitbutton
fadescreen FADEOUT_WHITE
closemsg
disappear 0x2C
setflag 0x291
fadescreen FADEIN_WHITE
releaseall
end


#org 0x8740014
= I'm sorry, the road is closed\nuntil further notice.

#org 0x874005C
= I'm sorry, th-\pOh right!\nThe construction just finished\lyesterday[.]
 
Hello! Its 30 minutes till midnight here and I have had a very busy night, so I'm tired and can't be bothered with looking through pages 2-7 to check and see if this has been answered soooooo...
I use the automatic script generator, now in AdvanceMap there is an offset tab, but the 0x740000, or whatever it comes up with doesn't work in the tab, and when I try and imput something that makes sense to me (Like just 740000 or whatever, I do make sure its the correct numbers when I put it in BTW) It turns into 74000074 or something to that effect. If possible screenshots would be lovely, otherwise can you put it into terms that make it so easy a caveman can do it? (I had to get some sort of reference into my post. :3)
 

The Void

hiiiii
1,416
Posts
13
Years
Hello! Its 30 minutes till midnight here and I have had a very busy night, so I'm tired and can't be bothered with looking through pages 2-7 to check and see if this has been answered soooooo...
I use the automatic script generator, now in AdvanceMap there is an offset tab, but the 0x740000, or whatever it comes up with doesn't work in the tab, and when I try and imput something that makes sense to me (Like just 740000 or whatever, I do make sure its the correct numbers when I put it in BTW) It turns into 74000074 or something to that effect. If possible screenshots would be lovely, otherwise can you put it into terms that make it so easy a caveman can do it? (I had to get some sort of reference into my post. :3)

If you're using the latest version of AdvanceMap, be sure to remove the first two zero's. Also, you should remove '0x' in the offset.
 
35
Posts
9
Years
  • Age 24
  • Seen Dec 24, 2014
Is PKSV still a good option? Whenever I post a thread in the beginners lounge asking for help on a pksv script, no one bothers to look at it, they just tell me "Use XSE it's much better lol" without a reason why.
 

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
Is PKSV still a good option? Whenever I post a thread in the beginners lounge asking for help on a pksv script, no one bothers to look at it, they just tell me "Use XSE it's much better lol" without a reason why.

PKSV is still a perfectly valid option, at least in my opinion. Honestly, after using both, I can't really say that XSE is better. Both of them do the exact same thing, so it really doesn't matter.

On a side note, it really, really, really bugs me when somebody asks for help on a PKSV script and all the answers they get are "OMG!!!1111 Y R U USIN PKSV JUST USE XSE!11111" Seriously people, it's like if somebody had a problem with their iPhone and instead of getting help, people just told them "Get a samsung it's so much better!" because brand loyalty (I guess.)

Personally for me, XSE doesn't work on my computer, so I physically cannot use it. If you can't help with the script because you don't know anything about PKSV, then just don't post. If you don't have anything helpful to say, then just be quiet.

Anyway, rant over. If you need any help with PKSV, you can ask me. I've used PKSV for years now, and I know a pretty good amount on how to use various commands and such.
 
I know this script is terribly wrong, but I can't figure out where I screw up. It doesn't move initially, but does set a flag somewhere, only to screw up the movement and text.
The compare playerfacing doesn't seem to work quite well :/

I'm using pksv and a FR ROM.

Spoiler:
 

Blah

Free supporter
1,924
Posts
11
Years
I know this script is terribly wrong, but I can't figure out where I screw up. It doesn't move initially, but does set a flag somewhere, only to screw up the movement and text.
The compare playerfacing doesn't seem to work quite well :/

I'm using pksv and a FR ROM.

Spoiler:

after every applymovement line, insert the line "pauseevent 0x0".
Also you don't need:
compare playerfacing right
if == jump @right
replace it with just "jump @right".
 
78
Posts
15
Years
Thanks for the tutorial. It helped me a lot to transition from XSE to PKSV (had to - computer issues). I know PKSV is rather old, but it seems like a pretty good tool to me. I don't see any problems with it. It's not quite as user-friendly as XSE, even with all the nifty macros, but I don't think it's less capable by any means.

I couldn't help but notice the sloppiness of the Eevee script in the "example scripts" segment, though. The fanfare/"player received" message combination doesn't work correctly in it. So, I've rewritten it, also adding in a nickname option. This little drill really helped me to learn and get used to PKSV faster. XSE knowledge is surprisingly more applicable than I thought it would be. I took a peek at the original give Eevee script in Celadon City, which also helped me to tweak some things. Looking at original scripts from the game helps so much when you're trying to learn.

Rewritten Eevee script:
Spoiler:


Sorry if my habitual usage of hexadecimal here and there is confusing... I don't know why, but I sometimes feel a bit more comfortable using hexadecimal instead of writing out macros like MSG_NORMAL. The \v\h02 business is just Eevee stored as a buffer thanks to storepokemon 0x0 EEVEE (not necessary - just wanted to play with it).

I know hardly anyone checks out this thread anymore, but I wanted to post this anyway. Let me know if you don't understand something in my script or if you want help with your own! It would help me learn.
 

Funnygameer4354

Hacking Newbie
10
Posts
8
Years
  • Age 23
  • Seen Sep 8, 2015
Hi guys! Quick question ummmm..... WHAT AM I DOING WRONG??!?!?
I typed in this script for someone saying a simple message:
#dynamic 0x740000
#ORG @start
message @visit
callstd 2
end

#org @visit
= I come to One Island\nto do some shopping.

And then I compiled it and added it to the sprite using advance map
Then i clicked the sprite and open script to make sure it works, but I just get:

#org 0x8740849
'-----------------------------------
#raw 0xFF
#raw 0xFF
#raw 0xFF
(Numerous #raw 0xFF's later)
#raw 0xFF
#raw 0xFF
#raw 0xFF
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)

What did I do wrong?
 
41
Posts
8
Years
  • Age 23
  • Seen Jul 3, 2016
Want a fossil script
#dyn 0x740000
#org @start
setflag 0x568
lock
showpokepic AERODACTYL 0X3 0X0
cry AERODACTYL 0x0
msgbox @Slow
callstd MSG_YESNO
compare LASTRESULT YES
if == jump @pushedyes
jump @pushedno

#org @pushedyes
msgbox @receive
callstd MSG_NORMAL
addpokemon AERODACTYL 10 00 0 0 0
hidepokepic
disappear 0x5
release
end

#org @pushedno
msgbox @bye
callstd MSG_NORMAL
hidepokepic
disappear 0x5
release
end

#org @slow
= Its an aerodactyl do you want\nit?

#org @receive
= \v\h01 received a AERODACTYL!

#org @bye
= \v\h01 did not receive a AERODACTYL!

Set person id as 0567 Make sure person event no. is 5
 
Last edited:
22
Posts
7
Years
  • Age 21
  • Seen Mar 9, 2022
I know this thread is old, but I have a problem with my script. It's a snorlax script. After you beat him, he disapperas (normal) then the camera goes wacko. And sometimes you take control of the chubby kid.

Spoiler:


A new at this so the script may suck. Thanks for the help.
 
Last edited:
Back
Top