• 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 Extra Scripting Tutorials

The Void

hiiiii
1,416
Posts
13
Years

PKSV EXTRA SCRIPTING TUTORIALS


I know there's already the PKSV Scripting Tutorial Thread by Full Metal, but that thread didn't explain all there was about scripting. That is why I've made a compilation of even more awesome scripts you an make with PKSV.


Extra Lesson 1: Weather
Spoiler:


Extra Lesson 2: Camera Movement​
Spoiler:


Extra Lesson 3: Setmaptile​
Spoiler:


Extra Lesson 4: Warping​
Spoiler:


Extra Lesson 5: Music​
Spoiler:


Extra Lesson 6: Shinies​
Spoiler:


That's all for now. I'll be updating this as much as possible. If you have any questions, feel free to ask in this thread, or VM me directly.


 
Last edited:
39
Posts
12
Years
  • Age 28
  • Seen Jun 8, 2021
hm this is very helpful thank you. would you mind doing one on changing regular NPCs into battleable trainers and changing what items you find?
 

The Void

hiiiii
1,416
Posts
13
Years
hm this is very helpful thank you. would you mind doing one on changing regular NPCs into battleable trainers and changing what items you find?

Changing the items you find would be really easy, and most people know how to do it, so I'm just putting it in this post.

So first, you go to "Script Generator" in PKSV.

Then you click on 'Find Item' then you fill up the stuff and you have your very own Item script (just put the compiled offset into, say a Pokeball event).

But as for the trainer thing, I think I'll put that in my first post instead.
 
39
Posts
12
Years
  • Age 28
  • Seen Jun 8, 2021
thanks again! as one of the only pksv tuts this should prove very helpful
incidentally, how would I per say add an NPC who could give you the National Pokedex? it doesnt seem to be in the script generator.
 
Last edited:

The Void

hiiiii
1,416
Posts
13
Years
thanks again! as one of the only pksv tuts this should prove very helpful
incidentally, how would I per say add an NPC who could give you the National Pokedex? it doesnt seem to be in the script generator.

Well, that's easy as well.

Just use this code:

Code:
[FONT="Courier New"]special FR_NATIONAL_DEX[/FONT]

You can use that after your message saying that you'll upgrade his/her Pokedex. Example:

Code:
#dyn 0x740000
#org @main
lock
faceplayer
message @upgradepokedex
callstd MSG_NORMAL
special FR_NATIONAL_DEX
release
end

#org @upgradepokedex
= I'll upgrade your Pokedex for you.
 
Last edited:
39
Posts
12
Years
  • Age 28
  • Seen Jun 8, 2021
YES! Thank you SO much I've been looking EVERYwhere for that! Just to be sure though does the FR stand for FireRed? cos im using emerald but thats my bad for not saying so. or does it not matter (Im sure u've guessed at what a n00b i am by now) :P
 

The Void

hiiiii
1,416
Posts
13
Years
YES! Thank you SO much I've been looking EVERYwhere for that! Just to be sure though does the FR stand for FireRed? cos im using emerald but thats my bad for not saying so. or does it not matter (Im sure u've guessed at what a n00b i am by now) :P

You're not a noob, don't worry XD
I've known experienced scripters have the same problem.
But yes, the FR stands for FireRed and no, it won't matter if you're hacking Emerald :D
 
Last edited:

AustinWolff

has left
100
Posts
12
Years
hello, I have a question about the specials. I know a special that makes the hall of fame and credits role, but is there a special that ONLY makes the credits role and not the hall of fame?
 

The Void

hiiiii
1,416
Posts
13
Years
hello, I have a question about the specials. I know a special that makes the hall of fame and credits role, but is there a special that ONLY makes the credits role and not the hall of fame?

Sorry for taking so long to reply (didn't see you posted)... anyway... see below please XD

Code:
special 0xA9
 
Last edited:
2
Posts
11
Years
  • Seen Aug 9, 2012
Need help.

Hello! I am new with coding so i have some questions :)

I am trying to get the Player to "auto-walk" and talk when you walk on a special point of the ground.
This is my code

Code:
#dyn 0x74000
#org @start
lock
applymovement PLAYER @a
release
end
#org @a
m walk_up end


I have placed out a script on the ground i insert the script
But the game freezes when i walk on that spot.
What is the wrong?
Do i have to change the script?
Do i have to set var numbers.
Please answer.
 
Last edited:
22
Posts
12
Years
  • Seen Sep 11, 2016
Hey all.hope u all are doing good and fine. I didnt know a thing about hacking...a couple of years ago,but only because of new pokemons i started getting the grip. After several attempts i can easily now insert sprites,use YAPE at some extend(dont know why but it crashes when using on hacked roms),can change pokemons and items name.and then i decided to make a hack to have all pokemons in gba rom. I tried using jambo 51,s patch,but couldn.t go much ahead after inserting sprites and enabling national dex,because of extreme hexing.
So i came back to normal.now i am adding new things in the famous hack pokemon light platinum bt weesely,i have added several gen 5 pokemons,removes several others and repetitive pokemons,got pokedex entries of some right,changed name added fakemons extra. Now i have added a lots of new maps.these will act as a side mini game.you get pokemart here,with masterballs,nurse joy,people giving stuff and pokemons.and here the problem started-1. i want a person to give a pokemon,but not more than once.that doesn,t work.the setflag didnt worked.iwanted them to give several new pokemons,fakemons,but only once. 2.i created several trainer mansion and lairs,fyll of champions and trainer. I want that i can go their and fight all the trainers,and then face the champion,having pokemons at level 100- but again and again. That is I want a rebattle script.write now i have a script,but with that i can fight only once.when i return to the sprite agin,nothing happens. I used pokescript for above two scripts.
3.i am re creating a event for tornadus,thundurus,landorus. I want that when i stand in front of the house in one of my map,a man comes out and make me follow him inside,then recite the whole history of the trio. I already have the map,and script to fight these pokemons prepared.just want this movement script.
4.similarly,when i enter a house in one other map of mine,i want a man there,when i talk to him he will ask me to go take a sleep on the map.only this much movement script i want.after that i can put a warp on bed itself,and make my player go to a different map to fight darkrai,as in diamond and pearl,and after fight warped back to my bed.
5.also if somehow i carry kaldeo to special part of map,kaldeo jumps out of pokeball,and then virizion,terrakin n cobalion come,and teach him a move,and kaldeo evolves.so a movement,move tutor and evolution script.6. When i enter a place,a person teaches a move to my meleotta,learning which my meleotta transforms into piourette forme.
7. I already made white orb,black orb,and gladecia flower item to transform kyurem to its two form,and shaymin to its.I want to give proper respect to these legendaries,hence i am asking for these script.or else cud have easily given them the easy wild battle script. And someone plz tell,after i get the script ready,if I get,then what to do next to compile it into a rom.I mean there is no compile button or so.
If someone got the time and patience to answer me and provide me the simple,usable,tested script,I shall be forever thankfull to him/her/them.
This rom is entirely for personal use so I can have all my favs in one rom with all events and all.so plz anyone help...
Hope to find a reply soon. Till then take care you all.and thanks to all scripter,gamers,programmers for providing these amazing tools,without which we could have only dreamed of such possibilities- sign off....
 
22
Posts
12
Years
  • Seen Sep 11, 2016
See i dont remember for sure at the moment.but try this.
There is this command you use in pokescript.with that you use some figures.use this command in a script and compile it,and it will work.
Procedure:
1.write a script,any script will work,even a basic message script.
2.example-
#org &start
Lock
Faceplayer
Message &1
Boxset 6
Warp 0x20 0x5 0xFE 0x55 0x2A
Release
End

#org &1
&1 1 =this is an example.
3.in the above script,when you will run it,then the person will first say tha-this is an example,and then teleport you to the map you entered.
4.if you want you can write this script,compile and then in a-map select a new script event and assign it.then you have to change the var value to 4050.thats it.now when you will step on that script tile in game,again the message will be displayed-'this is an example' and you will be teleported.
5.you can even use this warp command with give pokemon or give item or wild battle or trainer battle script.
6.just remember to add this line-
Warp 0x20 0x5 0xFE 0x2A 0x65 (this is just a example).
Warp will teleport you.
0x20 means map number 20 in HEX.you will have to check your map number in A-Map and then convert it to hex using a hex calculator and enter as the first figure.0x20 in this case..
0x5 means bank number in HEX.check this too in a-map.convet thenumber to hex and enter as the second one.
0xFE is to be written as it is.
0x2A means the exact spot you want to be teleported.its the x- coordinate.example you wanted to be teleported in a certain map at a point.the value of that point you can check in bottom left hand side.it says X:... And Y:...
Both X and Y values are already in hex so no need to convert as like fist two numbers.
7.Complete the script and hit compile,enter offset in a-map and save.
8.goto any other map number.
9.if it says save changes,click yes.
10.go back to your map number on which you placed the teleport script and open it using pokescript.
11.check the warp values.
First three values will be as you have initially written,but the last two may have changed.
12.if not enjoy.
13.if the values are indeed changed,correct them and hit compile,save.save.
14.now your warp will work.
15.i faced your problem too.
16.always after compiling check the last two figures in warp command.they tend to corrupt while compiling.
Hope it helps,if not pm me,i shall be happy to assist you.bye take care.
 

xXNightsChildXx

Ghost Mistress
13
Posts
11
Years
Oh, you mean like when you pick up a Pokeball or something? Here ya go then:

Spoiler:


:3 Have fun!

I used the exact same code and when I picked up the master-ball it vanished, but when I move one tile it reappears. Is there any way to make it disappear for good once its been picked up? :3
 
1
Posts
10
Years
  • Age 26
  • Seen Sep 3, 2013
I was wondering how to make a rival battle. Like how do i make a battle with the enemy walking away after the battle?
 
6
Posts
10
Years
  • Age 27
  • Seen Nov 19, 2017
I've made a script and saved and compiled it, but when I try to open it on Advance Map it comes up like this:
#org 0x881565C
'-----------------------------------
lockall
checkflag 0x253
if true jump 0x887405A ' Flag is set
if false jump 0x887409E ' Flag is unset
setflag 0x251
waitbutton
releaseall
end

#org 0x887405A
'-----------------------------------
#raw 0xD8
#raw 0xD5
#raw 0xE2
#raw 0xDB
#raw 0xD9
#raw 0xE6
#raw 0xE3
#raw 0xE9
#raw 0xE7
nop0 ' #raw 0x0
#raw 0xDA
#raw 0xE3
#raw 0xE6
nop0 ' #raw 0x0
#raw 0xE4
#raw 0xD9
#raw 0xE3
#raw 0xE4
#raw 0xE0
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xE3
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xE6
#raw 0xD5
#raw 0xEA
#raw 0xD9
#raw 0xE0
nop0 ' #raw 0x0
#raw 0xD5
#raw 0xE0
#raw 0xE3
#raw 0xE2
#raw 0xD9
setdoorclosedstatic 0xFFFF 0xFFFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
CMD_C3 0xB4
#raw 0xE1
nop0 ' #raw 0x0
#raw 0xE7
#raw 0xE3
#raw 0xE6
#raw 0xE6
#raw 0xED
#raw 0xB8
nop0 ' #raw 0x0
#raw 0xDD
#raw 0xE8
nop0 ' #raw 0x0
#raw 0xDD
#raw 0xE7
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xE3
#raw 0xE3
nop0 ' #raw 0x0
#raw 0xD8
#raw 0xD5
#raw 0xE2
#raw 0xDB
#raw 0xD9
#raw 0xE6
#raw 0xE3
#raw 0xE9
#raw 0xE7
nop0 ' #raw 0x0
#raw 0xE9
#raw 0xE4
nop0 ' #raw 0x0
#raw 0xD5
#raw 0xDC
#raw 0xD9
#raw 0xD5
#raw 0xD8
CMD_FB 0xDCE8DDEB
#raw 0xE3
#raw 0xE9
#raw 0xE8
nop0 ' #raw 0x0
#raw 0xD5
nop0 ' #raw 0x0
msgboxsign
#raw 0xC9
waitcry
#raw 0xD9
nop0 ' #raw 0x0
textcolor 0xC9
#raw 0xC8
#raw 0xB8
nop0 ' #raw 0x0
#raw 0xE1
#raw 0xD5
#raw 0xED
#raw 0xD6
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xED
#raw 0xE3
#raw 0xE9
nop0 ' #raw 0x0
#raw 0xD7
#raw 0xE3
#raw 0xE9
#raw 0xE0
#raw 0xD8
nop0 ' #raw 0x0
#raw 0xD6
#raw 0xE3
#raw 0xE6
#raw 0xE6
#raw 0xE3
#raw 0xEB
nop0 ' #raw 0x0
#raw 0xE3
#raw 0xE2
#raw 0xD9
setdooropened 0xFFFF 0xFFFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)

#org 0x887409E
'-----------------------------------
nop0 ' #raw 0x0
#raw 0xE7
#raw 0xE3
#raw 0xE6
#raw 0xE6
#raw 0xED
#raw 0xB8
nop0 ' #raw 0x0
#raw 0xDD
#raw 0xE8
nop0 ' #raw 0x0
#raw 0xDD
#raw 0xE7
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xE3
#raw 0xE3
nop0 ' #raw 0x0
#raw 0xD8
#raw 0xD5
#raw 0xE2
#raw 0xDB
#raw 0xD9
#raw 0xE6
#raw 0xE3
#raw 0xE9
#raw 0xE7
nop0 ' #raw 0x0
#raw 0xE9
#raw 0xE4
nop0 ' #raw 0x0
#raw 0xD5
#raw 0xDC
#raw 0xD9
#raw 0xD5
#raw 0xD8
CMD_FB 0xDCE8DDEB
#raw 0xE3
#raw 0xE9
#raw 0xE8
nop0 ' #raw 0x0
#raw 0xD5
nop0 ' #raw 0x0
msgboxsign
#raw 0xC9
waitcry
#raw 0xD9
nop0 ' #raw 0x0
textcolor 0xC9
#raw 0xC8
#raw 0xB8
nop0 ' #raw 0x0
#raw 0xE1
#raw 0xD5
#raw 0xED
#raw 0xD6
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xED
#raw 0xE3
#raw 0xE9
nop0 ' #raw 0x0
#raw 0xD7
#raw 0xE3
#raw 0xE9
#raw 0xE0
#raw 0xD8
nop0 ' #raw 0x0
#raw 0xD6
#raw 0xE3
#raw 0xE6
#raw 0xE6
#raw 0xE3
#raw 0xEB
nop0 ' #raw 0x0
#raw 0xE3
#raw 0xE2
#raw 0xD9
setdooropened 0xFFFF 0xFFFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)

Why is it doing this? If it helps, here is what the script should be:
#dyn 0x740001
#org 0x81565C
'-----------------------------------
lockall
checkflag 0x253
if true jump 0x87405A ' Flag is set
if false jump 0x87409E
setflag 0x251
waitbutton
releaseall
end

#org 0x87405A
message 0x87402A ' I'm sorry, th-\pOh r...
showmsg
waitbutton
fadescreen FADEOUT_WHITE
closemsg
disappear 0x3
setflag 0x251
fadescreen FADEIN_WHITE
releaseall
end

#org 0x87409E
message 0x87409B
showmsg
waitbutton
release
end

#org 0x87409B
= I'm sorry, it is too dangerous up ahead\pwithout a POKe\MON, maybe you could borrow one?

#org 0x87402A
= Recent POK\eMON attacks mean that it \is now too dangerous for people to travel alone[.]

PLEASE HELP!!!
 
Back
Top