High-level scripting language for gen 3 pokemon decompilation projects
MIT License
Bot releases are visible (Hide)
Preview build for upcoming autovars feature.
Published by github-actions[bot] 9 months ago
format()
. For example, this is useful if the text is intended to render in, a 3-line textbox (instead of the usual 2).
format()
now accepts named parameters, and numLines
has been included in font_config.json
.Published by github-actions[bot] 11 months ago
-lm
option for C Preprocessor line markers to improve error messages.
-lm
is enabled by default. You can specify -lm=false
to disable line markers in the compiled output.Published by github-actions[bot] 11 months ago
format()
's ability to fit text on a line.
cursorOverlapWidth
field in font_config.json
maxLineLength
of the 1_latin_frlg
font, so existing uses of format()
could be affected--especially when used in combination with explicit line breaks inside the format()
text content.\N
) support to format()
Published by github-actions[bot] about 1 year ago
format()
would apply the wrong maximum line width configuration.Published by github-actions[bot] over 1 year ago
switch
statement with all empty case
bodies would produce invalid output.Published by github-actions[bot] almost 2 years ago
end
and return
commands could cause labels to not render.Published by github-actions[bot] almost 2 years ago
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.Published by github-actions[bot] over 2 years ago
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.Published by github-actions[bot] over 2 years ago
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.Published by github-actions[bot] almost 3 years ago
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
).while
statement without any boolean expression.Published by github-actions[bot] almost 3 years ago
font_widths.json
for formatted text.Published by github-actions[bot] over 3 years ago
ascii"My ASCII text"
will result in .ascii "My ASCII text\0"
)Published by github-actions[bot] about 4 years ago
format()
operator.Published by github-actions[bot] over 4 years ago
switch
statement default
case didn't work properly when combined with other cases.Published by github-actions[bot] over 4 years ago
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)
}
}
}
}
Published by github-actions[bot] over 4 years ago
!
) operator in front of nested boolean expressions. Example:if (flag(A) && !(flag(B) || flag(C)))
Published by github-actions[bot] almost 5 years ago
Published by github-actions[bot] almost 5 years ago
{COLOR BLUE}
) were not handled properly in format()
.Published by github-actions[bot] almost 5 years ago
poryswitch
statement. This helps with language differences or game-version differences, for example.const
keyword. This helps with things like defining event object ids to refer to throughout the script.