Removed examples

This commit is contained in:
Mike Magarino 2021-01-24 16:55:26 -05:00
parent 71a99e97a9
commit 6d02f68608
11 changed files with 0 additions and 2393 deletions

BIN
examples/.DS_Store vendored

Binary file not shown.

View file

@ -1 +0,0 @@
{"flavor":{"faction":"","environment":"","description":"","nameIsProper":true,"imageUrl":"https://static.wikia.nocookie.net/disney/images/1/17/Profile_-_Mushu.jpeg/revision/latest?cb=20190425004614","descriptionHtml":""},"stats":{"size":"Small","race":"Dragon","alignment":"Unaligned","armorType":"Natural Armor","armorClass":16,"numHitDie":15,"speed":"40 ft.","abilityScores":{"strength":16,"dexterity":12,"constitution":15,"intelligence":8,"wisdom":14,"charisma":8},"proficiencyBonus":0,"damageVulnerabilities":[],"damageResistances":[],"damageImmunities":["Fire"],"conditionImmunities":[],"senses":["darkvision 60ft.","Passive Oerception 12"],"languages":["Draconic"],"challengeRating":2,"experiencePoints":450,"legendaryActionsPerRound":3,"legendaryActionsDescription":"","savingThrows":[{"ability":"dexterity","proficient":false,"value":1,"modifier":1,"modifierStr":"Dex +1","$$hashKey":"object:1076"},{"ability":"wisdom","proficient":false,"value":2,"modifier":2,"modifierStr":"Wis +2","$$hashKey":"object:1077"}],"skills":[],"additionalAbilities":[],"actions":[{"name":"Bite","description":"<i>Melee Weapon Attack:</i> +5 to hit, reach 5 ft., one target. <i>Hit:</i> 4 (1d6) piercing and 2 fire damage.\n<avrae hidden>Bite|+5|1d6 [piercing]+2 [fire]</avrae>","descriptionHtml":{},"$$hashKey":"object:1060"}],"reactions":[{"name":"Infused Strikes.","description":"When another creature within 30 feet of the drake that it can see hits with a weapon attack, the drake infuses the strike with its essence, causing the attack to deal an extra 1d6 [fire] damage","descriptionHtml":{},"$$hashKey":"object:1065"}],"legendaryActions":[],"hitDieSize":10,"armorTypeStr":"(Natural Armor)","abilityScoreModifiers":{"strength":3,"dexterity":1,"constitution":2,"intelligence":-1,"wisdom":2,"charisma":-1},"abilityScoreStrs":{"strength":"16 (+3)","dexterity":"12 (+1)","constitution":"15 (+2)","intelligence":"8 (1)","wisdom":"14 (+2)","charisma":"8 (1)"},"extraHealthFromConstitution":30,"hitPoints":112,"hitPointsStr":"112 (15d10 + 30)","passivePerception":12,"challengeRatingStr":"2"},"sharing":{"linkSharingEnabled":true},"_id":"5fd0466f60c2d632c8613e3d","name":"Mushu","__v":0,"publishedBestiaryId":"5fd045c660c2d632c8613e19"}

View file

@ -1 +0,0 @@
{"name":"Strom Klovrah","builderVersion":"0.4.23","image":"","user":"","experiencePoints":0,"species":{"name":"Human","abilityScoreImprovementSelectedOption":0,"abilityScoreImprovement":{"Dexterity":2,"Charisma":1}},"classes":[{"name":"Scout","levels":1,"hitPoints":[],"abilityScoreImprovements":[]}],"baseAbilityScores":{"Strength":8,"Dexterity":15,"Constitution":12,"Intelligence":13,"Wisdom":10,"Charisma":14},"background":{"name":"Bounty Hunter","feat":{"name":"Alert","type":"Feat"}},"characteristics":{"alignment":"Chaotic Balanced","Personality Traits":"","Ideal":"","Bond":"","Flaw":"","Gender":"","Place of Birth":"","Age":"","Height":"","Weight":"","Hair":"","Eyes":"","Skin":"","Appearance":"","Backstory":""},"credits":1700,"equipment":[{"name":"Combat suit","quantity":1,"category":"Equipment","equipped":true},{"name":"Blaster carbine","quantity":1,"category":"Equipment","equipped":true},{"name":"Power cell","quantity":"2","category":"Equipment"},{"name":"Vibrodagger","quantity":"2","category":"Equipment","equipped":false},{"name":"Wristpad","quantity":1,"category":"Equipment"}],"currentStats":{"hitPointsLost":0,"temporaryHitPoints":0,"techPointsUsed":0,"forcePointsUsed":0,"superiorityDiceUsed":0,"hitDiceUsed":{},"deathSaves":{"successes":0,"failures":0},"hasInspiration":false,"featuresTimesUsed":{},"conditions":[],"exhaustion":0,"highLevelCasting":{"level6":false,"level7":false,"level8":false,"level9":false}},"tweaks":{"abilityScores":{"Wisdom":{"skills":{"Perception":{"proficiency":"Proficient"},"Survival":{"proficiency":"Proficient"},"Insight":{"proficiency":"Proficient"}}},"Intelligence":{"skills":{"Piloting":{"proficiency":"Proficient"}}},"Charisma":{"skills":{"Deception":{"proficiency":"Proficient"},"Persuasion":{"proficiency":"Proficient"}}}}},"customProficiencies":[],"customLanguages":[],"customFeatures":[],"customFeats":[],"customTechPowers":[],"customForcePowers":[],"customEquipment":[],"settings":{"isEnforcingForcePrerequisites":true,"isFixedHitPoints":false,"abilityScoreMethod":"Standard Array"},"notes":""}

View file

@ -1,155 +0,0 @@
{
"name": "Strom Klovrah",
"builderVersion": "0.4.23",
"image": "",
"user": "",
"experiencePoints": 0,
"species": {
"name": "Human",
"abilityScoreImprovementSelectedOption": 0,
"abilityScoreImprovement": {
"Dexterity": 2,
"Charisma": 1
}
},
"classes": [
{
"name": "Scout",
"levels": 1,
"hitPoints": [],
"abilityScoreImprovements": []
}
],
"baseAbilityScores": {
"Strength": 8,
"Dexterity": 15,
"Constitution": 12,
"Intelligence": 13,
"Wisdom": 10,
"Charisma": 14
},
"background": {
"name": "Bounty Hunter",
"feat": {
"name": "Alert",
"type": "Feat"
}
},
"characteristics": {
"alignment": "Chaotic Balanced",
"Personality Traits": "",
"Ideal": "",
"Bond": "",
"Flaw": "",
"Gender": "",
"Place of Birth": "",
"Age": "",
"Height": "",
"Weight": "",
"Hair": "",
"Eyes": "",
"Skin": "",
"Appearance": "",
"Backstory": ""
},
"credits": 1700,
"equipment": [
{
"name": "Combat suit",
"quantity": 1,
"category": "Equipment",
"equipped": true
},
{
"name": "Blaster carbine",
"quantity": 1,
"category": "Equipment",
"equipped": true
},
{
"name": "Power cell",
"quantity": "2",
"category": "Equipment"
},
{
"name": "Vibrodagger",
"quantity": "2",
"category": "Equipment",
"equipped": false
},
{
"name": "Wristpad",
"quantity": 1,
"category": "Equipment"
}
],
"currentStats": {
"hitPointsLost": 0,
"temporaryHitPoints": 0,
"techPointsUsed": 0,
"forcePointsUsed": 0,
"superiorityDiceUsed": 0,
"hitDiceUsed": {},
"deathSaves": {
"successes": 0,
"failures": 0
},
"hasInspiration": false,
"featuresTimesUsed": {},
"conditions": [],
"exhaustion": 0,
"highLevelCasting": {
"level6": false,
"level7": false,
"level8": false,
"level9": false
}
},
"tweaks": {
"abilityScores": {
"Wisdom": {
"skills": {
"Perception": {
"proficiency": "Proficient"
},
"Survival": {
"proficiency": "Proficient"
},
"Insight": {
"proficiency": "Proficient"
}
}
},
"Intelligence": {
"skills": {
"Piloting": {
"proficiency": "Proficient"
}
}
},
"Charisma": {
"skills": {
"Deception": {
"proficiency": "Proficient"
},
"Persuasion": {
"proficiency": "Proficient"
}
}
}
}
},
"customProficiencies": [],
"customLanguages": [],
"customFeatures": [],
"customFeats": [],
"customTechPowers": [],
"customForcePowers": [],
"customEquipment": [],
"settings": {
"isEnforcingForcePrerequisites": true,
"isFixedHitPoints": false,
"abilityScoreMethod": "Standard Array"
},
"notes": ""
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,205 +0,0 @@
export default class CharacterImporter {
// transform JSON from sw5e.com to Foundry friendly format
// and insert new actor
static transform(rawCharacter){
const sourceCharacter = JSON.parse(rawCharacter);
// v1 - just import the very basics: name, species, hp, ac and abilities
const name = sourceCharacter.name;
const species = sourceCharacter.attribs.find(o => o.name == "race").current;
const hp = sourceCharacter.attribs.find(o => o.name == "hp").current;
const hpTemp = sourceCharacter.attribs.find(o => o.name == "hp_temp").current;
const ac = sourceCharacter.attribs.find(o => o.name == "ac").current;
const strength = sourceCharacter.attribs.find(o => o.name == "strength").current;
const dexterity = sourceCharacter.attribs.find(o => o.name == "dexterity").current;
const constitution = sourceCharacter.attribs.find(o => o.name == "constitution").current;
const intelligence = sourceCharacter.attribs.find(o => o.name == "intelligence").current;
const wisdom = sourceCharacter.attribs.find(o => o.name == "wisdom").current;
const charisma = sourceCharacter.attribs.find(o => o.name == "charisma").current;
// v2 - import skills and proficiencies
const targetCharacter = {
name: sourceCharacter.name,
type: "character",
data: {
abilities: {
str: {
value: strength,
proficient: CharacterImporter.isProficient('strength_save', sourceCharacter)
},
dex: {
value: dexterity,
proficient: CharacterImporter.isProficient('dexterity_save', sourceCharacter)
},
con: {
value: constitution,
proficient: CharacterImporter.isProficient('constitution_save', sourceCharacter)
},
int: {
value: intelligence,
proficient: CharacterImporter.isProficient('intelligence_save', sourceCharacter)
},
wis: {
value: wisdom,
proficient: CharacterImporter.isProficient('wisdom_save', sourceCharacter)
},
cha: {
value: charisma,
proficient: CharacterImporter.isProficient('charisma_save', sourceCharacter)
},
},
attributes: {
ac: {
value: ac
},
hp: {
value: hp,
min: 0,
max: hp,
temp: hpTemp
}
}/*,
skills: {
"acr": {
value: CharacterImporter.fetchSkill('acrobatics', sourceCharacter),
"ability": "dex"
},
"ani": {
value: CharacterImporter.fetchSkill('animal_handling', sourceCharacter),
"ability": "wis"
},
"ath": {
value: CharacterImporter.fetchSkill('athletics', sourceCharacter),
"ability": "str"
},
"dec": {
value: CharacterImporter.fetchSkill('deception', sourceCharacter),
"ability": "cha"
},
"ins": {
value: CharacterImporter.fetchSkill('insight', sourceCharacter),
"ability": "wis"
},
"itm": {
value: CharacterImporter.fetchSkill('intimidation', sourceCharacter),
"ability": "cha"
},
"inv": {
value: CharacterImporter.fetchSkill('investigation', sourceCharacter),
"ability": "int"
},
"lor": {
value: CharacterImporter.fetchSkill('lore', sourceCharacter),
"ability": "int"
},
"med": {
value: CharacterImporter.fetchSkill('medicine', sourceCharacter),
"ability": "wis"
},
"nat": {
value: CharacterImporter.fetchSkill('nature', sourceCharacter),
"ability": "int"
},
"pil": {
value: CharacterImporter.fetchSkill('piloting', sourceCharacter),
"ability": "int"
},
"prc": {
value: CharacterImporter.fetchSkill('perception', sourceCharacter),
"ability": "wis"
},
"prf": {
value: CharacterImporter.fetchSkill('performance', sourceCharacter),
"ability": "cha"
},
"per": {
value: CharacterImporter.fetchSkill('persusasion', sourceCharacter),
"ability": "cha"
},
"slt": {
value: CharacterImporter.fetchSkill('sleight_of_hand', sourceCharacter),
"ability": "dex"
},
"ste": {
value: CharacterImporter.fetchSkill('stealth', sourceCharacter),
"ability": "dex"
},
"sur": {
value: CharacterImporter.fetchSkill('survival', sourceCharacter),
"ability": "wis"
},
"tec": {
value: CharacterImporter.fetchSkill('technology', sourceCharacter),
"ability": "int"
}
}*/
}
};
Actor.create(targetCharacter);
}
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 => {
console.log("FISH: character import button pressed. 2")
let files = [];
let contentOld = '<h1>Saved Character JSON Import</h1> '
+ '<input class="file-picker" type="file" id="sw5e-character-json" accept=".json" multiple name="sw5e-character-json">'
+ '<hr>'
+ '<div class="sw5e-file-import"></div>';
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);
});
}
static isProficient(ability, sourceCharacter){
let abilitySaveProf = ability + "_save_prof";
let prof = sourceCharacter.attribs.find(o => o.name == abilitySaveProf).current;
if (prof == "(@{pb})") {
console.log("DEBUG Prof: true");
return 1
} else {
console.log("DEBUG Prof: false");
return 0
}
}
static fetchSkill(skill, source){
return source.attribs.find(o => o.name == skill+'_mod').current;
}
}

View file

@ -1 +0,0 @@
{"name":"Ellimist Skywalker","builderVersion":"0.0.0","image":"","user":"","experiencePoints":64000,"species":{"name":"Kel Dor","abilityScoreImprovementSelectedOption":0,"abilityScoreImprovement":{}},"classes":[{"name":"Consular","levels":5,"hitPoints":[4,4,4,4],"abilityScoreImprovements":[{"type":"Ability Score Improvement","abilitiesIncreased":[{"name":"Wisdom","value":2}]}],"archetype":{"name":"Way of Balance"},"forcePowers":["Turbulence","Spirit Blade","Wound","Telemetry","Stun Droid","Stun","Telekinetic Storm","Sever Force"]},{"name":"Monk","levels":5,"hitPoints":[5,5,5,5,5],"abilityScoreImprovements":[{"type":"Ability Score Improvement","abilitiesIncreased":[{"name":"Wisdom","value":2}]}],"archetype":{"name":"Whills Order"}}],"baseAbilityScores":{"Strength":8,"Dexterity":14,"Constitution":13,"Intelligence":12,"Wisdom":15,"Charisma":10},"background":{"name":"Force Adept","feat":{"name":"Entertainer","type":"Feat"}},"characteristics":{"alignment":"Neutral Light","Personality Traits":"Personality Traits","Ideal":"Ideal","Bond":"Bond","Flaw":"Flaw","Gender":"Gender","Place of Birth":"Place of Birth","Age":"55","Height":"5'10\"","Weight":"Weight","Hair":"Hair","Eyes":"Eyes","Skin":"Skin","Appearance":"Appearance","Backstory":"Backstory"},"credits":0,"equipment":[{"name":"Combat suit","quantity":1,"category":"Equipment","equipped":true},{"name":"Shotosaber","quantity":"2","category":"Equipment","equipped":true},{"name":"Datacron Mark V","quantity":1,"category":"EnhancedItem"}],"currentStats":{"hitPointsLost":0,"temporaryHitPoints":0,"techPointsUsed":0,"forcePointsUsed":0,"superiorityDiceUsed":0,"hitDiceUsed":{},"deathSaves":{"successes":0,"failures":0},"hasInspiration":false,"featuresTimesUsed":{},"conditions":[],"exhaustion":0,"highLevelCasting":{"level6":false,"level7":false,"level8":false,"level9":false}},"tweaks":{},"customProficiencies":[],"customLanguages":[],"customFeatures":[],"customFeats":[],"customTechPowers":[],"customForcePowers":[],"customEquipment":[{"name":"Custom item","quantity":1,"equipmentCategory":"Gear","cost":"10","description":"Description of the thing","weight":1}],"settings":{"isEnforcingForcePrerequisites":true,"isFixedHitPoints":true,"abilityScoreMethod":"Standard Array"},"notes":""}

View file

@ -1,170 +0,0 @@
{
"name": "Ellimist Skywalker",
"builderVersion": "0.0.0",
"image": "",
"user": "",
"experiencePoints": 64000,
"species": {
"name": "Kel Dor",
"abilityScoreImprovementSelectedOption": 0,
"abilityScoreImprovement": {}
},
"classes": [
{
"name": "Consular",
"levels": 5,
"hitPoints": [
4,
4,
4,
4
],
"abilityScoreImprovements": [
{
"type": "Ability Score Improvement",
"abilitiesIncreased": [
{
"name": "Wisdom",
"value": 2
}
]
}
],
"archetype": {
"name": "Way of Balance"
},
"forcePowers": [
"Turbulence",
"Spirit Blade",
"Wound",
"Telemetry",
"Stun Droid",
"Stun",
"Telekinetic Storm",
"Sever Force"
]
},
{
"name": "Monk",
"levels": 5,
"hitPoints": [
5,
5,
5,
5,
5
],
"abilityScoreImprovements": [
{
"type": "Ability Score Improvement",
"abilitiesIncreased": [
{
"name": "Wisdom",
"value": 2
}
]
}
],
"archetype": {
"name": "Whills Order"
}
}
],
"baseAbilityScores": {
"Strength": 8,
"Dexterity": 14,
"Constitution": 13,
"Intelligence": 12,
"Wisdom": 15,
"Charisma": 10
},
"background": {
"name": "Force Adept",
"feat": {
"name": "Entertainer",
"type": "Feat"
}
},
"characteristics": {
"alignment": "Neutral Light",
"Personality Traits": "Personality Traits",
"Ideal": "Ideal",
"Bond": "Bond",
"Flaw": "Flaw",
"Gender": "Gender",
"Place of Birth": "Place of Birth",
"Age": "55",
"Height": "5'10\"",
"Weight": "Weight",
"Hair": "Hair",
"Eyes": "Eyes",
"Skin": "Skin",
"Appearance": "Appearance",
"Backstory": "Backstory"
},
"credits": 0,
"equipment": [
{
"name": "Combat suit",
"quantity": 1,
"category": "Equipment",
"equipped": true
},
{
"name": "Shotosaber",
"quantity": "2",
"category": "Equipment",
"equipped": true
},
{
"name": "Datacron Mark V",
"quantity": 1,
"category": "EnhancedItem"
}
],
"currentStats": {
"hitPointsLost": 0,
"temporaryHitPoints": 0,
"techPointsUsed": 0,
"forcePointsUsed": 0,
"superiorityDiceUsed": 0,
"hitDiceUsed": {},
"deathSaves": {
"successes": 0,
"failures": 0
},
"hasInspiration": false,
"featuresTimesUsed": {},
"conditions": [],
"exhaustion": 0,
"highLevelCasting": {
"level6": false,
"level7": false,
"level8": false,
"level9": false
}
},
"tweaks": {},
"customProficiencies": [],
"customLanguages": [],
"customFeatures": [],
"customFeats": [],
"customTechPowers": [],
"customForcePowers": [],
"customEquipment": [
{
"name": "Custom item",
"quantity": 1,
"equipmentCategory": "Gear",
"cost": "10",
"description": "Description of the thing",
"weight": 1
}
],
"settings": {
"isEnforcingForcePrerequisites": true,
"isFixedHitPoints": true,
"abilityScoreMethod": "Standard Array"
},
"notes": ""
}

View file

@ -1,117 +0,0 @@
const targetCharacter = {
name: sourceCharacter.name,
type: "character",
data: {
abilities: {
str: {
value: strength,
proficient: strengthSaveProf
},
dex: {
value: dexterity,
proficient: dexteritySaveProf
},
con: {
value: constitution,
proficient: constitutionSaveProf
},
int: {
value: intelligence,
proficient: intelligenceSaveProf
},
wis: {
value: wisdom,
proficient: wisdomSaveProf
},
cha: {
value: charisma,
proficient: charismaSaveProf
},
},
attributes: {
ac: {
value: ac
},
hp: {
value: hp,
min: 0,
max: hp,
temp: hpTemp
}
}/*,
skills: {
acr: {
value: acrobaticsSkill,
ability: "dex"
},
ani: {
value: animalHandlingSkill,
ability: "wis"
},
ath: {
value: athleticsSkill,
ability: "str"
},
dec: {
value: deceptionSkill,
ability: "cha"
},
ins: {
value: insightSkill,
ability: "wis"
},
itm: {
value: intimidationSkill,
ability: "cha"
},
inv: {
value: investigationSkill,
ability: "int"
},
lor: {
value: loreSkill,
ability: "int"
},
med: {
value: medicineSkill,
ability: "wis"
},
nat: {
value: natureSkill,
ability: "int"
},
pil: {
value: pilotingSkill,
ability: "int"
},
prc: {
value: perceptionSkill,
ability: "wis"
},
prf: {
value: performanceSkill,
ability: "cha"
},
per: {
value: persuasionSkill,
ability: "cha"
},
slt: {
value: sleightOfHandSkill,
ability: "dex"
},
ste: {
value: stealthSkill,
ability: "dex"
},
sur: {
value: survivalSkill,
ability: "wis"
},
tec: {
value: technologySkill,
ability: "int"
}
}*/
}
};