Initial system development
This commit is contained in:
parent
199dc4c6ed
commit
ca29af6b61
18
lang/en.json
Normal file
18
lang/en.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"SHEET.TabStats": "Stats",
|
||||||
|
"SHEET.TabSkills": "Skills",
|
||||||
|
"SHEET.TabFight": "Fight",
|
||||||
|
"SHEET.TabGears": "Gears",
|
||||||
|
"SHEET.TabDescription": "Description",
|
||||||
|
|
||||||
|
"STATS.physical": "physical",
|
||||||
|
"STATS.mental": "mental",
|
||||||
|
"STATS.strength": "Strength",
|
||||||
|
"STATS.dexterity": "Dextrity",
|
||||||
|
"STATS.speed": "Speed",
|
||||||
|
"STATS.endurance": "Endurance",
|
||||||
|
"STATS.intelligence": "Intelligence",
|
||||||
|
"STATS.perception": "Perception",
|
||||||
|
"STATS.charisma": "Charisma",
|
||||||
|
"STATS.determination": "Determination"
|
||||||
|
}
|
@ -24,6 +24,10 @@ export class SoSActorSheet extends ActorSheet {
|
|||||||
getData() {
|
getData() {
|
||||||
let data = super.getData();
|
let data = super.getData();
|
||||||
|
|
||||||
|
console.log("stats", data);
|
||||||
|
//data.stats = duplicate(this.actor.stats);
|
||||||
|
//data.scores = duplicate(this.actor.scores);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +41,7 @@ export class SoSActorSheet extends ActorSheet {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
|
//HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
|
||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
if (!this.options.editable) return;
|
if (!this.options.editable) return;
|
||||||
|
@ -32,7 +32,6 @@ export class SoSActor extends Actor {
|
|||||||
return actor;
|
return actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return super.create(data, options);
|
return super.create(data, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,9 +11,7 @@
|
|||||||
import { SoSActor } from "./actor.js";
|
import { SoSActor } from "./actor.js";
|
||||||
import { SoSItemSheet } from "./item-sheet.js";
|
import { SoSItemSheet } from "./item-sheet.js";
|
||||||
import { SoSActorSheet } from "./actor-sheet.js";
|
import { SoSActorSheet } from "./actor-sheet.js";
|
||||||
import { SoSUtility } from "./rdd-utility.js";
|
import { SoSUtility } from "./sos-utility.js";
|
||||||
//import { SoSTokenHud } from "./rdd-token-hud.js";
|
|
||||||
//import { SoSCommands } from "./rdd-commands.js";
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
@ -36,7 +34,7 @@ Hooks.once("init", async function () {
|
|||||||
// preload handlebars templates
|
// preload handlebars templates
|
||||||
SoSUtility.preloadHandlebarsTemplates();
|
SoSUtility.preloadHandlebarsTemplates();
|
||||||
// Create useful storage space
|
// Create useful storage space
|
||||||
game.system.sos = { TMRUtility: TMRUtility }
|
game.system.sos = { }
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Set an initiative formula for the system
|
// Set an initiative formula for the system
|
||||||
@ -59,9 +57,9 @@ Hooks.once("init", async function () {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Register sheet application classes
|
// Register sheet application classes
|
||||||
Actors.unregisterSheet("core", ActorSheet);
|
Actors.unregisterSheet("core", ActorSheet);
|
||||||
Actors.registerSheet("foundryvtt-reve-de-dragon", SoSActorSheet, { types: ["character"], makeDefault: true });
|
Actors.registerSheet("foundryvtt-shadows-over-sol", SoSActorSheet, { types: ["character"], makeDefault: true });
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("foundryvtt-reve-de-dragon", SoSItemSheet, { makeDefault: true });
|
Items.registerSheet("foundryvtt-shadows-over-sol", SoSItemSheet, { makeDefault: true });
|
||||||
|
|
||||||
// Patch the initiative formula
|
// Patch the initiative formula
|
||||||
_patch_initiative();
|
_patch_initiative();
|
||||||
@ -70,7 +68,7 @@ Hooks.once("init", async function () {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
function welcomeMessage() {
|
function welcomeMessage() {
|
||||||
ChatUtility.removeMyChatMessageContaining('<div id="welcome-message-sos">');
|
//ChatUtility.removeMyChatMessageContaining('<div id="welcome-message-sos">');
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
user: game.user._id,
|
user: game.user._id,
|
||||||
whisper: [game.user._id],
|
whisper: [game.user._id],
|
||||||
@ -112,6 +110,6 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||||
RdDUtility.pushInitiativeOptions(html, options);
|
//SoS.pushInitiativeOptions(html, options);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,11 +3,13 @@ export class SoSUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async preloadHandlebarsTemplates() {
|
static async preloadHandlebarsTemplates() {
|
||||||
const templatePaths = [
|
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html',
|
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/editor-notes-gm.html',
|
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-shet.html'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const templatePaths = [
|
||||||
|
'systems/foundryvtt-shadows-over-sol/templates/actor-sheet.html',
|
||||||
|
'systems/foundryvtt-shadows-over-sol/templates/editor-notes-gm.html',
|
||||||
|
'systems/foundryvtt-shadows-over-sol/templates/stat-option-list.html',
|
||||||
|
'systems/foundryvtt-shadows-over-sol/templates/item-sheet.html'
|
||||||
|
]
|
||||||
|
return loadTemplates(templatePaths);
|
||||||
|
}
|
||||||
}
|
}
|
1371
styles/simple.css
Normal file
1371
styles/simple.css
Normal file
File diff suppressed because it is too large
Load Diff
16
system.json
16
system.json
@ -2,11 +2,11 @@
|
|||||||
"name": "foundryvtt-shadows-over-sol",
|
"name": "foundryvtt-shadows-over-sol",
|
||||||
"title": "Shadows over Sol",
|
"title": "Shadows over Sol",
|
||||||
"description": "Shadows over Sol for FoundryVTT",
|
"description": "Shadows over Sol for FoundryVTT",
|
||||||
"version": "0.0.1",
|
"version": "0.0.4",
|
||||||
"manifestPlusVersion": "1.0.0",
|
"manifestPlusVersion": "1.0.0",
|
||||||
"minimumCoreVersion": "0.7.5",
|
"minimumCoreVersion": "0.7.5",
|
||||||
"compatibleCoreVersion": "0.7.9",
|
"compatibleCoreVersion": "0.7.9",
|
||||||
"templateVersion": 1,
|
"templateVersion": 4,
|
||||||
"author": "LeRatierBretonnien",
|
"author": "LeRatierBretonnien",
|
||||||
"esmodules": [ "module/sos-main.js" ],
|
"esmodules": [ "module/sos-main.js" ],
|
||||||
"styles": ["styles/simple.css"],
|
"styles": ["styles/simple.css"],
|
||||||
@ -15,11 +15,17 @@
|
|||||||
"packs": [
|
"packs": [
|
||||||
],
|
],
|
||||||
"library": false,
|
"library": false,
|
||||||
"languages": [],
|
"languages": [
|
||||||
|
{
|
||||||
|
"lang": "en",
|
||||||
|
"name": "English",
|
||||||
|
"path": "lang/en.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
"gridDistance": 5,
|
"gridDistance": 5,
|
||||||
"gridUnits": "ft",
|
"gridUnits": "ft",
|
||||||
"primaryTokenAttribute": "attributes.life",
|
"primaryTokenAttribute": "",
|
||||||
"secondaryTokenAttribute": "attributes.endurance",
|
"secondaryTokenAttribute": "",
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"url": "https://gitlab.com/LeRatierBretonnien/foundryvtt-shadows-over-sol/",
|
"url": "https://gitlab.com/LeRatierBretonnien/foundryvtt-shadows-over-sol/",
|
||||||
"manifest": "https://gitlab.com/LeRatierBretonnien/foundryvtt-shadows-over-sol/raw/system.json",
|
"manifest": "https://gitlab.com/LeRatierBretonnien/foundryvtt-shadows-over-sol/raw/system.json",
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
"Actor": {
|
"Actor": {
|
||||||
"types": ["character", "npc"],
|
"types": ["character", "npc"],
|
||||||
"templates": {
|
"templates": {
|
||||||
"description": {
|
|
||||||
"description": "Description ...",
|
|
||||||
"gmnotes": "GM notes"
|
|
||||||
},
|
|
||||||
"subactors": {
|
"subactors": {
|
||||||
"subactors": {
|
"subactors": {
|
||||||
"followers": [],
|
"followers": [],
|
||||||
@ -115,11 +111,11 @@
|
|||||||
"eyes": "",
|
"eyes": "",
|
||||||
"hair": "",
|
"hair": "",
|
||||||
"weight": "",
|
"weight": "",
|
||||||
"sex": "",
|
"genre": "",
|
||||||
"corp": "",
|
|
||||||
"age": 0
|
"age": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"personnage": {
|
"character": {
|
||||||
"templates": [ "background", "common", "subactors" ]
|
"templates": [ "background", "common", "subactors" ]
|
||||||
},
|
},
|
||||||
"npc": {
|
"npc": {
|
||||||
@ -161,4 +157,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
|
|
||||||
{{!-- Sheet Tab Navigation --}}
|
{{!-- Sheet Tab Navigation --}}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
<a class="item" data-tab="stats">Stats</a>
|
<a class="item" data-tab="stats">{{localize 'SHEET.TabStats'}}</a>
|
||||||
<a class="item" data-tab="skills">Skills</a>
|
<a class="item" data-tab="skills">{{localize 'SHEET.TabSkills'}}</a>
|
||||||
<a class="item" data-tab="fight">Fight</a>
|
<a class="item" data-tab="fight">{{localize 'SHEET.TabFight'}}</a>
|
||||||
<a class="item" data-tab="gears">Gears</a>
|
<a class="item" data-tab="gears">{{localize 'SHEET.TabGears'}}</a>
|
||||||
<a class="item" data-tab="description">Description</a>
|
<a class="item" data-tab="description">{{localize 'SHEET.TabDescription'}}</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
@ -34,16 +34,20 @@
|
|||||||
{{#each data.stats as |stat key|}}
|
{{#each data.stats as |stat key|}}
|
||||||
{{#if stat.isLevelUp}}
|
{{#if stat.isLevelUp}}
|
||||||
<li class="stat flexrow xp-level-up" data-attribute="{{key}}">
|
<li class="stat flexrow xp-level-up" data-attribute="{{key}}">
|
||||||
<span class="stat-label flexrow tooltip tooltip-nobottom" name="data.stat.{{key}}.label">
|
<span class="stat-label flexrow tooltip tooltip-nobottom" name="data.stats.{{key}}.label">
|
||||||
<span class="tooltiptext ttt-xp">
|
<span class="tooltiptext ttt-xp">
|
||||||
{{localize STAT.levelUp}}
|
{{localize 'STAT.levelUp'}}
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li class="stat flexrow list-item" data-attribute="{{key}}">
|
<li class="stat flexrow list-item" data-attribute="{{key}}">
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<a name={{key}}>{{stat.label}}</a></span>
|
<a name={{key}}>{{localize stat.label}}</a></span>
|
||||||
<input class="stat-value flexrow" type="text" name="data.stat.{{key}}.value" value="{{stat.value}}" data-dtype="Number" {{#unless @root.data.editStatSkill}}disabled{{/unless}} />
|
<select class="stat-value flexrow" type="text" name="data.stats.{{key}}.value" value="{{stat.value}}" data-dtype="Number">
|
||||||
<input class="stat-xp flexrow" type="text" name="data.stat.{{key}}.xp" value="{{stat.xp}}" data-dtype="Number" {{#unless @root.data.editStatSkill}}disabled{{/unless}} />
|
{{#select stat.value}}
|
||||||
|
{{>"systems/foundryvtt-shadows-over-sol/templates/stat-option-list.html"}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
<input class="stat-xp flexrow" type="text" name="data.stats.{{key}}.xp" value="{{stat.xp}}" data-dtype="Number" {{#unless @root.data.editStatSkill}}disabled{{/unless}} />
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
11
templates/stat-option-list.html
Normal file
11
templates/stat-option-list.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<option value="0">0</option>
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3">3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
<option value="5">5</option>
|
||||||
|
<option value="6">6</option>
|
||||||
|
<option value="7">7</option>
|
||||||
|
<option value="8">8</option>
|
||||||
|
<option value="9">9</option>
|
||||||
|
<option value="10">10</option>
|
Loading…
Reference in New Issue
Block a user