All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Nothing, yet.
- Fix bug where
\N
didn't respectnumLines
when usingformat()
.
3.5.0 - 2024-11-10
- Movement can now be inlined within commands using a special
moves()
operator, similar to text. For example:applymovement(OBJ_EVENT_ID_PLAYER, moves( walk_left * 4 face_down ))
- Print a warning message when
numLines
is missing from a font's config. Defaults tonumLines=2
in that case, rather than0
. - Added
msgbox
to the defaultcommand_config.json
, sincemsgbox(.., MSGBOX_YESNO)
would be a very common use case.
- Multi-line string literals will now remove newline characters, and separate each line by a space character instead.
- This should rarely, if ever, be used. But the previous behavior resulted in invalid compiled scripts.
3.4.0 - 2024-08-15
- Add support for AutoVar commands.
- AutoVar commands can be used in place of the
var
operator to streamline comparisons. - AutoVar commands are defined in a new config file
command_config.json
.
- AutoVar commands can be used in place of the
- Fix missing semicon character in FireRed/LeafGreen font config
3.3.0 - 2024-01-15
- Add ability to configure number of lines used by
format()
. For example, this is useful if the text is intended to render in, a 3-line textbox (instead of the usual 2).- Additionally,
format()
now accepts named parameters, andnumLines
has been included infont_config.json
.
- Additionally,
3.2.0 - 2023-12-02
- Add
-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.
3.1.0 - 2023-11-11
- Add support for configuration of the textbox's cursor width to improve
format()
's ability to fit text on a line.- This is achieved with a new
cursorOverlapWidth
field infont_config.json
- Note, this change also changed the
maxLineLength
of the1_latin_frlg
font, so existing uses offormat()
could be affected--especially when used in combination with explicit line breaks inside theformat()
text content.
- This is achieved with a new
- Add automatic line break (
\N
) support toformat()
3.0.3 - 2023-09-04
- Fix bug where specifying a non-default font id with
format()
would apply the wrong maximum line width configuration.
3.0.2 - 2023-05-20
- Fix bug where a
switch
statement with all emptycase
bodies would produce invalid output.
3.0.1 - 2023-01-08
- Fix bug where
end
andreturn
commands could cause labels to not render.
3.0.0 - 2022-11-19
- Font configuration file is now called
font_config.json
, and each font in that file contains amaxLineLength
used byformat()
. The command-line option-fw
has been renamed to-fc
to reflect the new name of the font configuration file.
2.14.0 - 2022-06-27
- 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 - 2022-06-16
- Add
mart
statement, which is a convenient way to define a list of items used with the decomp'spokemart
script command. Prior to this addition, the mart data had to be encoded using Poryscript'sraw
statement.
2.12.0 - 2021-12-27
- Add
value()
operator, which can be used on the right-hand side of avar()
comparison. It will force acompare_var_to_value
command to be output. This makes it possible to compare values that occupy the same range as vars (0x4000 <= x <= 0x40FF
and0x8000 <= x <= 0x8015
). - Add ability to author inifinite loops using the
while
statement without any boolean expression.
2.11.0 - 2021-10-23
- Add -l command-line option to define default line length for formatted text.
- Add -f command-line option to define default font id from
font_widths.json
for formatted text.
2.10.0 - 2021-04-03
- Add ability to specify custom directives for text. (e.g.
ascii"My ASCII text"
will result in.ascii "My ASCII text\0"
)
2.9.0 - 2020-09-07
- Add optional maximum line length parameter to
format()
operator.
2.8.1 - 2020-05-06
- Fix bug where
switch
statementdefault
case didn't work properly when combined with other cases.
2.8.0 - 2020-03-25
- Add ability to use the NOT (
!
) operator in front of nested boolean expressions. Example:if (flag(A) && !(flag(B) || flag(C)))
2.7.2 - 2019-11-16
- Fix bug where implicit text labels weren't properly inserted into command arguments.
2.7.1 - 2019-11-13
- Fix bug where control codes with spaces in them (e.g.
{COLOR BLUE}
) were not handled properly informat()
.
2.7.0 - 2019-11-05
- Add support for compile-time switches using the
poryswitch
statement. This helps with language differences or game-version differences, for example. - Add support for user-defined constants with
const
keyword. This helps with things like defining event object ids to refer to throughout the script.
2.6.0 - 2019-10-26
- Add support for scope modifiers
global
andlocal
forscript
,text
,movement
, andmapscripts
statements. This will force labels for be generated with::
(global) or:
(local) in the compiled output script.
2.5.0 - 2019-10-16
- Comments can now be used with
//
, in addition to the existing '#' style. This is to support users who want to process Poryscript with the C preprocessor. - Add
movement
statement, which is used to define movement data. Use*
as a shortcut for repeating a movement command many times.step_end
terminator is automatically added to the end of the data. - Add
mapscripts
statement, which is used to define map scripts. Scripts can be inlined, or simply specified with a label.
- Fix harmless bug where
format()
could result in empty.string ""
lines in the compiled out. - Fix bug where
end
command was incorrectly being replaced with areturn
. - Fix bug where negative numbers were not parsed correctly.
2.4.0 - 2019-10-13
- Add support for text auto-formatting with the
format()
operator. Font widths are loaded from a config JSON file. Specify config file with-fw <config filepath>
. If-fw
is omitted, Poryscript will try to loadfont_widths.json
by default.
- Text is now automatically terminated with a
$
character, so the user doesn't have to manually type it for all pieces of text. Of course, this does not apply to text withinraw
statements.
2.3.0 - 2019-10-12
- Add
defeated()
operator, which is used to check if a trainer has been defeated. Without this newdefeated()
operator, it was impossible to write scripts that checked trainer flags without usingraw
. - Add
text
statements.
2.2.0 - 2019-10-07
- Identical implicit texts are now combined into a single text output.
- Fix some potential infinite loops when parsing certain invalid scripts.
2.1.1 - 2019-09-14
- Fix bug where hexadecimal numbers were not tokenized correctly, resulting in a space after the
0x
prefix.
2.1.0 - 2019-09-11
- Add implicit truthiness checks for
var()
andflag()
operators. - Add NOT (
!
) prefix operator forvar()
andflag()
operators.
- Errors are now prefixed with
PORYSCRIPT
, and they are written tostderr
, instead ofstdout
. - The program will no longer panic when handled errors occur.
- Fix parser errors that were not showing the line number of the error.
2.0.0 - 2019-09-02
- Add single-line comments with the
#
character. - Add
go.mod
file so the project can be built outside of the Go workspace. - Add
while
loops. - Add
do...while
loops. - Add
break
andcontinue
statements. - Add compound boolean expressions.
- Add output optimization which significantly simplifies and shrinks the resulting compiled scripts. Turn off optimization by specifying
-optimize=false
. - Add
switch
statements.
raw
no longer takes a label name.- Removed
raw_global
, since there is no longer a concept of being global or local forraw
.
- Inline texts are now generated with labels that are prefixed to their parent script's name. Otherwise, they would easily clash with external scripts because they were all simply named
Text_<num>
.
1.0.0 - 2019-08-27
Initial Release