Version 1.4.0
EliteMasterEric
released this
17 Jan 05:16
·
177 commits
to master
since this release
1.4.0 - 2022-01-17
This release marks the migration of the project documentation to polymod.io, a new website for the project hosted by Github Pages.
Aside from several new configuration options, version 1.4's key feature is integration with the FireTongue. Passing a FireTongue instance to Polymod will cause Polymod to check for custom assets in the locales
folder and load them when the appropriate translation is being used. See the Polymod website for more information.
Added
- Added a new Github Pages site for documentation.
- This page is automatically generated using the
master
branch, with the Jekyll project located at/docs/
.
- This page is automatically generated using the
- Added a new logo for the library.
- Added FireTongue integration for asset localization.
- This incredibly powerful feature allows you to pass a FireTongue instance to Polymod, which will allow loading assets from the locale folder. This allows for locales to override not just strings, but also data files and even audio/visual assets, just by using your framework's asset management system.
- For example, when the locale is set to
en-US
,openfl.Assets.getImage("images/billboard.png")
can return a default image, or a custom image when the locale ispt-BR
. - This not only allows developers to translate audio or graphics with almost no effort, but also allows mods to translate audio and graphics of the base game, or EVEN OTHER MODS.
- With the existing features of Polymod, mods should also be able to reasonably append new locales to the manifest, without requiring the developers to modify the base game.
- Added a new compile definition:
POLYMOD_API_VERSION_MATCH
- This allows you to define how strictly mods must match when loading.
NONE
matches any version,MATCH_MAJOR
requires the major version to match,MATCH_MINOR
requires the minor version to match, andMATCH_PATCH
requires the patch version to match.- This defaults to
MATCH_PATCH
to prevent breaking changes, but you should probably update this to at leastMATCH_MINOR
to reduce strain on your mod developers.
- Added a new compile definition:
POLYMOD_USE_HSCRIPTEX
- This EXPERIMENTAL option allows you to replace the default hscript parser with hscript-ex, which provides support for classes.
- Added the new
FlixelBackend
backend.- This backend provides additional HaxeFlixel-specific fixes to the OpenFLBackend.
- Added
FLIXEL
as a Framework value to manually select this backend. - Updated the framework detector to use the
FlixelBackend
over theOpenFLBackend
when HaxeFlixel is being used.
- Added a new function,
Polymod.clearCache()
, which triggers the backend to clear any cached assets from memory.- This is useful if you want to ensure assets reload after a modlist or locale change.
- Improved the Mod Metadata format with new and useful attributes.
- These changes are backwards compatible; new fields are optional, and changed fields still support the existing format.
- Added the
homepage
attribute to allow mods to provide a URL. - Added the
contributors
attribute to provide a list of contributors.- Each contributor is an object with the following keys:
name
,role
,email
,url
. - New applications are encouraged to use this attribute over the
author
attribute where possible.
- Each contributor is an object with the following keys:
- Added a new sample demonstrating usage with FireTongue.
Changed
- Deprecated the
author
attribute in favor of thecontributors
attribute.- The
author
attribute is still supported for backwards compatibility. - Retrieving
author
whencontributors
is defined will return the name of the first contributor.
- The
- Improved compile-time error output for when
@:hscript({context})
receives an invalid value. - Changed the
openfl_hscript
sample to demonstrate retrieving and calling one or more functions from a single script file. - Cleaned up samples by removing unnecessary project configuration.
Fixed
- Fixed a crash bug which occured when LimeBackend was used without a
frameworkParams
argument. - Fixed a bug where
MOD_LOAD_PREPARE
andMOD_LOAD_DONE
were showing as errors rather than notices.