├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── .gitignore ├── .npmignore ├── README.md ├── assets ├── dice │ ├── chosen-d10.svg │ ├── chosen-d12.svg │ ├── chosen-d4.svg │ ├── chosen-d6.svg │ ├── chosen-d8.svg │ ├── d10.svg │ ├── d12.svg │ ├── d4.svg │ ├── d6.svg │ ├── d8.svg │ ├── effect-d10.svg │ ├── effect-d12.svg │ ├── effect-d4.svg │ ├── effect-d6.svg │ ├── effect-d8.svg │ ├── hitch-d10.svg │ ├── hitch-d12.svg │ ├── hitch-d4.svg │ ├── hitch-d6.svg │ ├── hitch-d8.svg │ ├── result-d10.svg │ ├── result-d12.svg │ ├── result-d4.svg │ ├── result-d6.svg │ ├── result-d8.svg │ ├── selected-d10.svg │ ├── selected-d12.svg │ ├── selected-d4.svg │ ├── selected-d6.svg │ └── selected-d8.svg └── plot-point │ └── plot-point.png ├── cortexprime.js ├── css └── cortexprime.css ├── gulpfile.js ├── lang ├── en.json └── es.json ├── lib └── helpers.js ├── module ├── PlotPoint.js ├── actor │ ├── actor-sheet.js │ └── defaultActorTypes.js ├── applications │ └── UserDicePool.js ├── cortexPrimeHooks.js ├── entities │ └── CortexPrimeActor.js ├── handlebars │ ├── helpers.js │ └── preloadTemplates.js ├── scripts │ ├── foundryHelpers.js │ ├── rollDice.js │ ├── settingsHelpers.js │ └── sheetHelpers.js ├── settings │ ├── ActorSettings.js │ ├── ImportExportSettings.js │ ├── ThemeSettings.js │ └── settings.js └── theme │ └── defaultThemes.js ├── package-lock.json ├── package.json ├── scss ├── components │ ├── _breadcrumbs.scss │ ├── _dice.scss │ ├── _forms.scss │ └── _tabs.scss ├── cortexprime.scss ├── global │ ├── _borders.scss │ ├── _buttons.scss │ ├── _icons.scss │ ├── _layout.scss │ ├── _misc.scss │ ├── _reset.scss │ ├── _spacing.scss │ ├── _text.scss │ └── _theme.scss └── utils │ ├── _functions.scss │ ├── _spacing.scss │ └── _typography.scss ├── system.json ├── template.json └── templates ├── actor ├── actor-sheet.html └── settings.html ├── chat ├── change-pp.html └── roll-result.html ├── dialog ├── consumable-dice.html └── dice-picker.html ├── dice-pool.html ├── import-export-settings.html ├── partials ├── actor-sheet │ ├── sidebar.html │ ├── simple-traits.html │ ├── temporary-traits.html │ ├── trait-set-edit.html │ ├── trait-sets.html │ ├── traits-edit.html │ └── traits.html ├── breadcrumbs.html ├── dice │ ├── d10.html │ ├── d12.html │ ├── d4.html │ ├── d6.html │ ├── d8.html │ ├── select-options.html │ └── select.html ├── die-display.html ├── plot-point.html ├── pp.html ├── remove-button.html ├── reorder.html ├── settings │ ├── actor-type.html │ ├── actor-types.html │ ├── simple-trait.html │ ├── theme │ │ ├── background-position.html │ │ ├── background-repeat.html │ │ ├── background-size.html │ │ ├── body.html │ │ ├── border-position.html │ │ ├── border-style.html │ │ ├── border-width.html │ │ ├── button-style.html │ │ ├── color.html │ │ ├── dice-colors.html │ │ ├── die-colors.html │ │ ├── font-size.html │ │ ├── font-style.html │ │ ├── font-weight.html │ │ ├── image.html │ │ ├── inputs.html │ │ ├── misc.html │ │ ├── opacity.html │ │ ├── sections.html │ │ ├── style.html │ │ ├── text-transform.html │ │ └── traits.html │ ├── trait-set.html │ ├── trait.html │ └── value-types │ │ ├── descriptors.html │ │ ├── dice.html │ │ ├── number.html │ │ ├── sfx.html │ │ ├── sub-traits.html │ │ └── text.html └── value-types │ ├── descriptors.html │ ├── dice.html │ ├── number.html │ ├── sfx.html │ ├── sub-traits.html │ └── text.html └── theme └── settings.html /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # IDE 2 | .idea/ 3 | .vs/ 4 | 5 | # Node Modules 6 | node_modules/ 7 | npm-debug.log -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cortex Prime 2 | version 0.2.16 (Beta) 3 | 4 | ## Feedback? 5 | All feedback is welcome! To send feedback you can either visit the Cortex Prime or FoundryVTT discords and @Necrophage for any feedback. Additionally, you may submit an issue here on Github. 6 | 7 | ## Beta Version 8 | This is currently in Beta. Most of the primary features have been implemented and tested through alpha. Adjustments or reworking of these features may still occur based on feedback. Which means there is a risk of breaking changes with major updates. Many of the minor updates should not break anything. Please do expect some lingering bugs from the core features and from any new enhancement features that may occur during Beta. 9 | 10 | ## How to use 11 | When creating a new world the GM will have to set up the character sheet in the system settings, including their trait sets, traits, and all of their various options. 12 | 13 | To see how to use this system, there is a help tab in the actor sheets that will give a breakdown on their current features. -------------------------------------------------------------------------------- /assets/dice/chosen-d10.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/chosen-d12.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/chosen-d4.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/dice/chosen-d6.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/chosen-d8.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/d10.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | 26 | -------------------------------------------------------------------------------- /assets/dice/d12.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | 27 | -------------------------------------------------------------------------------- /assets/dice/d4.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | 27 | 28 | 29 | 30 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /assets/dice/d6.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | 26 | -------------------------------------------------------------------------------- /assets/dice/d8.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | 26 | -------------------------------------------------------------------------------- /assets/dice/effect-d10.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/effect-d12.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/effect-d4.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/dice/effect-d6.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/effect-d8.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/hitch-d10.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/hitch-d12.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/hitch-d4.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/dice/hitch-d6.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/hitch-d8.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/result-d10.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/result-d12.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/result-d4.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/dice/result-d6.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/result-d8.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/selected-d10.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/selected-d12.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/selected-d4.svg: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/dice/selected-d6.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/dice/selected-d8.svg: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /assets/plot-point/plot-point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Secular12/cortexprime/29857ddd30fb09e0622d1100835453102b9f1502/assets/plot-point/plot-point.png -------------------------------------------------------------------------------- /cortexprime.js: -------------------------------------------------------------------------------- 1 | import { CortexPrimeActor } from './module/entities/CortexPrimeActor.js' 2 | import PlotPoint from './module/PlotPoint.js' 3 | import { preloadHandlebarsTemplates } from './module/handlebars/preloadTemplates.js' 4 | import { registerHandlebarHelpers } from './module/handlebars/helpers.js' 5 | import { registerSettings } from './module/settings/settings.js' 6 | import { CortexPrimeActorSheet } from './module/actor/actor-sheet.js' 7 | import cortexPrimeHooks from './module/cortexPrimeHooks.js' 8 | 9 | Hooks.once('init', () => { 10 | console.log(`CP | Initializing Cortex Prime`) 11 | 12 | game.cortexprime = { 13 | CortexPrimeActor 14 | } 15 | 16 | CONFIG.Actor.documentClass = CortexPrimeActor 17 | CONFIG.Dice.terms['p'] = PlotPoint 18 | 19 | registerHandlebarHelpers() 20 | preloadHandlebarsTemplates() 21 | registerSettings() 22 | 23 | foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet) 24 | foundry.documents.collections.Actors.registerSheet("cortexprime", CortexPrimeActorSheet, { makeDefault: true }) 25 | 26 | cortexPrimeHooks() 27 | }) -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const gulp = require('gulp'); 2 | const prefix = require('gulp-autoprefixer'); 3 | const sourcemaps = require('gulp-sourcemaps'); 4 | const sass = require('gulp-sass')(require('sass')); 5 | 6 | /* ----------------------------------------- */ 7 | /* Compile Sass 8 | /* ----------------------------------------- */ 9 | 10 | // Small error handler helper function. 11 | function handleError(err) { 12 | console.log(err.toString()); 13 | this.emit('end'); 14 | } 15 | 16 | const SYSTEM_SCSS = ["scss/**/*.scss"]; 17 | function compileScss() { 18 | // Configure options for sass output. For example, 'expanded' or 'nested' 19 | let options = { 20 | outputStyle: 'expanded' 21 | }; 22 | return gulp.src(SYSTEM_SCSS) 23 | .pipe( 24 | sass(options) 25 | .on('error', handleError) 26 | ) 27 | .pipe(prefix({ 28 | cascade: false 29 | })) 30 | .pipe(gulp.dest("./css")) 31 | } 32 | const css = gulp.series(compileScss); 33 | 34 | /* ----------------------------------------- */ 35 | /* Watch Updates 36 | /* ----------------------------------------- */ 37 | 38 | function watchUpdates() { 39 | gulp.watch(SYSTEM_SCSS, css); 40 | } 41 | 42 | /* ----------------------------------------- */ 43 | /* Export Tasks 44 | /* ----------------------------------------- */ 45 | 46 | exports.default = gulp.series( 47 | compileScss, 48 | watchUpdates 49 | ); 50 | exports.css = css; 51 | -------------------------------------------------------------------------------- /lib/helpers.js: -------------------------------------------------------------------------------- 1 | const getFirstMatch = (obj, cb, matchAll = false, keys = null, keyIndex = null) => { 2 | const objKeys = Object.keys(obj) 3 | 4 | if (!keys) { 5 | return getFirstMatch(obj, cb, matchAll, objKeys, 0) 6 | } 7 | 8 | if (keyIndex === keys.length) return { found: matchAll, key: undefined, value: undefined } 9 | 10 | const key = keys[keyIndex] 11 | 12 | const truthyCb = !!cb(obj[key], key, objKeys.length) 13 | 14 | if ((truthyCb && !matchAll) || (!truthyCb && matchAll)) return { found: !matchAll, key, value: obj[key] } 15 | 16 | return getFirstMatch(obj, cb, matchAll, keys, keyIndex + 1) 17 | } 18 | 19 | export const getLength = value => { 20 | if (isArray(value ?? [])) return (value ?? []).length 21 | if (isObject(value)) return Object.keys(value).length 22 | 23 | return -1 24 | } 25 | 26 | export const indexObjectValues = obj => { 27 | return Object.keys(obj) 28 | .reduce((acc, key, index) => { 29 | return { ...acc, [index]: obj[key] } 30 | }, {}) 31 | } 32 | 33 | export const isArray = arr => { 34 | return arr && arr.constructor === Array 35 | } 36 | 37 | export const isObject = obj => { 38 | return obj && obj !== null && typeof obj === 'object' && !isArray(obj) 39 | } 40 | 41 | export const objectEvery = (obj, cb) => { 42 | return getFirstMatch(obj, cb, true).found 43 | } 44 | 45 | export const objectFilter = (obj, cb) => { 46 | const objKeys = Object.keys(obj) 47 | 48 | return objKeys 49 | .reduce((acc, key) => { 50 | return cb(obj[key], key, objKeys.length) 51 | ? { ...acc, [key]: obj[key] } 52 | : acc 53 | }, {}) 54 | } 55 | 56 | export const objectFindEntry = (obj, cb) => { 57 | const { key, value } = getFirstMatch(obj, cb) 58 | 59 | return { key, value } 60 | } 61 | 62 | export const objectFindKey = (obj, cb) => { 63 | return getFirstMatch(obj, cb).key 64 | } 65 | 66 | export const objectFindValue = (obj, cb) => { 67 | return getFirstMatch(obj, cb).value 68 | } 69 | 70 | export const objectForEach = (obj, cb) => { 71 | const objKeys = Object.keys(obj) 72 | objKeys 73 | .forEach(key => { 74 | cb(obj[key], key, objKeys.length) 75 | }) 76 | } 77 | 78 | export const objectIncludes = (obj, value) => { 79 | return Object.values(obj).includes(value) 80 | } 81 | 82 | export const objectIncludesKey = (obj, value) => { 83 | return Object.keys(obj).includes(value) 84 | } 85 | 86 | export const objectMapKeys = (obj, cb) => { 87 | const objKeys = Object.keys(obj) 88 | return objKeys 89 | .reduce((acc, key) => { 90 | return { ...acc, [cb(obj[key], key, objKeys.length)]: obj[key] } 91 | }, {}) 92 | } 93 | 94 | export const objectMap = (obj, cb) => { 95 | const objKeys = Object.keys(obj) 96 | return objKeys 97 | .reduce((acc, key) => { 98 | return { ...acc, ...cb(obj[key], key, objKeys.length) } 99 | }, {}) 100 | } 101 | 102 | export const objectMapValues = (obj, cb) => { 103 | const objKeys = Object.keys(obj) 104 | return objKeys 105 | .reduce((acc, key) => { 106 | return { ...acc, [key]: cb(obj[key], key, objKeys.length) } 107 | }, {}) 108 | } 109 | 110 | export const objectReduce = (obj, cb, start) => { 111 | const objKeys = Object.keys(obj) 112 | return objKeys 113 | .reduce((acc, key) => { 114 | return cb(acc, obj[key], key, objKeys.length) 115 | }, start) 116 | } 117 | 118 | export const objectReindexFilter = (obj, cb) => { 119 | const objKeys = Object.keys(obj) 120 | 121 | return objKeys 122 | .reduce((acc, key) => { 123 | return cb(obj[key], key, objKeys.length) 124 | ? { ...acc, [getLength(acc)]: obj[key] } 125 | : acc 126 | }, {}) 127 | } 128 | 129 | export const objectSome = (obj, cb) => { 130 | return getFirstMatch(obj, cb).found 131 | } 132 | 133 | export const objectSort = (obj, cb) => { 134 | const keys = Object.keys(obj) 135 | 136 | const callback = cb 137 | ? cb 138 | : (a, b) => b > a ? -1 : a > b ? 1 : 0 139 | 140 | keys.sort((a, b) => callback(obj[a], obj[b], a, b, keys.length)) 141 | 142 | return keys 143 | .reduce((acc, key) => { 144 | return { ...acc, [key]: obj[key] } 145 | }, {}) 146 | } 147 | 148 | export const resetDataObject = ({ path, source }, pathIndex = 0) => { 149 | if (source[path[pathIndex]]) { 150 | return { 151 | ...source, 152 | [path[pathIndex]]: Object.keys(source[path[pathIndex]]) 153 | .reduce((acc, key, index) => { 154 | return { 155 | ...acc, 156 | [index]: resetDataObject({ path, source: source[path[pathIndex]][key] }, pathIndex + 1) 157 | } 158 | }, {}) 159 | } 160 | } 161 | 162 | return source 163 | } 164 | -------------------------------------------------------------------------------- /module/PlotPoint.js: -------------------------------------------------------------------------------- 1 | export default class PlotPoint extends foundry.dice.terms.Die { 2 | constructor(termData) { 3 | termData.faces = 2 4 | super(termData) 5 | } 6 | } 7 | 8 | PlotPoint.DENOMINATION = 'p' 9 | -------------------------------------------------------------------------------- /module/actor/defaultActorTypes.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 0: { 3 | defaultImage: 'icons/svg/mystery-man.svg', 4 | hasAssets: true, 5 | hasComplications: true, 6 | hasHidableTraits: false, 7 | hasNotesPage: true, 8 | hasPlotPoints: true, 9 | id: '_1', 10 | name: 'Character', 11 | showProfileImage: true, 12 | traitSets: { 13 | 0: { 14 | description: null, 15 | hasDescription: false, 16 | id: '_11', 17 | label: 'Distinctions', 18 | shutdown: false, 19 | traits: { 20 | 0: { 21 | dice: { 22 | value: { 23 | 0: '8' 24 | } 25 | }, 26 | id: '_111', 27 | label: '', 28 | name: 'Distinction 1', 29 | sfx: { 30 | 0: { 31 | label: 'Hinder', 32 | description: 'Gain a PP when you switch out this distinction\'s d8 for a d4.', 33 | unlocked: true 34 | } 35 | }, 36 | shutdown: false 37 | }, 38 | 1: { 39 | dice: { 40 | value: { 41 | 0: '8' 42 | } 43 | }, 44 | id: '_112', 45 | label: '', 46 | name: 'Distinction 2', 47 | sfx: { 48 | 0: { 49 | label: 'Hinder', 50 | description: 'Gain a PP when you switch out this distinction\'s d8 for a d4.', 51 | unlocked: true 52 | } 53 | }, 54 | shutdown: false 55 | }, 56 | 2: { 57 | dice: { 58 | value: { 59 | 0: '8' 60 | } 61 | }, 62 | id: '_113', 63 | label: '', 64 | name: 'Distinction 3', 65 | sfx: { 66 | 0: { 67 | label: 'Hinder', 68 | description: 'Gain a PP when you switch out this distinction\'s d8 for a d4.', 69 | unlocked: true 70 | } 71 | }, 72 | shutdown: false 73 | } 74 | }, 75 | settings: { 76 | hasDescription: false, 77 | hasDescriptors: false, 78 | hasDice: true, 79 | hasLabel: true, 80 | hasSfx: true, 81 | hasSubTraits: false, 82 | subTraitsHaveDice: true, 83 | subTraitsDiceConsumable: false, 84 | } 85 | }, 86 | 1: { 87 | description: null, 88 | hasDescription: false, 89 | id: '_12', 90 | label: 'Signature Assets', 91 | shutdown: false, 92 | settings: { 93 | hasDescription: false, 94 | hasDescriptors: false, 95 | hasDice: true, 96 | hasLabel: false, 97 | hasSfx: true, 98 | hasSubTraits: false, 99 | subTraitsHaveDice: false, 100 | subTraitsDiceConsumable: false, 101 | }, 102 | traits: {} 103 | } 104 | } 105 | }, 106 | 1: { 107 | defaultImage: 'icons/svg/house.svg', 108 | hasAssets: true, 109 | hasComplications: true, 110 | hasHidableTraits: true, 111 | hasNotesPage: true, 112 | hasPlotPoints: true, 113 | id: '_2', 114 | name: 'Scene', 115 | showProfileImage: false, 116 | simpleTraits: { 117 | 0: { 118 | dice: { 119 | id: '_21', 120 | value: { 121 | 0: '6', 122 | 1: '6' 123 | } 124 | }, 125 | hasDescription: false, 126 | label: 'Doom Pool', 127 | settings: { 128 | diceConsumable: false, 129 | editable: true, 130 | valueType: 'dice' 131 | } 132 | } 133 | }, 134 | traitSets: { 135 | 0: { 136 | description: null, 137 | hasDescription: false, 138 | id: '_21', 139 | label: 'Extras', 140 | shutdown: false, 141 | traits: {}, 142 | settings: { 143 | hasDescription: false, 144 | hasDescriptors: false, 145 | hasDice: true, 146 | hasLabel: false, 147 | hasSfx: false, 148 | hasSubTraits: false, 149 | subTraitsHaveDice: true, 150 | subTraitsDiceConsumable: false 151 | } 152 | }, 153 | 1: { 154 | description: null, 155 | hasDescription: false, 156 | id: '_22', 157 | label: 'Minor GMCs', 158 | shutdown: false, 159 | traits: {}, 160 | settings: { 161 | hasDescription: true, 162 | hasDescriptors: false, 163 | hasDice: false, 164 | hasLabel: false, 165 | hasSfx: false, 166 | hasSubTraits: true, 167 | subTraitsHaveDice: true, 168 | subTraitsDiceConsumable: false 169 | } 170 | }, 171 | 2: { 172 | description: null, 173 | hasDescription: false, 174 | id: '_23', 175 | label: 'Mobs', 176 | shutdown: false, 177 | traits: {}, 178 | settings: { 179 | hasDescription: true, 180 | hasDescriptors: false, 181 | hasDice: true, 182 | hasLabel: true, 183 | hasSfx: false, 184 | hasSubTraits: true, 185 | subTraitsHaveDice: true, 186 | subTraitsDiceConsumable: false 187 | } 188 | }, 189 | 3: { 190 | description: null, 191 | hasDescription: false, 192 | id: '_24', 193 | label: 'Bosses/Factions/Orgs', 194 | shutdown: false, 195 | traits: {}, 196 | settings: { 197 | hasDescription: true, 198 | hasDescriptors: false, 199 | hasDice: true, 200 | hasLabel: true, 201 | hasSfx: true, 202 | hasSubTraits: true, 203 | subTraitsHaveDice: true, 204 | subTraitsDiceConsumable: false 205 | } 206 | } 207 | } 208 | } 209 | } -------------------------------------------------------------------------------- /module/cortexPrimeHooks.js: -------------------------------------------------------------------------------- 1 | import { UserDicePool } from './applications/UserDicePool.js' 2 | import { localizer, setCssVars } from './scripts/foundryHelpers.js' 3 | import rollDice from './scripts/rollDice.js' 4 | 5 | export default () => { 6 | Hooks.once('diceSoNiceReady', dice3d => { 7 | dice3d.addSystem({ id: 'cp-pp', name: 'Cortex Prime Plot Point' }, false) 8 | const ppLabel = 'systems/cortexprime/assets/plot-point/plot-point.png' 9 | dice3d.addDicePreset({ 10 | type: 'dp', 11 | labels: [ppLabel, ppLabel], 12 | system: 'standard', 13 | }, 'd2') 14 | }) 15 | 16 | Hooks.once('ready', async () => { 17 | const themes = game.settings.get('cortexprime', 'themes') 18 | const theme = themes.current === 'custom' ? themes.custom : themes.list[themes.current] 19 | setCssVars(theme) 20 | if (game.settings.get('cortexprime', 'WelcomeSeen') === false) { 21 | if (game.user.isGM) { 22 | const seeWelcome = await new Promise(resolve => { 23 | new Dialog( 24 | { 25 | title: localizer('WelcomeTitle'), 26 | content: `

${localizer('SettingsMessage')}

`, 27 | buttons: { 28 | ok: { 29 | label: localizer("Okay"), 30 | callback: () => resolve(true) 31 | } 32 | }, 33 | default: "ok", 34 | close: () => resolve(false), 35 | }, 36 | { 37 | width: 500, 38 | height: 'auto', 39 | } 40 | ).render(true) 41 | }) 42 | 43 | if (seeWelcome) { 44 | await game.settings.set('cortexprime', 'WelcomeSeen', true) 45 | } 46 | } 47 | } 48 | 49 | const $rollPrivacy = $(document.querySelector('#roll-privacy')) 50 | 51 | if ($rollPrivacy) { 52 | const $dicePoolButton = $( 53 | `` 55 | ) 56 | 57 | $rollPrivacy 58 | .prepend($dicePoolButton) 59 | $rollPrivacy 60 | .find('.dice-pool-control') 61 | .on('click', async () => { 62 | await game.cortexprime.UserDicePool.toggle() 63 | }) 64 | } 65 | }) 66 | 67 | Hooks.on('ready', async () => { 68 | game.cortexprime.UserDicePool = new UserDicePool() 69 | await game.cortexprime.UserDicePool.initPool() 70 | }) 71 | 72 | Hooks.on('renderChatMessageHTML', async (message, html, data) => { 73 | const $html = $(html) 74 | const $rollResult = $html.find('.roll-result').first() 75 | 76 | if ($rollResult) { 77 | const $chatMessage = $rollResult.closest('.chat-message') 78 | 79 | $chatMessage 80 | .addClass('roll-message') 81 | .prepend('
') 82 | 83 | const $messageHeader = $chatMessage.find('.message-header').first() 84 | 85 | $messageHeader.children().wrapAll('
') 86 | $messageHeader.prepend('
') 87 | 88 | const $dice = $rollResult.find('.die') 89 | 90 | for await (const die of $dice) { 91 | const $die = $(die) 92 | const data = $die.data() 93 | 94 | const { dieRating, type, value: number } = data 95 | 96 | const html = await foundry.applications.handlebars.renderTemplate(`systems/cortexprime/templates/partials/dice/d${dieRating}.html`, { 97 | type, 98 | number 99 | }) 100 | $die.html(html) 101 | } 102 | 103 | $html 104 | .find('.source-header') 105 | .click(function () { 106 | const $source = $(this) 107 | $source 108 | .find('.fa') 109 | .toggleClass('fa-chevron-down fa-chevron-up') 110 | $source 111 | .siblings('.source-content') 112 | .toggleClass('hide') 113 | }) 114 | 115 | const getPool = $html => { 116 | return $html.find('.source').get().reduce((sources, source) => { 117 | const $source = $(source) 118 | return { 119 | ...sources, 120 | [$source.data('source')]: $source 121 | .find('.dice-tag') 122 | .get() 123 | .reduce((dice, die, dieIndex) => { 124 | const $die = $(die) 125 | return { 126 | ...dice, 127 | [dieIndex]: { 128 | label: $die.data('label'), 129 | value: $die.find('.die').get() 130 | .reduce((diceValues, dieValue, dieValueIndex) => { 131 | return { 132 | ...diceValues, 133 | [dieValueIndex]: $(dieValue).data('die-rating') 134 | } 135 | }, {}) 136 | } 137 | } 138 | }, {}) 139 | } 140 | }, {}) 141 | } 142 | $rollResult.find('.re-roll').click(async (event) => { 143 | event.preventDefault() 144 | const pool = getPool($rollResult) 145 | await rollDice(pool) 146 | }) 147 | $rollResult.find('.send-to-pool').click(async (event) => { 148 | event.preventDefault() 149 | const pool = getPool($rollResult) 150 | await game.cortexprime.UserDicePool._setPool(pool) 151 | }) 152 | } 153 | }) 154 | } 155 | -------------------------------------------------------------------------------- /module/entities/CortexPrimeActor.js: -------------------------------------------------------------------------------- 1 | import { localizer } from '../scripts/foundryHelpers.js' 2 | 3 | export class CortexPrimeActor extends Actor { 4 | // add or subtract plot point value assigned to the actor by specified amount 5 | async changePpBy (value, directChange = false) { 6 | // ensure current value is an integer 7 | const currentValue = +(this.system.pp.value ?? 0) 8 | 9 | const newValue = currentValue + value 10 | 11 | // action only taken if value will be different and won't result in negative plot points 12 | if (currentValue !== newValue && newValue >= 0) { 13 | await this.updatePpValue(newValue) 14 | // determin if it is spending a plot point or receiving a plot point 15 | const valueChangeType = currentValue > newValue 16 | ? directChange 17 | ? localizer('Removed') 18 | : localizer('Spent') 19 | : directChange 20 | ? localizer('Added') 21 | : localizer('Received') 22 | 23 | await this.createPpMessage(valueChangeType, Math.abs(currentValue - newValue), newValue) 24 | } 25 | } 26 | 27 | // Send a message to the chat on the pp change 28 | async createPpMessage (changeType, value, total) { 29 | const message = await foundry.applications.handlebars.renderTemplate(`systems/cortexprime/templates/chat/change-pp.html`, { 30 | changeType, 31 | speaker: game.user, 32 | target: this, 33 | total, 34 | value 35 | }) 36 | 37 | ChatMessage.create({ content: message }) 38 | } 39 | 40 | // Update plot point value of the actor 41 | async updatePpValue (value) { 42 | await this.update({ 43 | 'system.pp.value': value 44 | }) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /module/handlebars/helpers.js: -------------------------------------------------------------------------------- 1 | import { getLength, objectFindValue } from '../../lib/helpers.js' 2 | import { getBorderWidth } from '../scripts/foundryHelpers.js' 3 | 4 | export const registerHandlebarHelpers = () => { 5 | Handlebars.registerHelper('borderPosition', (borderPosition, borderWidth) => { 6 | return getBorderWidth(borderPosition, borderWidth) 7 | }) 8 | 9 | Handlebars.registerHelper('concat', function (...args) { 10 | return args.reduce((acc, current) => { 11 | return typeof current !== 'object' 12 | ? `${acc}${current}` 13 | : acc 14 | }, '') 15 | }) 16 | 17 | Handlebars.registerHelper('listHasLess', (value, max = -1) => { 18 | const parsedMax = parseInt(max) 19 | if (parsedMax < 0) return true 20 | 21 | const length = getLength(value) 22 | 23 | return length > -1 && length < parsedMax 24 | }) 25 | 26 | Handlebars.registerHelper('listHasMore', (value, min = -1) => { 27 | const parsedMin = parseInt(min) 28 | if (parsedMin < 0) return true 29 | 30 | const length = getLength(value) 31 | 32 | return length > -1 && length > parsedMin 33 | }) 34 | 35 | Handlebars.registerHelper('viewClasses', (value, breadcrumbs = {}) => { 36 | const activeBreadcrumb = objectFindValue(breadcrumbs, breadcrumb => breadcrumb.active) 37 | 38 | return (activeBreadcrumb?.target || null) === value ? 'view' : 'view hide' 39 | }) 40 | 41 | Handlebars.registerHelper({ 42 | '??': (a, b) => a ?? b, 43 | and: (a, b) => a && b, 44 | eq: (a, b) => a === b, 45 | gt: (a, b) => a > b, 46 | gte: (a, b) => a >= b, 47 | lt: (a, b) => a < b, 48 | lte: (a, b) => a <= b, 49 | mod: (a, b) => a % b, 50 | minus: (a, b) => (+a) - (+b), 51 | ne: (a, b) => a !== b, 52 | not: a => !a, 53 | or: (a, b) => a || b, 54 | plus: (a, b) => +a + b, 55 | ternary: (conditional, a, b) => conditional ? a : b 56 | }) 57 | } 58 | -------------------------------------------------------------------------------- /module/handlebars/preloadTemplates.js: -------------------------------------------------------------------------------- 1 | export const preloadHandlebarsTemplates = async function () { 2 | const templatePaths = [ 3 | 'actor-sheet/sidebar', 4 | 'actor-sheet/simple-traits', 5 | 'actor-sheet/temporary-traits', 6 | 'actor-sheet/traits', 7 | 'actor-sheet/traits-edit', 8 | 'actor-sheet/trait-set-edit', 9 | 'actor-sheet/trait-sets', 10 | 'breadcrumbs', 11 | 'dice/d4', 12 | 'dice/d6', 13 | 'dice/d8', 14 | 'dice/d10', 15 | 'dice/d12', 16 | 'dice/select', 17 | 'dice/select-options', 18 | 'die-display', 19 | 'plot-point', 20 | 'pp', 21 | 'remove-button', 22 | 'reorder', 23 | 'settings/actor-types', 24 | 'settings/actor-type', 25 | 'settings/theme/background-position', 26 | 'settings/theme/background-repeat', 27 | 'settings/theme/background-size', 28 | 'settings/theme/body', 29 | 'settings/theme/border-position', 30 | 'settings/theme/border-style', 31 | 'settings/theme/border-width', 32 | 'settings/theme/button-style', 33 | 'settings/theme/color', 34 | 'settings/theme/dice-colors', 35 | 'settings/theme/die-colors', 36 | 'settings/theme/font-size', 37 | 'settings/theme/font-style', 38 | 'settings/theme/font-weight', 39 | 'settings/theme/image', 40 | 'settings/theme/misc', 41 | 'settings/theme/opacity', 42 | 'settings/theme/inputs', 43 | 'settings/theme/sections', 44 | 'settings/theme/style', 45 | 'settings/theme/text-transform', 46 | 'settings/theme/traits', 47 | 'settings/trait', 48 | 'settings/trait-set', 49 | 'settings/simple-trait', 50 | 'settings/value-types/descriptors', 51 | 'settings/value-types/dice', 52 | 'settings/value-types/number', 53 | 'settings/value-types/sfx', 54 | 'settings/value-types/sub-traits', 55 | 'settings/value-types/text', 56 | 'value-types/descriptors', 57 | 'value-types/dice', 58 | 'value-types/number', 59 | 'value-types/sfx', 60 | 'value-types/sub-traits', 61 | 'value-types/text', 62 | ] 63 | .map(template => `systems/cortexprime/templates/partials/${template}.html`) 64 | 65 | return foundry.applications.handlebars.loadTemplates(templatePaths) 66 | } 67 | -------------------------------------------------------------------------------- /module/scripts/foundryHelpers.js: -------------------------------------------------------------------------------- 1 | export const getBorderWidth = (borderPosition, borderWidth) => { 2 | switch (borderPosition) { 3 | case 'a': 4 | return `${borderWidth}px ${borderWidth}px ${borderWidth}px ${borderWidth}px` 5 | case 'b': 6 | return `0 0 ${borderWidth}px 0` 7 | case 'l': 8 | return `0 0 0 ${borderWidth}px` 9 | case 'r': 10 | return `0 ${borderWidth}px 0 0` 11 | case 't': 12 | return `${borderWidth}px 0 0 0` 13 | case 'x': 14 | return `0 ${borderWidth}px 0 ${borderWidth}px` 15 | case 'y': 16 | return `${borderWidth}px 0 ${borderWidth}px 0` 17 | } 18 | } 19 | 20 | export const localizer = target => game.i18n.localize(target) 21 | 22 | export const setCssVars = (theme) => { 23 | Object.entries(theme).forEach(([ key, value ]) => { 24 | if ('inputBorderPosition' === key) { 25 | value = getBorderWidth(value, theme.inputBorderWidth) 26 | } 27 | 28 | if ('sectionBorderPosition' === key) { 29 | value = getBorderWidth(value, theme.sectionBorderWidth) 30 | } 31 | 32 | if ([ 33 | 'bodyFontSize', 34 | 'descriptorLabelFontSize', 35 | 'inputBorderWidth', 36 | 'inputLabelFontSize', 37 | 'sectionBorderWidth', 38 | 'sectionPrimaryTitleFontSize', 39 | 'sectionSecondaryTitleFontSize', 40 | 'separatorWeight', 41 | 'sfxLabelFontSize', 42 | 'subTraitLabelFontSize', 43 | 'traitSubTitleFontSize', 44 | 'traitTitleFontSize' 45 | ].includes(key)) { 46 | value = `${value}px` 47 | } 48 | 49 | if (['sheetBackgroundImage', 'sectionBackgroundImage'].includes(key)) { 50 | value = value 51 | ? value.startsWith('http') 52 | ? `url('${value}')` 53 | : `url('/${value}')` 54 | : 'none' 55 | } 56 | 57 | const property = `--cp-${key.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase())}` 58 | 59 | document.body.style.setProperty(property, value) 60 | }) 61 | } 62 | -------------------------------------------------------------------------------- /module/scripts/settingsHelpers.js: -------------------------------------------------------------------------------- 1 | import { getLength, objectMapKeys, objectReduce, objectReindexFilter } from '../../lib/helpers.js' 2 | import { localizer } from './foundryHelpers.js' 3 | 4 | export const collapseToggle = function (html) { 5 | html.find('.collapse-toggle').click(async (event) => { 6 | event.preventDefault() 7 | const $element = $(event.currentTarget) 8 | const $collapseValue = $element 9 | .next('.collapse-value') 10 | 11 | $collapseValue.prop('checked', !($collapseValue.is(':checked'))) 12 | 13 | await this._onSubmit(event) 14 | this.render(true) 15 | }) 16 | } 17 | 18 | export const displayToggle = html => { 19 | html.find('input.display-toggle').change((event) => { 20 | event.preventDefault() 21 | const $target = $(event.currentTarget) 22 | const scope = $target.data('scope') 23 | const selector = $target.data('selector') 24 | 25 | if (scope) { 26 | $(event.currentTarget) 27 | .closest(scope) 28 | .find(selector) 29 | .toggle() 30 | } else { 31 | html.find(selector).toggle() 32 | } 33 | }) 34 | } 35 | 36 | export const removeItem = async function (html) { 37 | html.find('.remove-item').click(async event => { 38 | event.preventDefault() 39 | const { 40 | group, 41 | itemKey, 42 | itemName, 43 | setting, 44 | stayOnPage 45 | } = event.currentTarget.dataset 46 | 47 | let confirmed 48 | 49 | await Dialog.confirm({ 50 | title: localizer('AreYouSure'), 51 | content: `${localizer('Remove')} ${itemName}?`, 52 | yes: () => { confirmed = true }, 53 | no: () => { confirmed = false }, 54 | defaultYes: false 55 | }) 56 | 57 | if (confirmed) { 58 | if (setting) { 59 | let settings = game.settings.get('cortexprime', setting) 60 | 61 | const currentGroupSettings = group ? await foundry.utils.getProperty(settings, group) : settings 62 | const groupSettingValue = objectReindexFilter(currentGroupSettings, (_, key) => +key !== +itemKey) 63 | 64 | if (group) { 65 | foundry.utils.setProperty(settings, group, groupSettingValue) 66 | } else { 67 | settings = groupSettingValue 68 | } 69 | await game.settings.set('cortexprime', setting, settings) 70 | 71 | if (setting === 'actorTypes' && !stayOnPage) { 72 | const currentBreadcrumbs = game.settings.get('cortexprime', 'actorBreadcrumbs') 73 | 74 | const breadcrumbsValue = objectReduce(currentBreadcrumbs, (acc, value, key, length) => { 75 | if (+key === length - 1) return acc 76 | return { 77 | ...acc, 78 | [key]: { 79 | ...value, 80 | active: +key === (length - 2) 81 | } 82 | } 83 | }, {}) 84 | 85 | await game.settings.set('cortexprime', 'actorBreadcrumbs', breadcrumbsValue) 86 | } 87 | 88 | this.render(true) 89 | } 90 | } 91 | }) 92 | } 93 | 94 | export const reorderItem = async function (html) { 95 | html.find('.reorder').click(async event => { 96 | event.preventDefault() 97 | const { 98 | currentIndex, 99 | newIndex, 100 | path, 101 | setting 102 | } = event.currentTarget.dataset 103 | 104 | let settings = game.settings.get('cortexprime', setting) 105 | const targetObject = (path || parseInt(path, 10) === 0) ? foundry.utils.getProperty(settings, path) ?? {} : settings 106 | const maxKey = getLength(targetObject ?? {}) - 1 107 | 108 | const key = +newIndex < 0 109 | ? maxKey 110 | : maxKey < +newIndex 111 | ? 0 112 | : +newIndex 113 | 114 | const value = objectMapKeys(targetObject, (_, targetKey) => { 115 | return +targetKey === +currentIndex 116 | ? key 117 | : +currentIndex > key 118 | ? +targetKey < +currentIndex && +targetKey >= key 119 | ? +targetKey + 1 120 | : +targetKey 121 | : +targetKey > +currentIndex && +targetKey <= key 122 | ? +targetKey - 1 123 | : +targetKey 124 | }) 125 | 126 | if (path || parseInt(path, 10) === 0) { 127 | foundry.utils.setProperty(settings, path, value) 128 | } else { 129 | settings = value 130 | } 131 | 132 | await game.settings.set('cortexprime', setting, settings) 133 | this.render(true) 134 | }) 135 | } 136 | -------------------------------------------------------------------------------- /module/scripts/sheetHelpers.js: -------------------------------------------------------------------------------- 1 | import { getLength, objectReindexFilter } from '../../lib/helpers.js' 2 | import { localizer } from './foundryHelpers.js' 3 | 4 | export const addNewDataPoint = async function (data, path, value) { 5 | const currentData = data || {} 6 | 7 | await this.actor.update({ 8 | [`data.${path}`]: { 9 | ...currentData, 10 | [getLength(currentData)]: value 11 | } 12 | }) 13 | } 14 | 15 | export const resetDataPoint = async function (path, target, value) { 16 | await this.actor.update({ 17 | [`${path}.-=${target}`]: null 18 | }) 19 | 20 | await this.actor.update({ 21 | [`${path}.${target}`]: value 22 | }) 23 | } 24 | 25 | export const toggleItems = async function (html) { 26 | html.find('.toggle-item').click(async event => { 27 | event.preventDefault() 28 | const $target = $(event.currentTarget) 29 | const path = $target.data('path') 30 | const value = !foundry.utils.getProperty(this.actor, path) 31 | 32 | await this.actor.update({ 33 | [path]: value 34 | }) 35 | }) 36 | } 37 | 38 | export const removeDataPoint = async function (data, path, target, key) { 39 | const currentData = data || {} 40 | 41 | const newData = objectReindexFilter(currentData, (_, currentKey) => parseInt(currentKey, 10) !== parseInt(key, 10)) 42 | 43 | await resetDataPoint.call(this, path, target, newData) 44 | } 45 | 46 | export const removeItems = async function (html) { 47 | html.find('.remove-item').click(async event => { 48 | event.preventDefault() 49 | const { 50 | path, 51 | itemKey, 52 | itemName, 53 | target 54 | } = event.currentTarget.dataset 55 | 56 | let confirmed 57 | 58 | await Dialog.confirm({ 59 | title: localizer('AreYouSure'), 60 | content: `${localizer('Remove')} ${itemName}?`, 61 | yes: () => { confirmed = true }, 62 | no: () => { confirmed = false }, 63 | defaultYes: false 64 | }) 65 | 66 | if (confirmed) { 67 | const data = foundry.utils.getProperty(this.actor, `${path}.${target}`) 68 | 69 | await removeDataPoint.call(this, data, path, target, itemKey) 70 | } 71 | }) 72 | } 73 | -------------------------------------------------------------------------------- /module/settings/ImportExportSettings.js: -------------------------------------------------------------------------------- 1 | import defaultActorTypes from "../actor/defaultActorTypes.js" 2 | import { localizer, setCssVars } from "../scripts/foundryHelpers.js" 3 | 4 | export default class ImportExportSettings extends FormApplication { 5 | constructor() { 6 | super() 7 | } 8 | 9 | static get defaultOptions() { 10 | return foundry.utils.mergeObject(super.defaultOptions, { 11 | id: 'import-export-settings', 12 | template: 'systems/cortexprime/templates/import-export-settings.html', 13 | title: localizer('ImportExportSettings'), 14 | classes: ['cortexprime', 'import-export-settings'], 15 | width: 'auto', 16 | height: 'auto', 17 | top: 200, 18 | left: 400, 19 | resizable: true, 20 | closeOnSubmit: false, 21 | submitOnClose: true, 22 | submitOnChange: true 23 | }) 24 | } 25 | 26 | getData() { 27 | return game.settings.get('cortexprime', 'importedSettings') 28 | } 29 | 30 | async _updateObject(event, formData) { 31 | } 32 | 33 | activateListeners(html) { 34 | super.activateListeners(html) 35 | html.find('.export-settings').click(this._exportSettings.bind(this)) 36 | html.find('.import-settings').change(this._importSettings.bind(this)) 37 | html.find('.reset-settings').click(this._resetSettings.bind(this)) 38 | } 39 | 40 | async _exportSettings(event) { 41 | event.preventDefault() 42 | 43 | const { current, custom } = await game.settings.get('cortexprime', 'themes') 44 | 45 | const settings = { 46 | actorTypes: game.settings.get('cortexprime', 'actorTypes'), 47 | cortexPrimeVersion: game.system.version, 48 | theme: { current, custom } 49 | } 50 | 51 | await saveDataToFile(JSON.stringify(settings), 'json', 'my-cortex-prime-settings.json') 52 | } 53 | 54 | async _importSettings(event) { 55 | event.preventDefault() 56 | const file = $(event.currentTarget).prop('files')[0] 57 | 58 | if (file) { 59 | const fileReader = new FileReader() 60 | 61 | fileReader.onload = async () => { 62 | let data 63 | let warning 64 | 65 | try { 66 | data = JSON.parse(fileReader.result) 67 | } catch (error) { 68 | console.error(error) 69 | ui.notifications.error(localizer('CantReadImportFile')) 70 | return 71 | } 72 | 73 | if (!data?.cortexPrimeVersion && !data?.actorTypes) { 74 | ui.notifications.error(localizer('CantReadImportFile')) 75 | return 76 | } 77 | 78 | if (game.system.version !== data?.cortexPrimeVersion) { 79 | warning = localizer('ImportVersionWarning') 80 | } 81 | 82 | let confirmed 83 | 84 | await Dialog.confirm({ 85 | title: localizer('AreYouSure'), 86 | content: `
${warning ? '

' + warning + '

' : ''}

${localizer('ConfirmImportMessage')}

`, 87 | yes: () => { confirmed = true }, 88 | no: () => { confirmed = false }, 89 | defaultYes: false 90 | }) 91 | 92 | if (confirmed) { 93 | await game.settings.set('cortexprime', 'importedSettings', { currentSetting: file.name }) 94 | await game.settings.set('cortexprime', 'actorTypes', data.actorTypes) 95 | 96 | const themeSettings = await game.settings.get('cortexprime', 'themes') 97 | 98 | const { current, custom } = data.theme ?? {} 99 | 100 | themeSettings.current = current ?? 'Default' 101 | themeSettings.custom = custom ?? themeSettings.custom 102 | 103 | await game.settings.set('cortexprime', 'themes', themeSettings) 104 | 105 | const theme = themeSettings.current === 'custom' ? themeSettings.custom : themeSettings.list[themeSettings.current] 106 | 107 | setCssVars(theme) 108 | 109 | ui.notifications.info(localizer('ImportSuccessMessage')) 110 | 111 | this.render(true) 112 | } 113 | } 114 | 115 | fileReader.readAsText(file) 116 | } 117 | } 118 | 119 | async _resetSettings (event) { 120 | event.preventDefault() 121 | 122 | let confirmed 123 | 124 | await Dialog.confirm({ 125 | title: localizer('AreYouSure'), 126 | content: localizer('ConfirmResetSettingsMessage'), 127 | yes: () => { confirmed = true }, 128 | no: () => { confirmed = false }, 129 | defaultYes: false 130 | }) 131 | 132 | if (confirmed) { 133 | await game.settings.set('cortexprime', 'importedSettings', { currentSetting: localizer('Default') }) 134 | await game.settings.set('cortexprime', 'actorTypes', defaultActorTypes) 135 | ui.notifications.info(localizer('ResetSuccessMessage')) 136 | 137 | this.render(true) 138 | } 139 | } 140 | } -------------------------------------------------------------------------------- /module/settings/ThemeSettings.js: -------------------------------------------------------------------------------- 1 | import { localizer, setCssVars } from '../scripts/foundryHelpers.js' 2 | import defaultThemes from '../theme/defaultThemes.js' 3 | 4 | export default class ThemeSettings extends FormApplication { 5 | constructor() { 6 | super() 7 | } 8 | 9 | static get defaultOptions () { 10 | return foundry.utils.mergeObject(super.defaultOptions, { 11 | id: 'theme-settings', 12 | template: 'systems/cortexprime/templates/theme/settings.html', 13 | title: localizer('ThemeSettings'), 14 | classes: ['cortexprime', 'theme-settings'], 15 | width: 960, 16 | height: 900, 17 | top: 200, 18 | left: 400, 19 | resizable: true, 20 | closeOnSubmit: false, 21 | submitOnClose: true, 22 | submitOnChange: true 23 | }) 24 | } 25 | 26 | getData() { 27 | const themes = game.settings.get('cortexprime', 'themes') 28 | 29 | return { 30 | themes, 31 | defaultVersion: defaultThemes.version 32 | } 33 | } 34 | 35 | async _updateObject(event, formData) { 36 | const expandedFormData = foundry.utils.expandObject(formData) 37 | const currentThemes = game.settings.get('cortexprime', 'themes') ?? {} 38 | 39 | expandedFormData.themes.currentSettings = currentThemes.current !== expandedFormData.themes.current 40 | ? expandedFormData.themes.current === 'custom' 41 | ? currentThemes.custom 42 | : currentThemes.list[expandedFormData.themes.current] 43 | : expandedFormData.themes.currentSettings 44 | 45 | await game.settings.set('cortexprime', 'themes', foundry.utils.mergeObject(currentThemes, expandedFormData.themes)) 46 | 47 | const themes = game.settings.get('cortexprime', 'themes') 48 | const theme = themes.current === 'custom' ? themes.custom : themes.list[themes.current] 49 | 50 | setCssVars(theme) 51 | 52 | this.render(true) 53 | } 54 | 55 | activateListeners(html) { 56 | super.activateListeners(html) 57 | html.find('.image-picker').click(this._changeImage.bind(this)) 58 | html.find('.image-remove').click(this._removeImage.bind(this)) 59 | html.find('.refresh-preset').click(this._refreshPreset.bind(this)) 60 | html.find('.save-as-custom-preset').click(this._saveAsCustomPreset.bind(this)) 61 | html.find('.update-presets').click(this._updatePresets.bind(this)) 62 | } 63 | 64 | async _changeImage (event) { 65 | event.preventDefault() 66 | const { targetSetting } = event.currentTarget.dataset 67 | const source = game.settings.get('cortexprime', 'themes') 68 | const currentImage = source?.currentSettings?.[targetSetting] || null 69 | const _this = this 70 | 71 | const imagePicker = await new FilePicker({ 72 | type: 'image', 73 | current: currentImage, 74 | async callback (newImage) { 75 | source.currentSettings[targetSetting] = newImage 76 | 77 | await game.settings.set('cortexprime', 'themes', source) 78 | 79 | _this.render() 80 | } 81 | }) 82 | 83 | await imagePicker.render() 84 | } 85 | 86 | async _removeImage (event) { 87 | event.preventDefault() 88 | const { targetSetting } = event.currentTarget.dataset 89 | const source = game.settings.get('cortexprime', 'themes') 90 | source.currentSettings[targetSetting] = null 91 | 92 | await game.settings.set('cortexprime', 'themes', source) 93 | 94 | this.render() 95 | } 96 | 97 | async _refreshPreset (event) { 98 | event.preventDefault() 99 | const source = game.settings.get('cortexprime', 'themes') 100 | source.currentSettings = source.current === 'custom' 101 | ? source.custom 102 | : source.list[source.current] 103 | 104 | await game.settings.set('cortexprime', 'themes', source) 105 | 106 | const themes = game.settings.get('cortexprime', 'themes') 107 | const theme = themes.current === 'custom' ? themes.custom : themes.list[themes.current] 108 | 109 | setCssVars(theme) 110 | 111 | this.render() 112 | } 113 | 114 | async _saveAsCustomPreset (event) { 115 | event.preventDefault() 116 | const source = game.settings.get('cortexprime', 'themes') 117 | source.current = 'custom' 118 | source.custom = source.currentSettings 119 | 120 | await game.settings.set('cortexprime', 'themes', source) 121 | 122 | const themes = game.settings.get('cortexprime', 'themes') 123 | const theme = themes.current === 'custom' ? themes.custom : themes.list[themes.current] 124 | 125 | setCssVars(theme) 126 | 127 | this.render() 128 | } 129 | 130 | async _updatePresets (event) { 131 | event.preventDefault() 132 | const source = game.settings.get('cortexprime', 'themes') 133 | 134 | source.current = source.current !== 'custom' 135 | ? source[source.current] || defaultThemes.current 136 | : 'custom' 137 | source.list = defaultThemes.list 138 | source.version = defaultThemes.version 139 | source.currentSettings = source.current === 'custom' 140 | ? source.custom 141 | : source.list[source.current] 142 | 143 | await game.settings.set('cortexprime', 'themes', source) 144 | 145 | const themes = game.settings.get('cortexprime', 'themes') 146 | const theme = themes.current === 'custom' ? themes.custom : themes.list[themes.current] 147 | 148 | setCssVars(theme) 149 | 150 | this.render() 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /module/settings/settings.js: -------------------------------------------------------------------------------- 1 | import ActorSettings from './ActorSettings.js' 2 | import ImportExportSettings from './ImportExportSettings.js' 3 | import defaultActorTypes from '../actor/defaultActorTypes.js' 4 | import defaultThemes from '../theme/defaultThemes.js' 5 | import ThemeSettings from './ThemeSettings.js' 6 | 7 | import { localizer } from '../scripts/foundryHelpers.js' 8 | 9 | export const registerSettings = () => { 10 | game.settings.registerMenu('cortexprime', 'ActorSettings', { 11 | hint: localizer('ActorSettingsH'), 12 | icon: 'fa-solid fa-user-cog', 13 | label: localizer('ActorSettings'), 14 | name: localizer('ActorSettings'), 15 | restricted: true, 16 | type: ActorSettings 17 | }) 18 | 19 | game.settings.register('cortexprime', 'actorTypes', { 20 | name: localizer('ActorTypes'), 21 | default: defaultActorTypes, 22 | scope: 'world', 23 | type: Object, 24 | config: false, 25 | }) 26 | 27 | game.settings.register('cortexprime', 'actorBreadcrumbs', { 28 | name: localizer('ActorBreadcrumbs'), 29 | default: { 0: { active: true, name: 'ActorTypes', localize: true, target: 'actorTypes' } }, 30 | scope: 'world', 31 | type: Object, 32 | config: false, 33 | }) 34 | 35 | game.settings.registerMenu("cortexprime", "ImportExportSettings", { 36 | name: localizer('ImportExportSettings'), 37 | hint: localizer('ImportExportSettingsHint'), 38 | icon: 'fa-solid fa-file-import', 39 | label: localizer('ImportExportSettings'), 40 | restricted: true, 41 | type: ImportExportSettings 42 | }) 43 | 44 | game.settings.register('cortexprime', 'rollResultSourceCollapsed', { 45 | name: localizer('RollResultSourceCollapsed'), 46 | hint: localizer('RollResultSourceCollapsedHint'), 47 | label: localizer('RollResultSourceCollapsed'), 48 | default: false, 49 | type: Boolean, 50 | config: true 51 | }) 52 | 53 | game.settings.register('cortexprime', 'importedSettings', { 54 | name: localizer('ImportedSettings'), 55 | default: { currentSetting: localizer('Default') }, 56 | scope: 'world', 57 | type: Object, 58 | config: false, 59 | }) 60 | 61 | game.settings.register("cortexprime", "WelcomeSeen", { 62 | name: localizer('WelcomeSeen'), 63 | hint: localizer('WelcomSeenHint'), 64 | scope: "world", 65 | config: false, 66 | type: Boolean, 67 | default: false 68 | }) 69 | 70 | game.settings.registerMenu('cortexprime', 'ThemeSettings', { 71 | hint: localizer('ThemeSettingsH'), 72 | icon: 'fa-solid fa-user-cog', 73 | label: localizer('ThemeSettings'), 74 | name: localizer('ThemeSettings'), 75 | restricted: true, 76 | type: ThemeSettings 77 | }) 78 | 79 | game.settings.register('cortexprime', 'themes', { 80 | name: localizer('Themes'), 81 | default: defaultThemes, 82 | scope: 'world', 83 | type: Object, 84 | config: false, 85 | }) 86 | } 87 | -------------------------------------------------------------------------------- /module/theme/defaultThemes.js: -------------------------------------------------------------------------------- 1 | const defaultSettings = { 2 | bodyFontColor: '#000000', 3 | bodyFontSize: 15, 4 | bodyFontWeight: '400', 5 | buttonPrimaryColor: '#2d5931', 6 | buttonPrimaryFontColor: '#ffffff', 7 | buttonSecondaryColor: '#b30044', 8 | buttonSecondaryFontColor: '#ffffff', 9 | buttonStyle: 'rounded', 10 | chosenFill: '#ffffff', 11 | chosenStroke: '#b30044', 12 | chosenNumber: '#1f2834', 13 | descriptorLabelFontColor: '#000000', 14 | descriptorLabelFontSize: 14, 15 | descriptorLabelFontStyle: 'italic', 16 | descriptorLabelFontWeight: '700', 17 | descriptorLabelTextTransform: 'none', 18 | dieRatingFill: '#b30044', 19 | dieRatingStroke: '#b30044', 20 | dieRatingNumber: '#ffffff', 21 | effectFill: '#2d5931', 22 | effectStroke: '#2d5931', 23 | effectNumber: '#ffffff', 24 | hitchFill: '#141c27', 25 | hitchStroke: '#b30044', 26 | hitchNumber: '#ffffff', 27 | inputBackgroundColor: '#c9e2d1', 28 | inputBorderColor: '#2d5931', 29 | inputBorderPosition: 'b', 30 | inputBorderStyle: 'solid', 31 | inputBorderWidth: '2', 32 | inputCheckboxColor: '#2d5931', 33 | inputFocusColor: '#b30044', 34 | inputColor: '#000000', 35 | inputLabelColor: '#424c59', 36 | inputLabelFontSize: 14, 37 | inputLabelFontStyle: 'normal', 38 | inputLabelFontWeight: '700', 39 | inputLabelTextTransform: 'capitalize', 40 | plotPointFill: '#c9e2d1', 41 | plotPointStroke: '#c9e2d1', 42 | plotPointText: '#141c27', 43 | sectionAlternateBackgroundColor: '#ccd7df', 44 | sectionBackgroundColor: '#f5f8fa', 45 | sectionBackgroundColorOpacity: '1', 46 | sectionBackgroundImage: null, 47 | sectionBackgroundImageOpacity: '0', 48 | sectionBackgroundPosition: 'center', 49 | sectionBackgroundRepeat: 'no-repeat', 50 | sectionBackgroundSize: 'cover', 51 | sectionBorderColor: '#2d5931', 52 | sectionBorderPosition: 'a', 53 | sectionBorderStyle: 'solid', 54 | sectionBorderWidth: '2', 55 | sectionPrimaryTitleFontColor: '#b30044', 56 | sectionPrimaryTitleFontSize: 19, 57 | sectionPrimaryTitleFontStyle: 'normal', 58 | sectionPrimaryTitleFontWeight: '700', 59 | sectionPrimaryTitleTextTransform: 'uppercase', 60 | sectionSecondaryTitleFontColor: '#2d5931', 61 | sectionSecondaryTitleFontSize: 17, 62 | sectionSecondaryTitleFontStyle: 'normal', 63 | sectionSecondaryTitleFontWeight: '700', 64 | sectionSecondaryTitleTextTransform: 'uppercase', 65 | selectedFill: '#c9e2d1', 66 | selectedStroke: '#b30044', 67 | selectedNumber: '#141c27', 68 | separatorColor: '#b30044', 69 | separatorStyle: 'solid', 70 | separatorWeight: '2', 71 | sfxBulletColor: '#b30044', 72 | sfxLabelFontColor: '#2d5931', 73 | sfxLabelFontSize: 15, 74 | sfxLabelFontStyle: 'italic', 75 | sfxLabelFontWeight: '700', 76 | sfxLabelTextTransform: 'capitalize', 77 | sheetBackgroundColor: '#dedede', 78 | sheetBackgroundImage: null, 79 | sheetBackgroundImageOpacity: '0.5', 80 | sheetBackgroundPosition: 'center', 81 | sheetBackgroundRepeat: 'no-repeat', 82 | sheetBackgroundSize: 'cover', 83 | subTraitLabelFontColor: '#2d5931', 84 | subTraitLabelFontSize: 14, 85 | subTraitLabelFontStyle: 'normal', 86 | subTraitLabelFontWeight: '700', 87 | subTraitLabelTextTransform: 'uppercase', 88 | tabStyle: 'rounded', 89 | traitSubTitleFontColor: '#b30044', 90 | traitSubTitleFontSize: 15, 91 | traitSubTitleFontStyle: 'italic', 92 | traitSubTitleFontWeight: '700', 93 | traitSubTitleTextTransform: 'none', 94 | traitTitleFontColor: '#424c59', 95 | traitTitleFontSize: 16, 96 | traitTitleFontStyle: 'normal', 97 | traitTitleFontWeight: '700', 98 | traitTitleTextTransform: 'uppercase', 99 | unchosenFill: '#dedede', 100 | unchosenStroke: '#424c59', 101 | unchosenNumber: '#424c59', 102 | } 103 | 104 | export default { 105 | current: 'Default', 106 | currentSettings: { 107 | ...defaultSettings 108 | }, 109 | custom: null, 110 | list: { 111 | 'Default': { 112 | ...defaultSettings 113 | }, 114 | 'Tales of Xadia': { 115 | bodyFontColor: '#fff8ef', 116 | bodyFontSize: 15, 117 | bodyFontWeight: '400', 118 | buttonPrimaryColor: '#48c0E9', 119 | buttonPrimaryFontColor: '#000000', 120 | buttonSecondaryColor: '#d2942a', 121 | buttonSecondaryFontColor: '#201b15', 122 | buttonStyle: 'rounded', 123 | chosenFill: '#005590', 124 | chosenStroke: '#b0e4f5', 125 | chosenNumber: '#fff8ef', 126 | descriptorLabelFontColor: '#016ebc', 127 | descriptorLabelFontSize: 14, 128 | descriptorLabelFontStyle: 'italic', 129 | descriptorLabelFontWeight: '700', 130 | descriptorLabelTextTransform: 'none', 131 | dieRatingFill: '#005590', 132 | dieRatingStroke: '#005590', 133 | dieRatingNumber: '#fff8ef', 134 | effectFill: '#3b873e', 135 | effectStroke: '#b0dfaf', 136 | effectNumber: '#fff8ef', 137 | hitchFill: '#000000', 138 | hitchStroke: '#48c0e9', 139 | hitchNumber: '#fff8ef', 140 | inputBackgroundColor: 'transparent', 141 | inputBorderColor: '#fff8ef', 142 | inputBorderPosition: 'a', 143 | inputBorderStyle: 'solid', 144 | inputBorderWidth: '1', 145 | inputCheckboxColor: '#d2942a', 146 | inputFocusColor: '#48c0E9', 147 | inputColor: '#fff8ef', 148 | inputLabelColor: '#bdb5ad', 149 | inputLabelFontSize: 14, 150 | inputLabelFontStyle: 'normal', 151 | inputLabelFontWeight: '700', 152 | inputLabelTextTransform: 'capitalize', 153 | plotPointFill: '#d2942a', 154 | plotPointStroke: '#d2942a', 155 | plotPointText: '#141c27', 156 | sectionAlternateBackgroundColor: '#9c6600', 157 | sectionBackgroundColor: '#453b35', 158 | sectionBackgroundColorOpacity: 0.3, 159 | sectionBackgroundImage: null, 160 | sectionBackgroundImageOpacity: 0.125, 161 | sectionBackgroundPosition: 'top', 162 | sectionBackgroundRepeat: 'no-repeat', 163 | sectionBackgroundSize: 'cover', 164 | sectionBorderColor: '#605a53', 165 | sectionBorderPosition: 'a', 166 | sectionBorderStyle: 'dashed', 167 | sectionBorderWidth: '2', 168 | sectionPrimaryTitleFontColor: '#48c0E9', 169 | sectionPrimaryTitleFontSize: 19, 170 | sectionPrimaryTitleFontStyle: 'normal', 171 | sectionPrimaryTitleFontWeight: '700', 172 | sectionPrimaryTitleTextTransform: 'capitalize', 173 | sectionSecondaryTitleFontColor: '#d2942a', 174 | sectionSecondaryTitleFontSize: 17, 175 | sectionSecondaryTitleFontStyle: 'normal', 176 | sectionSecondaryTitleFontWeight: '700', 177 | sectionSecondaryTitleTextTransform: 'uppercase', 178 | selectedFill: '#d2942a', 179 | selectedStroke: '#ffb433', 180 | selectedNumber: '#fff8ef', 181 | separatorColor: '#d2942a', 182 | separatorStyle: 'solid', 183 | separatorWeight: '2', 184 | sfxBulletColor: '#d2942a', 185 | sfxLabelFontColor: '#016ebc', 186 | sfxLabelFontSize: 15, 187 | sfxLabelFontStyle: 'italic', 188 | sfxLabelFontWeight: '700', 189 | sfxLabelTextTransform: 'uppercase', 190 | sheetBackgroundColor: '#201b15', 191 | sheetBackgroundImage: null, 192 | sheetBackgroundImageOpacity: 0.5, 193 | sheetBackgroundPosition: 'center', 194 | sheetBackgroundRepeat: 'no-repeat', 195 | sheetBackgroundSize: 'cover', 196 | subTraitLabelFontColor: '#48c0E9', 197 | subTraitLabelFontSize: 14, 198 | subTraitLabelFontStyle: 'normal', 199 | subTraitLabelFontWeight: '700', 200 | subTraitLabelTextTransform: 'uppercase', 201 | tabBorderColor: '#b30000', 202 | tabStyle: 'rounded', 203 | traitSubTitleFontColor: '#bdb5ad', 204 | traitSubTitleFontSize: 15, 205 | traitSubTitleFontStyle: 'italic', 206 | traitSubTitleFontWeight: '700', 207 | traitSubTitleTextTransform: 'none', 208 | traitTitleFontColor: '#d2942a', 209 | traitTitleFontSize: 16, 210 | traitTitleFontStyle: 'normal', 211 | traitTitleFontWeight: '700', 212 | traitTitleTextTransform: 'uppercase', 213 | unchosenFill: '#fff8ef', 214 | unchosenStroke: '#000000', 215 | unchosenNumber: '#000000', 216 | } 217 | }, 218 | version: 2, 219 | } 220 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cortexprime", 3 | "version": "0.2.16", 4 | "description": "CSS compiler for the Cortex Prime system", 5 | "scripts": { 6 | "build": "gulp", 7 | "compile": "gulp css", 8 | "watch": "gulp", 9 | "gulp": "gulp" 10 | }, 11 | "browserslist": [ 12 | "last 3 versions" 13 | ], 14 | "author": "Mark Dekin", 15 | "license": "MIT", 16 | "private": true, 17 | "dependencies": { 18 | "gulp": "^4.0.2", 19 | "gulp-autoprefixer": "^8.0.0", 20 | "gulp-sass": "^5.0.0", 21 | "gulp-sourcemaps": "^3.0.0", 22 | "sass": "^1.45.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /scss/components/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | &:hover { 3 | text-decoration: underline; 4 | cursor: pointer; 5 | } 6 | 7 | &.active { 8 | font-weight: bold; 9 | 10 | &:hover { 11 | text-decoration: none; 12 | cursor: default; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /scss/components/_dice.scss: -------------------------------------------------------------------------------- 1 | .dice-container { 2 | position: relative; 3 | z-index: 1; 4 | 5 | .die-container { 6 | height: 32px; 7 | width: 32px; 8 | position: absolute; 9 | z-index: -1; 10 | } 11 | } 12 | 13 | .die-select { 14 | border: none !important; 15 | background-color: transparent !important; 16 | background-repeat: no-repeat; 17 | background-size: contain; 18 | background-position: center; 19 | color: transparent; 20 | cursor: pointer; 21 | height: toRem(32px); 22 | position: relative; 23 | text-align: center; 24 | text-align-last: center; 25 | width: toRem(32px); 26 | -moz-text-align-last: center; 27 | -webkit-appearance: none; 28 | -moz-appearance: none; 29 | ::-ms-expand { 30 | display: none; 31 | } 32 | z-index: 1; 33 | 34 | &:focus { 35 | box-shadow: none; 36 | } 37 | 38 | option { 39 | color: black; 40 | font-weight: 600; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /scss/components/_forms.scss: -------------------------------------------------------------------------------- 1 | input, select, textarea { 2 | border: 0; 3 | border-radius: 0; 4 | } 5 | 6 | input, textarea { 7 | font-family: $font-primary; 8 | font-size: toRem(14px); 9 | } 10 | 11 | input { 12 | vertical-align: middle; 13 | } 14 | 15 | .notes-field { 16 | font-size: toRem(16px); 17 | height: toRem(350px); 18 | } 19 | -------------------------------------------------------------------------------- /scss/components/_tabs.scss: -------------------------------------------------------------------------------- 1 | nav.sheet-tabs { 2 | height: auto; 3 | margin: 0 toRem(-4px) toRem(8px); 4 | border: 0; 5 | padding: 0; 6 | justify-content: start; 7 | } 8 | -------------------------------------------------------------------------------- /scss/cortexprime.scss: -------------------------------------------------------------------------------- 1 | // Import utilities. 2 | @import 'utils/functions'; 3 | @import 'utils/typography'; 4 | @import 'utils/spacing'; 5 | 6 | 7 | /* Global styles */ 8 | 9 | 10 | /* Styles limited to cortexprime sheets */ 11 | .cortexprime { 12 | @import 'global/reset'; 13 | @import 'global/text'; 14 | @import 'global/borders'; 15 | @import 'global/layout'; 16 | @import 'global/spacing'; 17 | @import 'global/misc'; 18 | @import 'global/buttons'; 19 | @import 'global/icons'; 20 | @import 'components/forms'; 21 | @import 'components/tabs'; 22 | @import 'components/breadcrumbs'; 23 | } 24 | 25 | @import 'components/dice'; 26 | @import 'global/theme'; 27 | 28 | -------------------------------------------------------------------------------- /scss/global/_borders.scss: -------------------------------------------------------------------------------- 1 | .ba-2-primary { 2 | border: 2px solid #B30044; 3 | } 4 | -------------------------------------------------------------------------------- /scss/global/_buttons.scss: -------------------------------------------------------------------------------- 1 | .btn { 2 | background-color: transparent; 3 | border: none; 4 | border-radius: 5px; 5 | cursor: pointer; 6 | font-weight: bold; 7 | font-size: toRem(14px); 8 | line-height: normal; 9 | min-height: auto; 10 | padding: toRem(4px) toRem(8px); 11 | text-transform: uppercase; 12 | white-space: nowrap; 13 | width: auto; 14 | 15 | &:disabled { 16 | opacity: 0.5; 17 | color: #ffffff; 18 | cursor: not-allowed; 19 | } 20 | 21 | &.btn-small { 22 | font-size: toRem(10px); 23 | height: toRem(16px); 24 | padding: toRem(2px); 25 | width: toRem(16px); 26 | } 27 | } 28 | 29 | .btn-icon { 30 | border-radius: 50%; 31 | font-size: toRem(14px); 32 | height: toRem(24px); 33 | line-height: normal; 34 | padding: toRem(4px); 35 | text-align: center; 36 | width: toRem(24px); 37 | 38 | i.fa { 39 | margin-right: 0; 40 | } 41 | } 42 | 43 | .add-trait-to-pool { 44 | cursor: pointer; 45 | } 46 | -------------------------------------------------------------------------------- /scss/global/_icons.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | background-position: center; 3 | background-repeat: no-repeat; 4 | background-size: contain; 5 | display: inline-block; 6 | height: 1.25rem; 7 | margin-left: toRem(2px); 8 | margin-right: toRem(2px); 9 | position: relative; 10 | width: 1.25rem; 11 | 12 | &.pp { 13 | background-image: url("../assets/plot-point/plot-point.png"); 14 | vertical-align: bottom; 15 | } 16 | } -------------------------------------------------------------------------------- /scss/global/_layout.scss: -------------------------------------------------------------------------------- 1 | .d-block { 2 | display: block; 3 | } 4 | 5 | @for $i from 1 through 4 { 6 | .columns-#{$i} { 7 | column-count: 2; 8 | column-gap: 0; 9 | } 10 | } 11 | 12 | @for $i from 0 through 12 { 13 | .column-gap-#{$i} { 14 | column-gap: $i * $spacing-sm; 15 | } 16 | } 17 | 18 | .column-item { 19 | -webkit-column-break-inside: avoid; 20 | page-break-inside: avoid; 21 | break-inside: avoid; 22 | } 23 | 24 | .flex, .flex-row { 25 | display: flex; 26 | } 27 | 28 | .flex-wrap { 29 | flex-wrap: wrap; 30 | } 31 | 32 | .flex-row { 33 | margin-left: ($side-gutters - calc($horizontal-gutters / 2)) * -1; 34 | margin-right: ($side-gutters - calc($horizontal-gutters / 2)) * -1; 35 | } 36 | 37 | .flex-col { 38 | flex-basis: auto; 39 | flex-grow: 0; 40 | max-width: 100%; 41 | padding-left: calc($horizontal-gutters / 2); 42 | padding-right: calc($horizontal-gutters / 2); 43 | width: auto; 44 | } 45 | 46 | @for $i from 1 through 12 { 47 | .col-#{$i} { 48 | max-width: percentage(calc($i / 12)); 49 | width: 100%; 50 | } 51 | } 52 | 53 | .flex-as { 54 | align-items: flex-start; 55 | } 56 | 57 | .flex-ac { 58 | align-items: center; 59 | } 60 | 61 | .flex-ae { 62 | align-items: flex-end; 63 | } 64 | 65 | .flex-ab { 66 | align-items: baseline; 67 | } 68 | 69 | .flex-as-self { 70 | align-self: flex-start; 71 | } 72 | 73 | .flex-ac-self { 74 | align-self: center; 75 | } 76 | 77 | .flex-ae-self { 78 | align-self: flex-end; 79 | } 80 | 81 | .flex-ab-self { 82 | align-self: baseline; 83 | } 84 | 85 | .flex-js { 86 | justify-content: flex-start; 87 | } 88 | 89 | .flex-jc { 90 | justify-content: center; 91 | } 92 | 93 | .flex-je { 94 | justify-content: flex-end; 95 | } 96 | 97 | .flex-jsa { 98 | justify-content: space-around; 99 | } 100 | 101 | .flex-jsb { 102 | justify-content: space-between; 103 | } 104 | 105 | .flex-jse { 106 | justify-content: space-evenly; 107 | } 108 | 109 | .flex-c { 110 | align-items: center; 111 | justify-content: center; 112 | text-align: center; 113 | } 114 | 115 | .flex-g-1 { 116 | flex-grow: 1; 117 | } 118 | 119 | .flex-g-2 { 120 | flex-grow: 2; 121 | } 122 | 123 | .flex-s-1 { 124 | flex-shrink: 1; 125 | } 126 | 127 | .flex-s-2 { 128 | flex-shrink: 2; 129 | } 130 | -------------------------------------------------------------------------------- /scss/global/_misc.scss: -------------------------------------------------------------------------------- 1 | .actor-selection { 2 | height: 100%; 3 | } 4 | 5 | .cursor-pointer { 6 | cursor: pointer; 7 | } 8 | 9 | .default-image, .profile-image { 10 | cursor: pointer; 11 | width: 100%; 12 | } 13 | 14 | .hide { 15 | display: none; 16 | } 17 | 18 | .shutdown { 19 | opacity: 0.5; 20 | 21 | .shutdown { 22 | opacity: 1; 23 | } 24 | } 25 | 26 | .list-style-none { 27 | list-style: none; 28 | } 29 | 30 | .add-to-pool { 31 | cursor: pointer; 32 | 33 | &::before { 34 | font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; 35 | content: "\f522"; 36 | } 37 | } 38 | 39 | #controls { 40 | ol.cortexprime-controls { 41 | padding-left: 20px; 42 | } 43 | } 44 | 45 | input[type="text"].color { 46 | max-width: toRem(100px); 47 | } 48 | 49 | input[type="color"][data-edit][data-edit] { 50 | border: none; 51 | cursor: pointer; 52 | margin-left: 0; 53 | max-width: toRem(26px); 54 | } 55 | -------------------------------------------------------------------------------- /scss/global/_reset.scss: -------------------------------------------------------------------------------- 1 | .window-app { 2 | font-family: $font-primary; 3 | 4 | .window-content { 5 | background: #ffffff; 6 | } 7 | } 8 | 9 | &.window-app { 10 | .window-content { 11 | background: none; 12 | padding: 0; 13 | } 14 | 15 | .window-resizable-handle { 16 | z-index: 10; 17 | } 18 | } 19 | 20 | .dice-picker, .consumable-dice { 21 | &.window-app { 22 | .window-content { 23 | background: none; 24 | padding: 0; 25 | } 26 | } 27 | } 28 | 29 | h1, h2, h3, h4, h5, h6 { 30 | border: 0; 31 | margin: 0; 32 | font-family: "Roboto", sans-serif; 33 | } 34 | 35 | p { 36 | margin: 0; 37 | } 38 | 39 | a[href] { 40 | color: inherit; 41 | } 42 | -------------------------------------------------------------------------------- /scss/global/_spacing.scss: -------------------------------------------------------------------------------- 1 | $options: ( 2 | 'ma': ('margin-bottom', 'margin-left', 'margin-right', 'margin-top'), 3 | 'pa': ('padding-bottom', 'padding-left', 'padding-right', 'padding-top'), 4 | 'mb': ('margin-bottom'), 5 | 'pb': ('padding-bottom'), 6 | 'ml': ('margin-left'), 7 | 'pl': ('padding-left'), 8 | 'mr': ('margin-right'), 9 | 'pr': ('padding-right'), 10 | 'mt': ('margin-top'), 11 | 'pt': ('padding-top'), 12 | 'mx': ('margin-left', 'margin-right'), 13 | 'px': ('padding-left', 'padding-right'), 14 | 'my': ('margin-bottom', 'margin-top'), 15 | 'py': ('padding-bottom', 'padding-top') 16 | ); 17 | 18 | @each $opt, $props in $options { 19 | @for $i from 0 through 12 { 20 | .#{$opt}-#{$i} { 21 | @each $prop in $props { 22 | #{$prop}: $i * $spacing-sm; 23 | } 24 | } 25 | } 26 | } 27 | 28 | .my-auto { 29 | margin-left: auto; 30 | margin-right: auto; 31 | } 32 | 33 | .max-50 { 34 | max-width: 50%; 35 | } 36 | 37 | .white-space-nowrap { 38 | white-space: nowrap; 39 | } 40 | -------------------------------------------------------------------------------- /scss/global/_text.scss: -------------------------------------------------------------------------------- 1 | .truncate { 2 | width: toRem(340px); 3 | overflow: hidden; 4 | text-overflow: ellipsis; 5 | text-align: center; 6 | white-space: nowrap; 7 | } 8 | 9 | .text-center { 10 | text-align: center; 11 | } 12 | -------------------------------------------------------------------------------- /scss/utils/_functions.scss: -------------------------------------------------------------------------------- 1 | @function toRem($size) { 2 | @return calc($size / 16px) * 1rem; 3 | } 4 | -------------------------------------------------------------------------------- /scss/utils/_spacing.scss: -------------------------------------------------------------------------------- 1 | $spacing-sm: toRem(4px); 2 | 3 | $horizontal-gutters: toRem(16px); 4 | $side-gutters: toRem(16px); 5 | -------------------------------------------------------------------------------- /scss/utils/_typography.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap'); 2 | 3 | $font-primary: 'Roboto', sans-serif; 4 | $font-secondary: 'Roboto', sans-serif; 5 | -------------------------------------------------------------------------------- /system.json: -------------------------------------------------------------------------------- 1 | { 2 | "authors": [ 3 | { 4 | "discord": "Necrophage#6900", 5 | "email": "mark.dekin@gmail.com", 6 | "name": "Mark Dekin" 7 | } 8 | ], 9 | "compatibility": { 10 | "minimum": 13, 11 | "verified": "13.342" 12 | }, 13 | "description": "Cortex Prime System WARNING: This is currently in Beta. Which means there is a risk of breaking changes with every update. More features are being planned and worked on. It is currently playable, however, expect bugs and you may need to use the features that currently exist in different ways to make up for a feature that is not yet released.", 14 | "download": "https://github.com/Secular12/cortexprime/archive/refs/tags/v0.2.16.zip", 15 | "esmodules": ["cortexprime.js"], 16 | "id": "cortexprime", 17 | "grid": { 18 | "distance": 5, 19 | "units": "ft" 20 | }, 21 | "languages": [ 22 | { 23 | "lang": "en", 24 | "name": "English", 25 | "path": "lang/en.json" 26 | } 27 | ], 28 | "manifest": "https://raw.githubusercontent.com/Secular12/cortexprime/master/system.json", 29 | "packs": [], 30 | "scripts": [], 31 | "styles": ["css/cortexprime.css"], 32 | "title": "Cortex Prime", 33 | "url": "https://github.com/Secular12/cortexprime", 34 | "version": "0.2.16" 35 | } 36 | -------------------------------------------------------------------------------- /template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Actor": { 3 | "types": ["character"], 4 | "templates": { 5 | "common": { 6 | "actorType": null 7 | } 8 | }, 9 | "character": { 10 | "templates": ["common"] 11 | } 12 | }, 13 | "Item": { 14 | "types": ["asset"], 15 | "templates": { 16 | "base": { 17 | "description": "" 18 | } 19 | }, 20 | "asset": { 21 | "templates": ["base"], 22 | "quantity": 1, 23 | "weight": 0 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /templates/actor/actor-sheet.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | {{#unless data.system.actorType}} 6 |
7 |
8 |
9 |
10 |
11 | 12 | 17 | 18 |
19 |
20 |
21 | {{else}} 22 | {{#if (and (or data.system.actorType.traitSetEdit (eq data.system.actorType.traitSetEdit 0)) owner)}} 23 | {{> "systems/cortexprime/templates/partials/actor-sheet/trait-set-edit.html" 24 | data=data.system.actorType 25 | traitSet=(lookup data.system.actorType.traitSets data.system.actorType.traitSetEdit) 26 | traitSetIndex=data.system.actorType.traitSetEdit 27 | path="system.actorType.traitSets" 28 | }} 29 | {{else}} 30 |
31 | 38 |
39 |
40 |
41 |
42 | {{> "systems/cortexprime/templates/partials/actor-sheet/sidebar.html" 43 | actor=actor 44 | actorType=data.system.actorType 45 | pp=data.system.pp 46 | }} 47 |
48 | {{> "systems/cortexprime/templates/partials/actor-sheet/trait-sets.html" 49 | data=data.system.actorType 50 | traitSets=data.system.actorType.traitSets 51 | path="system.actorType.traitSets" 52 | }} 53 | {{#if (and data.system.actorType.traitSets.[0] (or data.system.actorType.hasAssets data.system.actorType.hasComplications))}} 54 |
55 | {{/if}} 56 | {{#if (or data.system.actorType.hasAssets data.system.actorType.hasComplications)}} 57 | {{> "systems/cortexprime/templates/partials/actor-sheet/temporary-traits.html" 58 | data=data.system.actorType 59 | path="system.actorType" 60 | }} 61 | {{/if}} 62 |
63 |
64 |
65 | {{#if data.system.actorType.hasNotesPage}} 66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |

{{localize 'Notes'}}

75 |
76 |
77 | 80 |
81 |
82 |
83 |
84 |
85 | {{#each data.system.actorType.notes as |note noteIndex|}} 86 |
87 |
88 |
89 |
90 |
91 |
92 | 93 | 94 |
95 |
96 | {{> "systems/cortexprime/templates/partials/remove-button.html" 97 | path='system.actorType' 98 | target='notes' 99 | itemKey=noteIndex 100 | itemName=note.label 101 | type="trash" 102 | }} 103 |
104 |
105 |
106 | {{editor 107 | note.value 108 | content=note.value 109 | target=(concat 'system.actorType.notes.' noteIndex '.value') 110 | button=true 111 | owner=owner 112 | editable=true 113 | }} 114 |
115 |
116 |
117 | {{/each}} 118 |
119 | {{/if}} 120 |
121 | {{/if}} 122 | {{/unless}} 123 |
124 |
-------------------------------------------------------------------------------- /templates/actor/settings.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{> "systems/cortexprime/templates/partials/breadcrumbs.html" breadcrumbs=breadcrumbs }} 12 |
13 | 20 |
21 |
22 | {{> "systems/cortexprime/templates/partials/settings/actor-types.html" 23 | actorTypes=actorTypes 24 | breadcrumbs=breadcrumbs 25 | }} 26 | {{#each actorTypes as |actorType actorTypeIndex|}} 27 | {{> "systems/cortexprime/templates/partials/settings/actor-type.html" 28 | actorType=actorType 29 | actorTypeIndex=actorTypeIndex 30 | breadcrumbs=../breadcrumbs 31 | }} 32 | {{#each actorType.traitSets as |traitSet traitSetIndex|}} 33 | {{> "systems/cortexprime/templates/partials/settings/trait-set.html" 34 | actorTypeIndex=actorTypeIndex 35 | breadcrumbs=../../breadcrumbs 36 | path=(concat actorTypeIndex '.traitSets') 37 | traitSet=traitSet 38 | traitSetIndex=traitSetIndex 39 | }} 40 | {{#each traitSet.traits as |trait traitIndex|}} 41 | {{> "systems/cortexprime/templates/partials/settings/trait.html" 42 | actorTypeIndex=actorTypeIndex 43 | breadcrumbs=../../../breadcrumbs 44 | path=(concat actorTypeIndex '.traitSets.' traitSetIndex '.traits') 45 | settings=traitSet.settings 46 | trait=trait 47 | traitIndex=traitIndex 48 | traitSetIndex=traitSetIndex 49 | }} 50 | {{/each}} 51 | {{/each}} 52 | {{#each actorType.simpleTraits as |simpleTrait simpleTraitIndex|}} 53 | {{> "systems/cortexprime/templates/partials/settings/simple-trait.html" 54 | actorTypeIndex=actorTypeIndex 55 | breadcrumbs=../../breadcrumbs 56 | path=(concat actorTypeIndex '.simpleTraits') 57 | simpleTrait=simpleTrait 58 | simpleTraitIndex=simpleTraitIndex 59 | }} 60 | {{/each}} 61 | {{/each}} 62 |
63 |
64 |
65 |
66 |
-------------------------------------------------------------------------------- /templates/chat/change-pp.html: -------------------------------------------------------------------------------- 1 |
2 | {{target.name}} {{localize changeType}} {{value}} {{localize 'MakingATotalOf'}} {{total}}! 3 |
-------------------------------------------------------------------------------- /templates/chat/roll-result.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{#each dicePool as |sourcePool source|}} 4 |
5 |
6 |
7 |
8 |
9 |

{{source}}

10 |
11 | 12 |
13 |
14 |
15 | {{#each sourcePool as |dice|}} 16 |
17 |
18 | {{#if dice.label}} 19 |
20 |

{{dice.label}}

21 |
22 | {{/if}} 23 |
24 |
25 | {{#each dice.value as |dieRating|}} 26 |
27 |
28 |
29 | {{/each}} 30 |
31 |
32 |
33 |
34 | {{/each}} 35 |
36 |
37 |
38 | {{/each}} 39 |
40 |
41 |
42 |
43 |
44 |
45 | {{#each rollResults.results as |rollResult|}} 46 |
47 |
48 |
d{{rollResult.faces}}
49 |
50 | {{/each}} 51 | {{#each rollResults.hitches as |rollResult|}} 52 |
53 |
54 |
d{{rollResult.faces}}
55 |
56 | {{/each}} 57 |
58 |
59 |
60 | {{#if total}} 61 |
62 |
63 |
64 |
65 |
66 |
67 |

{{localize 'Total'}}

68 |

{{total}}

69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |

{{localize 'EffectDice'}}

78 |
79 | {{#if effectDice}} 80 | {{#each effectDice as |effectDie|}} 81 |
82 |
83 |
84 | {{/each}} 85 | {{else}} 86 |
87 | {{/if}} 88 |
89 |
90 |
91 |
92 |
93 | {{/if}} 94 |
95 | 98 | 101 |
102 |
-------------------------------------------------------------------------------- /templates/dialog/consumable-dice.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |

{{localize 'SelectDiceToAdd'}}

11 |
12 | {{#each options as |option optionIndex|}} 13 |
14 | {{> (concat "systems/cortexprime/templates/partials/dice/d" option ".html") 15 | number=option 16 | type='unchosen' 17 | }} 18 |
19 | {{/each}} 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 38 |
39 |
40 |
41 |
-------------------------------------------------------------------------------- /templates/dialog/dice-picker.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{#each rollResults.results as |rollResult rollResultIndex|}} 12 |
13 |
14 | {{> (concat "systems/cortexprime/templates/partials/dice/d" rollResult.faces ".html") 15 | number=rollResult.result 16 | type='unchosen' 17 | }} 18 |
19 |
d{{rollResult.faces}}
20 |
21 | {{/each}} 22 | {{#each rollResults.hitches as |rollResult|}} 23 |
24 |
25 | {{> (concat "systems/cortexprime/templates/partials/dice/d" rollResult.faces ".html") 26 | number=1 27 | type='hitch' 28 | }} 29 |
30 |
d{{rollResult.faces}}
31 |
32 | {{/each}} 33 |
34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |

{{localize 'Total'}}

50 |
51 |
52 | 55 |
56 |
57 | 60 |
61 |
62 |

0

63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |

{{localize 'EffectDice'}}

72 |
73 |
74 | 77 |
78 |
79 | 82 |
83 |
84 |
85 |
86 | {{> (concat "systems/cortexprime/templates/partials/dice/d4.html") 87 | number=4 88 | type='effect' 89 | }} 90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
-------------------------------------------------------------------------------- /templates/dice-pool.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |

{{localize 'AddCustomDice'}}

11 |
12 |
13 |
14 | 18 |
19 | {{localize 'Dice'}} 20 | {{> "systems/cortexprime/templates/partials/dice/select.html" 21 | dice=customAdd.value 22 | edit=true 23 | selectName="customAdd" 24 | }} 25 |
26 |
27 |
28 |
29 | 32 |
33 |
34 | 38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | {{#each pool as |source sourceName|}} 46 |
47 | {{sourceName}} 48 |
49 | 52 |
53 |
54 |
55 | {{#each source as |trait traitKey|}} 56 |
57 |
58 | {{#if trait.label}} 59 |
60 |

{{trait.label}}

61 |
62 | {{/if}} 63 |
64 | {{> "systems/cortexprime/templates/partials/dice/select.html" 65 | dice=trait.value 66 | edit=true 67 | selectName=(concat 'pool.' sourceName '.' traitKey) 68 | }} 69 |
70 |
71 | 79 |
80 |
81 |
82 | {{/each}} 83 |
84 | {{else}} 85 |
86 |

{{localize 'NoTraitsInPool'}}

87 |
88 | {{/each}} 89 |
90 |
91 | {{#if (listHasMore pool 0)}} 92 |
93 |
94 |
95 |
96 |
97 | 98 |
99 |
100 | 101 |
102 |
103 | 104 |
105 |
106 | 107 |
108 |
109 |
110 | {{/if}} 111 |
112 |
113 |
114 |
115 | -------------------------------------------------------------------------------- /templates/import-export-settings.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |

Current Setting:

10 |

{{currentSetting}}

11 |
12 | 13 |
14 |
15 | 19 |
20 |
21 | 22 |
23 |
24 |
25 |
26 |
-------------------------------------------------------------------------------- /templates/partials/actor-sheet/sidebar.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 | 8 |

{{localize 'ActorType'}} {{actorType.name}}

9 | {{#if actorType.showProfileImage}} 10 | 11 | {{/if}} 12 |
{{localize 'Name'}}
13 |
14 | {{#if owner}} 15 | 16 | {{else}} 17 |

{{actor.name}}

18 | {{/if}} 19 |
20 | {{#if actorType.hasPlotPoints}} 21 | {{> "systems/cortexprime/templates/partials/pp.html" pp=pp }} 22 | {{/if}} 23 |
24 | {{#if actorType.simpleTraits}} 25 | {{> "systems/cortexprime/templates/partials/actor-sheet/simple-traits.html" 26 | data=actorType 27 | simpleTraits=actorType.simpleTraits 28 | path='system.actorType.simpleTraits' 29 | }} 30 | {{/if}} 31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /templates/partials/actor-sheet/simple-traits.html: -------------------------------------------------------------------------------- 1 |
2 | {{#each simpleTraits as |simpleTrait simpleTraitIndex|}} 3 | {{#if (or ../owner (or (not ../data.hasHidableTraits) (not simpleTrait.hidden)))}} 4 |
5 |
6 |
7 | {{#if ../owner}} 8 |
9 | 16 |
17 | {{/if}} 18 | {{#if (and ../owner ../data.hasHidableTraits)}} 19 | {{#if simpleTrait.edit}} 20 |
21 | 28 |
29 | {{else if simpleTrait.hidden}} 30 | 31 | 32 | 33 | {{/if}} 34 | {{/if}} 35 | 50 |
51 |
52 | {{#if (and ../owner (and simpleTrait.hasDescription simpleTrait.edit))}} 53 |
54 | 58 |
59 | {{else if (and simpleTrait.hasDescription simpleTrait.description)}} 60 |
61 |

{{simpleTrait.description}}

62 |
63 | {{/if}} 64 |
65 | {{> (concat "systems/cortexprime/templates/partials/value-types/" simpleTrait.settings.valueType ".html") 66 | addToPool=true 67 | fieldPath=(concat ../path '.' simpleTraitIndex '.' simpleTrait.settings.valueType) 68 | path=(concat ../path '.' simpleTraitIndex '.' simpleTrait.settings.valueType) 69 | data=simpleTrait 70 | edit=(and ../owner simpleTrait.edit) 71 | label=simpleTrait.label 72 | }} 73 |
74 |
75 |
76 | {{/if}} 77 | {{/each}} 78 |
-------------------------------------------------------------------------------- /templates/partials/actor-sheet/trait-set-edit.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{or traitSet.label "[Trait Set]"}} 13 |
14 |
15 | 19 |
20 |
21 |
22 |
23 | {{#if traitSet.hasDescription}} 24 |
25 |
26 |
27 |
28 | 32 |
33 |
34 | {{/if}} 35 |
36 | {{#if traitSet.traits.[0]}} 37 | {{> "systems/cortexprime/templates/partials/actor-sheet/traits-edit.html" 38 | data=data 39 | label=(localize 'PresetTraits') 40 | settings=traitSet.settings 41 | target='traits' 42 | traits=traitSet.traits 43 | path=(concat path '.' traitSetIndex) 44 | }} 45 | {{/if}} 46 | {{> "systems/cortexprime/templates/partials/actor-sheet/traits-edit.html" 47 | custom=true 48 | data=data 49 | label=(localize 'CustomTraits') 50 | target='customTraits' 51 | settings=traitSet.settings 52 | traits=traitSet.customTraits 53 | path=(concat path '.' traitSetIndex) 54 | }} 55 |
56 |
57 |
-------------------------------------------------------------------------------- /templates/partials/actor-sheet/trait-sets.html: -------------------------------------------------------------------------------- 1 |
2 | {{#each traitSets as |traitSet traitSetIndex|}} 3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{or traitSet.label (concat '[' (localize 'TraitSet') ']')}} 11 |
12 | {{#if ../owner}} 13 |
14 | 17 |
18 | {{/if}} 19 |
20 |
21 | {{#if (and traitSet.hasDescription traitSet.description)}} 22 |
{{traitSet.description}}
23 | {{/if}} 24 |
25 |
26 | {{#if traitSet.traits}} 27 | {{> "systems/cortexprime/templates/partials/actor-sheet/traits.html" 28 | data=../data 29 | owner=../owner 30 | path=(concat ../path '.' traitSetIndex) 31 | settings=traitSet.settings 32 | target='traits' 33 | traits=traitSet.traits 34 | traitSetShutdown=traitSet.shutdown 35 | }} 36 | {{/if}} 37 | {{#if traitSet.customTraits}} 38 | {{> "systems/cortexprime/templates/partials/actor-sheet/traits.html" 39 | custom=true 40 | data=../data 41 | owner=../owner 42 | path=(concat ../path '.' traitSetIndex) 43 | settings=traitSet.settings 44 | target='customTraits' 45 | traits=traitSet.customTraits 46 | traitSetShutdown=traitSet.shutdown 47 | }} 48 | {{/if}} 49 |
50 |
51 | {{/each}} 52 |
-------------------------------------------------------------------------------- /templates/partials/actor-sheet/traits.html: -------------------------------------------------------------------------------- 1 |
2 | {{#each traits as |trait traitIndex|}} 3 | {{#if (or ../owner (or (not ../data.hasHidableTraits) (not trait.hidden)))}} 4 |
5 |
6 |
7 | {{#if (and ../data.hasHidableTraits trait.hidden)}} 8 | 9 | 10 | 11 | {{/if}} 12 | 17 | {{ternary (and ../settings.hasLabel trait.label) trait.label trait.name}} 18 | 19 | {{#if ../settings.hasDice}} 20 | {{#if (or (not ../owner) (or ../traitSetShutdown trait.shutdown))}} 21 |
22 |
23 | {{#each trait.dice.value as |die|}} 24 | {{> (concat "systems/cortexprime/templates/partials/dice/d" die ".html") 25 | number=die 26 | type='die-rating' 27 | }} 28 | {{/each}} 29 |
30 |
31 | {{else}} 32 |
33 | {{> "systems/cortexprime/templates/partials/dice/select.html" 34 | addToPool=true 35 | consumable=../settings.consumableDice 36 | dice=trait.dice.value 37 | minDice=0 38 | label=(ternary (and ../settings.hasLabel trait.label) trait.label trait.name) 39 | selectName=(concat ../path '.' ../target '.' traitIndex '.dice') 40 | }} 41 |
42 | {{/if}} 43 | {{/if}} 44 |
45 | {{#if (and trait.name (and ../settings.hasLabel trait.label))}} 46 |
47 | {{trait.name}} 48 |
49 | {{/if}} 50 | {{#if (and ../settings.hasDescription trait.description)}} 51 |
52 |

{{trait.description}}

53 |
54 | {{/if}} 55 | {{#if (and ../settings.hasDescriptors trait.descriptors)}} 56 |
57 | {{#each trait.descriptors as |descriptor|}} 58 | {{#if (or descriptor.label descriptor.value)}} 59 |
60 |
63 |

64 | {{#if descriptor.label}} 65 | {{descriptor.label}}: 66 | {{/if}} 67 | {{{descriptor.value}}} 68 |

69 |
70 |
71 | {{/if}} 72 | {{/each}} 73 |
74 | {{/if}} 75 | {{#if (and ../settings.hasSubTraits trait.subTraits)}} 76 |
77 | {{#each trait.subTraits as |subTrait subTraitIndex|}} 78 | {{#if (or subTrait.label subTrait.dice.value)}} 79 |
80 | {{#if subTrait.label}} 81 |
82 | 85 | {{subTrait.label}} 86 | 87 |
88 | {{/if}} 89 | {{#if (and ../../settings/subTraitsHaveDice (or (not ../../owner) (or ../../traitSetShutdown trait.shutdown)))}} 90 |
91 |
92 | {{#each subTrait.dice.value as |die|}} 93 | {{> (concat "systems/cortexprime/templates/partials/dice/d" die ".html") 94 | number=die 95 | type='die-rating' 96 | }} 97 | {{/each}} 98 |
99 |
100 | {{else if ../../settings/subTraitsHaveDice}} 101 |
102 | {{> "systems/cortexprime/templates/partials/dice/select.html" 103 | addToPool=true 104 | consumable=../../settings.subTraitsDiceConsumable 105 | dice=subTrait.dice.value 106 | minDice=0 107 | label=subTrait.label 108 | selectName=(concat ../../path '.' ../../target '.' traitIndex '.subTraits.' subTraitIndex '.dice') 109 | }} 110 |
111 | {{/if}} 112 |
113 | {{/if}} 114 | {{/each}} 115 |
116 | {{/if}} 117 | {{#if (and ../settings.hasSfx trait.sfx)}} 118 |
119 | {{#each trait.sfx as |sfx|}} 120 | {{#if (or sfx.label sfx.description)}} 121 |
122 |
123 | 124 |
125 |
126 | {{#if sfx.label}} 127 | {{sfx.label}} 128 | {{/if}} 129 | {{#if sfx.description}} 130 |

{{{sfx.description}}}

131 | {{/if}} 132 |
133 |
134 | {{/if}} 135 | {{/each}} 136 |
137 | {{/if}} 138 |
139 | {{/if}} 140 | {{/each}} 141 |
-------------------------------------------------------------------------------- /templates/partials/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /templates/partials/dice/d10.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
{{number}}
7 |
-------------------------------------------------------------------------------- /templates/partials/dice/d12.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
{{number}}
7 |
-------------------------------------------------------------------------------- /templates/partials/dice/d4.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
{{number}}
7 |
-------------------------------------------------------------------------------- /templates/partials/dice/d6.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
{{number}}
7 |
-------------------------------------------------------------------------------- /templates/partials/dice/d8.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |
{{number}}
7 |
-------------------------------------------------------------------------------- /templates/partials/dice/select-options.html: -------------------------------------------------------------------------------- 1 | {{#if (and (gte 4 min) (lte 4 max))}} 2 | 3 | {{/if}} 4 | {{#if (and (gte 6 min) (lte 6 max))}} 5 | 6 | {{/if}} 7 | {{#if (and (gte 8 min) (lte 8 max))}} 8 | 9 | {{/if}} 10 | {{#if (and (gte 10 min) (lte 10 max))}} 11 | 12 | {{/if}} 13 | {{#if (and (gte 12 min) (lte 12 max))}} 14 | 15 | {{/if}} 16 | -------------------------------------------------------------------------------- /templates/partials/dice/select.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{#each dice as |dieRating index|}} 4 |
5 |
6 | {{> (concat "systems/cortexprime/templates/partials/dice/d" dieRating ".html") 7 | number=dieRating 8 | type='die-rating' 9 | }} 10 |
11 | 18 |
19 | {{/each}} 20 |
21 | {{#if (or (listHasLess dice (?? maxDice -1)) (not dice)) }} 22 | 25 | {{/if}} 26 |
27 | -------------------------------------------------------------------------------- /templates/partials/die-display.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{> (concat "systems/cortexprime/templates/partials/dice/d" dieRating ".html") 4 | number=value 5 | type='effect' 6 | }} 7 |
8 |
-------------------------------------------------------------------------------- /templates/partials/plot-point.html: -------------------------------------------------------------------------------- 1 |
2 |
PP
3 |
-------------------------------------------------------------------------------- /templates/partials/pp.html: -------------------------------------------------------------------------------- 1 |
2 |

{{localize 'PlotPoints'}}

3 |
4 | {{#if owner}} 5 | 8 | {{/if}} 9 |
10 |
11 | {{#if owner}} 12 |
13 | 14 |
15 |
16 | 19 |
20 | {{else}} 21 | {{pp.value}} 22 | {{/if}} 23 |
24 |
-------------------------------------------------------------------------------- /templates/partials/remove-button.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/partials/reorder.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 8 |
-------------------------------------------------------------------------------- /templates/partials/settings/actor-types.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/partials/settings/simple-trait.html: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /templates/partials/settings/theme/background-position.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 14 |
15 |
16 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/background-repeat.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/background-size.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/body.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'Body'}}

6 |
7 |

{{localize 'Font'}}

8 |
9 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 10 | default=themes.list.Default.bodyFontColor 11 | label=(localize 'Color') 12 | name='themes.currentSettings.bodyFontColor' 13 | value=themes.currentSettings.bodyFontColor 14 | }} 15 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 16 | label=(localize 'Size') 17 | name='themes.currentSettings.bodyFontSize' 18 | value=themes.currentSettings.bodyFontSize 19 | }} 20 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 21 | label=(localize 'Weight') 22 | name='themes.currentSettings.bodyFontWeight' 23 | value=themes.currentSettings.bodyFontWeight 24 | }} 25 |
26 |
27 |

{{localize 'Background'}}

28 |
29 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 30 | default='transparent' 31 | label=(localize 'Color') 32 | name='themes.currentSettings.sheetBackgroundColor' 33 | value=themes.currentSettings.sheetBackgroundColor 34 | }} 35 |
36 |
37 | {{> "systems/cortexprime/templates/partials/settings/theme/image.html" 38 | label=(localize 'Image') 39 | targetSetting='sheetBackgroundImage' 40 | value=themes.currentSettings.sheetBackgroundImage 41 | }} 42 |
43 |
44 | {{> "systems/cortexprime/templates/partials/settings/theme/opacity.html" 45 | label=(localize 'Opacity') 46 | name='themes.currentSettings.sheetBackgroundImageOpacity' 47 | value=themes.currentSettings.sheetBackgroundImageOpacity 48 | }} 49 | {{> "systems/cortexprime/templates/partials/settings/theme/background-position.html" 50 | label=(localize 'Position') 51 | name='themes.currentSettings.sheetBackgroundPosition' 52 | value=themes.currentSettings.sheetBackgroundPosition 53 | }} 54 | {{> "systems/cortexprime/templates/partials/settings/theme/background-repeat.html" 55 | label=(localize 'Repeat') 56 | name='themes.currentSettings.sheetBackgroundRepeat' 57 | value=themes.currentSettings.sheetBackgroundRepeat 58 | }} 59 | {{> "systems/cortexprime/templates/partials/settings/theme/background-size.html" 60 | label=(localize 'Size') 61 | name='themes.currentSettings.sheetBackgroundSize' 62 | value=themes.currentSettings.sheetBackgroundSize 63 | }} 64 |
65 |
66 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/border-position.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/border-style.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 17 |
18 |
19 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/border-width.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/button-style.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 11 |
12 |
13 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/color.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 | 7 |
8 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/dice-colors.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'DiceColors'}}

6 | {{#if description}} 7 |

{{description}}

8 | {{/if}} 9 |
10 | {{> "systems/cortexprime/templates/partials/settings/theme/die-colors.html" 11 | label=(localize 'DieRating') 12 | fillDefault=themes.list.Default.dieRatingFill 13 | fillName='themes.currentSettings.dieRatingFill' 14 | fillValue=themes.currentSettings.dieRatingFill 15 | strokeDefault=themes.list.Default.dieRatingStroke 16 | strokeName='themes.currentSettings.dieRatingStroke' 17 | strokeValue=themes.currentSettings.dieRatingStroke 18 | numberDefault=themes.list.Default.dieRatingNumber 19 | numberName='themes.currentSettings.dieRatingNumber' 20 | numberValue=themes.currentSettings.dieRatingNumber 21 | type='die-rating' 22 | }} 23 |
24 | {{> "systems/cortexprime/templates/partials/settings/theme/die-colors.html" 25 | label=(localize 'Hitch') 26 | fillDefault=themes.list.Default.hitchFill 27 | fillName='themes.currentSettings.hitchFill' 28 | fillValue=themes.currentSettings.hitchFill 29 | strokeDefault=themes.list.Default.hitchStroke 30 | strokeName='themes.currentSettings.hitchStroke' 31 | strokeValue=themes.currentSettings.hitchStroke 32 | numberDefault=themes.list.Default.hitchNumber 33 | numberName='themes.currentSettings.hitchNumber' 34 | numberValue=themes.currentSettings.hitchNumber 35 | type='hitch' 36 | }} 37 |
38 | {{> "systems/cortexprime/templates/partials/settings/theme/die-colors.html" 39 | label=(localize 'Effect') 40 | fillDefault=themes.list.Default.effectFill 41 | fillName='themes.currentSettings.effectFill' 42 | fillValue=themes.currentSettings.effectFill 43 | strokeDefault=themes.list.Default.effectStroke 44 | strokeName='themes.currentSettings.effectStroke' 45 | strokeValue=themes.currentSettings.effectStroke 46 | numberDefault=themes.list.Default.effectNumber 47 | numberName='themes.currentSettings.effectNumber' 48 | numberValue=themes.currentSettings.effectNumber 49 | type='effect' 50 | }} 51 |
52 | {{> "systems/cortexprime/templates/partials/settings/theme/die-colors.html" 53 | label=(localize 'Unchosen') 54 | fillDefault=themes.list.Default.unchosenFill 55 | fillName='themes.currentSettings.unchosenFill' 56 | fillValue=themes.currentSettings.unchosenFill 57 | strokeDefault=themes.list.Default.unchosenStroke 58 | strokeName='themes.currentSettings.unchosenStroke' 59 | strokeValue=themes.currentSettings.unchosenStroke 60 | numberDefault=themes.list.Default.unchosenNumber 61 | numberName='themes.currentSettings.unchosenNumber' 62 | numberValue=themes.currentSettings.unchosenNumber 63 | type='unchosen' 64 | }} 65 |
66 | {{> "systems/cortexprime/templates/partials/settings/theme/die-colors.html" 67 | label=(localize 'Chosen') 68 | fillDefault=themes.list.Default.chosenFill 69 | fillName='themes.currentSettings.chosenFill' 70 | fillValue=themes.currentSettings.chosenFill 71 | strokeDefault=themes.list.Default.chosenStroke 72 | strokeName='themes.currentSettings.chosenStroke' 73 | strokeValue=themes.currentSettings.chosenStroke 74 | numberDefault=themes.list.Default.chosenNumber 75 | numberName='themes.currentSettings.chosenNumber' 76 | numberValue=themes.currentSettings.chosenNumber 77 | type='chosen' 78 | }} 79 |
80 | {{> "systems/cortexprime/templates/partials/settings/theme/die-colors.html" 81 | description=(localize 'SelectedDiceDescription') 82 | label=(localize 'Selected') 83 | fillDefault=themes.list.Default.selectedFill 84 | fillName='themes.currentSettings.selectedFill' 85 | fillValue=themes.currentSettings.selectedFill 86 | strokeDefault=themes.list.Default.selectedStroke 87 | strokeName='themes.currentSettings.selectedStroke' 88 | strokeValue=themes.currentSettings.selectedStroke 89 | numberDefault=themes.list.Default.selectedNumber 90 | numberName='themes.currentSettings.selectedNumber' 91 | numberValue=themes.currentSettings.selectedNumber 92 | type='selected' 93 | }} 94 |
95 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/die-colors.html: -------------------------------------------------------------------------------- 1 |

{{label}}

2 |
3 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 4 | default=fillDefault 5 | label=(localize 'Fill') 6 | name=fillName 7 | value=fillValue 8 | }} 9 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 10 | default=strokeDefault 11 | label=(localize 'Stroke') 12 | name=strokeName 13 | value=strokeValue 14 | }} 15 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 16 | default=numberDefault 17 | label=(localize 'Number') 18 | name=numberName 19 | value=numberValue 20 | }} 21 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/font-size.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 8 | px 9 |
10 |
11 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/font-style.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 11 |
12 |
13 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/font-weight.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/image.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 10 | {{#if value}} 11 | {{value}} 12 | {{else}} 13 | No Image Chosen 14 | {{/if}} 15 | 18 |
19 |
20 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/inputs.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'Inputs'}}

6 |
7 |

{{localize 'Colors'}}

8 |
9 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 10 | default=themes.list.Default.inputBackgroundColor 11 | label=(localize 'Background') 12 | name='themes.currentSettings.inputBackgroundColor' 13 | value=themes.currentSettings.inputBackgroundColor 14 | }} 15 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 16 | default=themes.list.Default.inputColor 17 | label=(localize 'Font') 18 | name='themes.currentSettings.inputColor' 19 | value=themes.currentSettings.inputColor 20 | }} 21 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 22 | default=themes.list.Default.inputFocusColor 23 | label=(localize 'Focus') 24 | name='themes.currentSettings.inputFocusColor' 25 | value=themes.currentSettings.inputFocusColor 26 | }} 27 |
28 |
29 |

{{localize 'Border'}}

30 |
31 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 32 | default=themes.list.Default.inputBorderColor 33 | label=(localize 'Color') 34 | name='themes.currentSettings.inputBorderColor' 35 | value=themes.currentSettings.inputBorderColor 36 | }} 37 | {{> "systems/cortexprime/templates/partials/settings/theme/border-style.html" 38 | label=(localize 'Style') 39 | name='themes.currentSettings.inputBorderStyle' 40 | value=themes.currentSettings.inputBorderStyle 41 | }} 42 | {{> "systems/cortexprime/templates/partials/settings/theme/border-width.html" 43 | label=(localize 'Width') 44 | name='themes.currentSettings.inputBorderWidth' 45 | value=themes.currentSettings.inputBorderWidth 46 | }} 47 |
48 |
49 | {{> "systems/cortexprime/templates/partials/settings/theme/border-position.html" 50 | label=(localize 'Position') 51 | name='themes.currentSettings.inputBorderPosition' 52 | value=themes.currentSettings.inputBorderPosition 53 | }} 54 |
55 |
56 |

{{localize 'Label'}}

57 |
58 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 59 | default=themes.list.Default.inputLabelColor 60 | label=(localize 'Color') 61 | name='themes.currentSettings.inputLabelColor' 62 | value=themes.currentSettings.inputLabelColor 63 | }} 64 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 65 | label=(localize 'Weight') 66 | name='themes.currentSettings.inputLabelFontWeight' 67 | value=themes.currentSettings.inputLabelFontWeight 68 | }} 69 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 70 | label=(localize 'Style') 71 | name='themes.currentSettings.inputLabelFontStyle' 72 | value=themes.currentSettings.inputLabelFontStyle 73 | }} 74 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 75 | label=(localize 'Casing') 76 | name='themes.currentSettings.inputLabelTextTransform' 77 | value=themes.currentSettings.inputLabelTextTransform 78 | }} 79 |
80 |
81 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 82 | label=(localize 'Size') 83 | name='themes.currentSettings.inputLabelFontSize' 84 | value=themes.currentSettings.inputLabelFontSize 85 | }} 86 |
87 |
88 |

{{localize 'Checkbox'}}

89 |
90 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 91 | default=themes.list.Default.inputCheckboxColor 92 | label=(localize 'Color') 93 | name='themes.currentSettings.inputCheckboxColor' 94 | value=themes.currentSettings.inputCheckboxColor 95 | }} 96 |
97 |
98 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/misc.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'Miscellaneous'}}

6 |
7 |

{{localize 'PlotPointColors'}}

8 |
9 |
10 | {{> "systems/cortexprime/templates/partials/plot-point.html"}} 11 |
12 |
13 |
14 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 15 | default=themes.list.Default.plotPointFill 16 | label=(localize 'Fill') 17 | name='themes.currentSettings.plotPointFill' 18 | value=themes.currentSettings.plotPointFill 19 | }} 20 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 21 | default=themes.list.Default.plotPointStroke 22 | label=(localize 'Stroke') 23 | name='themes.currentSettings.plotPointStroke' 24 | value=themes.currentSettings.plotPointStroke 25 | }} 26 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 27 | default=themes.list.Default.plotPointText 28 | label=(localize 'Text') 29 | name='themes.currentSettings.plotPointText' 30 | value=themes.currentSettings.plotPointText 31 | }} 32 |
33 |
34 |

{{localize 'HorizontalSeparator'}}

35 |
36 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 37 | default=themes.list.Default.separatorColor 38 | label=(localize 'Color') 39 | name='themes.currentSettings.separatorColor' 40 | value=themes.currentSettings.separatorColor 41 | }} 42 | {{> "systems/cortexprime/templates/partials/settings/theme/border-style.html" 43 | label=(localize 'Style') 44 | name='themes.currentSettings.separatorStyle' 45 | value=themes.currentSettings.separatorStyle 46 | }} 47 | {{> "systems/cortexprime/templates/partials/settings/theme/border-width.html" 48 | label=(localize 'Weight') 49 | name='themes.currentSettings.separatorWeight' 50 | value=themes.currentSettings.separatorWeight 51 | }} 52 |
53 |
54 |

{{localize 'Buttons'}}

55 |
56 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 57 | default=themes.list.Default.buttonPrimaryColor 58 | label=(localize 'PrimaryColor') 59 | name='themes.currentSettings.buttonPrimaryColor' 60 | value=themes.currentSettings.buttonPrimaryColor 61 | }} 62 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 63 | default=themes.list.Default.buttonPrimaryFontColor 64 | label=(localize 'PrimaryFontColor') 65 | name='themes.currentSettings.buttonPrimaryFontColor' 66 | value=themes.currentSettings.buttonPrimaryFontColor 67 | }} 68 |
69 |
70 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 71 | default=themes.list.Default.buttonSecondaryColor 72 | label=(localize 'SecondaryColor') 73 | name='themes.currentSettings.buttonSecondaryColor' 74 | value=themes.currentSettings.buttonSecondaryColor 75 | }} 76 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 77 | default=themes.list.Default.buttonSecondaryFontColor 78 | label=(localize 'SecondaryFontColor') 79 | name='themes.currentSettings.buttonSecondaryFontColor' 80 | value=themes.currentSettings.buttonSecondaryFontColor 81 | }} 82 |
83 |
84 | {{> "systems/cortexprime/templates/partials/settings/theme/button-style.html" 85 | label=(localize 'Style') 86 | name='themes.currentSettings.buttonStyle' 87 | value=themes.currentSettings.buttonStyle 88 | }} 89 |
90 |
91 |

{{localize 'Tabs'}}

92 |
93 | {{> "systems/cortexprime/templates/partials/settings/theme/button-style.html" 94 | default=themes.list.Default.tabStyle 95 | label=(localize 'Style') 96 | name='themes.currentSettings.tabStyle' 97 | value=themes.currentSettings.tabStyle 98 | }} 99 |
100 |
101 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/opacity.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} (0 - 1) 4 |

5 |
6 |
7 | 8 |
9 |
10 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/sections.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'Sections'}}

6 |
7 |

{{localize 'BackgroundImage'}}

8 |
9 | {{> "systems/cortexprime/templates/partials/settings/theme/image.html" 10 | label=(localize 'Image') 11 | targetSetting='sectionBackgroundImage' 12 | value=themes.currentSettings.sectionBackgroundImage 13 | }} 14 |
15 |
16 | {{> "systems/cortexprime/templates/partials/settings/theme/opacity.html" 17 | label=(localize 'Opacity') 18 | name='themes.currentSettings.sectionBackgroundImageOpacity' 19 | value=themes.currentSettings.sectionBackgroundImageOpacity 20 | }} 21 | {{> "systems/cortexprime/templates/partials/settings/theme/background-position.html" 22 | label=(localize 'Position') 23 | name='themes.currentSettings.sectionBackgroundPosition' 24 | value=themes.currentSettings.sectionBackgroundPosition 25 | }} 26 | {{> "systems/cortexprime/templates/partials/settings/theme/background-repeat.html" 27 | label=(localize 'Repeat') 28 | name='themes.currentSettings.sectionBackgroundRepeat' 29 | value=themes.currentSettings.sectionBackgroundRepeat 30 | }} 31 | {{> "systems/cortexprime/templates/partials/settings/theme/background-size.html" 32 | label=(localize 'Size') 33 | name='themes.currentSettings.sectionBackgroundSize' 34 | value=themes.currentSettings.sectionBackgroundSize 35 | }} 36 |
37 |
38 |

{{localize 'BackgroundColor'}}

39 |
40 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 41 | default=themes.list.Default.sectionBackgroundColor 42 | label=(localize 'Color') 43 | name='themes.currentSettings.sectionBackgroundColor' 44 | value=themes.currentSettings.sectionBackgroundColor 45 | }} 46 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 47 | default=themes.list.Default.sectionAlternateBackgroundColor 48 | label=(localize 'AlternateColor') 49 | name='themes.currentSettings.sectionAlternateBackgroundColor' 50 | value=themes.currentSettings.sectionAlternateBackgroundColor 51 | }} 52 | {{> "systems/cortexprime/templates/partials/settings/theme/opacity.html" 53 | label=(localize 'Opacity') 54 | name='themes.currentSettings.sectionBackgroundColorOpacity' 55 | value=themes.currentSettings.sectionBackgroundColorOpacity 56 | }} 57 |
58 |
59 |

{{localize 'Border'}}

60 |
61 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 62 | default=themes.list.Default.sectionBorderColor 63 | label=(localize 'Color') 64 | name='themes.currentSettings.sectionBorderColor' 65 | value=themes.currentSettings.sectionBorderColor 66 | }} 67 | {{> "systems/cortexprime/templates/partials/settings/theme/border-style.html" 68 | label=(localize 'Style') 69 | name='themes.currentSettings.sectionBorderStyle' 70 | value=themes.currentSettings.sectionBorderStyle 71 | }} 72 | {{> "systems/cortexprime/templates/partials/settings/theme/border-width.html" 73 | label=(localize 'Width') 74 | name='themes.currentSettings.sectionBorderWidth' 75 | value=themes.currentSettings.sectionBorderWidth 76 | }} 77 |
78 |
79 | {{> "systems/cortexprime/templates/partials/settings/theme/border-position.html" 80 | label=(localize 'Position') 81 | name='themes.currentSettings.sectionBorderPosition' 82 | value=themes.currentSettings.sectionBorderPosition 83 | }} 84 |
85 |
86 |

{{localize 'PrimaryTitles'}}

87 |
88 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 89 | default=themes.list.Default.sectionPrimaryTitleFontColor 90 | label=(localize 'Color') 91 | name='themes.currentSettings.sectionPrimaryTitleFontColor' 92 | value=themes.currentSettings.sectionPrimaryTitleFontColor 93 | }} 94 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 95 | label=(localize 'Weight') 96 | name='themes.currentSettings.sectionPrimaryTitleFontWeight' 97 | value=themes.currentSettings.sectionPrimaryTitleFontWeight 98 | }} 99 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 100 | label=(localize 'Style') 101 | name='themes.currentSettings.sectionPrimaryTitleFontStyle' 102 | value=themes.currentSettings.sectionPrimaryTitleFontStyle 103 | }} 104 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 105 | label=(localize 'Casing') 106 | name='themes.currentSettings.sectionPrimaryTitleTextTransform' 107 | value=themes.currentSettings.sectionPrimaryTitleTextTransform 108 | }} 109 |
110 |
111 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 112 | label=(localize 'Size') 113 | name='themes.currentSettings.sectionPrimaryTitleFontSize' 114 | value=themes.currentSettings.sectionPrimaryTitleFontSize 115 | }} 116 |
117 |
118 |

{{localize 'SecondaryTitles'}}

119 |
120 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 121 | default=themes.list.Default.sectionSecondaryTitleFontColor 122 | label=(localize 'Color') 123 | name='themes.currentSettings.sectionSecondaryTitleFontColor' 124 | value=themes.currentSettings.sectionSecondaryTitleFontColor 125 | }} 126 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 127 | label=(localize 'Weight') 128 | name='themes.currentSettings.sectionSecondaryTitleFontWeight' 129 | value=themes.currentSettings.sectionSecondaryTitleFontWeight 130 | }} 131 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 132 | label=(localize 'Style') 133 | name='themes.currentSettings.sectionSecondaryTitleFontStyle' 134 | value=themes.currentSettings.sectionSecondaryTitleFontStyle 135 | }} 136 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 137 | label=(localize 'Casing') 138 | name='themes.currentSettings.sectionSecondaryTitleTextTransform' 139 | value=themes.currentSettings.sectionSecondaryTitleTextTransform 140 | }} 141 |
142 |
143 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 144 | label=(localize 'Size') 145 | name='themes.currentSettings.sectionSecondaryTitleFontSize' 146 | value=themes.currentSettings.sectionSecondaryTitleFontSize 147 | }} 148 |
149 |
150 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/style.html: -------------------------------------------------------------------------------- 1 | 4 | 105 | -------------------------------------------------------------------------------- /templates/partials/settings/theme/text-transform.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{label}} 4 |

5 |
6 |
7 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /templates/partials/settings/theme/traits.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'Traits'}}

6 |
7 |

{{localize 'TraitTitles'}}

8 |
9 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 10 | default=themes.list.Default.traitTitleFontColor 11 | label=(localize 'Color') 12 | name='themes.currentSettings.traitTitleFontColor' 13 | value=themes.currentSettings.traitTitleFontColor 14 | }} 15 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 16 | label=(localize 'Weight') 17 | name='themes.currentSettings.traitTitleFontWeight' 18 | value=themes.currentSettings.traitTitleFontWeight 19 | }} 20 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 21 | label=(localize 'Style') 22 | name='themes.currentSettings.traitTitleFontStyle' 23 | value=themes.currentSettings.traitTitleFontStyle 24 | }} 25 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 26 | label=(localize 'Casing') 27 | name='themes.currentSettings.traitTitleTextTransform' 28 | value=themes.currentSettings.traitTitleTextTransform 29 | }} 30 |
31 |
32 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 33 | label=(localize 'Size') 34 | name='themes.currentSettings.traitTitleFontSize' 35 | value=themes.currentSettings.traitTitleFontSize 36 | }} 37 |
38 |
39 |

{{localize 'TraitSubTitles'}}

40 |
41 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 42 | default=themes.list.Default.traitSubTitleFontColor 43 | label=(localize 'Color') 44 | name='themes.currentSettings.traitSubTitleFontColor' 45 | value=themes.currentSettings.traitSubTitleFontColor 46 | }} 47 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 48 | label=(localize 'Weight') 49 | name='themes.currentSettings.traitSubTitleFontWeight' 50 | value=themes.currentSettings.traitSubTitleFontWeight 51 | }} 52 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 53 | label=(localize 'Style') 54 | name='themes.currentSettings.traitSubTitleFontStyle' 55 | value=themes.currentSettings.traitSubTitleFontStyle 56 | }} 57 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 58 | label=(localize 'Casing') 59 | name='themes.currentSettings.traitSubTitleTextTransform' 60 | value=themes.currentSettings.traitSubTitleTextTransform 61 | }} 62 |
63 |
64 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 65 | label=(localize 'Size') 66 | name='themes.currentSettings.traitSubTitleFontSize' 67 | value=themes.currentSettings.traitSubTitleFontSize 68 | }} 69 |
70 |
71 |

{{localize 'SubTraitLabels'}}

72 |
73 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 74 | default=themes.list.Default.subTraitLabelFontColor 75 | label=(localize 'Color') 76 | name='themes.currentSettings.subTraitLabelFontColor' 77 | value=themes.currentSettings.subTraitLabelFontColor 78 | }} 79 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 80 | label=(localize 'Weight') 81 | name='themes.currentSettings.subTraitLabelFontWeight' 82 | value=themes.currentSettings.subTraitLabelFontWeight 83 | }} 84 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 85 | label=(localize 'Style') 86 | name='themes.currentSettings.subTraitLabelFontStyle' 87 | value=themes.currentSettings.subTraitLabelFontStyle 88 | }} 89 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 90 | label=(localize 'Casing') 91 | name='themes.currentSettings.subTraitLabelTextTransform' 92 | value=themes.currentSettings.subTraitLabelTextTransform 93 | }} 94 |
95 |
96 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 97 | label=(localize 'Size') 98 | name='themes.currentSettings.subTraitLabelFontSize' 99 | value=themes.currentSettings.subTraitLabelFontSize 100 | }} 101 |
102 |
103 |

{{localize 'DescriptorLabels'}}

104 |
105 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 106 | default=themes.list.Default.descriptorLabelFontColor 107 | label=(localize 'Color') 108 | name='themes.currentSettings.descriptorLabelFontColor' 109 | value=themes.currentSettings.descriptorLabelFontColor 110 | }} 111 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 112 | label=(localize 'Weight') 113 | name='themes.currentSettings.descriptorLabelFontWeight' 114 | value=themes.currentSettings.descriptorLabelFontWeight 115 | }} 116 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 117 | label=(localize 'Style') 118 | name='themes.currentSettings.descriptorLabelFontStyle' 119 | value=themes.currentSettings.descriptorLabelFontStyle 120 | }} 121 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 122 | label=(localize 'Casing') 123 | name='themes.currentSettings.descriptorLabelTextTransform' 124 | value=themes.currentSettings.descriptorLabelTextTransform 125 | }} 126 |
127 |
128 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 129 | label=(localize 'Size') 130 | name='themes.currentSettings.descriptorLabelFontSize' 131 | value=themes.currentSettings.descriptorLabelFontSize 132 | }} 133 |
134 |
135 |

{{localize 'SfxLabel'}}

136 |
137 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 138 | default=themes.list.Default.sfxLabelFontColor 139 | label=(localize 'Color') 140 | name='themes.currentSettings.sfxLabelFontColor' 141 | value=themes.currentSettings.sfxLabelFontColor 142 | }} 143 | {{> "systems/cortexprime/templates/partials/settings/theme/font-weight.html" 144 | label=(localize 'Weight') 145 | name='themes.currentSettings.sfxLabelFontWeight' 146 | value=themes.currentSettings.sfxLabelFontWeight 147 | }} 148 | {{> "systems/cortexprime/templates/partials/settings/theme/font-style.html" 149 | label=(localize 'Style') 150 | name='themes.currentSettings.sfxLabelFontStyle' 151 | value=themes.currentSettings.sfxLabelFontStyle 152 | }} 153 | {{> "systems/cortexprime/templates/partials/settings/theme/text-transform.html" 154 | label=(localize 'Casing') 155 | name='themes.currentSettings.sfxLabelTextTransform' 156 | value=themes.currentSettings.sfxLabelTextTransform 157 | }} 158 |
159 |
160 | {{> "systems/cortexprime/templates/partials/settings/theme/font-size.html" 161 | label=(localize 'Size') 162 | name='themes.currentSettings.sfxLabelFontSize' 163 | value=themes.currentSettings.sfxLabelFontSize 164 | }} 165 |
166 |
167 |

{{localize 'SfxBullet'}}

168 |
169 | {{> "systems/cortexprime/templates/partials/settings/theme/color.html" 170 | default=themes.list.Default.sfxBulletColor 171 | label=(localize 'Color') 172 | name='themes.currentSettings.sfxBulletColor' 173 | value=themes.currentSettings.sfxBulletColor 174 | }} 175 |
176 |
177 |
-------------------------------------------------------------------------------- /templates/partials/settings/trait.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/partials/settings/value-types/descriptors.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'DefaultDescriptors'}}

6 |
7 | 10 |
11 |
12 |
13 | {{#if (listHasMore data.descriptors 0)}} 14 |
15 | {{/if}} 16 | {{> "systems/cortexprime/templates/partials/value-types/descriptors.html" 17 | data=data 18 | fieldPath=(concat 'actorTypes.' path '.descriptors') 19 | path=(concat path '.descriptors') 20 | }} 21 |
-------------------------------------------------------------------------------- /templates/partials/settings/value-types/dice.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{#if consumableOption}} 4 |
5 | 12 |
13 | {{/if}} 14 |
15 | {{localize 'DefaultDice'}} 16 | {{> "systems/cortexprime/templates/partials/value-types/dice.html" 17 | data=data 18 | path=(concat path '.dice') 19 | }} 20 |
21 |
22 | {{#if consumableOption}} 23 |
24 |
25 |
26 |

{{localize 'ConsumableDice'}}: {{localize 'ConsumableDiceDescription'}}

27 |
28 | {{/if}} -------------------------------------------------------------------------------- /templates/partials/settings/value-types/number.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 11 |
12 |
13 | 22 |
23 |
-------------------------------------------------------------------------------- /templates/partials/settings/value-types/sfx.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'DefaultSfx'}}

6 |
7 | 10 |
11 |
12 |
13 |
14 |
15 |

{{localize 'Unlocked'}}: {{localize 'UnlockedDescription'}}

16 |
17 |
18 | {{#if (listHasMore data.sfx 0)}} 19 |
20 | {{/if}} 21 | {{> "systems/cortexprime/templates/partials/value-types/sfx.html" 22 | data=data 23 | fieldPath=(concat 'actorTypes.' path '.sfx') 24 | path=(concat path '.sfx') 25 | }} 26 |
-------------------------------------------------------------------------------- /templates/partials/settings/value-types/sub-traits.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{localize 'DefaultSubTraits'}}

6 |
7 | 10 |
11 |
12 |
13 |
14 |
15 |

{{localize 'SubTraitsDescription'}}

16 |
17 |
18 | {{#if (listHasMore data.subTraits 0)}} 19 |
20 | {{/if}} 21 | {{> "systems/cortexprime/templates/partials/value-types/sub-traits.html" 22 | data=data 23 | edit=true 24 | fieldPath=(concat 'actorTypes.' path '.subTraits') 25 | path=path 26 | settings=settings 27 | }} 28 |
-------------------------------------------------------------------------------- /templates/partials/settings/value-types/text.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 12 |
-------------------------------------------------------------------------------- /templates/partials/value-types/descriptors.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/partials/value-types/dice.html: -------------------------------------------------------------------------------- 1 |
2 | {{> "systems/cortexprime/templates/partials/dice/select.html" 3 | addToPool=addToPool 4 | dice=data.dice.value 5 | minDice=0 6 | label=label 7 | path=path 8 | }} 9 |
-------------------------------------------------------------------------------- /templates/partials/value-types/number.html: -------------------------------------------------------------------------------- 1 |
2 | {{#if edit}} 3 |
4 |
5 | 6 |
7 | {{#if data.settings.hasMaxNumber}} 8 | / 9 |
10 | 11 |
12 | {{/if}} 13 |
14 | {{else}} 15 |

16 | {{ternary (or data.number.value (eq data.number.value 0)) data.number.value '-'}} 17 | {{#if data.settings.hasMaxNumber}} 18 | / 19 | {{ternary (or data.number.max (eq data.number.max 0)) data.number.max '-'}} 20 | {{/if}} 21 |

22 | {{/if}} 23 |
-------------------------------------------------------------------------------- /templates/partials/value-types/sfx.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/partials/value-types/sub-traits.html: -------------------------------------------------------------------------------- 1 |
2 | 41 |
-------------------------------------------------------------------------------- /templates/partials/value-types/text.html: -------------------------------------------------------------------------------- 1 |
2 | {{#if edit}} 3 | 4 | {{else}} 5 |

{{data.text.value}}

6 | {{/if}} 7 |
-------------------------------------------------------------------------------- /templates/theme/settings.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | {{> "systems/cortexprime/templates/partials/settings/theme/style.html" 5 | settings=themes.list.Default 6 | target='#theme-settings.cortexprime' 7 | }} 8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |

16 | {{localize 'ThemeSettings'}} 17 |

18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |

{{localize 'Preset'}}

31 |
32 | {{#if (ne defaultVersion themes.version)}} 33 |
34 | 35 |
36 | {{/if}} 37 |
38 |
39 |
40 |

{{localize 'SaveSettingsNote'}}

41 |
42 |
43 | 53 |
54 |
55 | 56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | {{> "systems/cortexprime/templates/partials/settings/theme/body.html"}} 67 | {{> "systems/cortexprime/templates/partials/settings/theme/inputs.html"}} 68 | {{> "systems/cortexprime/templates/partials/settings/theme/dice-colors.html"}} 69 |
70 |
71 | {{> "systems/cortexprime/templates/partials/settings/theme/sections.html"}} 72 | {{> "systems/cortexprime/templates/partials/settings/theme/traits.html"}} 73 | {{> "systems/cortexprime/templates/partials/settings/theme/misc.html"}} 74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------