Refactor/84 data models structure (#131)

* - Move all DataModel item files to a new 'items' subfolder for better organization
- Add _module.mjs file to simplify imports
- Update all import paths
- Rename class for use the new acronym DH

* FIX: remove unnecessary import

* FEAT: BaseDataItem class
add TODO comments for future improvements
FIX: Remove effect field on template
FIX: remove unused DhpEffects file

* FEAT: new FormulaField class
FEAT: add getRollData on BaseDataItem Class
FEAT: weapon
FIX: remove inventoryWeapon field on Weapon Data Model

* FEAT: add class prepareBaseData for domains

* FEAT: new ForeignDocumentUUIDField
FIX: Remove unnecessary fields
FEAT: use ForeignDocumentUUIDField in the Item Class DataModel

* FIX: remove wrong option in String Field

* FIX: remove unused import

* FIX: ADD htmlFields description in manifest

* FIX: minor fixes

* REFACTOR: rename folder `data/items` -> `data/item`
REFACTOR: rename folder `data/messages` -> `data/chat-message`.

* FIX: imports
FIX: items sheet new paths
FIX: ItemDataModelMetadata type jsdoc

* FEAT: formatting code
FIX: fix fields used
FEAT: add jsdoc

* 110 - Class Data Model (#111)

* Added PreCreate/Create/Delete logic for Class/Subclass and set it as foreignUUID fields in PC

* Moved methods into TypedModelData

* Simplified Subclass

* Fixed up data model and a basic placeholder template (#117)

* 118 - adversary data model (#119)

* Fixed datamodel and set up basic template in new style

* Added in a temp attack button, because why not

* Restored HitPoints counting up

* 113 - Character Data Model (#114)

* Improved Character datamodel

* Removed additional unneccessary getters

* Preliminary cleanup in the class sheet

* Cleanup of 'pc' references

* Corrected Duality rolling from Character

* Fix to damage roll

* Added a basic BaseDataActor data model

* Gathered exports

* getRollData recursion fix

* Feature/112 items use action datamodel (#127)

* Create new actions classes

* actions types - attack roll

* fixes before merge

* First PR

* Add daggerheart.css to gitignore

* Update ToDo

* Remove console log

* Fixed chat /dr roll

* Remove jQuery

* Fixed so the different chat themes work again

* Fixed duality roll buttons

* Fix to advantage/disadvantage shortcut

* Extand action to other item types

* Roll fixes

* Fixes to adversary rolls

* resources

* Fixed adversary dice

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>

* Feature/116-implementation-of-pseudo-documents (#125)

* FEAT: add baseDataModel logic

* FEAT: new PseudoDocumentsField
FIX: BasePseudoDocument 's getEmbeddedDocument

* FEAT: PseudoDocument class

* FEAT: add TypedPseudoDocument
REFACTOR: PreudoDocument
FIX: Typos Bug

* FIX: CONFIG types

* FEAT: basic PseudoDocumentSheet

* FIX: remove schema
ADD: input of example

---------

Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
Co-authored-by: WBHarry <williambjrklund@gmail.com>

* Levelup Followup (#126)

* Levelup applies bonuses to character

* Added visualisation of domain card levels

* Fixed domaincard level max for selections in a tier

* A trait can now only be level up once within the same tier

---------

Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
Co-authored-by: joaquinpereyra98 <24190917+joaquinpereyra98@users.noreply.github.com>
Co-authored-by: Dapoulp <74197441+Dapoulp@users.noreply.github.com>
This commit is contained in:
WBHarry 2025-06-13 14:17:13 +02:00 committed by GitHub
parent 90bc2dc488
commit 187ee3e1bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
153 changed files with 5481 additions and 4829 deletions

View file

@ -13,8 +13,7 @@
"armor": "Armor"
},
"Actor": {
"pc": "PC",
"npc": "NPC",
"character": "Character",
"adversary": "Adversary",
"environment": "Environment"
}
@ -110,8 +109,14 @@
},
"VariantRules": {
"ActionTokens": {
"Name": "Action Tokens",
"Hint": "Give each player action tokens to use in combat"
"label": "Action Tokens",
"hint": "Give each player action tokens to use in combat"
},
"FIELDS": {
"useCoins": {
"label": "Use Coins",
"hint": "test"
}
}
},
"DualityRollColor": {
@ -132,10 +137,6 @@
"AttackTargetDoesNotExist": "The target token no longer exists"
},
"Error": {
"NoClassSelected": "Your character has no class selected!",
"LacksDomain": "Your character doesn't have the domain of the card!",
"MaxLoadoutReached": "You can't have any more domain cards at this level!",
"DuplicateDomainCard": "You already have a domain card with that name!",
"ActionRequiresTarget": "The action requires at least one target",
"NoAssignedPlayerCharacter": "You have no assigned character.",
"NoSelectedToken": "You have no selected token",
@ -145,6 +146,7 @@
}
},
"General": {
"Name": "Name",
"Hope": "Hope",
"Fear": "Fear",
"Duality": "Duality",
@ -261,46 +263,54 @@
"Description": "When an effect makes a creature Restrained, it means they cannot move until this condition is cleared.\nThey can still take actions from their current position."
}
},
"Tiers": {
"tier1": "Tier 1",
"tier2": "Tier 2",
"tier3": "Tier 3",
"tier4": "Tier 4"
},
"Adversary": {
"Bruiser": {
"Name": "Bruiser",
"Description": "Tough adversaries with powerful attacks."
},
"Horde": {
"Name": "Horde",
"Description": "A Horde represents a number of foes working in a group."
},
"Leader": {
"Name": "Leader",
"Description": "Adversaries that command and summon other adversaries."
},
"Minion": {
"Name": "Minion",
"Description": "Basic enemies that are easily dispatched but dangerous in numbers."
},
"Ranged": {
"Name": "Ranged",
"Description": "Adversaries that attack from a distance."
},
"Skulker": {
"Name": "Skulker",
"Description": "Adversaries that maneuver and exploit opportunities to ambush their opponents."
},
"Social": {
"Name": "Social",
"Description": "Adversaries that are primarily interpersonal threats or challenges."
},
"Solo": {
"Name": "Solo",
"Description": "Designed to present a challenge to a whole party."
},
"Standard": {
"Name": "Standard",
"Description": "Rank and File adversaries."
},
"Support": {
"Name": "Support",
"Description": "Enemies that enhance their allies and/or disrupt their opponents."
"Type": {
"Bruiser": {
"label": "Bruiser",
"Description": "Tough adversaries with powerful attacks."
},
"Horde": {
"label": "Horde",
"Description": "A Horde represents a number of foes working in a group."
},
"Leader": {
"label": "Leader",
"Description": "Adversaries that command and summon other adversaries."
},
"Minion": {
"label": "Minion",
"Description": "Basic enemies that are easily dispatched but dangerous in numbers."
},
"Ranged": {
"label": "Ranged",
"Description": "Adversaries that attack from a distance."
},
"Skulk": {
"label": "Skulk",
"Description": "Adversaries that maneuver and exploit opportunities to ambush their opponents."
},
"Social": {
"label": "Social",
"Description": "Adversaries that are primarily interpersonal threats or challenges."
},
"Solo": {
"label": "Solo",
"Description": "Designed to present a challenge to a whole party."
},
"Standard": {
"label": "Standard",
"Description": "Rank and File adversaries."
},
"Support": {
"label": "Support",
"Description": "Enemies that enhance their allies and/or disrupt their opponents."
}
},
"Trait": {
"Relentless": {
@ -320,32 +330,61 @@
}
}
},
"Environment": {
"Type": {
"Exploration": {
"label": "Exploration",
"description": ""
},
"Social": {
"label": "Social",
"description": ""
},
"Traversal": {
"label": "Traversal",
"description": ""
},
"Event": {
"label": "Event",
"description": ""
}
}
},
"Domains": {
"Arcana": {
"label": "Arcana",
"Description": "This is the domain of the innate or instinctual use of magic. Those who walk this path tap into the raw, enigmatic forces of the realms to manipulate both the elements and their own energy. Arcana offers wielders a volatile power, but it is incredibly potent when correctly channeled."
},
"Blade": {
"label": "Blade",
"Description": "This is the domain of those who dedicate their lives to the mastery of weapons. Whether by blade, bow, or perhaps a more specialized arm, those who follow this path have the skill to cut short the lives of others. Blade requires study and dedication from its followers, in exchange for inexorable power over death."
},
"Bone": {
"label": "Bone",
"Description": "This is the domain of mastery of swiftness and tactical mastery. Practitioners of this domain have an uncanny control over their own physical abilities, and an eye for predicting the behaviors of others in combat. Bone grants its adherents unparalleled understanding of bodies and their movements in exchange for diligent training."
},
"Codex": {
"label": "Codex",
"Description": "This is the domain of intensive magical study. Those who seek magical knowledge turn to the recipes of power recorded in books, on scrolls, etched into walls, or tattooed on bodies. Codex offers a commanding and versatile understanding of magic to those devotees who are willing to seek beyond the common knowledge."
},
"Grace": {
"label": "Grace",
"Description": "This is the domain of charisma. Through rapturous storytelling, clever charm, or a shroud of lies, those who channel this power define the realities of their adversaries, bending perception to their will. Grace offers its wielders raw magnetism and mastery over language."
},
"Midnight": {
"label": "Midnight",
"Description": "This is the domain of shadows and secrecy. Whether by clever tricks, or cloak of night those who channel these forces are practiced in that art of obscurity and there is nothing hidden they cannot reach. Midnight offers practitioners the incredible power to control and create enigmas."
},
"Sage": {
"label": "Sage",
"Description": "This is the domain of the natural world. Those who walk this path tap into the unfettered power of the earth and its creatures to unleash raw magic. Sage grants its adherents the vitality of a blooming flower and ferocity of a hungry predator."
},
"Splendor": {
"label": "Splendor",
"Description": "This is the domain of life. Through this magic, followers gain the ability to heal, though such power also grants the wielder some control over death. Splendor offers its disciples the magnificent ability to both give and end life."
},
"Valor": {
"label": "Valor",
"Description": "This is the domain of protection. Whether through attack or defense, those who choose this discipline channel formidable strength to protect their allies in battle. Valor offers great power to those who raise their shield in defense of others."
}
},
@ -449,6 +488,10 @@
"twoHanded": "Two-Handed"
},
"Range": {
"self": {
"name": "Self",
"description": "means yourself."
},
"melee": {
"name": "Melee",
"description": "means a character is within touching distance of the target. PCs can generally touch targets up to a few feet away from them, but melee range may be greater for especially large NPCs."
@ -800,7 +843,7 @@
"content": "Returning to the previous level selection will remove all selections made for this level. Do you want to proceed?"
},
"Selections": {
"emptyDomainCardHint": "Domain Card Level {level} or below"
"emptyDomainCardHint": "{domain} level {level} or below"
},
"summary": {
"levelAchievements": "Level Achievements",
@ -999,40 +1042,81 @@
}
},
"Adversary": {
"Description": "Description",
"MotivesAndTactics": "Motives & Tactics",
"Tier": "Tier",
"Type": "Type",
"Attack": {
"Title": "Attack",
"Modifier": "Attack Modifier",
"Name": "Name",
"Range": "Range",
"Damage": {
"Title": "Damage",
"Value": "Value",
"Type": "Type"
"FIELDS": {
"tier": { "label": "Tier" },
"type": { "label": "Type" },
"description": { "label": "Description" },
"motivesAndTactics": { "label": "Motives & Tactics" },
"difficulty": { "label": "Difficulty" },
"damageThresholds": {
"major": { "label": "Major" },
"severe": { "label": "Severe" }
},
"resources": {
"hitPoints": {
"value": { "label": "Current" },
"max": { "label": "Max" }
},
"stress": {
"value": { "label": "Current" },
"max": { "label": "Max" }
}
},
"experiences": {
"element": {
"name": { "label": "Name" },
"value": { "label": "Modifier" }
}
},
"attack": {
"name": { "label": "Name" },
"modifier": { "label": "Modifier" },
"range": { "label": "Range" },
"damage": {
"value": { "label": "Damage" },
"type": { "label": "Damage Type" }
}
}
},
"Difficulty": "Difficulty",
"Reaction": "Reaction Roll",
"DamageThresholds": {
"Title": "Damage Thresholds",
"Minor": "Minor",
"Major": "Major",
"Severe": "Severe"
"Tabs": {
"Main": "Data",
"Information": "Information"
},
"HP": "HP",
"General": "General",
"DamageThresholds": "Damage Thresholds",
"HitPoints": "Hit Points",
"Stress": "Stress",
"Experience": "Experience",
"Experiences": "Experiences",
"Features": "Features",
"NewFeature": "New Feature"
"Attack": "Attack"
},
"Environment": {
"ToneAndFeel": "Tone And feel",
"PotentialAdversaries": "Potential Adversaries",
"NewFeature": "New Feature"
"FIELDS": {
"tier": {
"label": "Tier"
},
"type": {
"label": "Type"
},
"difficulty": {
"label": "Difficulty"
}
},
"Tabs": {
"Main": "Data",
"Information": "Information"
},
"general": "General",
"newAdversary": "New Adversary",
"newFeature": "New feature",
"description": "Description",
"impulses": "Impulses",
"potentialAdversaries": {
"label": "Potential Adversaries",
"placeholder": "Optionally drag and drop adversaries here"
},
"features": {
"label": "Features"
}
},
"Armor": {
"baseScore": "Base Score",
@ -1178,6 +1262,18 @@
"Description": "Description"
}
},
"Item": {
"Errors": {
"MissingClass": "The character is missing a class",
"SubclassNotInClass": "The subclass does not belong to the character's class",
"ClassAlreadySelected": "The character already has a class",
"SubclassAlreadySelected": "The character already has a subclass for that class.",
"NoClassSelected": "Your character has no class selected!",
"LacksDomain": "Your character doesn't have the domain of the card!",
"MaxLoadoutReached": "You can't have any more domain cards at this level!",
"DuplicateDomainCard": "You already have a domain card with that name!"
}
},
"Effects": {
"Types": {
"health": {
@ -1202,10 +1298,48 @@
}
}
},
"Tooltip": {
"openItemWorld": "Open Item World",
"delete": "Delete"
},
"Actions": {
"Types": {
"Attack": {
"Name": "Attack"
},
"Spellcast": {
"Name": "Spellcast"
},
"Resource": {
"Name": "Resource"
},
"Damage": {
"Name": "Damage"
},
"Healing": {
"Name": "Healing"
},
"Summon": {
"Name": "Summon"
},
"Effect": {
"Name": "Effect"
},
"Macro": {
"Name": "Macro"
}
}
},
"RollTypes": {
"ability": {
"name": "Ability"
},
"weapon": {
"name": "Weapon"
},
"spellcast": {
"name": "SpellCast"
}
}
}
}