Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

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:

I know this was already explained by Full Metal but I'm gonna expound on it and make it clearer for you anyway. Just follow this script I'm about to give you:

See the script in the middle of callstd and release? Follow that pattern. It's very important you include the 'special' scripts unless you want your scripts to be all screwed up. Simple as that.

Extra Lesson 3: Setmaptile

Spoiler:

Setmaptile is a special script that allows you to change things on the map (without having to use mapping tools). As for this tutorial you would need AdvanceMap and PKSV.

So first you need to look at 4 things. The X and Y Position of the map object you want to edit and the 'Block' of the object you'll replace it with. And the movement permission of the object you'll replace it with.

You'll know how to get those by opening AdvanceMap and following what I did below:

This is how to get the X and Y Position (look at the below left of A-Map):

And then the 'Block' number (again, look at the below left of A-Map):

And then choose a movement permission:

Now gather all of that beside each other. (If the Movement Permission you chose is 1, make it 0x1, if it's C, make it 0xC, and so on. Same thing applies with the 'Block' number.)

So if I put the X and Y Position, the Block number, and the Movement Permission together, that would then be...

You can add more 'setmaptile' codes if you want to put more objects. Just follow the same pattern. Note that the fadescreen codes aren't all that necessary but they just add that 'fade' effect before and after your setmaptile happens to make it look cool.

Extra Lesson 4: Warping

Spoiler:

Warping is a special script which 'forces' the player to move to another map. All we need is a 'warp' command followed by the map and map bank of the place you wanna warp in, a 0xFF command, and the new X and Y position you want your player to warp to in your map.

Open up AdvanceMap. Let's say there's a guy who wants to warp you to some random place in Victory Road. So now we have to get the map and map bank for Victory Road.

Now we have the map and map bank of Victory Road which is 1 and 39.

Next, we find the X and Y Position where the player is gonna warp to in the map. Let's make it random.

Now that we have that, let's put the map, map bank, and X and Y Position together, along with the 0xFF command. Do it in this order:

Map, Map bank, 0xFF command, X and Y Position. (Also note that if your Map or Map bank is, say, 1, then make it 0x1, and if it's 39, make it 0x39 and so on.)

In my case it's:0x1 0x39 0xFF 0xB 0xA

Now, put all that after a 'warp' command, which you would put after your 'callstd' command in your script. And if you want, you can add the fadescreen effect like what I did in the previous lesson. So now I have...

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.

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.

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)

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)

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.

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

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.

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

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

You don't need to use if twice, and lockall and releaseall should only be used when movement is involved (although it does not have a major effect on the script). Showmsg and waitbutton are also unnecessary, unless it's a level script (or something elaborate), so use callstd. Modify the script to your needs, and feel free to ask if you have any further questions/problems.

I'm making a road blocked script and thanks to manadhon I have made half of it, but now I need to make the person script. Can anyone help? This is the first script that manahdon made:
#org 0x8740000
'-----------------------------------
#raw 0xFF
checkflag 0x253
if true jump 0x874000F ' Flag is set
jump 0x8740024

The PokéCommunity

Meta

Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, or The Pokémon Company International. We just love Pokémon.