PDA

View Full Version : version and release attributes in the <root> element



darrenan
August 11th, 2021, 17:53
Is there someplace other than the "Ruleset Data Files" page in the wiki where the function of the version= and release= attributes in the <root> element is explained? How does FG use these attributes? What should they be set to normally and when should they be updated? Does their usage differ between rulesets and extensions? etc.

I've always been a bit hazy on exactly what they do; mainly because of the recommendation to take an existing ruleset/extension and modify it.

Thanks,
D.

Talyn
August 11th, 2021, 19:19
I've never been able to figure it out either. Most of the time you can omit the 'release' (and FGU added a new 'dataversion' field) and it still works fine.

Main thing is that if you use version="3.3" (or any 3.x or earlier) (final version that was for Classic) then Unity will work fine using the old markup (aka 'backward compatible mode) whereas if you use version="4.1" (or any 4.x+) then now you have to have all the newer markup for Unity such as the <layer> tags for images, etc.

Moon Wizard
August 11th, 2021, 20:14
Data Files

The version/dataversion/release attributes are to denote the versions which the files were created in. If they are omitted, then it is assumed that they are pre-versioning info, and all data migrations are applied in client and rulesets.

Example from 5E:
version="4.1" dataversion="20210708" release="8.1|CoreRPG:4.1"

The "version" and "dataversion" attributes are for the FG client data version. For example, between 3.3 and 4.1 data versions, the dice and image formats were changed to support the new features in FGU. Also, FGU introduced "dataversion" in YYYYMMDD format to denote inter-version data changes in smaller increments to support the faster pace at which FGU data formats changed to support new features.

The "release" attribute is for the ruleset version. The version attribute from the ruleset is the basis of that string value; then any imported rulesets are appended to the version string. This is just a capability for developers to track data versioning (similar to tags above for client). The VersionManager/VersionManager2 scripts in many rulesets use these to provide data migration when record formats change for a game system.

Ruleset Files

The "release" attribute is used to provide a mechanism for developers to handle data versions; as noted above in the "release" attribute for data files.

The "version" attribute denotes the FG client version for which the ruleset was built. This allows us to change certain behaviors on windows/controls, without breaking rulesets built on older versions. These changes are typically noted in the Developer section of the release notes; and the old behaviors are completely removed after a few years.

Rulesets can get at this information through the APIs:
* Database node client and data version - DB.getVersion(node) and DB.getRulesetVersion(node)
* Current ruleset version - Interface.getRulesetInfo()
* Current client version - Interface.getVersion()

Regards,
JPG

anathemort
March 3rd, 2022, 20:18
@Moon Wizard, does this mean we don't really need/use these fields for regular extensions (not rulesets/data files)? Can extension extension.xmls just have root tags without release/version attributes?

Moon Wizard
March 3rd, 2022, 21:59
Extensions can not affect these attributes; and they don't apply to extensions themselves. Only the client version and the ruleset release set the attribute information of the database.

Regards,
JPG

anathemort
March 3rd, 2022, 22:38
Understood, thanks!