Merge branch 'master' into cyr-power-point-ui
BIN
.DS_Store
vendored
Normal file
8
CONTRIBUTIONS.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
Rick Fisto
|
||||
- [Fisto's Codex](https://www.gmbinder.com/share/-M-qA_FYgTwJjU8yFjjx)
|
||||
|
||||
Heresy
|
||||
- [Heritic's Guide to the Galaxy](https://www.gmbinder.com/share/-M815p5BfQ0wbdKY7zqN)
|
||||
|
||||
Erikstormtrooper
|
||||
- [Englibesh Font](http://www.erikstormtrooper.com/englibesh.htm)
|
|
@ -27,3 +27,10 @@ may do this by cloning the repository or downloading a zip archive from the
|
|||
Code and content contributions are accepted. Please feel free to submit issues to the issue tracker or submit merge
|
||||
requests for code changes. Approval for such requests involves code and (if necessary) design review by The Dev Team.
|
||||
Please reach out on the SW5E Foundry Dev Discord with any questions.
|
||||
|
||||
## Compatible Modules and Optimum Settings
|
||||
|
||||
- DAE (Dynamic Active Effects) is needed for many automatic features.
|
||||
- **Please enable: "Include active effects in special traits display" in "Configure Game Settings> Module Settings> Dynamic Active Effects".**
|
||||
- Midi QoL is compatible with great features
|
||||
- Token Action Hud has compatibility
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
@blockquoteShadow: 0 0 20px rgba(@colorBlue, 0.8);
|
||||
|
||||
//forms
|
||||
@inputBackgroundColor: @colorGray;
|
||||
@inputBackgroundColor: white;
|
||||
@inputBorderNormal: @colorLightGray;
|
||||
@inputBorderHover: @colorGray;
|
||||
@inputBorderFocus: @colorRed;
|
||||
|
|
|
@ -999,9 +999,6 @@
|
|||
.russoOne(13px);
|
||||
border-bottom: none;
|
||||
}
|
||||
// .power-dc {
|
||||
// grid-column-start: 3;
|
||||
// }
|
||||
}
|
||||
}
|
||||
.tab.biography {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
input[type="text"], input[type="number"], input[type="password"], input[type="date"], input[type="time"], select, textarea {
|
||||
border: 1px solid @inputBorderNormal;
|
||||
color: @inputTextColor;
|
||||
&:hover {
|
||||
border-color: @inputBorderHover;
|
||||
}
|
||||
|
|
|
@ -95,8 +95,8 @@
|
|||
}
|
||||
#chat-controls {
|
||||
.roll-type-select {
|
||||
background: #4f4f4f;
|
||||
color: #FFFFFF;
|
||||
background: #a9a9a9;
|
||||
color: #1C1C1C;
|
||||
}
|
||||
label {
|
||||
color: @bodyFontColor;
|
||||
|
@ -104,7 +104,8 @@
|
|||
|
||||
}
|
||||
#chat-form textarea {
|
||||
background: #4f4f4f;
|
||||
background: #a9a9a9;
|
||||
color: #1C1C1C;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,16 @@ body.dark-theme {
|
|||
border-width: 0 0 1px 0;
|
||||
border-bottom: 1px solid @hrColor;
|
||||
}
|
||||
|
||||
select {
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
input[type="text"], input[type="number"], input[type="password"], input[type="date"], input[type="time"], select, textarea {
|
||||
color: @inputTextColor;
|
||||
}
|
||||
|
||||
@import "components/forms-themes.less";
|
||||
@import "components/sidebar-themes.less";
|
||||
@import "components/foundry-nav-themes.less";
|
||||
|
|
121
module/characterImporter.js
Normal file
|
@ -0,0 +1,121 @@
|
|||
export default class CharacterImporter {
|
||||
|
||||
// transform JSON from sw5e.com to Foundry friendly format
|
||||
// and insert new actor
|
||||
static async transform(rawCharacter){
|
||||
const sourceCharacter = JSON.parse(rawCharacter); //source character
|
||||
|
||||
const details = {
|
||||
species: sourceCharacter.attribs.find(e => e.name == "race").current,
|
||||
background: sourceCharacter.attribs.find(e => e.name == "background").current,
|
||||
alignment: sourceCharacter.attribs.find(e => e.name == "alignment").current
|
||||
}
|
||||
|
||||
const hp = {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "hp").current,
|
||||
min: 0,
|
||||
max: sourceCharacter.attribs.find(e => e.name == "hp").current,
|
||||
temp: sourceCharacter.attribs.find(e => e.name == "hp_temp").current
|
||||
};
|
||||
|
||||
const ac = {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "ac").current
|
||||
};
|
||||
|
||||
const abilities = {
|
||||
str: {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "strength").current,
|
||||
proficient: sourceCharacter.attribs.find(e => e.name == 'strength_save_prof').current ? 1 : 0
|
||||
},
|
||||
dex: {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "dexterity").current,
|
||||
proficient: sourceCharacter.attribs.find(e => e.name == 'dexterity_save_prof').current ? 1 : 0
|
||||
},
|
||||
con: {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "constitution").current,
|
||||
proficient: sourceCharacter.attribs.find(e => e.name == 'constitution_save_prof').current ? 1 : 0
|
||||
},
|
||||
int: {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "intelligence").current,
|
||||
proficient: sourceCharacter.attribs.find(e => e.name == 'intelligence_save_prof').current ? 1 : 0
|
||||
},
|
||||
wis: {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "wisdom").current,
|
||||
proficient: sourceCharacter.attribs.find(e => e.name == 'wisdom_save_prof').current ? 1 : 0
|
||||
},
|
||||
cha: {
|
||||
value: sourceCharacter.attribs.find(e => e.name == "charisma").current,
|
||||
proficient: sourceCharacter.attribs.find(e => e.name == 'charisma_save_prof').current ? 1 : 0
|
||||
},
|
||||
};
|
||||
|
||||
const targetCharacter = {
|
||||
name: sourceCharacter.name,
|
||||
type: "character",
|
||||
data: {
|
||||
abilities: abilities,
|
||||
details: details,
|
||||
attributes: {
|
||||
ac: ac,
|
||||
hp: hp
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let actor = await Actor.create(targetCharacter);
|
||||
|
||||
const profession = sourceCharacter.attribs.find(e => e.name == "class").current;
|
||||
let professionLevel = sourceCharacter.attribs.find(e => e.name == "class_display").current;
|
||||
professionLevel = parseInt( professionLevel.replace(/[^0-9]/g,'') ); //remove a-z, leaving only integers
|
||||
CharacterImporter.addClasses(profession, professionLevel, actor);
|
||||
}
|
||||
|
||||
static async addClasses(profession, level, actor){
|
||||
let classes = await game.packs.get('sw5e.classes').getContent();
|
||||
let assignedClass = classes.find( c => c.name === profession );
|
||||
assignedClass.data.data.levels = level;
|
||||
await actor.createEmbeddedEntity("OwnedItem", assignedClass.data, { displaySheet: false });
|
||||
}
|
||||
|
||||
static addImportButton(html){
|
||||
const header = $("#actors").find("header.directory-header");
|
||||
const search = $("#actors").children().find("div.header-search");
|
||||
const newImportButtonDiv = $("#actors").children().find("div.header-actions").clone();
|
||||
const newSearch = search.clone();
|
||||
search.remove();
|
||||
newImportButtonDiv.attr('id', 'character-sheet-import');
|
||||
header.append(newImportButtonDiv);
|
||||
newImportButtonDiv.children("button").remove();
|
||||
newImportButtonDiv.append("<button class='create-entity' id='cs-import-button'><i class='fas fa-upload'></i> Import Character</button>");
|
||||
newSearch.appendTo(header);
|
||||
|
||||
let characterImportButton = $("#cs-import-button");
|
||||
characterImportButton.click(ev => {
|
||||
let content = '<h1>Saved Character JSON Import</h1> '
|
||||
+ '<label for="character-json">Paste character JSON here:</label> '
|
||||
+ '</br>'
|
||||
+ '<textarea id="character-json" name="character-json" rows="10" cols="50"></textarea>';
|
||||
let importDialog = new Dialog({
|
||||
title: "Import Character from SW5e.com",
|
||||
content: content,
|
||||
buttons: {
|
||||
"Import": {
|
||||
icon: '<i class="fas fa-file-import"></i>',
|
||||
label: "Import Character",
|
||||
callback: (e) => {
|
||||
let characterData = $('#character-json').val();
|
||||
console.log('Parsing Character JSON');
|
||||
CharacterImporter.transform(characterData);
|
||||
}
|
||||
},
|
||||
"Cancel": {
|
||||
icon: '<i class="fas fa-times-circle"></i>',
|
||||
label: "Cancel",
|
||||
callback: () => {},
|
||||
}
|
||||
}
|
||||
})
|
||||
importDialog.render(true);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -274,7 +274,7 @@ SW5E.consumableTypes = {
|
|||
"food": "SW5E.ConsumableFood",
|
||||
"medpac": "SW5E.ConsumableMedpac",
|
||||
"technology": "SW5E.ConsumableTechnology",
|
||||
"ammunition": "SW5E.ConsumableAmmunition",
|
||||
"ammo": "SW5E.ConsumableAmmunition",
|
||||
"trinket": "SW5E.ConsumableTrinket",
|
||||
"force": "SW5E.ConsumableForce",
|
||||
"tech": "SW5E.ConsumableTech"
|
||||
|
|
|
@ -426,7 +426,7 @@ export default class Item5e extends Item {
|
|||
// Define follow-up actions resulting from the item usage
|
||||
let createMeasuredTemplate = hasArea; // Trigger a template creation
|
||||
let consumeRecharge = !!recharge.value; // Consume recharge
|
||||
let consumeResource = !!resource.target && (resource.type !== "ammo") // Consume a linked (non-ammo) resource
|
||||
let consumeResource = !!resource.target && resource.type !== "ammo" && !['simpleB', 'martialB'].includes(id.weaponType); // Consume a linked (non-ammo) resource, ignore if use is from a blaster
|
||||
let consumePowerSlot = requirePowerSlot; // Consume a power slot
|
||||
let consumeUsage = !!uses.per; // Consume limited uses
|
||||
let consumeQuantity = uses.autoDestroy; // Consume quantity of the item in lieu of uses
|
||||
|
|
BIN
packs/Icons/Archetypes/Occultist Pursuit.webp
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
packs/Icons/Archetypes/Pugnacity Practice.webp
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
packs/Icons/Class Features/BSKR-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/BSKR-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/BSKR-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/BSKR-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/BSKR-Action.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/BSKR-Bonus.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/BSKR-Passive.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/BSKR-Reaction.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/CSLR-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/CSLR-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
packs/Icons/Class Features/CSLR-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
packs/Icons/Class Features/CSLR-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
packs/Icons/Class Features/CSLR-Action.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
packs/Icons/Class Features/CSLR-Bonus.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
packs/Icons/Class Features/CSLR-Passive.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
packs/Icons/Class Features/CSLR-Reaction.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
packs/Icons/Class Features/ENGR-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
packs/Icons/Class Features/ENGR-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
packs/Icons/Class Features/ENGR-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
packs/Icons/Class Features/ENGR-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
packs/Icons/Class Features/ENGR-Action.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
packs/Icons/Class Features/ENGR-Bonus.webp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
packs/Icons/Class Features/ENGR-Passive.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/ENGR-Reaction.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/FGTR-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
packs/Icons/Class Features/FGTR-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
packs/Icons/Class Features/FGTR-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
packs/Icons/Class Features/FGTR-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
packs/Icons/Class Features/FGTR-Action.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
packs/Icons/Class Features/FGTR-Bonus.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
packs/Icons/Class Features/FGTR-Passive.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
packs/Icons/Class Features/FGTR-Reaction.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
packs/Icons/Class Features/GRDN-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/GRDN-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/GRDN-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/GRDN-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/GRDN-Action.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/GRDN-Bonus.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/GRDN-Passive.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/GRDN-Reaction.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/MNK-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/MNK-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/MNK-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/MNK-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/MNK-Action.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/MNK-Bonus.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/MNK-Passive.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/MNK-Reaction.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/OPRT-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/OPRT-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/OPRT-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/OPRT-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/OPRT-Action.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/OPRT-Bonus.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/OPRT-Passive.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/OPRT-Reaction.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/SCLR-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/SCLR-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SCLR-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SCLR-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SCLR-Action.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/SCLR-Bonus.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SCLR-Passive.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/SCLR-Reaction.webp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
packs/Icons/Class Features/SCT-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/SCT-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/SCT-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/SCT-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/SCT-Action.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SCT-Bonus.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/SCT-Passive.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/SCT-Reaction.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SNTL-ARCH-Action.webp
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
packs/Icons/Class Features/SNTL-ARCH-Bonus.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/SNTL-ARCH-Passive.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
packs/Icons/Class Features/SNTL-ARCH-Reaction.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
packs/Icons/Class Features/SNTL-Action.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SNTL-Bonus.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SNTL-Passive.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Class Features/SNTL-Reaction.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
packs/Icons/Force Powers/Animate Weapon.webp
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
packs/Icons/Force Powers/Battle Insight.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
packs/Icons/Force Powers/Breath Control.webp
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
packs/Icons/Force Powers/Burst.webp
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
packs/Icons/Force Powers/Call Lightning.webp
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
packs/Icons/Force Powers/Calm Emotions.webp
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
packs/Icons/Force Powers/Cloud Mind.webp
Normal file
After Width: | Height: | Size: 3.3 KiB |