mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Merged main
This commit is contained in:
commit
b87e630a0a
84 changed files with 2046 additions and 452 deletions
|
|
@ -11,3 +11,4 @@ export * as settingsConfig from './settingsConfig.mjs';
|
|||
export * as systemConfig from './system.mjs';
|
||||
export * as itemBrowserConfig from './itemBrowserConfig.mjs';
|
||||
export * as triggerConfig from './triggerConfig.mjs';
|
||||
export * as resourceConfig from './resourceConfig.mjs';
|
||||
|
|
|
|||
|
|
@ -35,6 +35,12 @@ export const actionTypes = {
|
|||
icon: 'fa-ghost',
|
||||
tooltip: 'DAGGERHEART.ACTIONS.TYPES.summon.tooltip'
|
||||
},
|
||||
transform: {
|
||||
id: 'transform',
|
||||
name: 'DAGGERHEART.ACTIONS.TYPES.transform.name',
|
||||
icon: 'fa-dragon',
|
||||
tooltip: 'DAGGERHEART.ACTIONS.TYPES.transform.tooltip'
|
||||
},
|
||||
effect: {
|
||||
id: 'effect',
|
||||
name: 'DAGGERHEART.ACTIONS.TYPES.effect.name',
|
||||
|
|
|
|||
|
|
@ -55,24 +55,6 @@ export const abilities = {
|
|||
}
|
||||
};
|
||||
|
||||
export const scrollingTextResource = {
|
||||
hitPoints: {
|
||||
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
reversed: true
|
||||
},
|
||||
stress: {
|
||||
label: 'DAGGERHEART.GENERAL.stress',
|
||||
reversed: true
|
||||
},
|
||||
hope: {
|
||||
label: 'DAGGERHEART.GENERAL.hope'
|
||||
},
|
||||
armor: {
|
||||
label: 'DAGGERHEART.GENERAL.armor',
|
||||
reversed: true
|
||||
}
|
||||
};
|
||||
|
||||
export const featureProperties = {
|
||||
agility: {
|
||||
name: 'DAGGERHEART.CONFIG.Traits.agility.name',
|
||||
|
|
|
|||
|
|
@ -634,7 +634,95 @@ export const diceSetNumbers = {
|
|||
flat: 'Flat'
|
||||
};
|
||||
|
||||
export const getDiceSoNicePreset = async (type, faces) => {
|
||||
export const diceSoNiceSFXClasses = {
|
||||
PlayAnimationBright: {
|
||||
id: 'PlayAnimationBright',
|
||||
label: 'DICESONICE.PlayAnimationBright'
|
||||
},
|
||||
PlayAnimationDark: {
|
||||
id: 'PlayAnimationDark',
|
||||
label: 'DICESONICE.PlayAnimationDark'
|
||||
},
|
||||
PlayAnimationOutline: {
|
||||
id: 'PlayAnimationOutline',
|
||||
label: 'DICESONICE.PlayAnimationOutline'
|
||||
},
|
||||
PlayAnimationImpact: {
|
||||
id: 'PlayAnimationImpact',
|
||||
label: 'DICESONICE.PlayAnimationImpact'
|
||||
},
|
||||
// PlayConfettiStrength1: {
|
||||
// id: 'PlayConfettiStrength1',
|
||||
// label: 'DICESONICE.PlayConfettiStrength1'
|
||||
// },
|
||||
// PlayConfettiStrength2: {
|
||||
// id: 'PlayConfettiStrength2',
|
||||
// label: 'DICESONICE.PlayConfettiStrength2'
|
||||
// },
|
||||
// PlayConfettiStrength3: {
|
||||
// id: 'PlayConfettiStrength3',
|
||||
// label: 'DICESONICE.PlayConfettiStrength3'
|
||||
// },
|
||||
PlayAnimationThormund: {
|
||||
id: 'PlayAnimationThormund',
|
||||
label: 'DICESONICE.PlayAnimationThormund'
|
||||
},
|
||||
PlayAnimationParticleSpiral: {
|
||||
id: 'PlayAnimationParticleSpiral',
|
||||
label: 'DICESONICE.PlayAnimationParticleSpiral'
|
||||
},
|
||||
PlayAnimationParticleSparkles: {
|
||||
id: 'PlayAnimationParticleSparkles',
|
||||
label: 'DICESONICE.PlayAnimationParticleSparkles'
|
||||
},
|
||||
PlayAnimationParticleVortex: {
|
||||
id: 'PlayAnimationParticleVortex',
|
||||
label: 'DICESONICE.PlayAnimationParticleVortex'
|
||||
},
|
||||
PlaySoundEpicWin: {
|
||||
id: 'PlaySoundEpicWin',
|
||||
label: 'DICESONICE.PlaySoundEpicWin'
|
||||
},
|
||||
PlaySoundEpicFail: {
|
||||
id: 'PlaySoundEpicFail',
|
||||
label: 'DICESONICE.PlaySoundEpicFail'
|
||||
}
|
||||
// "PlaySoundCustom",
|
||||
// "PlayMacro"
|
||||
};
|
||||
|
||||
export const daggerheartDiceAnimationEvents = {
|
||||
critical: {
|
||||
id: 'critical',
|
||||
label: 'DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.critical.name'
|
||||
},
|
||||
higher: {
|
||||
id: 'higher',
|
||||
label: 'DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.higher.name'
|
||||
}
|
||||
};
|
||||
|
||||
const getDiceSoNiceSFX = sfxOptions => {
|
||||
const diceSoNice = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance).diceSoNiceData;
|
||||
const criticalAnimationData = diceSoNice.sfx.critical;
|
||||
if (sfxOptions.critical && criticalAnimationData.class) {
|
||||
return {
|
||||
specialEffect: criticalAnimationData.class,
|
||||
options: {}
|
||||
};
|
||||
}
|
||||
|
||||
if (sfxOptions.higher && sfxOptions.data.higher) {
|
||||
return {
|
||||
specialEffect: sfxOptions.data.higher.class,
|
||||
options: {}
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
export const getDiceSoNicePreset = async (type, faces, sfxOptions = {}) => {
|
||||
const system = game.dice3d.DiceFactory.systems.get(type.system).dice.get(faces);
|
||||
if (!system) {
|
||||
ui.notifications.error(
|
||||
|
|
@ -657,16 +745,33 @@ export const getDiceSoNicePreset = async (type, faces) => {
|
|||
appearance: {
|
||||
...system.appearance,
|
||||
...type
|
||||
}
|
||||
},
|
||||
sfx: getDiceSoNiceSFX(sfxOptions)
|
||||
};
|
||||
};
|
||||
|
||||
export const getDiceSoNicePresets = async (hopeFaces, fearFaces, advantageFaces = 'd6', disadvantageFaces = 'd6') => {
|
||||
const { diceSoNice } = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
|
||||
export const getDiceSoNicePresets = async (
|
||||
result,
|
||||
hopeFaces,
|
||||
fearFaces,
|
||||
advantageFaces = 'd6',
|
||||
disadvantageFaces = 'd6'
|
||||
) => {
|
||||
const diceSoNice = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance).diceSoNiceData;
|
||||
|
||||
const { isCritical, withHope, withFear } = result;
|
||||
|
||||
return {
|
||||
hope: await getDiceSoNicePreset(diceSoNice.hope, hopeFaces),
|
||||
fear: await getDiceSoNicePreset(diceSoNice.fear, fearFaces),
|
||||
hope: await getDiceSoNicePreset(diceSoNice.hope, hopeFaces, {
|
||||
critical: isCritical,
|
||||
higher: withHope,
|
||||
data: diceSoNice.hope.sfx
|
||||
}),
|
||||
fear: await getDiceSoNicePreset(diceSoNice.fear, fearFaces, {
|
||||
critical: isCritical,
|
||||
higher: withFear,
|
||||
data: diceSoNice.fear.sfx
|
||||
}),
|
||||
advantage: await getDiceSoNicePreset(diceSoNice.advantage, advantageFaces),
|
||||
disadvantage: await getDiceSoNicePreset(diceSoNice.disadvantage, disadvantageFaces)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
export const hooksConfig = {
|
||||
effectDisplayToggle: 'DHEffectDisplayToggle'
|
||||
effectDisplayToggle: 'DHEffectDisplayToggle',
|
||||
lockedTooltipDismissed: 'DHLockedTooltipDismissed'
|
||||
};
|
||||
|
|
|
|||
88
module/config/resourceConfig.mjs
Normal file
88
module/config/resourceConfig.mjs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/**
|
||||
* Full custom typing:
|
||||
* id
|
||||
* initial
|
||||
* max
|
||||
* reverse
|
||||
* label
|
||||
* images {
|
||||
* full { value, isIcon, noColorFilter }
|
||||
* empty { value, isIcon noColorFilter }
|
||||
* }
|
||||
*/
|
||||
|
||||
const characterBaseResources = Object.freeze({
|
||||
hitPoints: {
|
||||
id: 'hitPoints',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
maxLabel: 'DAGGERHEART.ACTORS.Character.maxHPBonus'
|
||||
},
|
||||
stress: {
|
||||
id: 'stress',
|
||||
initial: 0,
|
||||
max: 6,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.stress'
|
||||
},
|
||||
hope: {
|
||||
id: 'hope',
|
||||
initial: 2,
|
||||
reverse: false,
|
||||
label: 'DAGGERHEART.GENERAL.hope'
|
||||
}
|
||||
});
|
||||
|
||||
const adversaryBaseResources = Object.freeze({
|
||||
hitPoints: {
|
||||
id: 'hitPoints',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
maxLabel: 'DAGGERHEART.ACTORS.Character.maxHPBonus'
|
||||
},
|
||||
stress: {
|
||||
id: 'stress',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.stress'
|
||||
}
|
||||
});
|
||||
|
||||
const companionBaseResources = Object.freeze({
|
||||
stress: {
|
||||
id: 'stress',
|
||||
initial: 0,
|
||||
max: 0,
|
||||
reverse: true,
|
||||
label: 'DAGGERHEART.GENERAL.stress'
|
||||
},
|
||||
hope: {
|
||||
id: 'hope',
|
||||
initial: 0,
|
||||
reverse: false,
|
||||
label: 'DAGGERHEART.GENERAL.hope'
|
||||
}
|
||||
});
|
||||
|
||||
export const character = {
|
||||
base: characterBaseResources,
|
||||
custom: {}, // module stuff goes here
|
||||
all: { ...characterBaseResources }
|
||||
};
|
||||
|
||||
export const adversary = {
|
||||
base: adversaryBaseResources,
|
||||
custom: {}, // module stuff goes here
|
||||
all: { ...adversaryBaseResources }
|
||||
};
|
||||
|
||||
export const companion = {
|
||||
base: companionBaseResources,
|
||||
custom: {}, // module stuff goes here
|
||||
all: { ...companionBaseResources }
|
||||
};
|
||||
|
|
@ -3,6 +3,10 @@ export const menu = {
|
|||
Name: 'GameSettingsAutomation',
|
||||
Icon: 'fa-solid fa-robot'
|
||||
},
|
||||
Metagaming: {
|
||||
Name: 'GameSettingsMetagaming',
|
||||
Icon: 'fa-solid fa-eye-low-vision'
|
||||
},
|
||||
Homebrew: {
|
||||
Name: 'GameSettingsHomebrew',
|
||||
Icon: 'fa-solid fa-flask-vial'
|
||||
|
|
@ -19,8 +23,10 @@ export const menu = {
|
|||
|
||||
export const gameSettings = {
|
||||
Automation: 'Automation',
|
||||
Metagaming: 'Metagaming',
|
||||
Homebrew: 'Homebrew',
|
||||
appearance: 'Appearance',
|
||||
GlobalOverrides: 'GlobalOverrides',
|
||||
variantRules: 'VariantRules',
|
||||
Resources: {
|
||||
Fear: 'ResourcesFear'
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import * as GENERAL from './generalConfig.mjs';
|
|||
import * as DOMAIN from './domainConfig.mjs';
|
||||
import * as ENCOUNTER from './encounterConfig.mjs';
|
||||
import * as ACTOR from './actorConfig.mjs';
|
||||
import * as RESOURCE from './resourceConfig.mjs';
|
||||
import * as ITEM from './itemConfig.mjs';
|
||||
import * as SETTINGS from './settingsConfig.mjs';
|
||||
import * as EFFECTS from './effectConfig.mjs';
|
||||
|
|
@ -19,6 +20,7 @@ export const SYSTEM = {
|
|||
GENERAL,
|
||||
DOMAIN,
|
||||
ACTOR,
|
||||
RESOURCE,
|
||||
ITEM,
|
||||
SETTINGS,
|
||||
EFFECTS,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue