• 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
  • This post applies to an OLD version of the program only
    Hey, I was wondering how to compile scripts with this program? If it's possible.
    Save the file as a .PKS file, right-click it, then press Compile. <- NOT USED IN PKSV 2.0 (This was used before v0.9)

    Old version of post:
    Spoiler:
     
    Last edited:

    Swampert 22

    Is making tools for you...
    393
    Posts
    18
    Years
  • Hey score-under, I had an idea that may make a useful addition to the program. Functionality to export the decompiled script to a txt file. Whadda ya think, cus sometimes, on a really long script it chops the top off. This would let you read the whole thing, and make basing new scripts on the decoded ones easier.

    Just an idea!
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • This post applies to an OLD version of the program only

    Old post:
    Spoiler:

    New post:

    Hey people! I got a new version out today.
    It can decompile codes for the slot-machine much better now, with commands for altering and checking the coin case, and some purely semantic commands (to prevent false data being decompiled).
    The unknown commands are prefixed with a "CMD_" both in the program AND in the decompiled code, and are useless until I find out what they actually do :D
    @swampert22: This version can now do that!

    EDIT:

    Random no-confirmation trading script
    Code:
    setvar 0x8004 0x0 ' Their poke, slot number (still don't know the variable for trainer)
    setvar 0x8005 0x0 ' Our poke, slot number [0-5]
    special 0xfd
    special 0xfe
    waitspecial
     
    Last edited:

    Lyzo

    Back from vacation
    261
    Posts
    17
    Years
  • Hey I've been trying to get the poké ball script because i still don't know how it works anyway the program worked but it says all these weird things that i don't get.

    Here's what it says if anyone knows what it means please tell me.

    copyvarifnotzero 0x8000 0x148
    copyvarifnotzero 0x8001 0x1
    callstd MSG_FIND ' PLAYER found one XXXXXX!
    end


    I think i understand the last 2 sentences. It plays a message just like the code message $**** and then the message. Then it ends. But i don't understand the first 2.
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • This post applies to an OLD version of the program only

    Hi,
    Code:
    copyvarifnotzero 0x8000 0x148
    copyvarifnotzero 0x8001 0x1
    When you find/obtain an item, the game needs to know which item and how much.
    The number stored in 0x8000 tells it which item (0x148 = TM40 Aerial Ace)
    The number stored in 0x8001 tells it how many (one)
    then it calls the function to give the item (callstd MSG_FIND) and ends the script.

    Also, be careful not to mix up message and msgbox in pksv - they mean different things.
    Code:
    message 0x????????  ' Gets ready to show a message (only one page, ie. cannot have \p or \l)
    showmsg
    waitbutton
    closemsg
    end
    
    --------------
    
    msgbox 0x???????? 'can have multiple pages
    callstd MSG_NORMAL 'shows message
    end
    message 0x???????? is used primarily in the "berry" script, as it provides more control over when the message closes, what it does, etc.
    msgbox 0x???????? is used for general-purpose messages.

    How to edit scripts
    This is a copy of a PM I sent - I hope it's useful to you.
    Spoiler:

    The 1st PKSV command chooses the ROM and offset, and decompiles it.
    The last PKSV command chooses the ROM and script, and compiles it again.
    ps. only 25% of people download this from pokecommunity.com - the rest come from pokecommunity.com
     
    Last edited:
    3
    Posts
    16
    Years
    • Seen Jun 10, 2008
    download

    ok, so i'm confused... is there a list of offsets somewhere? Or a list of what messages = what, or do you guys just magically just figure all this stuff out on your own?
    all i want to do is add the dp pokemon to my rom ><;
    not sure if there is an easier tool i can use or what >>;
     
    Last edited:

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • This post... wait, no. This one is still valid.
    This program edits scripts, whose offsets can be found using tools like advancemap or elitemap.

    To add new pokemon, you need a program which will edit pokemon base stats, pokemon pokedex entries, pokemon sprites and pokemon cries.
     
    Last edited:

    WaterSplash

    Common
    70
    Posts
    16
    Years
  • For some reason the pokescript tutorial's scripts aren't recognized by the PKSV. I really need a tutorial on writing these scripts. Hope someone can write one sometime.
     
    Last edited:

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • This post applies to an OLD version of the program only

    If you need pokescript scripts converted into PKSV scripts, don't hesitate to contact me (PM).

    MAJOR update
    Now you can specify free space, eg.
    Code:
    #define some_space FREESPACE100 ' defines some_space as free-space
                                    ' which is 0x100 (256) bytes long
    #org some_space
    ' BLAH etc...
    Or, you can specify it temporarily:
    Code:
    #org FREESPACEB0 ' sets file pointer to nearest free space of 0xB0 bytes.
    'do stuff here
    Or more practically:
    Code:
    #define CODE_SPACE FREESPACE10 '16 (0x10) bytes
    #define TEXT1 FREESPACE10      '16 (0x10) bytes
    #org CODE_SPACE
    msgbox text1
    callstd msg_normal
    end
    #org text1
    = Message!
    Edit: Sorry to all 5 people who downloaded the version before 200802211825. The FindFreeSpace() function had a serious glitch. It is now fixed :)
    Edit yet again:
    The file size of PKSV is smaller than the filesize of a BMP with dimensions of 300*200
     
    Last edited:

    GKS

    Retired Hacker
    1,320
    Posts
    16
    Years
    • Seen Dec 23, 2013
    This actually works! Thank you very much for this tool.
     

    Danno

    Formerly Meowth, AKA InnerMobius
    1,224
    Posts
    17
    Years
  • I understand how to work the program, but I'm not sure how to change the scripts.

    When I open it it comes up with a strange black box, then gives a prompt to open the ROM.
    After that it asks for an offset. So I put it in and it comes up with the offset I asked for. But then if I hit any button it clicks out.

    Help?

    Same here. Im having a hard time changing the scripts too, same thing for me.
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • note to self: post made on ui release.
    If this post is still on the last page of the topic, look at the date and just TRY telling me something isn't amiss.
     
    Last edited:

    metalaggron

    Master of Ice Pokemon
    73
    Posts
    16
    Years
  • i want to change the script, where i choose my starters in firered
    but i can't find the script in advancemap

    i chose the starters of gsc but the text still says bubasaur charmander and squirtle
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • Thank you man! You just alerted me to 2 different bugs - uploading the fixes:
    1) Update bug
    2) Decompiled code - unrecognised commands

    Uploaded! All your auto-updates should have fired (v.1.1.2 onwards), although in the second-to-latest (v1.1.2) it is glitched - which I just fixed.

    To MetalAggron:
    Warning: HUGE
    Spoiler:
     
    Last edited:

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • You can find this script on any of the pokéballs in professor Oak's lab.
    Just make sure to reset the first "setvar"s on each ball!
     

    metalaggron

    Master of Ice Pokemon
    73
    Posts
    16
    Years
  • sorry that i keep bothering you, but how to reset the setvar
    all i get from the script in the balls is this

    Code:
    #org 0x8169BAB
    '-----------------------------------
    lock
    faceplayer
    setvar 0x4001 0x0
    setvar 0x4002 0x98
    setvar 0x4003 0x60
    setvar 0x4004 0x7
    compare 0x4055 0x3
    if 0x4 jump 0x8169DE4 ' Larger Than or Equal To
    compare 0x4055 0x2
    if 0x1 jump 0x8169BE1 ' Equal To
    msgbox 0x818EA19 ' Those are POKé BALLS.\nThey contain POKéMON!
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    
    #org 0x8169DE4
    '-----------------------------------
    msgbox 0x818EA45 ' That's PROF. OAK's last POKéMON.
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    
    #org 0x8169BE1
    '-----------------------------------
    applymovement 0x4 0x81A75EF ' look_right end 
    pauseevent 0x0
    #raw 0x75
    end
    
    
    #org 0x818EA19
    = Those are POKé BALLS.\nThey contain POKéMON!
    
    #org 0x818EA45
    = That's PROF. OAK's last POKéMON.
    
    #org 0x81A75EF
    M look_right end
     

    score_under

    Inactive; Former ROM hack tool author, ❤️
    526
    Posts
    18
    Years
  • Uploaded an update - for frontend and back-end.
    GUI is now version 1.2.0 and PKSV is now 1.0.2

    Also, added a check to make Lucida console the default font and Courier New the fallback. Mainly because on my PC courier new can't not be italic.
     
    Last edited:
    10
    Posts
    15
    Years
    • Seen Jan 27, 2014
    Okay, you know that girl in pallet town that when you talk to her, she moves one step away from you and tells you about trainer tips? I want to replicate that, but every time I do, the test subject says the right things, but doesn't move. what gives?

    Here is the exact script:

    Code:
    #org 0x816575C
    '-----------------------------------
    lock
    compare 0x4070 0x2
    if 0x1 jump 0x81657ED ' Equal To
    compare 0x4070 0x1
    if 0x1 jump 0x8165815 ' Equal To
    compare 0x4002 0x1
    if 0x1 jump 0x81658C2 ' Equal To
    checkflag 0x2
    if 0x1 jump 0x8165801 ' Equal To
    msgbox 0x871B904 ' It appears to be a statue of\na rare POKéMON.\pHmm.... There seems to be something\nstrange about it.
    callstd MSG_NOCLOSE ' Non-closing msg
    applymovement 0x1 0x81A75E1 ' faceplayer end 
    pauseevent 0x0
    sound 0x15
    applymovement 0x1 0x81A75DB ' say_! end 
    pauseevent 0x0
    applymovement 0x1 0x81A75DD ' raw_1C raw_1C raw_1C end 
    pauseevent 0x0
    msgbox 0x871B345 ' Oh!\pA secret stair case appeared!
    callstd MSG_NOCLOSE ' Non-closing msg
    closemsg
    compare 0x800C 0x4
    if 0x1 call 0x81657D7
    compare 0x800C 0x4
    if 0x5 call 0x81657E2
    #raw 0x64
    nop1 ' #raw 0x1
    nop0 ' #raw 0x0
    setflag 0x2
    release
    end
    #org 0x81657ED
    '-----------------------------------
    applymovement 0x1 0x81A75E1 ' faceplayer end 
    pauseevent 0x0
    msgbox 0x817D7C8 ' I'm raising POKéMON, too.\pWhen they get strong, they can\nprotect me.
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    #org 0x8165815
    '-----------------------------------
    applymovement 0x1 0x81A75E1 ' faceplayer end 
    pauseevent 0x0
    msgbox 0x81B1CEC ' Signs are useful, aren't they?
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    #org 0x81658C2
    '-----------------------------------
    applymovement 0x1 0x81A75E1 ' faceplayer end 
    pauseevent 0x0
    call 0x8165894
    release
    end
    #org 0x8165894
    '-----------------------------------
    textcolor 0x1 'Sets text color (Fire Red).
    msgbox 0x81B1D0B ' Look, look!\pI copied what it said on one of\nthose TRAINER TIPS signs!
    callstd MSG_NOCLOSE ' Non-closing msg
    closemsg
    pause 0x14
    textcolor 0x3 'Sets text color (Fire Red).
    setflag 0x83E
    setvar 0x4070 0x1
    setvar 0x4002 0x0
    special 0x170
    special 0x171
    #raw 0xCA
    msgbox 0x81B1D51 ' TRAINER TIPS!\pPress START to open the MENU!
    callstd MSG_NOCLOSE ' Non-closing msg
    #raw 0xCB
    return
    #org 0x8165801
    '-----------------------------------
    applymovement 0x1 0x81A75E1 ' faceplayer end 
    pauseevent 0x0
    msgbox 0x871BDC9 ' The eerie glow has disappeared.
    callstd MSG_NOCLOSE ' Non-closing msg
    release
    end
    #org 0x81657D7
    '-----------------------------------
    applymovement 0x1 0x8165829 ' walk_right raw_2F end 
    pauseevent 0x0
    return
    #org 0x81657E2
    '-----------------------------------
    applymovement 0x1 0x816582C ' walk_left raw_30 end 
    pauseevent 0x0
    return
    
    #org 0x871B904
    = It appears to be a statue of\na rare POKéMON.\pHmm.... There seems to be something\nstrange about it.
    #org 0x871B345
    = Oh!\pA secret stair case appeared!
    #org 0x817D7C8
    = I'm raising POKéMON, too.\pWhen they get strong, they can\nprotect me.
    #org 0x81B1CEC
    = Signs are useful, aren't they?
    #org 0x81B1D0B
    = Look, look!\pI copied what it said on one of\nthose TRAINER TIPS signs!
    #org 0x81B1D51
    = TRAINER TIPS!\pPress START to open the MENU!
    #org 0x871BDC9
    = The eerie glow has disappeared.
    #org 0x81A75E1
    M faceplayer end 
    #org 0x81A75DB
    M say_! end 
    #org 0x81A75DD
    M raw_1C raw_1C raw_1C end 
    #org 0x8165829
    M walk_right raw_2F end 
    #org 0x816582C
    M walk_left raw_30 end ' Write script here, or press Script Generator to do it automatically.
     
    4
    Posts
    15
    Years
    • Seen May 4, 2011
    Eh. I believe you forgot faceplayer right under lock at the beginning of the script is what you're referring to.
     
    Status
    Not open for further replies.
    Back
    Top