Log in

View Full Version : Developer Notes - 2022-02 Ruleset Updates



Moon Wizard
February 9th, 2022, 16:37
As noted previously, usually ruleset updates are worked on and released independent of FGU client versions now.

These particular changes are more likely to impact rulesets and extensions than smaller updates, so are being released in the Test channel to allow fixes and testing to occur before Live release. Additionally, some new features need to be enabled by ruleset developers, so I will be reaching out to those developers directly.

See the Beta Release thread for initial patch notes:
https://www.fantasygrounds.com/forums/showthread.php?72554

NOTE: For extension developers, you will need to review the changes for the ruleset you are affecting to see if it will require extension updates. If you are publishing on the FG Forge, you can use the Test channel to deliver specific updates in conjunction with this beta.

Regards,
JPG

Moon Wizard
February 9th, 2022, 16:37
The following rulesets have already been updated to adapt to the latest changes.

Store/Included Rulesets Updated
CoreRPG
3.5E
4E
5E
PFRPG (1E)
SFRPG
13th Age
Advanced Fighting Fantasy (2E)
Alien
Barbarians of Lemuria
Basic Roleplaying
Castles and Crusades (Legacy)
Call of Cthulhu (6E)
Conan 2d20
Cypher (Numenera/The Strange)
Dungeon Crawl Classics
Fate Core
ICONS
ICRPG
d20 Modern
Mongoose Traveller (1E)
Mongoose Traveller (2E)
Mutant Crawl Classics
Mutants and Masterminds
Savage Worlds (SWADE/SWD/SWPF)
Symbaroum
Vaesen
Vampire
What's Old is New

Any specific Live updates for these rulesets will be gated until all the changes are released.

Moon Wizard
February 9th, 2022, 16:37
Developer Notes to Update Rulesets/Extensions



Currencies/Encumbrance

Update GameSystem.currencies to provide name, value, weight for each

Ex: { name = "GP", weight = 0.02, value = 1 }

Enable new system (CharEncumbranceManager.addStandardCalc() or addCustomCalc(fnCustomCalc))

Ex: See 3.5E ruleset for typical example
Ex: See SFRPG ruleset for custom example with partial replace and extra functionality
Note: Requires coin list updates (see below)
Note: Can use custom func that calls back into default functions for partial customization or additional functionality

calcDefaultEncumbrance
calcDefaultInventoryEncumbrance
calcDefaultCurrencyEncumbrance
setDefaultEncumbranceValue


Update charsheet_inventory

Remove old coinname and coinamount fields
Add standard templated currency list

If "coinother" support, then use: sub_charcurrency, scrollbar_sub_charcurrency, button_iadd_sub_charcurrency, button_iedit_sub_charcurrency
If no other field needed, then use: list_charcurrency, scrollbar_currencylist, button_iadd_currencylist, button_iedit_currencylist
Ex: See 3.5E ruleset for standard case with "coinother"
Ex: Ask for example of standard case without "coinother". (CoC/WOIN)

Update main window and inventory list scripts if override

Remove handlers for "count", "weight" and child delete in list
Remove onEncumbranceChanged calls


Update charsheetmini_inventory (if exists)

Remove coin fields completely

Update CharManager script overrides (updateEncumbrance)
Update global scripts that use old coins.slot# (Ex: Overrides of PSLootManager/ItemManager)
Implement custom overrides

setEncumbranceField("encumbrance.load");
setCustomItemLists({ "inventorylist" });
setCustomItemFields({ "carried", "count", "weight" });
setCustomCurrencyLists({ "coins" });
setCustomCurrencyFields({ "amount", "name" });

Remove other monitoring

Remove any other monitoring of item carried/count/weight fields that update encumbrance
Remove any other monitoring of coin amount/name fields that update encumbrance

Double check everything still works as expected


Sidebar

Add any custom buttons to sidebar

DesktopManager.registerSidebarToolButton(tButton, nIndex)

tButton = { sIcon = "<IconAsset>", tooltipres = "<StringAsset>", class = "<WindowAsset>", path = "<DBPathOrEmptyString>" }

Ex: See SFRPG ruleset for custom sidebar button example (DesktopSFRPG script)

Remove old sidebar tool button graphics references/files (button_ct, button_color, etc.)


D66 support

Add global script to register D66 handling

<script name="D66Support">function onInit() DiceManager.addDefaultD66Handling(); end</script>

Add "d60" and "d66" dice assets

<customdie name="d66"><model>d6</model><menuicon>d66icon</menuicon></customdie>
<customdie name="d60"><model>d6</model><script>function onValue(result) return DiceManager.onD60ResultValue(result); end</script></customdie>

Remove custom TableManager overrides (if any)


New house rule support

Once currency/encumbrance tied to built-in system, remove any coin weight options and encumbrance calculations.
Remove any diagonal distance measurement option, since it's built into CoreRPG layer now.

Moon Wizard
February 9th, 2022, 16:38
CoreRPG
(Modified)
Frames: desktop
Global Scripts: ActionsManager, ActionEffect, ActorManager, ActorHealthManager, CombatManager, CurrencyManager, Desktop, DesktopManager, ItemManager, LibraryData, OptionsCore, OptionsManager, PSLootManager, StringManager
Specific Scripts: campaign/scripts/char_invlist.lua, desktop/scripts/sidebar_dock_category.lua, desktop/scripts/sidebar_dock_entry.lua, desktop/scripts/sidebar_stack_entry.lua, ps/scripts/ps_carriedby.lua
Templates: label_export_frame, string_labeled, string_list_link, stringc_list_link, string_list_name, string_refgroupedlistgroupitem_link, string_refgroupedlistgroupitem_link_wrap, string_reflistitem, stringc_labeled, stringu
Window Classes: battle_header, battlerandom_header, calendar_day, char_ability_header, charsheet_inventory, currencylist, currencyitem, encounter_header, item_header, motd, parcel_header, quest_header, referenceinlineindexitem, shortcuts, shortcutbar, sidebar_dock_category, sidebar_dock_entry, sidebar_stack_entry, storytemplate_header, table_header, treasureparcel

(Removed)
Icons: button_calendar, button_calendar_down, button_color, button_color_down, button_ct, button_ct_down, button_effects, button_effects_down, button_modifiers, button_modifiers_down, button_options, button_options_down, button_partysheet, button_partysheet_down,

Moon Wizard
February 9th, 2022, 16:38
5E
(Modified)
Global Scripts: ActionDamage, CharManager, CombatManager2, GameSystem, Options5E
Specific Scripts: campaign/scripts/char_invlist.lua, charwizard/scripts/charwizard.lua, ct/scripts/ct_entry.lua
Templates: stringc_charclasslevel
Window Classes: charsheet_inventory_contents, charwizard, charwizard_summary, ct_power

(Removed)
Icons: button_calendar, button_calendar_down, button_color, button_color_down, button_ct, button_ct_down, button_effects, button_effects_down, button_modifiers, button_modifiers_down, button_options, button_options_down, button_partysheet, button_partysheet_down

4E
(Modified)
Frames: desktop
Global Scripts: ActionDamage, CharManager, Desktop4E, GameSystem
Specific Scripts: campaign/scripts/char_invlist.lua, ct/scripts/ct_entry.lua
Templates: string_charclasslevelsummary
Window Classes: charsheet_inventory, charsheetmini_inventory, item_propertylistitem, power_linkedpower, reference_catalogtopgroups

(Removed)
Icons: button_calendar, button_calendar_down, button_color, button_color_down, button_ct, button_ct_down, button_effects, button_effects_down, button_modifiers, button_modifiers_down, button_options, button_options_down, button_partysheet, button_partysheet_down, button_tracker, button_tracker_down

3.5E
(Modified)
Global Scripts: ActionDamage, ActorManager35E, CharManager, GameSystem
Specific Scripts: campaign/scripts/char_invlist.lua, ct/scripts/ct_entry.lua
Templates: stringc_charclasslevel, string_charclasslevelsummary
Window Classes: charmini_inventory, charmini_skill

SFRPG
(Modified)
Global Scripts: ActionDamage, CharManager, CharStarshipManager, CombatManager2, DesktopSFRPG, GameSystem, ItemManager2, PSLootManagerSFRPG, StarshipCombatManager
Specific Scripts: campaign/scripts/char_invlist.lua, campaign/scripts/comp_inv.lua, campaign/scripts/comp_invlist.lua
Templates: charmech_string_labeled_part, charstarship_string_labeled, charstarship_string_labeled, charstarship_string_labeledc, charstarship_string_labeled_linked, charstarship_string_labeled_linkedc, string_charclasslevelsummary, string_labeled_link, stringc_charclasslevel
Window Classes: battle_header, charmini_inventory, charmini_skill, charsheet_inventory, companionsheet_inventory

(Removed)
Icons: button_calendar, button_calendar_down, button_color, button_color_down, button_ct, button_ct_down, button_effects, button_effects_down, button_modifiers, button_modifiers_down, button_options, button_options_down, button_partysheet, button_partysheet_down, button_shipct, button_shipct_down