A PKSV Extra Scripting Tutorial
View Single Post
November 22nd, 2011, 11:13 AM
Legendary Dragon Master
Join Date: May 2010
PKSV EXTRA SCRIPTING TUTORIAL
I know there's already the
PKSV Scripting Tutorial Thread
by Full Metal, but that thread didn't explain all there was about scripting, anyway. So in this thread, I will explain to you how to do a few 'extra' scripting stuff using PKSV-UI.
Extra Lesson 1:
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:
= Behold, rain!
That was a script for rain. After the 'setweather' code, set the variable to 0x3 for rain, 0x0 for sunny, and 0x7 for snow. Just follow those guidelines and you have your very own weather code!
Extra Lesson 2:
Right, so Camera Movement is a script that moves the camera to another position. Well, it's hard to explain. So let this video set an example for you.
See that? That's what we're about to learn. So first follow this code below:
applymovement CAMERA @show
applymovement CAMERA @return
= I will show you your house.
= walk_left walk_left walk_left walk_left end
= This is your house.\nNow you see.
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. See?
Extra Lesson 3:
So 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...
0xB 0x8 0x5 0x1
Now put that in your script. Just follow this pattern:
setmaptile 0xB 0x8 0x5 0x1 (you put your pattern here)
= Behold, the power of setmaptile!
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 is a special script which 'forces' the player to warp somewhere. So 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.
So again, we'll need AdvanceMap for this. So let's open it up. And let's say there's a guy who wants to warp you to some random place in Victory Road. So let's get the map and map bank for Victory Road.
So we have the map and map bank of Victory Road which is 1 and 39.
Now to find the X and Y Position where the player is gonna warp to in the map. Let's make it random.
So 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 tf it's 39, make 0x39 and so on.)
So 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 in my case...
warp 0x1 0x39 0xFF 0xB 0xA
= Mwahaha!\nI shall warp you to some\lrandom place!
That's all for now. Till next time! If you have any questions, feel free to ask.
Last edited by dragon456; November 25th, 2011 at
View Public Profile
Send a private message to dragon456
Visit dragon456's homepage!
Find all posts by dragon456
Find threads started by dragon456