• 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: You're scripted evolved into a pokescript

Status
Not open for further replies.

Irish Witch

Office Jenny
147
Posts
17
Years
  • Your Scripted evolved into a Pokescipt

    Back in march 2006 I began my first attempt at hacking pokemon ruby. Instead of focusing of the graphics and text first like many first time hackers do I sttempted to jump into the deep end and while I was fully capable of remaking the maps all nice and functional I was appalled at the lack of friendliness of the script editor rubikon which was intended to edit the sprite scripts display text etc etc.

    Is it just me or should no programming language in it's right mind require a hex editor on standby to make it workable?

    Well having some experience with programming I set myself a task. Two nights ago the plan came to fruition. A fully function script editing tool that would first compile you're script into memory and then allow you to insert the code into a file at any location without having to provide fixed offsetts. This is literally the script editor * I * would want to use.

    Added features:
    - Reletive Pointers
    - File Associatoins
    (including long file name support)
    - The ability to re-bunk the script constructs used when compiling (like giveitem)

    and the biggest doosy of all :
    - The ability for persons knowing the language used in other games (or even other game engines) to create basic text files that can be registered and used in my compiler by following the instructions on my website making it the first assembly program in existence with flexibility in the command database!

    If all I have said above isn't enough - the check out the website

    Homepage
    Download Poketscript 1.2
    Download PkmAdv 1.2 (Rubikon)
    Download PkmGS 1.2 (Gaskon)

    EDIT 02/03/07

    Please note: there is a tutorial on writing scripts with my program in the tutorial thread.
    A Simple Pokescript Tutorial
     
    Last edited:

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Well.. I want to test the program, but I get an error when I want to compile..
    Spoiler:

    Then I get:
    Run-time error:'13' Type Mismatch

    Plzz help ^^
    It may have something to do that I don't have SP3, but I can't install it - -'
    For some reason, some months ago Windows said 'This is not a legal version..'
    And I haven't copied the CD or something.. It's 100% original..
    But, is there an other way to solve this problem ? Or is it a problem in the script ?
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Well.. I want to test the program, but I get an error when I want to compile..

    |19: Code Alias
    | - loadpointer [F]
    | - attached: " !PTR" into 0
    | - - log 134217729 in buffer 0 at byte: 41
    |Invalid Command : message
    | - attached: "message &h71A540" into 0
    |23: Code Command - boxset [9]
    | - attached: " " into 0
    Then I get:
    Run-time error:'13' Type Mismatch

    Plzz help ^^
    It may have something to do that I don't have SP3, but I can't install it - -'
    For some reason, some months ago Windows said 'This is not a legal version..'
    And I haven't copied the CD or something.. It's 100% original..
    But, is there an other way to solve this problem ? Or is it a problem in the script ?

    ok. That might be you're problem there. message is an alias for the command msgbox. I don't think I put compatibility in for the alias 'message'

    I'll fix that now. Thanks for reporting. Re download in about 15 minutes or so!

    UPDATE

    Added support for alias message in pkmadv.
    Fixed bug with command 'trainerbattle'

    Please re download!
     
    Last edited:

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Well.. I just wanted to edit my message.. It was a problem in my script.. And I solved it..
    I just need to use lil other commands in PokéScript than in ScriptEd..
    Only one problem left.. The 'giveitem' command..
    I looked through the commands and now I use: 'giveitem ITEM_FULLHEAL 1'
    I don't know if that's correct.. but it gives an error.. So.. :P
    But, without that, it's a great tool :).. But I should make my own aliases.. ^^

    Edit:
    Btw, when I know how to use the giveitem command I'll test the BufRite program and check it on the ROM :D
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • I'm Actually ahead of you hear..

    UPDATE

    MAJOR update to main program!
    Glitch in #alias command that meant all constructs were not being performed correctly.

    FIXED!

    (also fined minor problem when reading large values)

    0400hrs... I'm going to bed now!
    Play with program.. Report back in here!
     

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • I'm Actually ahead of you hear..

    UPDATE

    MAJOR update to main program!
    Glitch in #alias command that meant all constructs were not being performed correctly.

    FIXED!

    (also fined minor problem when reading large values)

    0400hrs... I'm going to bed now!
    Play with program.. Report back in here!
    Can you explain how to use the 'giveitem' command ?
    Now I use 'giveitem ITEM_FULLHEAL 1' but then I get an error..
    Here's the (last part from the) log:
    Spoiler:
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Can you explain how to use the 'giveitem' command ?
    Now I use 'giveitem ITEM_FULLHEAL 1' but then I get an error..
    Here's the (last part from the) log:
    Logging started18-2-2007 12:48:13

    ....

    #PROCESS: itemtest.rbc F:2 for input
    /-----------------------------------

    ....

    |21: Code Alias
    | - copyvarifnotzero [1A]
    | - copyvarifnotzero [1A]
    | - callstd [9]
    | - attached: "12 " into 0

    |23: Code Command - boxset [9]
    | - attached: " " into 0
    |25: Code Alias
    | - battle [B6]
    | - special [25]

    Well that section in bold is the giveitem being processed so it's not that!
    Show me the script, cause it doesn't apear to be the giveitem command itself.

    Make sure you have both updates!
     

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Well.. I think it's the 'giveitem' command.. because, without that command everything compiles, no error and I get a .buf file. With the 'giveitem' command, error and no .buf file.
    But anyway, here's the script:
    Spoiler:
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • I just copied what you wrote to a .rbc file. Right click, compile, and got this!
    I don't have the means to try it. Rename it to a .buf, then open it in bufrite, burn it and test it. Let me know what happens!

    Are you sure you downloaded both of the most recent downloads?

    - EDIT -

    DAAMNIT!@

    While trying to fix the bug for the construct handler I screwed up the registry association handler... I've just fixed that now!

    But as I said, that script of you'rs worked for me!
     
    Last edited:

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • I downloaded everything yesterday, but without deleting the current files.
    Now I deleted the files first, redownloaded and.. compiled with no errors :D
    I'm gonna test it on a ROM now ;)

    Edit:
    Well.. PokéScript and BufRite both work fine I think.. but! In-game it doesn't work.
    I think it has to do with the 'boxset 0x5' because you said in the Scripting Tutorial Topic that you use '0x2' ofr a question box.
    Well.. I use '0x5'.. the question box is there in-game.. but :( when I chose 'Yes' or 'No' the ROM restarts.. what's the problem ?
     
    Last edited:

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Ok. I'm going to TRY and answer that question but it comes down to constructs..

    Boxset is actually an alias for the function callstd.
    std stands for standard dialog. It is literally a hotlink to all the dialog boxes that can be accessed in the game, including "Do you want to save your game, yes/no" and other such dialogs.. Since I have no idea what entries 5 and 6 do I have no idea how they wiill behave!

    I (when I used scripts ) used
    0 for text
    1 for long blocks of text (although that was always buggy.)
    and
    2 for yes/no questions

    They usually worked.. Don't ask me what 5 and 6 do!
     

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Well.. most scripts I see use:
    'boxset 0x5' for a Yes/No QuestionBox
    and
    'boxset 0x6' for a normal TextBox

    When you compile those commands with ScriptEd and look in-game everything works fine.. so maybe you just need to change your aliases or wathever in the header files :\
     

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Shouldn't be.....

    Try replacing boxset with callstd....

    If it still does it then it isn't THAT command.............

    - EDIT -
    HAHA

    What do you see wrong with the lines in bold below

    #org $Test
    lock
    faceplayer
    msgbox $QuestionMsg
    boxset 0x5
    compare LASTRESULT 0x1
    if1 $Ok
    checkflag 10A
    if1 $Checked
    setflag 10A
    msgbox $HelpMsg
    boxset 0x6
    giveitem ITEM_FULLHEAL 1
    release
    end

    hint. It has to do with the word 0x1

    Spoiler:
     
    Last edited:

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Valid if commands in pokescript are as follows

    GOTO

    if <number> goto <offsett>
    if <number> jump <offsett>
    if <number> <offsett>
    if1 <number> <offsett>

    GOSUB

    if <number> gosub <offsett>
    if <number> call <offsett>
    if2 <number> <offsett>

    if you want a lazy way to do the goto version then I suppose I could add one!

    perhaps:
    iftrue <offsett>
    iffalse <offsett>

    - Meh?
     
    Last edited:

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Valid if commands in pokescript are as follows

    GOTO

    if <number> goto <offsett>
    if <number> jump <offsett>
    if1 <number> <offsett>

    GOSUB

    if <number> gosub <offsett>
    if <number> call <offsett>
    if2 <number> <offsett>

    if you want a lazy way to do the goto version then I suppose I could add one!

    perhaps:
    iftrue <offsett>
    iffalse <offsett>

    - Meh?
    That would be nice :D :P

    Btw, it's 'Your ScripEd..' instead of 'You're ScriptEd...' ;)
    I don't think you are ScriptEd evolved into PokéScript.. right ? :D


    Edit:
    Btw, after the 'Burn' a 'Added to ROM'-PopUp would be nice.. ;)
    Just to be sure it was added :)
     
    Last edited:

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Major Update

    MAJOR UPDATE 20/2/07 02:28am
    Overhauled the construct handlers.
    Should no longer cause problems in encoding or decoding.
    Added a menu to Pokescript for performing common functions!
    Added LAZY if/goto statement for pkmadv database [ if value offsett ]
    Corrected mistype in giveitem command for pokemon database
    - (Ok, I admit it blasiken there was a mistake there)

    - EDIT -
    Purely asthetic update 0334hr +8

    The menu items in Pokescript are now
    Database (Loads Database)
    Encode (Clears buffer, encodes file then opens buffer in bufrite)
    Decode (Clears buffer, Decodes file, then opens in notepad)
    Source Decode (Clears buffer, Decodes offsett from file, then opens in notepad)

    - EDIT -
    Hopefully the last update for some time!
    UPDATE 20/2/07 4:06pm
    Added commands TIF (offsett) and FIF (offsett) for if 0x1 goto and if ox0 goto respectively in pkmadv database!
    Removes items doubled up between databases.
    Cleared all bugs and typos in both databases!
     
    Last edited:

    Irish Witch

    Office Jenny
    147
    Posts
    17
    Years
  • Hopefully the last update for some time!

    Why do I say stuff like that!

    UPDATE 23/2/07 0123am
    Fixed bug in Decompiler that caused crashed when it encountered #RAW data inside the script!

    - EDIT -
    I just been told the file menu inside pokescript messes up with long file names...
    Fixed that now!
     
    Last edited:

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Why do I say stuff like that!

    UPDATE 23/2/07 0123am
    Fixed bug in Decompiler that caused crashed when it encountered #RAW data inside the script!
    Yes?? WHY ?! :P
    Well.. if that's the only thing I won't download it now.. I don't use the decompiler..
     
    Status
    Not open for further replies.
    Back
    Top