Skip to content

Releases: Prof9/TextPet

TextPet v1.0.0

17 Apr 16:58
bb6cb7c

Choose a tag to compare

  • Add support for Mega Man Battle Network Legacy Collection (EN and JP)

v1.0-alpha4

10 Apr 15:08
c3e9c82

Choose a tag to compare

v1.0-alpha4 Pre-release
Pre-release
Bump version to v1.0-alpha4

v1.0-alpha3

31 Dec 12:41

Choose a tag to compare

v1.0-alpha3 Pre-release
Pre-release

Now that 4.5 is finished, it's time to publish the version of TextPet used with it.

  • LZ77 compression support has been added and is enabled by default. Previously, compressed text archives would just be wrapped in an LZ container, but not actually compressed. This was faster, but very wasteful in terms of ROM space. The old behavior can be enabled with CLI command set-compression off.
  • Reworked TPL and plugin syntax with changes and new features (see below).
  • Full support for Star Force 1 and 2.
  • Many bug fixes and performance improvements.
  • Some minor fixes for MMBN1/OSS, MMBN4.5.
  • Some error messages made infinitesimally more helpful.
  • Text encoding now uses optimal path encoding (i.e. "level 2 compliance" in table file standard) by default.

TPL changes

TPL files from previous versions will not be directly compatible with this one. In previous versions each script command could have at most one list parameter (variable length list) which was unnamed. Going forward, script commands can have multiple list parameters, but they must all be named.

Old:

jumpRandom
	unused = true
	untrap = false
	[
		ratio = 32
		target = continue,
		ratio = 32
		target = 16
	]

New:

jumpRandom
	unused = true
	untrap = false
	targets = [
		ratio = 32
		jump = continue,
		ratio = 32
		jump = 16
	]

Note how the list now has a name, targets. (Some other parameter names have also been changed.)

Plugin changes

Command database INIs have an updated format too. Compare the following:

Old:

[Length]
offs = 1
bits = 6

[Data]
name = ratio
desc = The ratio for this entry to be picked randomly.
offs = 0
bits = 8
dgrp = 0

[Data]
name = target
desc = A script that execution can randomly jump to.
offs = 0
bits = 8
dgrp = 1
type = jump
valn = mmbn-jump

New:

[Parameter]
name = targets
offs = 1
bits = 6
addv = 1
dgrp = 1,1

[Parameter]
name = targets.ratio
desc = The ratio for this entry to be picked randomly.
rela = $
bits = 8

[Parameter]
name = targets.jump
desc = A script that execution can randomly jump to.
rela = $
bits = 8
type = jump
valn = mmbn-jump

This shows the new syntax for list parameters. By naming parameters as children of another Parameter e.g. targets.ratio, that parameter becomes a list parameter, its value specifying the list length. The rela property allows for the byte offset to be relative to the start of the command (^, default), the current end of the command ($) or relative to the last read instance of a specific parameter (e.g. rela = targets).

The dadd property of a Command (add a value to length of data list) has been removed and instead the length Parameter now has an addv (add a value) property, just like any other Parameter. Data grouping (dgrp) is now specified by the list length parameter instead of by each list element parameter. Probably this will make more sense once I actually get around to writing a tutorial...

It is now possible to have string parameters (used by MMSF1 and MMSF2). These use the following parameter properties:

stro = string offset (from the start of the command)
strl = string fixed length
stru = string length units (characters or bytes)

For instance, strl = 12, stru = char reads a string of exactly 12 characters (a single character being a single entry in the table file, which can be one or more bytes). If the string parameter also has a number component (i.e. by specifying a (nonzero) value for bits), then that is used as the string length instead of the strl property. If both a number component and string length are specified, then the string length is treated as a maximum length.

A new property lahd (lookahead) is added for Commands. If set to true, when the parser matches a byte sequence with the command, it will keep reading more bytes to see if there are any better matches.

Text box format changes

When using text box format files (.txt), the ###InsertCommand and ###RemoveCommand directives are replaced with a singular ###Command directives. Now, all in-text commands are simply removed from the text box unless specified with a <command> tag in the text and ###Command directive at the bottom.

v1.0-alpha2

06 Sep 18:20

Choose a tag to compare

v1.0-alpha2 Pre-release
Pre-release
  • Adds InsertCommand and RemoveCommand directives in text box files.
  • Adds rename, delete and load-file commands to the command line interface.
  • Adds comments for TextPet scripts (.tps). Syntax: /* comment */. Note: /* and */ must be surrounded by spaces. It's a bit shoddy, I know.
  • Fixes for text box patching.

v1.0-alpha

04 Apr 21:44

Choose a tag to compare

v1.0-alpha Pre-release
Pre-release

don't get too attached to your scripts