Compare commits

..

26 Commits

Author SHA1 Message Date
cd771c29d1 Fix #7 #26 2022-09-26 20:58:00 +02:00
0800a98606 Fix #7 #26 2022-09-26 20:57:55 +02:00
c194afe048 Fix #38 2022-09-26 18:51:55 +02:00
1a5ff925b7 Fix #38 2022-09-26 18:42:13 +02:00
1e37ae3eb1 Fix #42 2022-09-26 17:35:44 +02:00
423948626a Fix #21 2022-09-26 17:26:14 +02:00
6067f02aed Fix level remaining 2022-09-25 17:52:29 +02:00
a9d0a99129 Fix #24 #25 Cargo capacity 2022-09-25 17:37:57 +02:00
392c76f86a Fix #24 #25 Cargo capacity 2022-09-25 15:48:11 +02:00
262bd3b480 Fix #21 Effect for actors 2022-09-25 15:27:58 +02:00
f048408aa1 Fix #22 VMS fix 2022-09-25 15:15:40 +02:00
52b7279cb8 Fix #11 Speed management 2022-09-25 15:13:59 +02:00
241c7fa1ae Fix #6 Crew limits 2022-09-25 14:51:43 +02:00
857f36387a Fix #6 Crew limits 2022-09-25 14:45:02 +02:00
b185a3902d Fix #3 v10 fixes for processing embedded items 2022-09-25 14:26:18 +02:00
7d3f880633 Fix #1 for dropping items from compendium 2022-09-25 14:13:57 +02:00
7a1171b774 Vehicles enhancements 2022-09-25 09:26:12 +02:00
7a9ed39d02 Actor/Crew rolls 2022-09-21 16:58:02 +02:00
8345ee0ebb Actor/Crew rolls 2022-09-21 16:54:34 +02:00
343ac6ab9d NRG stuff 2022-09-18 17:30:15 +02:00
9a20a96cec Start vehicle automation 2022-09-16 17:36:58 +02:00
ae697b0bb8 WIP for vehicle sheets 2022-09-09 08:33:28 +02:00
ecf5a38eb0 WIP for vehicle sheets 2022-09-08 21:26:45 +02:00
1849a60194 Vehicle - WIP 2022-09-05 11:32:21 +02:00
fbb578c541 Vehicle - WIP 2022-09-05 08:57:48 +02:00
7614964772 Vehicle - WIP 2022-09-05 08:57:02 +02:00
41 changed files with 2570 additions and 467 deletions

View File

@ -1,6 +1,6 @@
[Dolphin]
SortRole=creationtime
Timestamp=2021,4,13,9,23,48.267
SortRole=modificationtime
Timestamp=2022,9,8,20,43,38.73
Version=4
ViewMode=1
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

BIN
images/icons/AD.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
images/icons/FC.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
images/icons/HR.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
images/icons/MAN.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
images/icons/PC.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -246,7 +246,7 @@ export class PegasusActorSheet extends ActorSheet {
this.actor.rollPool( 'agi', false, "ranged-atk");
});
html.find('.defense-roll').click((event) => {
this.actor.rollPool( 'def', true);
this.actor.rollPool( 'def', true, "defence");
});
html.find('.damage-melee').click((event) => {
this.actor.rollPool( 'str', false, "melee-dmg");
@ -365,7 +365,10 @@ export class PegasusActorSheet extends ActorSheet {
if (item == undefined) {
item = this.actor.items.get( dragData.uuid )
}
let ret = await this.actor.preprocessItem( event, item, true )
console.log("Dropped", item)
let itemFull = await PegasusUtility.searchItem( item )
let ret = await this.actor.preprocessItem( event, itemFull, true )
if ( ret ) {
super._onDropItem(event, dragData)
}

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,8 @@ export class PegasusActorCreate {
this.roles = rolesPack.map(i => i.toObject())
const perksPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.perk")
this.perks = perksPack.map(i => i.toObject())
const specPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.specialisations")
this.specs = specPack.map(i => i.toObject())
this.showRaces()
}
@ -44,6 +46,23 @@ export class PegasusActorCreate {
return formData;
}
/* -------------------------------------------- */
getSpecFromRoleStat( role) {
let specList = []
for(let stat of role.system.statincreasechoice) {
if (stat.flag) {
specList = specList.concat( this.specs.filter( spec => spec.system.statistic.toLowerCase() == stat.name.toLowerCase() ))
}
}
return specList
}
/* -------------------------------------------- */
getPerksFromRole( role ) {
let perks = this.perks.filter( perk => perk.system.category.toLowerCase() == role.system.perksrole.toLowerCase())
return perks
}
/* -------------------------------------------- */
processChatEvent( event ) {
const step = $(event.currentTarget).data("step-name");
@ -54,12 +73,12 @@ export class PegasusActorCreate {
this.currentRace = race;
this.actor.applyRace( race);
PegasusUtility.removeChatMessageId(PegasusUtility.findChatMessageId(event.currentTarget));
if ( race.data.nboptionnal > 0 && race.data.optionnalabilities.length > 0) {
if ( race.system.nboptionnal > 0 && race.system.optionnalabilities.length > 0) {
this.manageOptionnalAbilities(race);
} else {
if ( race.data.selectablestats ) {
if ( race.system.selectablestats ) {
this.manageSelectableStats(race);
} else if ( race.data.perksgained) {
} else if ( race.system.perksgained) {
this.manageRacePerks(race);
} else {
this.showRoles()
@ -107,7 +126,7 @@ export class PegasusActorCreate {
this.actor.applyRole( role );
this.currentRole = role;
this.nbRoleStat = 2;
this.roleStats = duplicate(role.data.statincreasechoice)
this.roleStats = duplicate(role.system.statincreasechoice)
this.showRoleStartSpec( );
}
@ -136,7 +155,7 @@ export class PegasusActorCreate {
}
this.nbRoleStat--;
if ( this.nbRoleStat == 0 || this.roleStats.length == 0) {
this.roleSpec = duplicate(this.currentRole.data.specincrease)
this.roleSpec = this.getSpecFromRoleStat( this.currentRole )
this.nbDT2 = 1;
this.nbDT1 = 2;
this.showRoleSpecialisations()
@ -157,7 +176,7 @@ export class PegasusActorCreate {
}
this.roleSpec = this.roleSpec.filter( item => item._id != itemId);//Remove selected spec
if ( this.nbDT1 == 0 || this.roleSpec.length == 0) {
this.rolePerks = duplicate(this.currentRole.data.perks)
this.rolePerks = this.getPerksFromRole( this.currentRole ) // duplicate(this.currentRole.data.perks)
this.nbPerks = 2;
this.showRolePerks()
} else {
@ -293,7 +312,7 @@ export class PegasusActorCreate {
if ( this.raceOptionnalAbilities.nboptionnal == 0) {
if ( this.raceSelectableStats ) {
this.manageSelectableStats(this.currentrace);
} else if ( this.currentRace.data.perksgained) {
} else if ( this.currentRace.system.perksgained) {
this.manageRacePerks(this.currentRace);
} else {
this.showRoles()
@ -319,7 +338,9 @@ export class PegasusActorCreate {
/* ------------------------------- ------------- */
async showRoleStartSpec() {
if ( !this.roleSpecStart) {
this.roleSpecStart = duplicate(this.currentRole.data.specialisationsplus1)
this.roleSpecStart = this.specs.filter(spec => spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease1.toUpperCase() || spec.system.statistic.toUpperCase() == this.currentRole.system.statincrease2.toUpperCase() )
console.log("SPEC FOUND", this.roleSpecStart)
//this.roleSpecStart = duplicate(this.currentRole.data.specialisationsplus1)
this.nbRoleSpecStart = 2;
}
let formData = this.createFormData("select-role-start-spec")
@ -334,7 +355,7 @@ export class PegasusActorCreate {
formData.rolestats = []
for(let stat of this.roleStats) {
if (stat.flag) {
formData.rolestats.push( duplicate(this.actor.data.data.statistics[stat.name.toLowerCase()]) )
formData.rolestats.push( duplicate(this.actor.system.statistics[stat.name.toLowerCase()]) )
}
}
//console.log("STAT", this.roleStats, formData)

View File

@ -426,11 +426,15 @@ export class PegasusItemSheet extends ItemSheet {
let data = event.dataTransfer.getData('text/plain')
let dataItem = JSON.parse( data)
console.log("DROP", event, dataItem )
const item = fromUuidSync(dataItem.uuid)
let item = fromUuidSync(dataItem.uuid)
if (item.pack) {
item = await PegasusUtility.searchItem(item)
}
if (!item) {
ui.notifications.warn("Unable to find relevant item - Aborting drag&drop " + data.uuid)
return
}
console.log("DROP REULT", this.object.type, item.type)
if (this.object.type == 'virtue' ) {
if (item.type == 'effect') {

View File

@ -11,6 +11,7 @@
import { PegasusActor } from "./pegasus-actor.js";
import { PegasusItemSheet } from "./pegasus-item-sheet.js";
import { PegasusActorSheet } from "./pegasus-actor-sheet.js";
import { PegasusVehicleSheet } from "./pegasus-vehicle-sheet.js";
import { PegasusNPCSheet } from "./pegasus-npc-sheet.js";
import { PegasusUtility } from "./pegasus-utility.js";
import { PegasusCombat } from "./pegasus-combat.js";
@ -62,8 +63,8 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("fvtt-pegasus", PegasusActorSheet, { types: ["character"], makeDefault: true });
//Actors.registerSheet("fvtt-pegasus", PegasusVehicleSheet, { types: ["vehicle"], makeDefault: false });
Actors.registerSheet("fvtt-pegasus", PegasusActorSheet, { types: ["character"], makeDefault: true })
Actors.registerSheet("fvtt-pegasus", PegasusVehicleSheet, { types: ["vehicle"], makeDefault: false })
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-pegasus", PegasusItemSheet, { makeDefault: true });

View File

@ -118,6 +118,36 @@ export class PegasusRollDialog extends Dialog {
PegasusUtility.updateDamageDicePool(this.rollData)
}
/* -------------------------------------------- */
manageVehicleWeapon( weaponIdx, toggled) {
let weapon = this.rollData.vehicleWeapons[weaponIdx]
if (weapon) {
this.rollData.weapon = duplicate(weapon)
if (toggled) {
this.rollData.weaponName = weapon.weapon.name
} else {
this.rollData.weaponName = undefined
}
weapon.applied = toggled
}
PegasusUtility.updateDamageDicePool(this.rollData)
}
/* -------------------------------------------- */
manageVehicleShield( shieldIdx, toggled) {
let shield = this.rollData.vehicleShieldList[shieldIdx]
if (shield) {
this.rollData.shield = duplicate(shield)
if (toggled) {
this.rollData.shieldName = shield.name
} else {
this.rollData.shieldName = undefined
}
shield.applied = toggled
}
PegasusUtility.updateArmorDicePool(this.rollData)
}
/* -------------------------------------------- */
manageEquip(equipIdx, toggled) {
let equip = this.rollData.equipmentsList[equipIdx]
@ -216,6 +246,19 @@ export class PegasusRollDialog extends Dialog {
let equipIdx = $(event.currentTarget).data("equip-idx")
this.manageEquip(equipIdx, toggled)
})
html.find('.vehicle-weapon-clicked').change((event) => {
let toggled = event.currentTarget.checked
let weaponIdx = $(event.currentTarget).data("vehicle-weapon-idx")
this.manageVehicleWeapon(weaponIdx, toggled)
this.refreshDialog()
})
html.find('.vehicle-shield-clicked').change((event) => {
let toggled = event.currentTarget.checked
let shieldIdx = $(event.currentTarget).data("vehicle-shield-idx")
this.manageVehicleShield(shieldIdx, toggled)
this.refreshDialog()
})
html.find('.pool-add-dice').click(async (event) => {
let diceKey = $(event.currentTarget).data("dice-key")

View File

@ -7,7 +7,7 @@ import { PegasusRollDialog } from "./pegasus-roll-dialog.js";
/* -------------------------------------------- */
const __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"]
const __name2DiceValue = { "0": 0, "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10": 10, "d12": 12 }
const __dice2Level = {"d0": 0, "d4": 1, "d6": 2, "d8": 3, "d10": 4, "d12": 5}
const __dice2Level = { "d0": 0, "d4": 1, "d6": 2, "d8": 3, "d10": 4, "d12": 5 }
/* -------------------------------------------- */
export class PegasusUtility {
@ -61,8 +61,8 @@ export class PegasusUtility {
/* -------------------------------------------- */
static initGenericRoll() {
let rollData = PegasusUtility.getBasicRollData()
rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.alias = "Dice Pool Roll",
rollData.mode = "generic"
rollData.title = `Dice Pool Roll`
rollData.img = "icons/dice/d12black.svg"
rollData.isGeneric = true
@ -85,14 +85,14 @@ export class PegasusUtility {
event.preventDefault()
let rollData = PegasusUtility.initGenericRoll()
rollData.isChatRoll = true
let rollDialog = await PegasusRollDialog.create( undefined, rollData)
rollDialog.render( true )
let rollDialog = await PegasusRollDialog.create(undefined, rollData)
rollDialog.render(true)
})
}
})
}
}
/* -------------------------------------------- */
static pushInitiativeOptions(html, options) {
options.push({ name: "Apply -10", condition: true, icon: '<i class="fas fa-plus"></i>', callback: target => { PegasusCombat.decInitBy10(target.data('combatant-id'), -10); } })
@ -105,20 +105,29 @@ export class PegasusUtility {
{ key: "d12", level: 5, img: "systems/fvtt-pegasus-rpg/images/dice/d12.webp" }]
}
/* -------------------------------------------- */
static buildDicePool(name, level, mod = 0, effectName = undefined) {
let dicePool = []
let diceKey = PegasusUtility.getDiceFromLevel(level)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
myDice = myDice.trim()
let newDice = {
name: name, key: myDice, level: PegasusUtility.getLevelFromDice(myDice), mod: mod, effect: effectName,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
dicePool.push(newDice)
mod = 0 // Only first dice has modifier
}
return dicePool
}
/* -------------------------------------------- */
static updateEffectsBonusDice(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-bonus-dice")
for (let effect of rollData.effectsList) {
if (effect && effect.applied && effect.type == "effect" && effect.effect.system.bonusdice) {
let diceKey = PegasusUtility.getDiceFromLevel(effect.effect.system.effectlevel)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "effect-bonus-dice", key: myDice, level: effect.effect.system.effectlevel, effect: effect.effect.name,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
newDicePool = newDicePool.concat( this.buildDicePool("effect-bonus-dice", effect.effect.system.effectlevel, 0, effect.effect.name ))
}
}
rollData.dicePool = newDicePool
@ -128,16 +137,8 @@ export class PegasusUtility {
static updateHindranceBonusDice(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-hindrance")
for (let hindrance of rollData.effectsList) {
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.system?.hindrance) ) ) {
let diceKey = PegasusUtility.getDiceFromLevel( (hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "effect-hindrance", key: myDice, level: hindrance.value, effect: hindrance.name,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.system?.hindrance))) {
newDicePool = newDicePool.concat( this.buildDicePool("effect-hindrance", (hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel, 0, hindrance.name ))
}
}
rollData.dicePool = newDicePool
@ -148,15 +149,13 @@ export class PegasusUtility {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "armor-shield")
for (let armor of rollData.armorsList) {
if (armor.applied) {
let diceKey = PegasusUtility.getDiceFromLevel(armor.value)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "armor-shield", key: myDice, level: armor.value,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
newDicePool = newDicePool.concat( this.buildDicePool("armor-shield", armor.value, 0))
}
}
newDicePool = rollData.dicePool.filter(dice => dice.name != "vehicle-shield")
for (let shield of rollData.vehicleShieldList) {
if (shield.applied) {
newDicePool = newDicePool.concat( this.buildDicePool("vehicle-shield", shield.value, 0))
}
}
rollData.dicePool = newDicePool
@ -169,56 +168,41 @@ export class PegasusUtility {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "damage")
for (let weapon of rollData.weaponsList) {
if (weapon.applied && weapon.type == "damage") {
let diceKey = PegasusUtility.getDiceFromLevel(weapon.value)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
let newDice = {
name: "damage", key: myDice, level: weapon.value,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
newDicePool = newDicePool.concat( this.buildDicePool("damage", weapon.value, 0))
}
}
for (let weapon of rollData.vehicleWeapons) {
if (weapon.applied) {
newDicePool = newDicePool.concat( this.buildDicePool("damage", weapon.value, 0))
}
}
rollData.dicePool = newDicePool
}
}
/* -------------------------------------------- */
static updateStatDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "stat")
let statDice = rollData.dicePool.find(dice => dice.name == "stat")
if (statDice.level > 0) {
newDicePool = newDicePool.concat( this.buildDicePool( "stat", rollData.statDicesLevel, statDice.mod))
}
if (rollData.vehicleStat) {
newDicePool = rollData.dicePool.filter(dice => dice.name != "vehiclestat")
if (rollData.vehicleStat.currentlevel > 0 ) {
newDicePool = newDicePool.concat( this.buildDicePool( "vehiclestat", rollData.vehicleStat.currentlevel, 0))
}
rollData.dicePool = newDicePool
}
}
/* -------------------------------------------- */
static updateStatDicePool( rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "stat")
let statDice = rollData.dicePool.find(dice => dice.name == "stat")
if (statDice.level > 0) {
let diceKey = PegasusUtility.getDiceFromLevel(rollData.statDicesLevel)
let diceList = diceKey.split(" ")
let mod = statDice.mod
for (let myDice of diceList) {
myDice = myDice.trim()
let newDice = {
name: "stat", key: myDice, level: PegasusUtility.getLevelFromDice(myDice), mod: mod,
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
mod = 0 // Only first dice has modifier
newDicePool.push(newDice)
}
}
rollData.dicePool = newDicePool
}
/* -------------------------------------------- */
static updateSpecDicePool(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "spec")
if (rollData.specDicesLevel > 0) {
let diceKey = PegasusUtility.getDiceFromLevel(rollData.specDicesLevel)
let diceList = diceKey.split(" ")
for (let myDice of diceList) {
myDice = myDice.trim()
let newDice = {
name: "spec", key: myDice, level: PegasusUtility.getLevelFromDice(myDice),
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
}
newDicePool.push(newDice)
}
newDicePool = newDicePool.concat( this.buildDicePool( "spec", rollData.specDicesLevel, 0))
}
rollData.dicePool = newDicePool
}
@ -302,14 +286,16 @@ export class PegasusUtility {
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
const pack = game.packs.get(compendium)
console.log("PACK", pack, compendium)
return await pack?.getDocuments() ?? []
}
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await PegasusUtility.loadCompendiumData(compendium);
return compendiumData.filter(filter);
let compendiumData = await PegasusUtility.loadCompendiumData(compendium)
//console.log("Comp data", compendiumData)
return compendiumData.filter(filter)
}
/* -------------------------------------------- */
@ -397,7 +383,7 @@ export class PegasusUtility {
this.rollPegasus(rollData)
character.modifyHeroLevelRemaining(-1)
} else {
ui.notifications.warn(`No more Hero Level for ${actor.name} ! Unable to reroll.`)
ui.notifications.warn(`No more Hero Level for ${character.name} ! Unable to reroll.`)
}
}
}
@ -408,7 +394,7 @@ export class PegasusUtility {
}
/* -------------------------------------------- */
static targetToken( user, token, flag) {
static targetToken(user, token, flag) {
if (flag) {
token.actor.checkIfPossible()
}
@ -447,6 +433,8 @@ export class PegasusUtility {
'systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-status.html',
'systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html',
'systems/fvtt-pegasus-rpg/templates/partial-vehicle-arc.html',
'systems/fvtt-pegasus-rpg/templates/partial-item-nav.html',
'systems/fvtt-pegasus-rpg/templates/partial-item-description.html',
'systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html',
@ -460,7 +448,7 @@ export class PegasusUtility {
effectName = effectName.toLowerCase()
let effect = game.items.contents.find(item => item.type == 'effect' && item.name.toLowerCase() == effectName)
if (!effect) {
let effects = await this.loadCompendium('fvtt-pegasus.effect', item => item.name.toLowerCase() == effectName)
let effects = await this.loadCompendium('fvtt-pegasus-rpg.effects', item => item.name.toLowerCase() == effectName)
let objs = effects.map(i => i.toObject())
effect = objs[0]
} else {
@ -632,7 +620,7 @@ export class PegasusUtility {
}
/* -------------------------------------------- */
static removeForeignEffect( effectData) {
static removeForeignEffect(effectData) {
if (game.user.isGM) {
console.log("Remote removal of effects", effectData)
let actor = game.canvas.tokens.get(effectData.defenderTokenId).actor
@ -660,19 +648,6 @@ export class PegasusUtility {
return chatData;
}
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium);
return await pack?.getDocuments() ?? [];
}
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await this.loadCompendiumData(compendium);
//console.log("Compendium", compendiumData);
return compendiumData.filter(filter);
}
/* -------------------------------------------- */
static async showDiceSoNice(roll, rollMode) {
if (game.modules.get("dice-so-nice")?.active) {
@ -723,7 +698,7 @@ export class PegasusUtility {
if (effect.foreign) {
if (game.user.isGM) {
this.removeForeignEffect(effect)
} else {
} else {
game.socket.emit("system.fvtt-pegasus-rpg", { msg: "msg_gm_remove_effect", data: effect })
}
} else {
@ -776,7 +751,6 @@ export class PegasusUtility {
/* -------------------------------------------- */
static async rollPegasus(rollData) {
let actor = game.actors.get(rollData.actorId)
let diceFormulaTab = []
@ -824,6 +798,8 @@ export class PegasusUtility {
// And save the roll
this.saveRollData(rollData)
actor.lastRoll = rollData
console.log("Rolldata performed ", rollData, diceFormula)
}
/* -------------------------------------------- */
@ -914,7 +890,11 @@ export class PegasusUtility {
static async searchItem(dataItem) {
let item
if (dataItem.pack) {
item = await fromUuid("Compendium." + dataItem.pack + "." + dataItem.id)
let id = dataItem.id || dataItem._id
let items = await this.loadCompendium( dataItem.pack, item => item.id == id)
//console.log(">>>>>> PACK", items)
item = items[0] || undefined
//item = await fromUuid(dataItem.pack + "." + id)
} else {
item = game.items.get(dataItem.id)
}
@ -977,10 +957,12 @@ export class PegasusUtility {
effectsList: [],
armorsList: [],
weaponsList: [],
vehicleWeapons: [],
equipmentsList: [],
vehicleShieldList: [],
optionsDiceList: PegasusUtility.getOptionsDiceList()
}
if ( !isInit) { // For init, do not display target hindrances
if (!isInit) { // For init, do not display target hindrances
PegasusUtility.updateWithTarget(rollData)
}
return rollData
@ -990,7 +972,7 @@ export class PegasusUtility {
static updateWithTarget(rollData) {
let target = PegasusUtility.getTarget()
if (target) {
console.log("TARGET ", target)
console.log("TARGET ", target)
let defenderActor = target.actor
rollData.defenderTokenId = target.id
//rollData.attackerId = this.id

View File

@ -0,0 +1,342 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { PegasusUtility } from "./pegasus-utility.js"
import { PegasusRollDialog } from "./pegasus-roll-dialog.js"
/* -------------------------------------------- */
export class PegasusVehicleSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "actor"],
template: "systems/fvtt-pegasus-rpg/templates/vehicle-sheet.html",
width: 960,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: true
});
}
/* -------------------------------------------- */
async getData() {
const objectData = this.object
let actorData = duplicate(this.object)
let formData = {
title: this.title,
id: objectData.id,
type: objectData.type,
img: objectData.img,
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: actorData.system,
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
optionsDiceList: PegasusUtility.getOptionsDiceList(),
vmsAvailable: objectData.system.modules.totalvms - objectData.system.modules.vmsused,
avgNRG: objectData.system.statistics.pc.maxnrg - objectData.system.statistics.pc.curnrg,
crewList: this.actor.getCrewList(),
totalCost: this.actor.getTotalCost(),
optionsLevel: PegasusUtility.getOptionsLevel(),
subActors: duplicate(this.actor.getSubActors()),
effects: duplicate(this.actor.getEffects()),
combatModules: duplicate(this.actor.getCombatModules()),
powerCoreModules: duplicate(this.actor.getPowercoreModules()),
vehicleHull: duplicate(this.actor.getVehicleHull()),
mobilityModules: duplicate(this.actor.getMobilityModules()),
propulsionModules: duplicate(this.actor.getPropulsionModules()),
vehicleModules: duplicate(this.actor.getVehicleModules()),
vehicleWeaponModules: duplicate(this.actor.getVehicleWeaponModules()),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields()) ),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
cargos: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getCargos()) ),
cargoCurrent: this.actor.getCurrentCargoCapacity(),
moneys: duplicate(this.actor.getMoneys()),
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,
isGM: game.user.isGM
}
this.formData = formData;
console.log("VEHICLE : ", formData, this.object);
return formData;
}
/* -------------------------------------------- */
async openGenericRoll() {
let rollData = PegasusUtility.initGenericRoll()
rollData.traumaState = this.actor.getTraumaState()
let rollDialog = await PegasusRollDialog.create( this.actor, rollData);
rollDialog.render( true );
}
/* -------------------------------------------- */
async rollIDR( itemId, diceValue) {
let item = this.actor.items.get( itemId) ?? {name: "Unknown"}
let myRoll = new Roll(diceValue+"x").roll({ async: false })
await PegasusUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
let chatData = {
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
content: `${this.actor.name} has roll IDR for ${item.name} : ${myRoll.total}`
}
ChatMessage.create(chatData)
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
if (e.keyCode === 13) return false;
});
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
const item = this.actor.items.get( itemId );
item.sheet.render(true);
});
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item")
PegasusUtility.confirmDelete(this, li)
})
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
})
html.find('.current-speed-change').change(ev => {
let speed = ev.currentTarget.value
this.actor.manageCurrentSpeed(speed)
})
html.find('.vehicle-module-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.activateVehicleModule( itemId)
});
html.find('.vehicle-weapon-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.activateVehicleModule( itemId)
});
html.find('.equip-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipActivate( itemId)
});
html.find('.equip-deactivate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipDeactivate( itemId)
});
html.find('.effect-used').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let itemId = li.data("item-id");
this.actor.perkEffectUsed( itemId)
});
html.find('.member-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let actorId = li.data("actor-id")
this.actor.delCrew(actorId)
});
html.find('.quantity-minus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), -1 );
} )
html.find('.quantity-plus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), +1 );
} )
html.find('.vehicle-current-nrg-minus').click(event => {
this.actor.incDecNRG( -1 );
} )
html.find('.vehicle-current-nrg-plus').click(event => {
this.actor.incDecNRG( 1 );
} )
html.find('.ammo-minus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), -1 );
} );
html.find('.ammo-plus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), +1 )
} );
html.find('.vehicle-stun-minus').click(event => {
this.actor.modifyVehicleStun( -1 )
} )
html.find('.vehicle-stun-plus').click(event => {
this.actor.modifyVehicleStun( 1 )
} )
html.find('.momentum-minus').click(event => {
this.actor.modifyMomentum( -1 )
} )
html.find('.momentum-plus').click(event => {
this.actor.modifyMomentum( 1 )
} )
html.find('.unarmed-attack').click((event) => {
this.actor.rollUnarmedAttack();
});
html.find('.generic-pool-roll').click((event) => {
this.openGenericRoll()
} );
html.find('.attack-melee').click((event) => {
this.actor.rollPoolFromVehicle( 'com', false, "melee-atk")
});
html.find('.damage-melee').click((event) => {
this.actor.rollPoolFromVehicle( 'str', false, "melee-dmg")
});
html.find('.attack-ranged').click((event) => {
this.actor.rollPoolFromVehicle( 'agi', false, "ranged-atk")
});
html.find('.damage-ranged').click((event) => {
this.actor.rollPoolFromVehicle( 'per', false, "ranged-dmg");
});
html.find('.defense-roll').click((event) => {
this.actor.rollPoolFromVehicle( 'agi', true, "defence");
});
html.find('.damage-resistance').click((event) => {
this.actor.rollVehicleDamageResistance( );
});
html.find('.currentlevel-change').change((event) => {
const statKey = $(event.currentTarget).data("stat-key");
if ( statKey == "man") {
this.actor.setTurningArc(event.currentTarget.value)
}
})
html.find('.roll-stat').click((event) => {
const statId = $(event.currentTarget).data("stat-key");
this.actor.rollStat(statId);
});
html.find('.roll-mr').click((event) => {
this.actor.rollMR();
});
html.find('.roll-idr').click((event) => {
const diceValue = $(event.currentTarget).data("dice-value")
const li = $(event.currentTarget).parents(".item")
this.rollIDR( li.data("item-id"), diceValue)
})
html.find('.weapon-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");
this.actor.rollWeapon(weaponId);
});
html.find('.armor-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const armorId = li.data("item-id");
this.actor.rollArmor(armorId);
});
html.find('.weapon-damage-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");
this.actor.rollWeapon(weaponId, true);
});
html.find('.weapon-damage').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weapon = this.actor.getOwnedItem(li.data("item-id"));
this.actor.rollDamage(weapon, 'damage');
});
html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore;
this.render(true);
});
html.find('.item-link a').click((event) => {
const itemId = $(event.currentTarget).data("item-id");
const item = this.actor.getOwnedItem(itemId);
item.sheet.render(true);
});
html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.equipItem( li.data("item-id") );
this.render(true);
});
html.find('.update-field').change(ev => {
const fieldName = $(ev.currentTarget).data("field-name");
let value = Number(ev.currentTarget.value);
this.actor.update( { [`${fieldName}`]: value } );
})
html.find('.member-view').click((event) => {
const li = $(event.currentTarget).parents(".item")
let actorId = li.data("actor-id")
const actor = game.actors.get( actorId )
actor.sheet.render(true)
})
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
return position;
}
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
const item = fromUuidSync(dragData.uuid)
if (item == undefined) {
item = this.actor.items.get( dragData.uuid )
}
let itemFull = await PegasusUtility.searchItem( item )
let ret = await this.actor.preprocessItemVehicle( event, itemFull, true )
if ( ret ) {
super._onDropItem(event, dragData)
}
}
/* -------------------------------------------- */
async _onDropActor(event, dragData) {
const actor = fromUuidSync(dragData.uuid)
if (actor) {
this.actor.addCrew(actor.id)
}else {
ui.notifications.warn("This actor is not found and can't be added to the Vehicle's crew.")
}
super._onDropActor(event)
}
/* -------------------------------------------- */
/** @override */
_updateObject(event, formData) {
// Update the Actor
return this.object.update(formData)
}
}

File diff suppressed because one or more lines are too long

View File

@ -1235,8 +1235,7 @@ ul, li {
/*************************************************************/
#pause
{
font-size: 2rem;
{ font-size: 2rem;
}
#pause > h3
{
@ -1285,6 +1284,8 @@ Focus FOC: #ff0084
background-color: black;
background: black;
}
.color-class-fc,
.color-class-man,
.color-class-agi,
.color-class-ranged-attack {
background-color: #02a41d;
@ -1303,10 +1304,12 @@ Focus FOC: #ff0084
.color-class-meleedmg {
background-color: #5f3d00;
}
.color-class-hr,
.color-class-phy,
.color-class-dmgres {
background-color: #990304;
}
.color-class-ad,
.color-class-mr {
background-color: #050505;
}
@ -1325,6 +1328,7 @@ Focus FOC: #ff0084
.color-class-ranged-damage {
background-color: #f9c801;
}
.color-class-pc,
.color-class-foc {
background-color: #ff0084;
}
@ -1376,6 +1380,10 @@ Focus FOC: #ff0084
max-height: 42px;
min-height: 36px;
}
.item-stat-roll-vehicle {
max-height: 102px;
min-height: 102px;
}
.item-stat-roll select, .item-stat-roll input {
margin-top: 4px;
margin-right: 2px;

View File

@ -1,6 +1,5 @@
{
"description": "Pegasus RPG system for FoundryVTT",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.0.zip",
"esmodules": [
"modules/pegasus-main.js"
],
@ -10,7 +9,8 @@
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
"path": "lang/en.json",
"flags": {}
}
],
"authors": [
@ -19,14 +19,11 @@
"flags": {}
}
],
"library": false,
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/raw/branch/master/system.json",
"manifestPlusVersion": "1.0.0",
"media": [],
"compatibility": {
"minimum": "10",
"verified": "10.284",
"verified": "10.285",
"maximum": "10"
},
"id": "fvtt-pegasus-rpg",
@ -35,241 +32,217 @@
"type": "Item",
"label": "Specialisations",
"name": "specialisations",
"path": "./packs/specialisations.db",
"path": "packs/specialisations.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"specialisation"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Racial Abilities",
"name": "racial-abilities",
"path": "./packs/racial-abilities.db",
"path": "packs/racial-abilities.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"ability"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Perks",
"name": "perk",
"path": "./packs/perk.db",
"path": "packs/perk.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"perk"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Powers",
"name": "powers",
"path": "./packs/powers.db",
"path": "packs/powers.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"power"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Race",
"name": "race",
"path": "./packs/race.db",
"path": "packs/race.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"race"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Role",
"name": "role",
"path": "./packs/role.db",
"path": "packs/role.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"role"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Effects",
"name": "effects",
"path": "./packs/effects.db",
"path": "packs/effects.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"effect"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Armour",
"name": "armour",
"path": "./packs/armour.db",
"path": "packs/armour.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"armour"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Equipment",
"name": "equipment",
"path": "./packs/equipment.db",
"path": "packs/equipment.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"equipment"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Shields",
"name": "shields",
"path": "./packs/shields.db",
"path": "packs/shields.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"shield"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Melee Weapons",
"name": "melee-weapons",
"path": "./packs/melee-weapons.db",
"path": "packs/melee-weapons.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"weapon", "melee"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Ranged Weapons",
"name": "ranged-weapons",
"path": "./packs/ranged-weapons.db",
"path": "packs/ranged-weapons.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"weapon", "ranged"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Currency",
"name": "currency",
"path": "./packs/currency.db",
"path": "packs/currency.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"currency", "money"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Macros",
"name": "macro-commands",
"path": "./packs/macro-commands.db",
"path": "packs/macro-commands.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"macro", "command"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Weapon modules",
"name": "vm-vehicle-weapons-modules",
"path": "./packs/vm-vehicle-weapons-modules.db",
"path": "packs/vm-vehicle-weapons-modules.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"weapon", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Propulsion modules",
"name": "vm-vehicle-propulsion-modules",
"path": "./packs/vm-vehicle-propulsion-modules.db",
"path": "packs/vm-vehicle-propulsion-modules.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"propulsion", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Power core modules",
"name": "vm-vehicle-power-core-module",
"path": "./packs/vm-vehicle-power-core-module.db",
"path": "packs/vm-vehicle-power-core-module.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"propulsion", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Modules",
"name": "vm-vehicle-modules",
"path": "./packs/vm-vehicle-modules.db",
"path": "packs/vm-vehicle-modules.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"module", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Mobility module",
"name": "vm-vehicle-mobility-module",
"path": "./packs/vm-vehicle-mobility-module.db",
"path": "packs/vm-vehicle-mobility-module.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"mobility", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Hull module",
"name": "vm-vehicle-hulls",
"path": "./packs/vm-vehicle-hulls.db",
"path": "packs/vm-vehicle-hulls.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"hull", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vehicle - Combat module",
"name": "vm-vehicle-combat-module",
"path": "./packs/vm-vehicle-combat-module.db",
"path": "packs/vm-vehicle-combat-module.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"combat", "vehicle"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Vices",
"name": "vices",
"path": "./packs/vices.db",
"path": "packs/vices.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"vice"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Virtues",
"name": "virtues",
"path": "./packs/virtues.db",
"path": "packs/virtues.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"virtue"
]
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "ZZ-Admin-FX",
"name": "zz-adminfx-zz",
"path": "./packs/zz-adminfx-zz.db",
"path": "packs/zz-adminfx-zz.db",
"system": "fvtt-pegasus-rpg",
"tags": [
"fx"
]
"private": false,
"flags": {}
}
],
"primaryTokenAttribute": "secondary.health",
@ -278,9 +251,9 @@
"styles": [
"styles/simple.css"
],
"templateVersion": 109,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.0.0",
"background" : "./images/ui/pegasus_welcome_page.webp"
}
"version": "10.0.19",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.19.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -10,6 +10,7 @@
"name": "",
"age": 0,
"size": "",
"sizenum": 0,
"weight": "",
"hair": "",
"sex": "",
@ -199,26 +200,33 @@
"description": ""
},
"vehicle": {
"crew": [],
"crewmax": 0,
"crewmin": 0,
"statistics": {
"fc": {
"label": "FC",
"abbrev": "fc",
"level": 0,
"currentlevel": 0
"currentlevel": 0,
"col": 1
},
"man": {
"label": "FC",
"abbrev": "fc",
"label": "MAN",
"abbrev": "man",
"dicevalue": "",
"level": 0,
"currentlevel": 0
"currentlevel": 0,
"turningarc45": 0,
"col": 1
},
"hr": {
"label": "HR",
"abbrev": "hr",
"level": 0,
"currentlevel": 0,
"size": 0
"size": 0,
"col": 2
},
"pc": {
"label": "PC",
@ -226,13 +234,16 @@
"level": 0,
"currentlevel": 0,
"avgnrg": 0,
"curnrg": 0
"curnrg": 0,
"maxnrg": 0,
"col": 2
},
"mr": {
"label": "MR",
"abbrev": "mr",
"level": 0,
"currentlevel": 0
"currentlevel": 0,
"col": 3
},
"ad": {
"label": "A/D",
@ -240,7 +251,8 @@
"level": 0,
"currentlevel": 0,
"accmode": "",
"currentspeed": ""
"currentspeed": "",
"col": 3
}
},
"stun": {
@ -257,7 +269,7 @@
"activatedmoduleenergy": 0,
"vdp": 0,
"vehiculevalue": 0,
"availablevms": 0,
"totalvms": 0,
"vmsused": 0,
"totalcost": 0
},
@ -275,34 +287,46 @@
},
"arcs": {
"frontarc": {
"label": "Fore Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"reararc": {
"label": "Rear Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"rightarc": {
"label": "Right Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"leftarc": {
"label": "Left Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": false
},
"toparc": {
"label": "Top Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": true
},
"bottomarc": {
"label": "Bottom Arc",
"topspeed": "",
"shieldlevel": 0,
"armourlevel": 0
"armourlevel": 0,
"is3D": true
}
}
}
@ -341,7 +365,8 @@
"combatmodule",
"propulsionmodule",
"vehiclemodule",
"vehicleweaponmodule"
"vehicleweaponmodule",
"cargo"
],
"effect": {
"type": "",
@ -386,6 +411,7 @@
"perksall": false,
"perksnumber": 0,
"perks": [],
"perksrole": "",
"statistics": ""
},
"role": {
@ -398,6 +424,7 @@
"specialability": [],
"specincrease": [],
"perks": [],
"perksrole": "",
"description": ""
},
"ability": {
@ -655,7 +682,9 @@
"range": "",
"idr": "",
"cost": 0,
"space": 0
"size": 0,
"space": 0,
"description": ""
},
"vehicleweaponmodule": {
"location": "",
@ -666,12 +695,22 @@
"effects": [],
"damagedicevalue": "",
"damagetype": "",
"damagetypelevel": 0,
"aoe": "",
"range": "",
"turret": "",
"linkedweapon": "",
"idr": "",
"cost": 0
"cost": 0,
"extradamage": false,
"extradamagevalue": 0,
"description": ""
},
"cargo": {
"capacity": 0,
"idr": "",
"value": 0,
"description": ""
}
}
}

View File

@ -839,17 +839,16 @@
<div>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="generic-label">Origin</label>
<input type="text" class="" name="system.biodata.origin" value="{{data.biodata.origin}}"
data-dtype="String" />
<label class="generic-label">Sex</label>
<input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Age</label>
<input type="text" class="" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Height</label>
<input type="text" class="" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="String" />
<label class="generic-label">Height/Weight</label>
<input type="text" class="" name="system.biodata.weight" value="{{data.biodata.weight}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
@ -864,13 +863,14 @@
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Weight</label>
<input type="text" class="" name="system.biodata.weight" value="{{data.biodata.weight}}"
data-dtype="String" />
<label class="generic-label">Size</label>
<input type="text" class="" name="system.biodata.sizenum" value="{{data.biodata.sizenum}}"
data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
<input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
<label class="generic-label">Origin</label>
<input type="text" class="" name="system.biodata.origin" value="{{data.biodata.origin}}"
data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
@ -986,6 +986,14 @@
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires"
name="system.biodata.desiresactive" {{checked data.biodata.desiresactive}} /> Active ?</label>
</li>
<li class="flexrow">
<label class="short-label">Morality : </label>
<input type="text" class="" name="system.biodata.morality" value="{{data.biodata.morality}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Morality threshold : </label>
<input type="text" class="" name="system.biodata.moralitythreshold" value="{{data.biodata.moralitythreshold}}" disabled data-dtype="Number" />
</li>
</ul>
<h3>Catchphrase : </h3>
@ -1026,14 +1034,6 @@
<label class="short-label">Bonus selection : </label>
<input type="text" class="" name="system.biodata.bonusselection" value="{{data.biodata.bonusselection}}" data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Morality : </label>
<input type="text" class="" name="system.biodata.morality" value="{{data.biodata.morality}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Morality threshold : </label>
<input type="text" class="" name="system.biodata.moralitythreshold" value="{{data.biodata.moralitythreshold}}" disabled data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Level (max) : </label>
<select class="status-small-label color-class-common" type="text" name="system.biodata.maxlevelremaining" value="{{data.biodata.maxlevelremaining}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>

View File

@ -25,7 +25,7 @@
<li>Weapon Damage Dice : {{weaponDamageDice}}</li>
{{/if}}
{{#if isResistance}}
<li>Armor Resistance Dice : {{armor.data.resistanceDice}}</li>
<li>Armor Resistance Dice : {{armor.system.resistanceDice}}</li>
{{/if}}
{{#if stat}}
<li>Statistic : {{stat.label}}</li>
@ -38,7 +38,11 @@
<li>Weapon : {{weaponName}}</li>
{{/if}}
{{#if weapon}}
<li>Damage type : {{weapon.weapon.data.damagetype}} {{weapon.weapon.data.damagetypelevel}}</li>
{{#if vehicle}}
<li>Damage type : {{weapon.weapon.system.damagetype}}</li>
{{else}}
<li>Damage type : {{weapon.weapon.system.damagetype}} {{weapon.weapon.system.damagetypelevel}}</li>
{{/if}}
{{/if}}
{{#if isResistance}}

View File

@ -0,0 +1,36 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul>
<li class="flexrow"><label class="generic-label">IDR</label>
<select class="competence-base flexrow" type="text" name="system.idr" value="{{data.idr}}" data-dtype="String">
{{#select data.idr}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Capacity</label>
<input type="text" class="" name="system.capacity" value="{{data.capacity}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Value</label>
<input type="text" class="" name="system.value" value="{{data.value}}" data-dtype="Number"/>
</li>
</ul>
</div>
</section>
</form>

View File

@ -21,12 +21,12 @@
<select class="competence-base flexrow" type="text" name="system.category" value="{{data.category}}" data-dtype="String">
{{#select data.category}}
<option value="general">General</option>
<option value="agitator">Agitator</option>,
<option value="defender">Defender</option>,
<option value="enhancer">Enhancer</option>,
<option value="scrapper">Scrapper</option>,
<option value="ranged">Ranged</option>,
<option value="tactician">Tactician</option>,
<option value="agitator">Agitator</option>
<option value="defender">Defender</option>
<option value="enhancer">Enhancer</option>
<option value="scrapper">Scrapper</option>
<option value="ranged">Ranged</option>
<option value="tactician">Tactician</option>
{{/select}}
</select>
</li>

View File

@ -124,7 +124,7 @@
<input type="text" class="padd-right" name="system.deactivatedtext" value="{{data.deactivatedtext}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Power Level Cost</label>
<li class="flexrow"><label class="generic-label">PPP Used to Purchase</label>
<input type="text" class="input-numeric-short padd-right" name="system.powerlevelcost" value="{{data.powerlevelcost}}"
data-dtype="Number" />
</li>

View File

@ -29,7 +29,7 @@
<input type="text" class="" name="system.ad" value="{{data.ad}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Top Speed (TS)</label>
<li class="flexrow"><label class="generic-label">Top Speed (TS) bonus</label>
<input type="text" class="" name="system.topspeed" value="{{data.topspeed}}" data-dtype="Number"/>
</li>

View File

@ -54,12 +54,12 @@
<ul>
<li class="flexrow"><label class="generic-label">Selectable Stats ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.selectablestats" {{checked
data.selectablestats}} /></label>
system.selectablestats}} /></label>
</li>
{{#if data.selectablestats}}
<li class="flexrow"><label class="generic-label">Select 1 stat only once?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.statsonlyonce" {{checked
data.statsonlyonce}} /></label>
system.statsonlyonce}} /></label>
</li>
<li class="flexrow"><label class="generic-label">Number of selectable stats</label>
<input type="text" class="input-numeric-short padd-right" name="system.numberstats" value="{{data.numberstats}}"

View File

@ -30,27 +30,7 @@
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="generic-label">Starting Specialisation at +1 DT (Two to be selected)</label>
</li>
<ul class="ul-level1">
<li class="flexrow">
<label class="generic-label">Starting Specialisations : </label>
</li>
<li class="flexrow">
<input type="text" class="padd-right" name="system.messagespecplus1" value="{{data.messagespecplus1}}" data-dtype="String"/>
</li>
<li class="flexrow"><div class="drop-spec1"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specialisationsplus1 as |spec idx|}}
<li class="flexrow">
<label name="system.specialisationsplus1[{{idx}}].name"><a class="view-subitem" data-type="specialisationsplus1" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specialisationsplus1" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<li class="flexrow">
<label class="generic-label">Role Ability</label>
</li>
@ -77,37 +57,23 @@
{{/each}}
</li>
</ul>
<li class="flexrow"><label class="generic-label">Available specialisations (Choose 1 at +2 DT, Choose 2 at +1 DT)</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-spec2"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specincrease as |spec idx|}}
<li class="flexrow">
<label name="system.specincrease[{{idx}}].name"><a class="view-subitem" data-type="specincrease" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specincrease" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<li class="flexrow"><label class="generic-label">Role category for available perks</label>
<select class="competence-base flexrow" type="text" name="system.perksrole" value="{{data.perksrole}}" data-dtype="String">
{{#select data.perksrole}}
<option value="agitator">Agitator</option>
<option value="defender">Defender</option>
<option value="enhancer">Enhancer</option>
<option value="scrapper">Scrapper</option>
<option value="ranged">Ranged</option>
<option value="tactician">Tactician</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Available perks (Choose 2)</label>
</li>
<ul class="ul-level1">
<li class="flexrow"><div class="drop-perk2"><label>Drop Perks here !</label></div>
</li>
{{#each data.perks as |perk idx|}}
<li class="flexrow">
<label name="system.perk[{{idx}}].name"><a class="view-subitem" data-type="perks" data-index="{{idx}}">{{perk.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="perks" data-index="{{idx}}" title="Delete Perk"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
</ul>
</div>
</section>

View File

@ -50,7 +50,7 @@
<label class="attribute-value checkbox"><input type="checkbox" name="system.activated" {{checked data.activated}}/></label>
</li>
<li class="flexrow"><label class="generic-label">NRG</label>
<li class="flexrow"><label class="generic-label">NRG Cost</label>
<input type="text" class="" name="system.nrg" value="{{data.nrg}}" data-dtype="Number"/>
</li>

View File

@ -67,7 +67,21 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Optimal Range</label>
<li class="flexrow"><label class="generic-label">Damage type level</label>
<input type="text" class="" name="system.damagetypelevel" value="{{data.damagetypelevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"><label class="generic-label">Extra damage ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.extradamage" {{checked data.extradamage}}/></label>
</li>
{{#if data.extradamage}}
<li class="flexrow"><label class="generic-label">Extra damage value (D12)</label>
<input type="text" class="" name="system.extradamagevalue" value="{{data.extradamagevalue}}" data-dtype="Number"/>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Optimal Range</label>
<select class="competence-base flexrow" type="text" name="system.range" value="{{data.range}}" data-dtype="String">
{{#select data.range}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-range.html notapplicable=true}}

View File

@ -7,14 +7,14 @@
{{/if}}
<span class="item-field-label-long"><label>
{{equip.data.quantity}}
{{equip.system.quantity}}
(<a class="quantity-minus plus-minus-button">&nbsp;-</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
{{#if (count equip.data.effects)}}
{{#if equip.data.activated}}
{{#if (count equip.system.effects)}}
{{#if equip.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
@ -25,14 +25,14 @@
</span>
<span class="item-field-label-short">
{{#if equip.data.iscontainer}}
{{equip.data.contentsEnc}}
{{equip.system.contentsEnc}}
{{else}}
{{mul equip.data.weight equip.data.quantity}}
{{mul equip.system.weight equip.system.quantity}}
{{/if}}
</span>
<span class="item-field-label-medium">
{{#if equip.data.idrDice}}
<a class="roll-idr" data-dice-value="{{equip.data.idrDice}}">{{equip.data.idrDice}}</a>
{{#if equip.system.idrDice}}
<a class="roll-idr" data-dice-value="{{equip.data.idrDice}}">{{equip.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
@ -40,9 +40,11 @@
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
{{#if (eq level 1)}}
<a class="item-control item-equip" title="Worn">{{#if equip.data.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
{{#if canequip}}
{{#if (eq level 1)}}
<a class="item-control item-equip" title="Worn">{{#if equip.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
{{/if}}
{{/if}}
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>

View File

@ -1,4 +1,4 @@
<option value="none">None</option>
<option value="fullstop">Full stop</option>
<option value="crawling">Crawling</option>
<option value="slow">Slow</option>
<option value="average">Average</option>

View File

@ -4,10 +4,10 @@
<ul>
{{#each effectsList as |effect idx|}}
{{#if effect.effect.data.hindrance}}
{{#if effect.effect.system.hindrance}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
<label class="generic-label">Target Hindrance : {{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">Target Hindrance : {{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
</li>
{{else}}
{{#if (eq type "hindrance")}}
@ -30,13 +30,13 @@
</li>
{{/if}}
{{#if (count effect.effect.data.specaffected)}}
{{#each effect.effect.data.specaffected as |spec idx2|}}
{{#if (count effect.effect.system.specaffected)}}
{{#each effect.effect.system.specaffected as |spec idx2|}}
{{#if (eq @root.specName spec.name)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
@ -44,31 +44,43 @@
{{/if}}
{{/each}}
{{else}}
{{#if (eq @root.statKey effect.effect.data.stataffected)}}
{{#if (eq @root.vehicleKey effect.effect.system.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{/if}}
{{#if (eq @root.statKey effect.effect.system.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}}
{{#if (eq @root.subKey effect.effect.data.stataffected)}}
{{#if (eq @root.subKey effect.effect.system.stataffected)}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
</li>
{{else}}
{{#if (eq effect.effect.data.stataffected "all")}}
{{#if (eq effect.effect.system.stataffected "all")}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="effect-clicked" id="effect-{{idx}}" data-effect-idx="{{idx}}" {{checked effect.applied}}/></label>
{{#if effect.effect}}
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.data.type}}, {{upperFirst effect.effect.data.genre}}, {{effect.value}})</label>
<label class="generic-label">{{effect.label}} ({{upperFirst effect.effect.system.type}}, {{upperFirst effect.effect.system.genre}}, {{effect.value}})</label>
{{else}}
<label class="generic-label">{{effect.label}} ({{effect.value}})</label>
{{/if}}
@ -76,6 +88,7 @@
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
@ -125,3 +138,33 @@
</ul>
{{/if}}
{{#if (notEmpty vehicleWeapons)}}
<label>Vehicle Weapons</label>
<ul>
{{#each vehicleWeapons as |weapon idx|}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="vehicle-weapon-clicked" id="vehicle-weapon-{{idx}}" data-vehicle-weapon-idx="{{idx}}" {{checked weapon.applied}}/></label>
<label class="generic-label padd-right">{{weapon.label}} ({{weapon.value}})</label>
</li>
{{/each}}
</ul>
{{/if}}
{{#if (notEmpty vehicleShieldList)}}
<label>Vehicle Shields</label>
<ul>
{{#each vehicleShieldList as |shield idx|}}
<li class="flex-group-left">
<label class="attribute-value checkbox"><input type="checkbox" class="vehicle-shield-clicked" id="vehicle-shield-{{idx}}" data-vehicle-shield-idx="{{idx}}" {{checked shield.applied}}/></label>
<label class="generic-label padd-right">{{shield.label}} ({{shield.value}})</label>
</li>
{{/each}}
</ul>
{{/if}}

View File

@ -0,0 +1,46 @@
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">{{arc.label}}</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Top speed</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Shield</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Armour</label>
</span>
</li>
<li class="item flexrow list-item list-item-shadow" data-arc-name="{{idx}}">
<span class="item-name-img">&nbsp;</span>
<span class="item-name-label-long">&nbsp;</span>
<span class="item-field-label-long">
<select type="text" name="system.arcs.{{idx}}.topspeed" value="{{arc.topspeed}}" data-dtype="String" disabled>
{{#select arc.topspeed}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-vehicle-speed.html}}
{{/select}}
</select>
</span>
<span class="item-field-label-long">
<select type="text" name="system.arcs.{{idx}}.shieldlevel" value="{{arc.shieldlevel}}" data-dtype="Number">
{{#select arc.shieldlevel}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</span>
<span class="item-field-label-long">
<select type="text" name="system.arcs.{{idx}}.armourlevel" value="{{arc.armourlevel}}" data-dtype="Number">
{{#select arc.armourlevel}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
</span>
</li>
</ul>

View File

@ -0,0 +1,94 @@
<li class="item flexrow list-item color-class-{{lower stat.abbrev}} item-stat-roll-vehicle" data-attr-key="{{key}}">
<div class="flexcol">
<div class="flexrow">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/icon_vehicle_{{stat.abbrev}}.webp">
</span>
<span class="stat-label stat-margin" name="{{key}}">
{{#if (eq key "ad")}}
<h4 class="stat-text-white stat-margin">{{upper stat.abbrev}}</h4>
{{else}}
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin"
data-stat-key="{{key}}">{{upper stat.abbrev}}</a></h4>
{{/if}}
</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
value="{{stat.level}}" data-dtype="Number" disabled>
{{#select stat.level}}
{{#if (eq key "ad")}}
{{{@root.optionsLevel}}}
{{else}}
{{{@root.optionsDiceList}}}
{{/if}}
{{/select}}
</select>
</div>
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Current level</span>
<select class="status-small-label color-class-common currentlevel-change" type="text" name="system.statistics.{{key}}.currentlevel"
value="{{stat.currentlevel}}" data-stat-key="{{key}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.currentlevel}}
{{#if (eq key "ad")}}
{{{@root.optionsLevel}}}
{{else}}
{{{@root.optionsDiceList}}}
{{/if}}
{{/select}}
</select>
</div>
{{#if (eq key "man")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">45° Turning Arcs</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.turningarc45"
value="{{stat.turningarc45}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} disabled>
{{#select stat.turningarc45}}
{{{@root.optionsLevel}}}
{{/select}}
</select>
</div>
{{/if}}
{{#if (eq key "hr")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Size</span>
<input type="text" class="input-numeric-short" name="system.statistics.{{key}}.size" value="{{stat.size}}" data-dtype="Number" />
</div>
{{/if}}
{{#if (eq key "pc")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Cur NRG</span>
<input type="text" class="input-numeric-short" name="system.statistics.{{key}}.curnrg" value="{{stat.curnrg}}" data-dtype="Number" />
<span class="padd-right status-small-label no-grow">
<a class="vehicle-current-nrg-plus plus-minus-button">+</a>
<a class="vehicle-current-nrg-minus plus-minus-button">&nbsp;-</a>
</span>
<span class="stat-label stat-margin" name="{{key}}">Av NRG</span>
<input type="text" class="input-numeric-short" value="{{@root.avgNRG}}" data-dtype="Number" disabled/>
<span class="stat-label stat-margin" name="{{key}}">Max NRG</span>
<input type="text" class="input-numeric-short" name="system.statistics.{{key}}.maxnrg" value="{{stat.maxnrg}}" data-dtype="Number" disabled />
</div>
{{/if}}
{{#if (eq key "ad")}}
<div class="flexrow stat-text-white">
<span class="stat-label stat-margin" name="{{key}}">Acc Mode</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.accmode"
value="{{stat.accmode}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.accmode}}
<option value="acc">ACC</option>
<option value="dec">DEC</option>
{{/select}}
</select>
<span class="stat-label stat-margin" name="{{key}}">Curr. speed</span>
<select class="status-small-label color-class-common current-speed-change" type="text" name="system.statistics.{{key}}.currentspeed"
value="{{stat.currentspeed}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.currentspeed}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-vehicle-speed.html}}
{{/select}}
</select>
</div>
{{/if}}
</div>
</li>

View File

@ -3,7 +3,7 @@
{{#if img}}
<img class="actor-icon" src="{{img}}" data-edit="img" title="{{name}}" />
{{/if}}
<h1 class="dialog-roll-title roll-dialog-header">{{title}}</h1>
<h1 class="dialog-roll-title roll-dialog-header">{{title}} {{#if vehicle}} from {{vehicle.name}} {{/if}}</h1>
</header>
<div class="grid grid-2col">
@ -14,7 +14,7 @@
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Stat Dice ({{stat.label}}) : </span>
<span class="roll-dialog-label">{{upper stat.label}} :</span>
<select class="roll-dialog-label" id="statDicesLevel" type="text" name="statDicesLevel"
value="{{statDicesLevel}}" data-dtype="Number" {{#if statKey}}disabled{{/if}}>
{{#select statDicesLevel}}
@ -24,6 +24,19 @@
<span class="small-label">&nbsp;+&nbsp;{{statMod}}</span>
</div>
{{#if statVehicle}}
<div class="flexrow">
<span class="roll-dialog-label">{{upper statVehicle.label}} :</span>
<select class="roll-dialog-label" id="statVehicleLevel" type="text" name="statVehicleLevel"
value="{{statVehicle.currentlevel}}" data-dtype="Number" {{#if statKey}}disabled{{/if}}>
{{#select statVehicle.currentlevel}}
{{{optionsDiceList}}}
{{/select}}
</select>
<span class="small-label">&nbsp;</span>
</div>
{{/if}}
{{#if specList}}
<div class="flexrow">
<span class="roll-dialog-label">Spec : </span>

View File

@ -0,0 +1,968 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="header-fields">
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="flexcol">
<div class="flexrow">
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 1)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
</ul>
</div>
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 2)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
</ul>
</div>
<div class="stat-item">
<ul>
{{#each data.statistics as |stat key|}}
{{#if (eq stat.col 3)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-stat-block.html stat=stat key=key}}
{{/if}}
{{/each}}
</ul>
</div>
</div>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="modules">Vehicle Modules</a>
<a class="item" data-tab="crew">Crew</a>
<a class="item" data-tab="cargo">Cargo Hold</a>
<a class="item" data-tab="details">Vehicle Details</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Combat Tab --}}
<div class="tab fight" data-group="primary" data-tab="combat">
<div class="flexcol">
<div class="flexrow">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-melee"><a class="combat-button attack-melee flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/COM.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Melee Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-meleedmg"><a class="combat-button damage-melee flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/STR.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Melee/Thrown Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-ranged-attack"><a class="combat-button attack-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/AGI.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Attack</span>
</a>
</li>
<li class="item flexrow list-item color-class-ranged-damage"><a class="combat-button damage-ranged flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PER.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Ranged Damage</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item color-class-defence"><a class="combat-button defense-roll flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/DEF.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Defence</span>
</a>
</li>
<li class="item flexrow list-item color-class-dmgres"><a class="combat-button damage-resistance flexrow">
<span class="combat-icon flexrow">
<img class="combat-icon" src="systems/fvtt-pegasus-rpg/images/icons/PHY.webp">
</span>
<span class="generic-label combat-margin stat-text-white">Damage Resistance</span>
</a>
</li>
</ul>
</div>
<div class="stat-item">
<span class="flexrow">
<h3>Stun</h3>
<span class="status-small-label no-grow">
<a class="vehicle-stun-plus plus-minus-button">+</a>
<a class="vehicle-stun-minus plus-minus-button">&nbsp;-</a>
</span>
</span>
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label">Current</span>
<input type="text" class="" name="system.combat.stunlevel" value="{{data.combat.stunlevel}}"
data-dtype="Number" />
<span class="generic-label small-label">Threshold</span>
<input type="text" class="" name="system.combat.stunthreshold" value="{{data.combat.stunthreshold}}"
data-dtype="Number" />
</li>
</ul>
</div>
</div>
<div class="flexrow">
<span class="item-name-label-header-long">
<label class="items-title-text">Direction of travel</label>
<select type="text" name="system.secondary.traveldirection" value="{{data.secondary.traveldirection}}" data-dtype="String">
{{#select data.secondary.traveldirection}}
{{#each data.arcs as |arc idx|}}
<option value="{{idx}}">{{arc.label}}</option>
{{/each}}
{{/select}}
</select>
</span>
<span class="item-name-label-header-long">
<label class="items-title-text">Move range</label>
<select type="text" name="system.secondary.moverange" value="{{data.secondary.moverange}}" data-dtype="String">
{{#select data.secondary.moverange}}
<option value="nomovement">No Movement</option>
<option value="threatzone">Threat zone</option>
<option value="close">Close</option>
<option value="medium">Medium</option>
<option value="long">Long</option>
<option value="extreme">Extreme</option>
{{/select}}
</select>
</span>
</div>
<div class="flexrow">
<span class="item-name-label-header-long">
<label class="items-title-text">Using 3D combat</label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.secondary.is3Dcombat" {{checked
data.secondary.is3Dcombat}} /></label>
</span>
{{#if data.secondary.is3Dcombat}}
<span class="item-name-label-header-long">
<label class="items-title-text">Elevation</label>
<input type="text" class="input-numeric-short padd-right" name="system.secondary.elevation" value="{{data.secondary.elevation}}" data-dtype="Number"/>
</span>
<span class="item-name-label-header-long">
<label class="items-title-text">Angle</label>
<select type="text" name="system.secondary.angle" value="{{data.secondary.angle}}" data-dtype="String">
{{#select data.secondary.angle}}
<option value="level">Level</option>
<option value="angled">Angled</option>
<option value="Vertical">Vertical</option>
{{/select}}
</select>
</span>
{{/if}}
</div>
<div>
{{#each data.arcs as |arc idx|}}
{{#if arc.is3D}}
{{#if @root.data.secondary.is3Dcombat}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-arc.html idx=idx arc=arc}}
{{/if}}
{{else}}
{{> systems/fvtt-pegasus-rpg/templates/partial-vehicle-arc.html idx=idx arc=arc}}
{{/if}}
{{/each}}
</div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long2">
<h3><label class="items-title-text">Effects</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Level</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">P/N</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Stat</label>
</span>
</li>
{{#each effects as |effect key|}}
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{effect.id}}"
data-item-id="{{effect._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{effect.img}}" /></a>
<span class="item-name-label-long2">{{effect.name}}</span>
<span class="item-field-label-short">{{effect.system.effectlevel}}</span>
<span class="item-field-label-short">{{upperFirst effect.system.type}}</span>
<span class="item-field-label-short">{{upperFirst effect.datsystema.genre}}</span>
<span class="item-field-label-short">{{upper effect.system.stataffected}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Modules Tab --}}
<div class="tab items" data-group="primary" data-tab="modules">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label "><strong>VDP</strong></span>
<input type="text" class="input-numeric-short padd-right" name="system.modules.vdp" value="{{data.modules.vdp}}"
data-dtype="Number" />
<span class="generic-label small-label"><strong>Vehicle Value</strong></span>
<input type="text" class="input-numeric-short" name="system.modules.vehiculevalue" value="{{data.modules.vehiculevalue}}"
data-dtype="Number" />
<span class="generic-label small-label"><strong>Total cost</strong></span>
<input type="text" class="" value="{{totalCost}}"
data-dtype="Number" disabled />
<span class="generic-label small-label "><strong>VMS</strong></span>
<span class="generic-label small-label">Total</span>
<input type="text" class="input-numeric-short" name="system.modules.totalvms" value="{{data.modules.totalvms}}"
data-dtype="Number" disabled />
<span class="generic-label small-label">Available</span>
<input type="text" class="input-numeric-short" value="{{vmsAvailable}}"
data-dtype="Number" disabled />
<span class="generic-label small-label">Used</span>
<input type="text" class="input-numeric-short" name="system.modules.vmsused" value="{{data.modules.vmsused}}"
data-dtype="Number" disabled />
</li>
</ul>
</div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">1 - Hull</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Size</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Hull Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">HR</label>
</span>
<span class="item-field-label-short">
<label class="short-label">MAN</label>
</span>
<span class="item-field-label-short">
<label class="short-label">VMS</label>
</span>
</li>
{{#each vehicleHull as |hull key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{hull._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{hull.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{hull.name}}</a></span>
<span class="item-field-label-short">{{hull.system.size}}</span>
<span class="item-field-label-medium">{{hull.system.hulltype}}</span>
<span class="item-field-label-short">{{hull.system.hr}}</span>
<span class="item-field-label-short">{{hull.system.man}}</span>
<span class="item-field-label-short">{{hull.system.vms}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">2 - Power core</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">PC</label>
</span>
<span class="item-field-label-short">
<label class="short-label">NRG</label>
</span>
</li>
{{#each powerCoreModules as |powercore key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{powercore._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{powercore.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{powercore.name}}</a></span>
<span class="item-field-label-medium">{{powercore.system.coretype}}</span>
<span class="item-field-label-short">{{powercore.system.pc}}</span>
<span class="item-field-label-short">{{powercore.system.nrg}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">3 -Mobility</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Vehicle Category</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Quality</label>
</span>
<span class="item-field-label-short">
<label class="short-label">MR</label>
</span>
<span class="item-field-label-short">
<label class="short-label">TS:F</label>
</span>
<span class="item-field-label-short">
<label class="short-label">TS:S</label>
</span>
<span class="item-field-label-short">
<label class="short-label">TS:R</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">MAN Adj.</label>
</span>
</li>
{{#each mobilityModules as |mobility key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{mobility._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{mobility.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{mobility.name}}</a></span>
<span class="item-field-label-long">{{mobility.system.vehiclecategory}}</span>
<span class="item-field-label-medium">{{mobility.system.quality}}</span>
<span class="item-field-label-short">{{mobility.system.mr}}</span>
<span class="item-field-label-short">{{mobility.system.ts_f}}</span>
<span class="item-field-label-short">{{mobility.system.ts_s}}</span>
<span class="item-field-label-short">{{mobility.system.ts_r}}</span>
<span class="item-field-label-medium">{{mobility.system.man}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">4 - Propulsion</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Quality</label>
</span>
<span class="item-field-label-short">
<label class="short-label">A/D</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">TS:F Adj.</label>
</span>
</li>
{{#each propulsionModules as |propulsion key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{propulsion._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{propulsion.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{propulsion.name}}</a></span>
<span class="item-field-label-medium">{{propulsion.system.quality}}</span>
<span class="item-field-label-short">{{propulsion.system.ad}}</span>
<span class="item-field-label-short">{{propulsion.system.topspeed}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">5 - Combat</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quality</label>
</span>
<span class="item-field-label-short">
<label class="short-label">FC</label>
</span>
</li>
{{#each combatModules as |combat key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{combat._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{combat.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{combat.name}}</a></span>
<span class="item-field-label-long">{{combat.system.combattype}}</span>
<span class="item-field-label-short">{{combat.system.fc}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Vehicles modules</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Category</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Location</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Security</label>
</span>
<span class="item-field-label-short">
<label class="short-label">NRG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
</span>
<span class="item-field-label-short">
<label class="short-label">IDR</label>
</span>
</li>
{{#each vehicleModules as |vehiclemod key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{vehiclemod._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{vehiclemod.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{vehiclemod.name}}</a></span>
<span class="item-field-label-long">{{vehiclemod.system.category}}</span>
<span class="item-field-label-long">{{vehiclemod.system.location}}</span>
<span class="item-field-label-long">{{vehiclemod.system.security}}</span>
<span class="item-field-label-short">{{vehiclemod.system.nrg}}</span>
<span class="item-field-label-medium">{{vehiclemod.system.range}}</span>
<span class="item-field-label-short">{{vehiclemod.system.idr}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control vehicle-module-activate" title="Activated">{{#if vehiclemod.system.activated}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Vehicles weapons</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Site</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Location</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">AoE</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Turret</label>
</span>
<span class="item-field-label-short">
<label class="short-label">NRG</label>
</span>
<span class="item-field-label-short">
<label class="short-label">IDR</label>
</span>
</li>
{{#each vehicleWeaponModules as |weapon key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label-long"><a class="roll-spec">{{weapon.name}}</a></span>
<span class="item-field-label-long">{{weapon.system.site}}</span>
<span class="item-field-label-long">{{weapon.system.location}}</span>
<span class="item-field-label-short">{{weapon.system.dmg}}</span>
<span class="item-field-label-medium">{{weapon.system.aoe}}</span>
<span class="item-field-label-medium">{{weapon.system.turrent}}</span>
<span class="item-field-label-short">{{weapon.system.nrg}}</span>
<span class="item-field-label-short">{{weapon.system.idr}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control vehicle-weapon-activate" title="Activated">{{#if weapon.system.activated}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{!-- Crew Tab --}}
<div class="tab items" data-group="primary" data-tab="crew">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label "><strong>Maximum Crew Capacity</strong></span>
<input type="text" class="input-numeric-short padd-right" name="system.crewmax" value="{{data.crewmax}}"
data-dtype="Number" />
<span class="generic-label small-label"><strong>Minimum Crew Required</strong></span>
<input type="text" class="input-numeric-short" name="system.crewmin" value="{{data.crewmin}}"
data-dtype="Number" />
</li>
</ul>
</div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Crew</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each crewList as |member key|}}
<li class="item flexrow list-item list-item-shadow" data-actor-id="{{member.id}}">
<a class="member-view item-name-img" title="View Actor"><img class="sheet-competence-img"
src="{{member.img}}" /></a>
<span class="item-name-label">{{member.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control member-delete" title="Delete Member"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{!-- Cargo Tab --}}
<div class="tab equipment" data-group="primary" data-tab="cargo">
<div class="stat-item">
<ul class="stat-list alternate-list">
<li class="item stat flexrow list-item">
<span class="generic-label small-label "><strong>Cargo Capacity</strong></span>
<input type="text" class="input-numeric-short padd-right" name="system.cargo.cargocapacity" value="{{data.cargo.cargocapacity}}"
data-dtype="Number" />
<span class="generic-label small-label"><strong>Total Cargo Capacity</strong></span>
<input type="text" class="input-numeric-short" value="{{cargoCurrent}}"
data-dtype="Number" />
</li>
</ul>
</div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Cargo</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Capacity</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Value</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="cargo" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each cargos as |cargo key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{cargo.img}}" /></a>
<span class="item-name-label">{{cargo.name}}</span>
<span class="item-field-label-long"><label>
{{cargo.system.capacity}}
</label>
</span>
<span class="item-field-label-medium">
<label>{{cargo.system.value}}</label>
</span>
<span class="item-field-label-medium">
{{#if cargo.system.idrDice}}
<a class="roll-idr" data-dice-value="{{cargo.system.idrDice}}">{{cargo.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Money</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Qty</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="money" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each moneys as |money key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{money.img}}" /></a>
<span class="item-name-label">{{money.name}}</span>
<span class="item-field-label-long"><label>
{{money.system.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
<label>{{money.system.weight}}</label>
</span>
<span class="item-field-label-medium">
{{#if money.system.idrDice}}
<a class="roll-idr" data-dice-value="{{money.system.idrDice}}">{{money.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Weapons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attack</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Damage</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">DMGT</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Ammo</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each weapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label">{{weapon.name}}</span>
<span class="item-field-label-short"><label>{{upper weapon.system.statistic}}</label></span>
<span class="item-field-label-short"><label>{{upper weapon.system.damagestatistic}}</label></span>
<span class="item-field-label-short"><label>{{weapon.system.damageDice}}</label></span>
<span class="item-field-label-medium"><label>{{weapon.system.damagetype}} ({{weapon.system.damagetypelevel}})</label></span>
{{#if (gt weapon.system.ammomax 0)}}
<span class="item-field-label-long"><label>{{weapon.system.ammocurrent}}/{{weapon.system.ammomax}}
(<a class="ammo-minus plus-minus-button"> -</a>/<a class="ammo-plus plus-minus-button">+</a>)
</label></span>
{{else}}
<span class="item-field-label-long"><label>-</label>
</span>
{{/if}}
<span class="item-field-label-medium">
{{#if (count weapon.system.effects)}}
{{#if weapon.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short"><label>{{weapon.system.weight}}</label></span>
<span class="item-field-label-medium">
{{#if weapon.system.idrDice}}
<a class="roll-idr" data-dice-value="{{weapon.system.idrDice}}">{{weapon.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armors</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG RES</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Loc</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="armor" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each armors as |armor key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{armor.img}}" /></a>
<span class="item-name-label">{{armor.name}}</span>
<span class="item-field-label-short">{{upper armor.system.statistic}}</span>
<span class="item-field-label-short">{{armor.system.resistanceDice}}</span>
<span class="item-field-label-medium">{{armor.system.locationprotected}}</span>
<span class="item-field-label-medium">
{{#if (count armor.system.effects)}}
{{#if armor.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{armor.system.weight}}</span>
<span class="item-field-label-medium">
{{#if armor.system.idrDice}}
<a class="roll-idr" data-dice-value="{{armor.system.idrDice}}">{{armor.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Shields</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="shield" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each shields as |shield key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{shield.img}}" /></a>
<span class="item-name-label">{{shield.name}}</span>
<span class="item-field-label-short">{{shield.system.levelDice}}</span>
<span class="item-field-label-medium">
{{#if (count shield.system.effects)}}
{{#if shield.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{shield.system.weight}}</span>
<span class="item-field-label-medium">
{{#if shield.system.idrDice}}
<a class="roll-idr" data-dice-value="{{shield.system.idrDice}}">{{shield.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipment</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quantity</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each equipments as |equip key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=equip level=1 canequip=false}}
{{/each}}
</ul>
<hr>
<h3>Cargo information : </h3>
<div class="form-group editor">
{{editor data.cargo.cargoinformation target="system.cargo.cargoinformation" button=true owner=owner
editable=editable}}
</div>
<hr>
</div>
{{!-- Details Tab --}}
<div class="tab biodata" data-group="primary" data-tab="details">
<hr>
<h3>Description : </h3>
<div class="form-group editor">
{{editor data.biodata.description target="system.biodata.description" button=true owner=owner
editable=editable}}
</div>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor data.biodata.notes target="system.biodata.notes" button=true owner=owner editable=editable}}
</div>
<hr>
</article>
</div>
</section>
</form>