This code library is a module for Foundry VTT — to be used with the various Warhammer Roleplaying systems.
- Warhammer Fantasy Roleplay 4th Edition – Repo
- Warhammer Age of Sigmar: Soulbound – Repo
- Warhammer Roleplay 40,000: Wrath & Glory – Repo
- Warhammer Roleplay 40,000: Imperium Maledictum – Repo
- Warhemmer: The Old World Roleplaying Game – Repo
There are multiple steps to integrate this library.
-
The system's Actor Document class should extend
WarhammerActor -
The system's Item Document class should extend
WarhammerItem -
The system's ActiveEffect Document class should extend
WarhammerActiveEffect-
If the system uses Zones, the static
CONFIGURATION.zonesproperty on the Active Effect document should be set to true. -
The ActiveEffect document should override the
resistEffectfunction to handle custom effect avoidance properties.
-
-
Actor Models should be descended from
BaseWarhammerActorModel-
preventItemTypesis a list of Item types not allowed on this model -
singletonItemPathsis antype->system.path.to.dataobject for singleton Items, or types which Actors can only have one of. The path should lead to aSingletonItemModel
-
-
Item Models should be descended from
BaseWarhammerItemModel -
Active EFfect Models should be descended from
WarhammerActiveEffectModel- This model should also define a static
_avoidTestModelproperty with a model class that extendsAvoidTestModel
- This model should also define a static
-
The Chat Message model should extend
WarhammerTestMessageModel, the schema should be redefined as needed, an thetestgetter should be defined to recreate Test objects.
-
Actor sheets should be descended from
WarhammerActorSheet(V2) -
Item sheets should be descended from
WarhammerItemSheet(V2) -
Active Effect sheets should extend
WarhammerActiveEffectConfig-
Systems can define
systemTemplateto add any additional properties to the effect config (usually for ading Zone Config) -
Define
effectKeysTemplatethe path variable (path to the template)
-
- Set Config
CONFIG.Actor.documentClass = SystemActor;
CONFIG.Item.documentClass = SystemItem;
CONFIG.ChatMessage.documentClass = SystemChatMessage;
CONFIG.ActiveEffect.documentClass = SystemEffect;
CONFIG.ActiveEffect.legacyTransferral = false;
CONFIG.ActiveEffect.dataModels["base"] = SystemActiveEffectModel
CONFIG.ChatMessage.dataModels["test"] = SystemMessageModel;
DocumentSheetConfig.registerSheet(ActiveEffect, "system", ImpmalActiveEffectConfig, {makeDefault : true});
//... Other sheets and data models- Config object properties
effectScripts = {}
logFormat = []
rollClasses = {}
premiumModules = {}
triggerMapping : {}
traitOrder : [],
avoidTestTemplate : "path/to/template",
getZoneTraitEffects : (region) =>
{
return [];
},
placeholderItemData : {
},