Ruleset - Layering

Overview

Ruleset layering allows an entire ruleset to be inherited, and then overriden as needed. For example, the PFRPG (Pathfinder) ruleset is layered on the 3.5E D&D ruleset which in turn is layered on the CoreRPG ruleset.

For any defined asset (windows, templates, scripts, graphics), the last defined version of that asset (whether in a ruleset layer or extension) is the one that gets used. When layering, window classes can also be adjusted by defining a merge attribute on the new window class definition, without having to re-specify the entire window class definition, similar to templates.

When developing with ruleset layers, it is VERY useful to have multi-file search capability within your text editor to be able to find assets defined in other ruleset layers.

Definition

To layer on top of one or more rulesets, use the "importruleset" tag with the "source" attribute set to the name of the ruleset you want to inherit from. More than one ruleset layer import can be defined for each ruleset, and ruleset layers can be nested.

All tags within a ruleset are processed in order, so it is typical to place the importruleset tag near the beginning of your ruleset base.xml file so that you can define your overrides after the layered ruleset is loaded.

Example

<root version="3.3" release="1" logo="logo.png"> <announcement text="TestRuleset v3.3.2 for Fantasy Grounds" font="emotefont" icon="rulesetlogo_CoreRPG" /> <description> <text>TestRuleset</text> <author>SmiteWorks USA, LLC</author> <website>http://www.fantasygrounds.com</website> </description> <importruleset source="CoreRPG" /> </root>

Window Class Merging

When using ruleset layers, window class asset definitions can also be merged or deleted, in addition to the default replacement behavior. To use this feature, the "merge" attribute needs to be specified on a window class asset definition with a value of: merge, join or delete.

When merging window classes, the merging behaves almost identical to the way templates are merged. (See the Ruleset Templates topic for more information on template merging.) The only exception is that the "sheetdata" tag. Any control definitions below the sheetdata tag only match if both the XML child tag matches as well as the name attribute. This allows specific instances of controls to be overriden within a window class definition.

When deleting window classes, the window class definition is simply removed from usage.

If a merge attribute is specified on a window class definition, and no window class with the same name was previously defined, then an error will be thrown.

Example

<windowclass name="effectsmall" merge="join"> <sheetdata> <button_effect_apply name="apply" insertbefore="rightanchor" /> <button_effect_units name="unit" insertbefore="duration" /> </sheetdata> </windowclass>

Die Merging

When using ruleset layers, die and customdie asset definitions can also be deleted. To use this feature, another die or customdie tag needs to be defined with the same name as the die asset to be deleted and the "merge" attribute set to a value of: delete. These dice are removed from availability within the ruleset, and will be removed from the tabletop.

Example

<die name="dF" merge="delete" />

Panel Merging

When using ruleset layers, panel definitions can also be merged or deleted. To use this feature, another panel definition needs to be defined with the same name and modes attributes as the panel asset to be modified, and the "merge" attribute set to a value of: merge, join, or delete.

The panels will be merged in the same way that template assets are. (See the Ruleset Templates topic for more information on template merging.)

CoreRPG

Overview

The CoreRPG ruleset is the basis for many rulesets written for Fantasy Grounds, because it was designed to provide a basic layer of common RPG functionality as well as a generic RPG ruleset for running any game system.

Some of the features included with the CoreRPG ruleset include:

  • Fantasy themed tabletop

  • Common templates (checkbox, text button, combobox, ...)

  • Standard record types (story, player note, image, quest, NPC, encounter, item, parcel)

  • Options subsystem and standard options (portrait chat, item identification, dice tower, ...)

  • Library, module and token management

  • Combat tracker with targeting and action/roll subsystem

  • And much more... (language chat, manual rolls, party sheet, ...)

Top-Level Window Classes

Record Window Class

Tool Window Class

Desktop Window Class

Reference Window Class

Record Window Class

Tool Window Class

Desktop Window Class

Reference Window Class

charsheet

combattracker_host

characterlist

referencetext

story

combattracker_client

chat

referencetextwide

storytemplate

partysheet_host

chatlocal

referenceindex

quest

partysheet_client

identitylist

referenceindexsorted

image

calendar

modifierstack

referenceinlineindex

npc

pointerselection

dicetower

reference_colindex

battle

lightingselection

shortcuts

reference_manual

battlerandom

options

 

reference_groupedlist (v3.3.2)

item

effectlist

 

 

treasureparcel

modifiers

 

 

note

tokenbag

 

 

table

library

 

 

Global Scripts

Global Desktop Scripts

 

Global Desktop Scripts

 

Desktop

Sidebar build, startup windows, public node register

CharacterListManager

Desktop PC portrait list display

DesktopManager

Sidebar management, Module set management

DiceTowerManager

Dice tower management

GmIdentityManager

GM identity list display and management

ModifierStack

Modifier stack management

Global Data Scripts

 

LibraryData

Record type definition and API

CampaignDataManager

Drag/drop record types, import/export

OptionsCore

Standard RPG options

VersionManager

Data version management for all derived rulesets

VersionManager2

Data version management specific to current game system

Other Global Scripts

 

ActionEffect

Effect actions management

ActorManager

Actor management (used by actions)

CalendarManager

Calendar management

CharManager

PC sheet features

ChatManager

Custom chat commands, whispers, portrait chat

ColorManager

Health color settings

CombatManager

Initiative, initiative trigger register, Drop handling

CombatManager2

(override), Game system specific combat management

ImageManager

Image sheet features

ItemManager

Item and parcel transfer/drop, Item trigger register, Inventory sort

LanguageManager

Language features

ManualRollManager

Manual roll features

NPCManager

NPC features

OOBManager

Out-of-band message features (i.e. passing data messages)

OptionsManager

Options management

PartyManager

Party sheet management

PartyLootManager

Party sheet loot distribution and selling features

ReferenceManualManager

Reference manual window features

StringManager

Common string functions

TargetingManager

Targeting management

TokenManager

Image token features

UtilityManager

Common utility functions

WindowManager

Common window functions