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

Tool: PKSV - Pokémon Script Editor + GUI

Status
Not open for further replies.

score_under

Inactive; Former ROM hack tool author, ❤️
526
Posts
18
Years
Is there a tutorial for this?
Not that I've created myself - oh dear, I'd forgotten all about my attempt to document all the commands :s

The blob of blobs has created a script generator console app, and there is an "official" script generator included in my PKSV package.

Aside from that, the best way to learn scripting is through decompiling scripts made by the creators of the game - they know best, as they programmed what each scripting command should do! :P

A script generator for 2nd Gen games would be AMAZINGLY useful.
Yes, it would... it'd also be amazingly difficult to program ;) I would need a little help with that.
 

poddish

Spirit Of Radio
233
Posts
15
Years
Not that I've created myself - oh dear, I'd forgotten all about my attempt to document all the commands :s

The blob of blobs has created a script generator console app, and there is an "official" script generator included in my PKSV package.

Aside from that, the best way to learn scripting is through decompiling scripts made by the creators of the game - they know best, as they programmed what each scripting command should do! :P


Yes, it would... it'd also be amazingly difficult to program ;) I would need a little help with that.

what'd be even harder would be a 1st gen script editor, but thats cause the 1st gen games' data is "cluttered". You also said this'd be the first 2nd and 3rd gen scripting tool, but that may cause the 2nd gen to get a bunch of "crap hacks" like the 3rd gen (by crap hacks, I mean basically all hacks people gave up on because of difficulty, even though there are more than enough tools out there; hacks with a lot of swearing, and... other stuff...; etc) Anyway, I hope you finish making this tool, it looks great so far, just don't make it like pokescript where the tool compiles garbage data to the rom, wasting space and the time it takes for the hacker to try to free up that garbage space again.

anyway, you don't have any support banners and xse does, so here's one I made in like 5 minutes You don't have to use it if you don't want to
 
Last edited:

ksunwoo6

Working on PKMN OI...
155
Posts
16
Years
ok. I have a problem... I did the script generator - give pokemon code - but it says you need flags - and where in the internet?
Where exactly? And also,
After I did it, it didn't give me a offset.
 

videoman

I'm no hero. And never was.
43
Posts
15
Years
Road-Closed and CERULEAN CITY Scripting

Hey there! I am new to the whole "Scripting" thing and all. So i was wondering if someone can help me on a curtain script issue. Here's the issue:
I need help making a Script, you know like the one they (Nintendo) made for making the one person not move from CERULEAN CAVE entrence untile you Beat the Elite Four. does anyone know the script for this curtain issue. Also can someone explane how the whole "Road-Closed" feature in the Scripting programs. How does it work? And how to use it?
Thanks

Videoman
 

score_under

Inactive; Former ROM hack tool author, ❤️
526
Posts
18
Years
Massive update!

PKSV has now exited that annoying beta stage, the easter holidays really gave me a chance to work on it.
Now, for the additions:
  • #dynamic support (can be abbreviated #dyn). #dynamic and #dyn search for the first block of free space, so for example "#dynamic 0x700000" would search for free space after 0x700000. There is also #dyn2 which will overwrite space even if it is not free, starting exactly where you say. A dialog box will also allow you to see all dynamic offsets.
  • A movement planner (may need a little graphical revamp) accessed through Ctrl+M or the Tools menu:
    moveplan.png
  • Printing with multiple zoom levels and syntax highlighting.
  • "#eorg" command - like #org, but erases a script of the same length from that location. The best use of this is to open an existing script from AdvanceMap, replace all #org with #eorg, and compile again. This will delete the script and free up the space the script was using.
  • "Debug compile" option, which "pretends" to compile the script so you can check the log for errors in a particularly volatile script.
  • Now compiled in MS Visual C++. Dropped again in favour of GCC's mean optimizer.
  • You can now drag-and-drop a ROM onto the window, or drag-and-drop a script onto the window to open it.
  • [2.0.1] Superfast compiling and decompiling with a DLL
  • [2.0.1] No need for PokeInc.txt, using a more compact "defines.dat" instead.
  • [2.0.1] PKSV engine version check to avoid compiler/IDE version mismatches.
  • Now with 200% more win!*
 
Last edited:

CollinP

My Avi Evolved
104
Posts
15
Years
  • Age 28
  • Seen May 19, 2009
help Please

um, i'm new, and i ned help- how do i use this? (the Guide Would not open For Me)
 
15
Posts
15
Years
  • Seen Apr 30, 2009
I've got the newest version (thanks for the update!) but I'm having some trouble.
I use the HM-Move generator and I type in
#dynamic 0x700000
as the first line but it says that it's an unknown command. --> "Warning: Unknown command "#dynamic""
Also, "checkattack CUT"- you need to put it in intergers? --> "Unknown value in CHECKATTACK (Value must be integer)"

Thanks. :D
 

score_under

Inactive; Former ROM hack tool author, ❤️
526
Posts
18
Years
I've got the newest version (thanks for the update!) but I'm having some trouble.
I use the HM-Move generator and I type in
#dynamic 0x700000
as the first line but it says that it's an unknown command. --> "Warning: Unknown command "#dynamic""
Also, "checkattack CUT"- you need to put it in intergers? --> "Unknown value in CHECKATTACK (Value must be integer)"

Thanks. :D
You only extracted the new PKSVUI.exe, didn't you? XD
You need to extract every single file in the ZIP, and into the same folder.

The "unknown command #dynamic" means you haven't updated PKSV.exe, and the "Unknown value in checkattack" means you have an absolutely ancient PokeInc.txt

If you downloaded the "pksvui_only" zip file (I uploaded that by accident ;) ) then get the other one: https://sourceforge.net/project/downloading.php?group_id=210460&filename=pksvui_pkg2-0-0.zip old version
 
Last edited:
15
Posts
15
Years
  • Seen Apr 30, 2009
You only extracted the new PKSVUI.exe, didn't you? XD
You need to extract every single file in the ZIP, and into the same folder.

The "unknown command #dynamic" means you haven't updated PKSV.exe, and the "Unknown value in checkattack" means you have an absolutely ancient PokeInc.txt

If you downloaded the "pksvui_only" zip file (I uploaded that by accident ;) ) then get the other one: https://sourceforge.net/project/downloading.php?group_id=210460&filename=pksvui_pkg2-0-0.zip

Ah, I see. Well it's working now. ;D
I'm just having trouble with the HM-Move still. (CUT on a tree)
So I start with this using the generator:
Spoiler:


And then I change the #dyn to #dynamic 0x700000

Then I click compile, and the offset comes up. I copy that and place it in Script Offset in A-Map. However, I open it back up and get

Spoiler:


Don't know what that is, but obviously, the event itself didn't work.
I'm probably doing something wrong, but what is it? xD

Oh also, what command is used to change the music of a WILD BATTLE (generated by the generator)?

Thanks.
 

score_under

Inactive; Former ROM hack tool author, ❤️
526
Posts
18
Years
Ah, I see. Well it's working now. ;D
I'm just having trouble with the HM-Move still. (CUT on a tree)
So I start with this using the generator:

And then I change the #dyn to #dynamic 0x700000

Then I click compile, and the offset comes up. I copy that and place it in Script Offset in A-Map. However, I open it back up and get

Don't know what that is, but obviously, the event itself didn't work.
I'm probably doing something wrong, but what is it? xD

Oh also, what command is used to change the music of a WILD BATTLE (generated by the generator)?

Thanks.

I think to change the music you alter this command (although I have no time to test it today):
special 0x138
This can be changed to 0x143, 0x137, or 0x139.

The generated script not compiling is in fact a bug [sprintf() is cutting out at "\\h"]. Use this script instead:
Spoiler:
 

Full Metal

C(++) Developer.
810
Posts
16
Years
um about the script gen
i'll fix it up (aotm trying to add the checkflag function and somehow got rid of the actual main script :O but easily fixable)
i'll upload it in toolbox because it isn't pksv specific it also works for XSE :D
Edit:it is now fixed ^-^
and checkflag is functional but currently incapable of doing messages for you
if you want you can you'll just have to [bold]cut[/bold] the
#org @[ur messagelabel]
= [your message]
and paste it with the rest so that your script compiler doesn't get confused
Edit again: here is a link CLICKY! CLICKY!
Hopefully the final edit: Here's a userbar
attachment.php

to add it to your sig copy and paste
Spoiler:
 
Last edited:
15
Posts
15
Years
  • Seen Apr 30, 2009
Oh I have another question. So I have this compiled script for a wild battle with MEW made using the script generator:
Spoiler:


I'm assuming that the \v\h02 is whatever the setvar 0x8004 0x** is, correct?
As 96 = MEWTWO, everytime I run from a wild battle I create says "Wild MEWTWO flew away!" or something. Then I realize that I can't change just that one part of this certain script because all the wild battles I create, that one part has the same offset for every one.

So can I fix this by simply using the FSF and changing the offset after #org (for 0x8162561)? Or do I need to do something different?

Because I also made wild battles with JIRACHI, KYOGRE, and more, but all of them say "MEWTWO flew away!" and the setvar 0x8004 0x** is the same (0x96)

Thanks for the help!
 
15
Posts
15
Years
  • Seen Apr 30, 2009
So using the response from Blob, I fixed up a wild battle with RAYQUAZA and used
setvar 0x8004 0x180
(180 is RAYQUAZA in hex, no?)

I fixed up the offsets and ran the ROM in VBA.
However, I run from it and it says AGGRON.

AGGRON = 132 and there's no 132 in my script.

Here it is:
Spoiler:


The bolded parts are what I fixed up. So why do I get AGGRON in the textbox when it should be RAYQUAZA?

EDIT: I opened it, and just tried to recompile/save it when I get this in the compiler log:
Spoiler:


It worked fine when I first compiled it, but now I can't do it again without that log showing up.
 

score_under

Inactive; Former ROM hack tool author, ❤️
526
Posts
18
Years
You need to extract the whole file - defines.dat is the datafile used for compiling. If you do have the whole file extracted, please tell me in which situation defines.dat failed to open.
 
Status
Not open for further replies.
Back
Top