Skip to content

Releases: huderlem/poryscript

3.0.0

19 Nov 21:05
Compare
Choose a tag to compare

Changed

  • Font configuration file is now called font_config.json, and each font in that file contains a maxLineLength used by format(). The command-line option -fw has been renamed to -fc to reflect the new name of the font configuration file.

2.14.0

27 Jun 15:11
Compare
Choose a tag to compare

Added

  • Add the ability to define sub-labels inside script statements. This is useful in some cases where it's more ergonomic to directly jump to a desired location inside a script, similar to C's goto labels.

2.13.0

16 Jun 16:19
Compare
Choose a tag to compare

Added

  • Add mart statement, which is a convenient way to define a list of items used with the decomp's pokemart script command. Prior to this addition, the mart data had to be encoded using Poryscript's raw statement.

2.12.0

27 Dec 22:31
Compare
Choose a tag to compare

Added

  • Add value() operator, which can be used on the right-hand side of a var() comparison. It will force a compare_var_to_value command to be output. This makes it possible to compare values that occupy the same range as vars (0x4000 <= x <= 0x40FF and 0x8000 <= x <= 0x8015).
  • Add ability to author inifinite loops using the while statement without any boolean expression.

2.11.0

23 Oct 17:58
Compare
Choose a tag to compare

Added

  • Added -l command-line option to define default line length for formatted text.
  • Added -f command-line option to define default font id from font_widths.json for formatted text.

2.10.0

03 Apr 16:18
Compare
Choose a tag to compare

Added

  • Added ability to specify custom directives for text. (e.g. ascii"My ASCII text" will result in .ascii "My ASCII text\0")

2.9.0

07 Sep 23:21
Compare
Choose a tag to compare

Added

  • Added optional maximum line length parameter to format() operator.

2.8.1

07 May 01:00
Compare
Choose a tag to compare

Fixed

  • Fix bug where switch statement default case didn't work properly when combined with other cases.

2.9.0-gen2-preview

30 Mar 01:37
Compare
Choose a tag to compare

First preview release for pokecrystal support. The README has not been updated to reflect the few differences between Gen 3 and Gen 2 syntax. Most of the README is still valid for Gen 2, though.

When running Poryscript, specify the -gen 2 command line option. It runs in -gen 3 mode by default, which is for the Gen 3 decomp projects (e.g. pokeemerald).

Example command:

poryscript.exe -gen 2 -i test.pory -o test.asm

Some examples of valid Gen 2 syntax:

script MyScript {
    if (myarbitrarycommand(param1) == 4) {
        ...
    } else if (othercommand || !randomcommand) {
        ...
    }
}

mapscripts MyMapscripts {
    scenes [
        { } // dummy script
        Scene2Script // label, instead of inlining script
        { // inlined script
            prioritysjump("other")
        }
    ]
    MAPCALLBACK_NEWMAP {
        if (checkflag(ENGINE_BUG_CONTEST_TIMER)) {
            setscene("other")
        } else {
            setscene("third")
        }
    }
    MAPCALLBACK_OBJECTS {
        switch (readvar(VAR_WEEKDAY)) {
            case TUESDAY:
            case THURSDAY:
            case SATURDAY:
                appear("whatever")
                disappear("whatever")
                disappear("other")
                return
            default:
                if (checkflag(ENGINE_BUG_CONTEST_TIMER)) {
                    setscene(SCENE_ROUTE35NATIONALPARKGATE_LEAVE_CONTEST_EARLY)
                } else {
                    disappear(ROUTE35NATIONALPARKGATE_OFFICER1)
                    appear(ROUTE35NATIONALPARKGATE_YOUNGSTER)
                    appear(ROUTE35NATIONALPARKGATE_OFFICER2)
                }
        }
    }
}

2.8.0

26 Mar 01:36
Compare
Choose a tag to compare

Added

  • Add ability to use the NOT (!) operator in front of nested boolean expressions. Example:
if (flag(A) && !(flag(B) || flag(C)))