• 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

Full Metal

C(++) Developer.
810
Posts
16
Years
try writebytetooffset
i'm not really sure how that works, but feel free to try ^_^
also, just check the drop down menu, then go to hackmew's xse and look for a similar command in the command help, that should get you the right "arguments" (arguments are just information a command needs to know in order to do what it needs to)
 

interdpth

I've seen things, man.
275
Posts
19
Years
  • Seen Jun 8, 2021
Yeah, i've looked through the whole command list, I really don't want to have to track down the actual memory address for LAST RESULT

urgh this nasty
 

Full Metal

C(++) Developer.
810
Posts
16
Years
lolz
check hackmew's knowledge thread, the asm thing has yet to work for me, (because it always gets the wrong address somehow or the other) but yea...he tells ya how to find the address of some variables.
 

Hedgehogger

Learning ASM, but struggling
204
Posts
17
Years
PKSV's an excellent program--I've been using it to compile my scripts for a while since I used to own Windows 98, which was non-XSE compatible. I've got Windows 7 now, but before I give you my life's story, I noticed Advance-Text doesn't work...Now I learned that in PKSV you could decompile a script, edit it, and re-compile it to the same offset.

I used this method a couple of times to change text, but I just need to know...If the text is shorter than the original, what happens to the leftover data? (I tried to look into it with a Hex Editor and the decompiled offsets, but I just got random Raw's out of it) And if the text is longer than the original, will anything be overwritten?
 

Full Metal

C(++) Developer.
810
Posts
16
Years
if the text is longer, then yes absolutely, things will be overwritten (unless you repoint the data...)
if the text is shorter, then the bytes will be left alone and you'll just have two different strings (pieces of text).
 
2
Posts
14
Years
  • Seen Jun 26, 2011
So I am new at this and i have been trying to write movement scripts with no success, this is how I write it.

Spoiler:


but when i compile it, it comes out like
Spoiler:


I was wondering what I'm doing wrong
 

Full Metal

C(++) Developer.
810
Posts
16
Years
trying redoing this in dynamics.
Spoiler:

also, since the script u compiled wasn't in dynamics, I'll assume that you compiled the script, then decompiled and tried to edit it.
If you intend to do this decompile the script using the "dynamic offsets" option in pksv's decompile box. this will avoid any errors like this.
If i'm not wrong, what happened was when you added to the script, the scripts overwrote eachother.
I could not see any problems in ur script, but the above should work (assuming the event number of the ow is 0x4. . .)
*edit*
welcome to pokecommunity ^.^
 
2
Posts
14
Years
  • Seen Jun 26, 2011
awesome thanks for the warm welcome, that worked perfectly. Great tutorial too by the way
 

Full Metal

C(++) Developer.
810
Posts
16
Years
thank ya thank ya :D
again may i make it known
ToDo
Level Script Update
Check Gender Script
and perhaps (still considering it) some tuts on how to use some features on jpans patch as i already have quite the lengthy script using the run-time multichoice. ... i'll add it to the collection nao.
 

ThePoketrix

real-life pikachu
9
Posts
14
Years
  • Seen Jun 1, 2012
One prob.
HOW IN THE WORLD DO YOU SAVE CHANGES TO EXISTING SCRIPTS?!?!?
 

Full Metal

C(++) Developer.
810
Posts
16
Years
-_- how many times have i answered this?
1) If its a file then either File->Save or ctrl+s
2) If it is supposed to be *inside* the ROM then push F9 or ROM->Compile
srsly though...i might have to add an entire new tutorial for all these nubs asking me how to put a script in a rom or save it...heck, i could probably write a book! >_>
FOR THE LAST FREAKING TIME
IF YOU WANT TO STORE A FILE IN THE GBA ROM, PUSH F FREAKING 9. IF YOU WANT TO SAVE IT AS A FILE TO EDIT LATER, PUSH CTRL + S
maybe the uggested screaming got it through your heads. >.>
 

558122_DG

Learning how to make mistakes
737
Posts
14
Years
  • Seen May 27, 2021
can't wait to see the move camera script implemented into this tutorial :D
It's pretty nice, you should update the level scripts part though :)

overall good tut :)
 

6ryan4

"Watch the power of aura!!!"
27
Posts
14
Years
Help?

I need help with this script:

Spoiler:


I need to make it so that the script continues directly after the trainer battle. Can someone edit my script so it'll do that?
 

558122_DG

Learning how to make mistakes
737
Posts
14
Years
  • Seen May 27, 2021
I need help with this script:

Spoiler:


I need to make it so that the script continues directly after the trainer battle. Can someone edit my script so it'll do that?

This goes in the script help thread not here. And full metal are you updating this thread?
 

Hedgehogger

Learning ASM, but struggling
204
Posts
17
Years
I was wondering...

When inserting a standard warp script, how would you make it warp you to a map that has 3 numbers in the Map address (i.e. 1.122)?

At first I tried just entering "warp 0x1 122 0x0", but that turned it into its true Hex number, which is 7A.

Then, I tried warp "0x1 290 0x0", since 290 in hex is 122...The script came out as warp 0x1 0x90 0x0.

So I tried warp 0x1 0x90 0x2, but then the warp just doesn't work altogether. A little help? The reason why I'm asking here is because I've never seen how it would work in PKSV.


Nvm. I had to put 0x7A in. Ignore this post...
 
Last edited:

Full Metal

C(++) Developer.
810
Posts
16
Years
OK
@558122_DG- I'll update when i...
A) Have the time (i'm doing a TON of work on Script Gen) and...
B) Feel like it
C) Am not grounded, (FEB 20th, I will be ungrounded, but I have a taekwondo tournament which will occupy all day )
So that everyone knows, I'm grounded until FEB 20th, so don't take it personal if I don't reply, this is the only reply I will make, because I *do* want to maintain some trust with my parents...
 
Back
Top