Changelog
2.1.1
Bugfixes
Two bugs in simfile 2.1.0’s SSC implementation broke multi-value properties, causing them to be truncated or mangled past the first value. This release fixes these issues:
When opening an SSC file, the DISPLAYBPM and ATTACKS properties of both simfiles and charts no longer stop parsing at the first
:
. For DISPLAYBPM, this meant a BPM range of120:240
would have been incorrectly parsed as a static BPM of120
. ATTACKS were completely broken as they use colon as a separator.The aforementioned properties are now correctly serialized from
SSCChart
; previously, they would have been escaped with backslashes. This bug had the same effects described above, but only affected manual assignment of multi-value properties (e.g.chart.displaybpm = "120:240"
) since the first bug shadowed this bug during deserialization.
2.1.0
New features
The new
simfile.dir
module offersSimfileDirectory
andSimfilePack
classes for nagivating simfile filesystem structures.The new
simfile.assets
module provides anAssets
class that can reliably discover paths to simfile assets, even if they’re not specified in the simfile.The top-level
simfile
module now offersopendir()
andopenpack()
functions as simplified interfaces to thesimfile.dir
API.PyFilesystem2 has been integrated throughout this library’s filesystem interactions, enabling OS and non-OS filesystems to be traversed using the same code. All functions, methods, and constructors that lead to filesystem interactions now have an optional filesystem parameter for specifying a PyFS filesystem object. When omitted, the filesystem defaults to the native OS filesystem as before.
The
DisplayBPM
classes now all expose the same four properties; the ones that don’t apply to a particular class return None. This enables you to handle all three cases without having to import the types forisinstance
checks. Refer to Getting the displayed BPM for more details.
Bugfixes
The
charts
property on simfiles is now writable, meaning the list of charts can be overwritten directly (not just added to / removed from).Backslash escape sequences and multi-value MSD parameters are now handled correctly, both when opening and serializing simfiles. See the Enhancements section below for more details.
sm_to_ssc()
no longer produces invalid output when there are negative BPMs or stops in the timing data. (It throwsNotImplementedError
as a temporary stopgap. In the future, negative timing data will be converted to warps, as StepMania does automatically.)Various type annotations have been improved throughout the library. In particular,
Iterator
input arguments have been replaced withIterable
so that you don’t need to wrap them initer(...)
to suppress type errors from static analyzers.
Enhancements
The dependency on msdparser has been upgraded to version 2. This corrects parsing of escape sequences and multi-value parameters, meaning that
:
and\
characters inside a value are handled the same way as in StepMania. Additionally, parsing is now up to 10 times faster than before!
2.0.1
Bugfix: The dependency on msdparser 1.0.0 was mis-specified in both the Pipfile and setup.py. Publishing msdparser 2.0.0-beta.3 (a breaking release) caused fresh installs to be broken. This patch fixes the version specification in both files.
2.0.0
Initial stable release of version 2. Refer to Migrating from simfile 1.0 to 2.0 for a general overview of the changes since version 1.