Compare commits
8 Commits
foundryvtt
...
foundryvtt
Author | SHA1 | Date | |
---|---|---|---|
037ba87761 | |||
e2178329f7 | |||
83da960d30 | |||
4f22403c5f | |||
6e9df6e59a | |||
43d78c5c68 | |||
6918eaeb1b | |||
838bf6cd85 |
@ -289,6 +289,7 @@ Hooks.once('init', () => {
|
|||||||
console.log("No beast traits found here ...")
|
console.log("No beast traits found here ...")
|
||||||
return beast_traits
|
return beast_traits
|
||||||
}
|
}
|
||||||
|
//console.log("TRANS:", beast_traits)
|
||||||
for (let trait_en of beast_traits) {
|
for (let trait_en of beast_traits) {
|
||||||
let special = "";
|
let special = "";
|
||||||
let nbt = "";
|
let nbt = "";
|
||||||
@ -403,7 +404,7 @@ Hooks.once('init', () => {
|
|||||||
}
|
}
|
||||||
if (trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated!
|
if (trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated!
|
||||||
trait_en.name = trait_fr.name.trim() + special
|
trait_en.name = trait_fr.name.trim() + special
|
||||||
if (trait_fr.system) { // Why ???
|
if (trait_fr.system?.description?.value) { // Why ???
|
||||||
trait_en.system.description.value = trait_fr.system.description.value;
|
trait_en.system.description.value = trait_fr.system.description.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,21 +413,23 @@ Hooks.once('init', () => {
|
|||||||
if (game.system.version.match("7.")) {
|
if (game.system.version.match("7.")) {
|
||||||
compendiumCareers = 'wfrp4e-core.items'
|
compendiumCareers = 'wfrp4e-core.items'
|
||||||
}
|
}
|
||||||
let career_fr = game.babele.translate(compendiumCareers, trait_en, true);
|
let career_fr = game.babele.translate(compendiumCareers, { name: name_en }, true);
|
||||||
career_fr.name = career_fr.name || trait_en.name
|
trait_en.name = career_fr.name || trait_en.name
|
||||||
//console.log(">>>>> Career ?", career_fr.name );
|
//console.log(">>>>> Career ?", career_fr.name );
|
||||||
trait_en.system = duplicate(career_fr.system);
|
if ( career_fr?.system) {
|
||||||
|
trait_en.system = duplicate(career_fr.system);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
|
} else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
|
||||||
let compendiumTrappings = 'wfrp4e-core.trappings' // Per default
|
let compendiumTrappings = 'wfrp4e-core.trappings' // Per default
|
||||||
if (game.system.version.match("7.")) {
|
if (game.system.version.match("7.")) {
|
||||||
compendiumTrappings = 'wfrp4e-core.items'
|
compendiumTrappings = 'wfrp4e-core.items'
|
||||||
}
|
}
|
||||||
let trapping_fr = game.babele.translate(compendiumTrappings, trait_en, true);
|
let trapping_fr = game.babele.translate(compendiumTrappings, { name: name_en }, true);
|
||||||
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
|
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
|
||||||
trapping_fr.name = trapping_fr.name || trait_en.name
|
trait_en.name = trapping_fr.name || trait_en.name
|
||||||
if (trapping_fr.system) {
|
if (trapping_fr.system?.description?.value) {
|
||||||
trait_en.system.description = trapping_fr.system.description;
|
trait_en.system.description.value = trapping_fr.system.description.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
"label": "Tables (Archives Vol. I)",
|
"label": "Tables (Archives Vol. I)",
|
||||||
|
"mapping": {
|
||||||
|
"results": {
|
||||||
|
"path": "results",
|
||||||
|
"converter": "resultConverter"
|
||||||
|
}
|
||||||
|
},
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"id": "Career - Wood Elf (Toriour)",
|
"id": "Career - Wood Elf (Toriour)",
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
"label": "Tables (Middenheim)",
|
"label": "Tables (Middenheim)",
|
||||||
|
"mapping": {
|
||||||
|
"results": {
|
||||||
|
"path": "results",
|
||||||
|
"converter": "resultConverter"
|
||||||
|
}
|
||||||
|
},
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"id": "Athletics - Middenball",
|
"id": "Athletics - Middenball",
|
||||||
|
17
fr.json
17
fr.json
@ -1523,14 +1523,19 @@
|
|||||||
|
|
||||||
"Academics": "Lettrés",
|
"Academics": "Lettrés",
|
||||||
"Academic": "Lettré",
|
"Academic": "Lettré",
|
||||||
"Burgher": "Citadins",
|
"Burghers": "Citadins",
|
||||||
"Rogues": "Roublards",
|
"Burgher": "Citadin",
|
||||||
|
"Rogues": "Roublards",
|
||||||
|
"Rogue": "Roublard",
|
||||||
"Riverfolk": "Riverains",
|
"Riverfolk": "Riverains",
|
||||||
"Peasants": "Ruraux",
|
"Peasants": "Ruraux",
|
||||||
"Peasant": "Ruraux",
|
"Peasant": "Rural",
|
||||||
"Warrior": "Guerriers",
|
"Warriors": "Guerriers",
|
||||||
"Ranger": "Itinérants",
|
"Warrior": "Guerrier",
|
||||||
"Courtier": "Courtisans",
|
"Rangers": "Itinérants",
|
||||||
|
"Ranger": "Itinérant",
|
||||||
|
"Courtiers": "Courtisans",
|
||||||
|
"Courtier": "Courtisan",
|
||||||
|
|
||||||
"Calvalry": "Cavalerie",
|
"Calvalry": "Cavalerie",
|
||||||
"Flail": "Fléau",
|
"Flail": "Fléau",
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
|
||||||
"version": "7.0.1",
|
"version": "7.0.6",
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"babele-register.js",
|
"babele-register.js",
|
||||||
"addon-register.js",
|
"addon-register.js",
|
||||||
@ -127,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.0.1.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.0.6.zip",
|
||||||
"id": "wh4-fr-translation",
|
"id": "wh4-fr-translation",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
|
@ -176,6 +176,12 @@ export class WH4FRPatchConfig {
|
|||||||
game.wfrp4e.config.species["welf"] = "Elfe Sylvain";
|
game.wfrp4e.config.species["welf"] = "Elfe Sylvain";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (game.wfrp4e.config.classTrappings) {
|
||||||
|
for(const c of Object.keys(game.wfrp4e.config.classTrappings)) {
|
||||||
|
game.wfrp4e.config.classTrappings[game.i18n.localize(c)] = game.wfrp4e.config.classTrappings[c];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.patch_species_skills();
|
this.patch_species_skills();
|
||||||
this.patch_species_talents();
|
this.patch_species_talents();
|
||||||
this.patch_subspecies();
|
this.patch_subspecies();
|
||||||
@ -262,7 +268,7 @@ export class WH4FRPatchConfig {
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
game.wfrp4e.config.statusEffects = [
|
/*game.wfrp4e.config.statusEffects = [
|
||||||
{
|
{
|
||||||
icon: "systems/wfrp4e/icons/conditions/bleeding.png",
|
icon: "systems/wfrp4e/icons/conditions/bleeding.png",
|
||||||
id: "bleeding",
|
id: "bleeding",
|
||||||
@ -474,7 +480,7 @@ export class WH4FRPatchConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]*/
|
||||||
|
|
||||||
/*game.wfrp4e.config.systemEffects = {
|
/*game.wfrp4e.config.systemEffects = {
|
||||||
"enc1": {
|
"enc1": {
|
||||||
|
@ -54,55 +54,81 @@ const fr_carac = 'm\\s+cc\\s+ct\\s+f\\s+e\\s+i\\s+agi?\\s+dex\\s+int\\s+fm\\s+so
|
|||||||
const carac_val = '(?<m>[0-9\\-]+)\\s+(?<ws>[0-9\\-]+)\\s+(?<bs>[0-9\\-]+)\\s+(?<s>[0-9\\-]+)\\s+(?<t>[0-9\\-]+)\\s+(?<i>[0-9\\-]+)\\s+(?<ag>[0-9\\-]+)\\s+(?<dex>[0-9\\-]+)\\s+(?<int>[0-9\\-]+)\\s+(?<wp>[0-9\\-]+)\\s+(?<fel>[0-9\\-]+)\\s+(?<w>[0-9\\-\*]+)';
|
const carac_val = '(?<m>[0-9\\-]+)\\s+(?<ws>[0-9\\-]+)\\s+(?<bs>[0-9\\-]+)\\s+(?<s>[0-9\\-]+)\\s+(?<t>[0-9\\-]+)\\s+(?<i>[0-9\\-]+)\\s+(?<ag>[0-9\\-]+)\\s+(?<dex>[0-9\\-]+)\\s+(?<int>[0-9\\-]+)\\s+(?<wp>[0-9\\-]+)\\s+(?<fel>[0-9\\-]+)\\s+(?<w>[0-9\\-\*]+)';
|
||||||
const name_val = '(?<name>[a-zA-Z\\s\\-,]*)[\\s\\r\\na-zA-Z]*(?<tiers>.*|[\\(\\)a-z0-9]+)';
|
const name_val = '(?<name>[a-zA-Z\\s\\-,]*)[\\s\\r\\na-zA-Z]*(?<tiers>.*|[\\(\\)a-z0-9]+)';
|
||||||
let sectionDataFR = [
|
let sectionDataFR = [
|
||||||
{ name: "trait", toFind: "Traits\\s*:", secondParse: '(?<name>[a-zàéè\\s]*)[\\s\\+]*(?<value>.*|[\\+0-9]+)', index: -1 },
|
{ name: "trait", toFind: "Traits\\s*:", secondParse: '(?<name>[a-zöàéè\\s]*)[\\s\\+]*(?<value>.*|[\\+0-9]+)', index: -1 },
|
||||||
{ name: "skill", toFind: "Compétences\\s*:", secondParse: '(?<name>[a-zàéè\\s\\(\\)]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
{ name: "skill", toFind: "Compétences\\s*:", secondParse: '(?<name>[a-zàéè\\s\\(\\)]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
{ name: "talent", toFind: "Talents\\s*:", secondParse: '(?<name>[a-zàéè\\-\\s!/]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
{ name: "talent", toFind: "Talents\\s*:", secondParse: '(?<name>[a-zöàéè\\-\\(\\)\\s\\/\'’]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
{ name: "mutation", toFind: "Mutations\\s*:", secondParse: '(?<name>[a-zàéè\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
{ name: "mutation", toFind: "Mutations\\s*:", secondParse: '(?<name>[a-zöàéè\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
{ name: "trapping", toFind: "Equiement\\s*:", secondParse: '(?<name>[a-zàéè\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 }
|
{ name: "trapping", toFind: "Equipement\\s*:", secondParse: '(?<name>[a-zöàéè0-9\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
|
{ name: "spell", toFind: "Sorts\\s*\\([a-z\\s]*\\)*:", secondParse: '(?<name>[a-zöàéè\\s]*)', index: -1 },
|
||||||
|
{ name: "spellpetty", toFind: "Spells\\s*\\(Magie Mineure\\)*:", secondParse: '(?<name>[a-zö\\-\\s]*)', index: -1 },
|
||||||
|
{ name: "spellarcane", toFind: "Spells\\s*\\(Arcane[a-z\\s]*\\)*:", secondParse: '(?<name>[a-zö\\-\\s]*)', index: -1 },
|
||||||
|
{ name: "spellarcane", toFind: "Spells\\s*\\(Domaine\\s*(?<lore>[a-z\\s]*)\\)*:", secondParse: '(?<name>[a-zö\\-\\s]*)', index: -1 }
|
||||||
];
|
];
|
||||||
let sectionDataUS = [
|
let sectionDataUS = [
|
||||||
{ name: "trait", toFind: "Traits\\s*:", secondParse: '(?<name>[a-z\\s]*)[\\s\\+]*(?<value>.*|[\\+0-9]+)', index: -1 },
|
{ name: "trait", toFind: "Traits\\s*:", secondParse: '(?<name>[a-z\\s]*)[\\s\\+]*(?<value>.*|[\\+0-9]+)', index: -1 },
|
||||||
{ name: "skill", toFind: "Skills\\s*:", secondParse: '(?<name>[a-z\\s\\(\\)]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
{ name: "skill", toFind: "Skills\\s*:", secondParse: '(?<name>[a-z\\s\\(\\)]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
{ name: "talent", toFind: "Talents\\s*:", secondParse: '(?<name>[a-z\\-\\s!/]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
{ name: "talent", toFind: "Talents\\s*:", secondParse: '(?<name>[a-z\\-\\s\\(\\)\\/\'’]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
{ name: "mutation", toFind: "Mutations\\s*:", secondParse: '(?<name>[a-z\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
{ name: "mutation", toFind: "Mutations\\s*:", secondParse: '(?<name>[a-zö\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
{ name: "trapping", toFind: "Trappings\\s*:", secondParse: '(?<name>[a-z\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 }
|
{ name: "trapping", toFind: "Trappings\\s*:", secondParse: '(?<name>[a-zö0-9\\s]*)[\\s\\+]*(?<value>.*|[0-9]+)', index: -1 },
|
||||||
];
|
{ name: "spellpetty", toFind: "Spells\\s*\\(Petty\\s*[a-z\\s]*\\)*:", secondParse: '(?<name>[a-zö\\-\\s]*)', index: -1 },
|
||||||
|
{ name: "spellarcane", toFind: "Spells\\s*\\(Arcane\\s*[a-z\\s]*\\)*:", secondParse: '(?<name>[a-zö\\-\\s]*)', index: -1 },
|
||||||
|
{ name: "spelllore", toFind: "Spells\\s*\\(Lore\\s*of\\s*(?<lore>[a-z\\s]*)\\)*:", secondParse: '(?<name>[a-zö\\-\\s]*)', index: -1 }
|
||||||
|
]
|
||||||
let regSep = XRegExp('\\s*,\\s*', 'gi'); // Term separator, with auto trim
|
let regSep = XRegExp('\\s*,\\s*', 'gi'); // Term separator, with auto trim
|
||||||
let regLine1 = XRegExp('[\\r\\n\\.]', 'gi'); // Term separator, with auto trim
|
let regLine1 = XRegExp('[\\r\\n\\.]', 'gi'); // Term separator, with auto trim
|
||||||
let regName = XRegExp(name_val, 'gi');
|
let regName = XRegExp(name_val, 'gi');
|
||||||
|
|
||||||
|
// Used to detect/manage the skill groupings in the statblock
|
||||||
|
const __SkillGroupsUS = ["Melee", "Lore", "Trade"]
|
||||||
|
const __SkillGroupsFR = ["Corps à corps", "Domaine", "Métier"]
|
||||||
|
// Used to auto update the system.tests.value field
|
||||||
|
const __hasTestValue = {
|
||||||
|
"etiquette": true,
|
||||||
|
"resistance": true,
|
||||||
|
"acute sense": true,
|
||||||
|
"strider": true,
|
||||||
|
"savant": true,
|
||||||
|
"craftsman": true
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
async function __findItem(itemName, itemType, location = null) {
|
async function __findItem(itemName, itemType, location = null) {
|
||||||
let toSearch = itemName.toLowerCase().trim();
|
let toSearch = itemName.toLowerCase().trim();
|
||||||
let items = game.items.contents.filter(i => i.type == itemType)
|
let items = game.items.contents.filter(i => i.type == itemType)
|
||||||
|
|
||||||
|
console.log("Searching for", toSearch, itemType)
|
||||||
|
|
||||||
// Search imported items first
|
// Search imported items first
|
||||||
for (let i of items) {
|
for (let i of items) {
|
||||||
if (i.name.toLowerCase() == itemName.toLowerCase() && i.type == itemType)
|
if (i.name.toLowerCase() == toSearch.toLowerCase() && i.type == itemType)
|
||||||
return i;
|
return i.toObject();
|
||||||
}
|
}
|
||||||
let itemList
|
let itemList
|
||||||
|
|
||||||
// find pack -> search pack -> return entity
|
// find pack -> search pack -> return entity
|
||||||
if (location) {
|
if (location) {
|
||||||
let pack = game.packs.find(p => {
|
let pack = game.packs.find(p => {
|
||||||
location.split(".")[0] == p.metadata.package &&
|
location.split(".")[0] == p.metadata.package && location.split(".")[1] == p.metadata.name
|
||||||
location.split(".")[1] == p.metadata.name
|
|
||||||
})
|
})
|
||||||
if (pack) {
|
if (pack) {
|
||||||
await pack.getIndex().then(index => itemList = index);
|
await pack.getIndex().then(index => itemList = index);
|
||||||
let searchResult = itemList.find(t => (t.translated && t.type == itemType && t.originalName.toLowerCase() == toSearch) || (t.type == itemType && t.name.toLowerCase() == toSearch) );
|
let searchResult = itemList.find(t => (t.translated && t.type == itemType && (t.originalName.toLowerCase() == toSearch || s.originalName.toLowerCase().split("(")[0].trim() == toSearch)) || (t.type == itemType && (t.name.toLowerCase() == toSearch || t.name.toLowerCase().split("(")[0].trim() == toSearch)));
|
||||||
if (searchResult)
|
if (searchResult) {
|
||||||
return await pack.getDocument(searchResult._id)
|
let item = await pack.getDocument(searchResult._id)
|
||||||
|
return item.toObject()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If all else fails, search each pack
|
// If all else fails, search each pack
|
||||||
for (let p of game.wfrp4e.tags.getPacksWithTag(itemType)) {
|
for (let p of game.wfrp4e.tags.getPacksWithTag(itemType)) {
|
||||||
await p.getIndex().then(index => itemList = index);
|
await p.getIndex().then(index => itemList = index);
|
||||||
let searchResult = itemList.find(t => (t.translated && t.type == itemType && t.originalName.toLowerCase() == toSearch) || (t.type == itemType && t.name.toLowerCase() == toSearch) );
|
console.log("Seatch", itemType, toSearch);
|
||||||
if (searchResult)
|
let searchResult = itemList.find(t => (t.translated && t.type == itemType && (t.originalName.toLowerCase() == toSearch || s.originalName.toLowerCase().split("(")[0].trim() == toSearch)) || (t.type == itemType && (t.name.toLowerCase() == toSearch || t.name.toLowerCase().split("(")[0].trim() == toSearch)));
|
||||||
return await p.getDocument(searchResult._id)
|
if (searchResult) {
|
||||||
|
let item = await p.getDocument(searchResult._id)
|
||||||
|
return item.toObject()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,73 +140,102 @@ async function __findSkill(skillName, value = undefined) {
|
|||||||
let skillSplit = XRegExp.exec(skillName, XRegExp(parseStr, 'gi'));
|
let skillSplit = XRegExp.exec(skillName, XRegExp(parseStr, 'gi'));
|
||||||
|
|
||||||
// First try world items
|
// First try world items
|
||||||
|
let item
|
||||||
let worldItem = game.items.contents.filter(i => i.type == "skill" && i.name.toLowerCase() == toSearch)[0];
|
let worldItem = game.items.contents.filter(i => i.type == "skill" && i.name.toLowerCase() == toSearch)[0];
|
||||||
if (worldItem) return worldItem;
|
if (worldItem) {
|
||||||
|
item = worldItem.toObject()
|
||||||
let packs = game.wfrp4e.tags.getPacksWithTag("skill");
|
} else {
|
||||||
for (let pack of packs) {
|
let packs = game.wfrp4e.tags.getPacksWithTag("skill");
|
||||||
let skillList = await pack.getIndex();
|
for (let pack of packs) {
|
||||||
// Search for specific skill (won't find unlisted specializations)
|
let skillList = await pack.getIndex();
|
||||||
let searchResult = skillList.find(s => (s.translated && s.originalName.toLowerCase() == toSearch) || (s.name.toLowerCase() == toSearch ) );
|
// Search for specific skill (won't find unlisted specializations)
|
||||||
if (!searchResult) {
|
let searchResult = skillList.find(s => (s.type == "skill" && s.translated && s.originalName.toLowerCase() == toSearch) || (s.type == "skill" && s.name.toLowerCase() == toSearch));
|
||||||
let toSearchClean = toSearch.split("(")[0].trim();
|
if (!searchResult) {
|
||||||
searchResult = skillList.find(s => (s.translated && s.originalName.toLowerCase().split("(")[0].trim() == toSearchClean) ||
|
let toSearchClean = toSearch.split("(")[0].trim();
|
||||||
(s.name.toLowerCase().split("(")[0].trim() == toSearchClean) );
|
searchResult = skillList.find(s => (s.type == "skill" && s.translated && s.originalName.toLowerCase().split("(")[0].trim() == toSearchClean) ||
|
||||||
}
|
(s.type == "skill" && s.name.toLowerCase().split("(")[0].trim() == toSearchClean));
|
||||||
if (searchResult) {
|
}
|
||||||
let dbSkill;
|
if (searchResult) {
|
||||||
await pack.getDocument(searchResult._id).then(packSkill => dbSkill = packSkill);
|
let dbSkill;
|
||||||
if (skillSplit.specialized && ( dbSkill.name.includes('()') || dbSkill.name.includes('( )' ) ) ) {
|
await pack.getDocument(searchResult._id).then(packSkill => dbSkill = packSkill);
|
||||||
let spec = XRegExp.replace(skillSplit.specialized, "(", "");
|
item = dbSkill.toObject();
|
||||||
spec = XRegExp.replace(spec, ")", "");
|
|
||||||
let skillSplit2 = XRegExp.exec(dbSkill.name, XRegExp(parseStr, 'gi'));
|
|
||||||
dbSkill.name = skillSplit2.name + '(' + game.i18n.localize( spec.trim() ) + ')'
|
|
||||||
//dbSkill.update( { name: } );
|
|
||||||
}
|
}
|
||||||
//game.babele.translate('wfrp4e-core.skills', dbSkill);
|
|
||||||
return dbSkill;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw "Could not find skill (or specialization of) " + skillName + " in compendum or world"
|
if (item) {
|
||||||
|
//console.log("Skill name1", skillSplit)
|
||||||
|
if (skillSplit.specialized && (item.name.includes('()') || item.name.includes('( )'))) {
|
||||||
|
let spec = XRegExp.replace(skillSplit.specialized, "(", "");
|
||||||
|
spec = XRegExp.replace(spec, ")", "");
|
||||||
|
let skillSplit2 = XRegExp.exec(item.name, XRegExp(parseStr, 'gi'));
|
||||||
|
item.name = skillSplit2.name + '(' + game.i18n.localize(spec.trim()) + ')'
|
||||||
|
//dbSkill.update( { name: } );
|
||||||
|
}
|
||||||
|
//game.babele.translate('wfrp4e-core.skills', dbSkill);
|
||||||
|
return item
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
async function __findTalent(talentName) {
|
async function __findTalent(talentName) {
|
||||||
let parseStr = '(?<name>[a-z\\s]*)[\\s\\+]*(?<specialized>[a-z\\s\\(\\)]*)';
|
let parseStr = '(?<name>[a-z\\s\\/\']*)[\\s\\+]*(?<specialized>[a-z\\s\\(\\)\'’]*)';
|
||||||
let talentSplit = XRegExp.exec(talentName, XRegExp(parseStr, 'gi'));
|
let talentSplit = XRegExp.exec(talentName, XRegExp(parseStr, 'gi'));
|
||||||
let toSearch = talentSplit.name.toLowerCase().trim();
|
let toSearch = talentSplit.name.toLowerCase().trim();
|
||||||
|
|
||||||
// First try world items
|
//console.log("Talent name", toSearch, talentName, talentSplit)
|
||||||
let worldItem = game.items.contents.filter(i => i.type == "talent" && i.name.toLowerCase() == toSearch)[0];
|
|
||||||
if (worldItem) return worldItem;
|
|
||||||
|
|
||||||
let packs = game.wfrp4e.tags.getPacksWithTag("talent");
|
// First try world items
|
||||||
for (let pack of packs) {
|
let item
|
||||||
let talentList = await pack.getIndex();
|
let worldItem = game.items.contents.filter(i => i.type == "talent" && i.name.toLowerCase() == toSearch)[0];
|
||||||
// Search for specific skill (won't find unlisted specializations)
|
if (worldItem) {
|
||||||
let searchResult = talentList.find(s => (s.translated && s.originalName.toLowerCase() == toSearch) || (s.name.toLowerCase() == toSearch ) );
|
item = worldItem.toObject()
|
||||||
if (!searchResult) {
|
} else {
|
||||||
let toSearchClean = toSearch.split("(")[0].trim();
|
let packs = game.wfrp4e.tags.getPacksWithTag("talent");
|
||||||
searchResult = talentList.find(s => (s.translated && s.originalName.toLowerCase().split("(")[0].trim() == toSearchClean) ||
|
for (let pack of packs) {
|
||||||
(s.name.toLowerCase().split("(")[0].trim() == toSearchClean) );
|
let talentList = await pack.getIndex();
|
||||||
}
|
// Search for specific talent (won't find unlisted specializations)
|
||||||
if (searchResult) {
|
let searchResult = talentList.find(s => (s.type == "talent" && s.translated && s.originalName.toLowerCase() == toSearch) || (s.type == "talent" && s.name.toLowerCase() == toSearch));
|
||||||
let dbTalent;
|
if (!searchResult) {
|
||||||
await pack.getDocument(searchResult._id).then(packTalent => dbTalent = packTalent);
|
let toSearchClean = toSearch.split("(")[0].trim();
|
||||||
if ( talentSplit.specialized ) {
|
searchResult = talentList.find(s => (s.type == "talent" && s.translated && s.originalName.toLowerCase().split("(")[0].trim() == toSearchClean) ||
|
||||||
let spec = XRegExp.replace(talentSplit.specialized, "(", "");
|
(s.type == "talent" && s.name.toLowerCase().split("(")[0].trim() == toSearchClean));
|
||||||
spec = XRegExp.replace(spec, ")", "");
|
}
|
||||||
dbTalent.update( { name: talentSplit.name + '(' + game.i18n.localize( spec.trim() ) + ')' } );
|
if (searchResult) {
|
||||||
|
let dbTalent;
|
||||||
|
//console.log("Talent name1", talentSplit)
|
||||||
|
await pack.getDocument(searchResult._id).then(packTalent => dbTalent = packTalent);
|
||||||
|
item = dbTalent.toObject();
|
||||||
}
|
}
|
||||||
return dbTalent;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw "Could not find talent (or specialization of) " + talentName + " in compendium or world"
|
if (item) {
|
||||||
|
if (talentSplit.specialized) {
|
||||||
|
let spec = XRegExp.replace(talentSplit.specialized, "(", "");
|
||||||
|
spec = XRegExp.replace(spec, ")", "");
|
||||||
|
spec = spec.trim()
|
||||||
|
let addToName = true
|
||||||
|
//console.log("Talent name2", dbTalent.name, spec, game.i18n.localize( spec.trim()) )
|
||||||
|
if (toSearch == 'doomed') {
|
||||||
|
item.system.description.value += `<br><br><em>${spec}</em>`;
|
||||||
|
addToName = false // Very specific case
|
||||||
|
}
|
||||||
|
if (__hasTestValue[toSearch]) {
|
||||||
|
item.system.tests.value = game.i18n.localize(spec);
|
||||||
|
}
|
||||||
|
item.name = talentSplit.name
|
||||||
|
if (addToName) {
|
||||||
|
item.name += '(' + game.i18n.localize(spec) + ')'
|
||||||
|
}
|
||||||
|
item.system.advances.value = 1 // Set 1 advance
|
||||||
|
}
|
||||||
|
// Specific Talent post-processing
|
||||||
|
return item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
function __patchName ( name) {
|
function __patchName(name) {
|
||||||
if (name.toLowerCase == 'magic sense')
|
if (name.toLowerCase == 'magic sense')
|
||||||
name = 'Magical Sense'
|
name = 'Magical Sense'
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
@ -194,30 +249,35 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
|
|
||||||
let statNameReg = us_carac
|
let statNameReg = us_carac
|
||||||
let sectionData = sectionDataUS
|
let sectionData = sectionDataUS
|
||||||
|
let skillGrouping = __SkillGroupsUS
|
||||||
// Detect French stat block
|
// Detect French stat block
|
||||||
if (statString.includes('CC') && statString.includes('CT') && statString.includes('FM')) {
|
if (statString.includes('CC') && statString.includes('CT') && statString.includes('FM')) {
|
||||||
//ui.notifications.warn("Le parsing de stablock en Français n'est pas encore prêt")
|
//ui.notifications.warn("Le parsing de stablock en Français n'est pas encore prêt")
|
||||||
statNameReg = fr_carac
|
statNameReg = fr_carac
|
||||||
sectionData = sectionDataFR
|
sectionData = sectionDataFR
|
||||||
|
skillGrouping = __SkillGroupsFR
|
||||||
}
|
}
|
||||||
|
|
||||||
let reg1 = XRegExp(statNameReg, 'gi')
|
let reg1 = XRegExp(statNameReg, 'gi')
|
||||||
let res = reg1.test(statString)
|
let res = reg1.test(statString)
|
||||||
if (res) { //stat block identified go on
|
if (res) { //stat block identified go on
|
||||||
|
let globalItemList = []
|
||||||
|
|
||||||
// Extract the name
|
// Extract the name
|
||||||
let res1 = XRegExp.exec(statString, reg1)
|
let res1 = XRegExp.exec(statString, reg1)
|
||||||
console.log("REG", res1)
|
console.log("REG", res1)
|
||||||
let pnjStr = statString.substring(0, res1.index)
|
let pnjStr = statString.substring(0, res1.index)
|
||||||
let nameRes = XRegExp.exec(pnjStr, regName)
|
let nameRes = XRegExp.exec(pnjStr, regName)
|
||||||
console.log(nameRes)
|
//console.log(nameRes)
|
||||||
if (nameRes.tiers && nameRes.tiers.length > 0 && hasProperty(model, "details.status.value")) {
|
if (nameRes.tiers && nameRes.tiers.length > 0 && hasProperty(model, "details.status.value")) {
|
||||||
let regTiers = XRegExp("(?<name>[A-Za-z]*)\\s+(?<level>[0-9]*)");
|
let regTiers = XRegExp("(?<name>[A-Za-z]*)\\s+(?<level>[0-9]*)");
|
||||||
let resTiers = XRegExp.exec(nameRes.tiers, regTiers);
|
let resTiers = XRegExp.exec(nameRes.tiers, regTiers);
|
||||||
console.log(resTiers);
|
console.log(resTiers);
|
||||||
model.details.status.value = game.i18n.localize(resTiers.name.trim()) + " " + resTiers.level;
|
model.details.status.value = game.i18n.localize(resTiers.name.trim()) + " " + resTiers.level;
|
||||||
}
|
}
|
||||||
|
let baseName = nameRes.name.split("\n")
|
||||||
// Compute the PNJ name
|
// Compute the PNJ name
|
||||||
let pnjName = nameRes.name.split("—")[0].split(" ").filter(f => !!f);
|
let pnjName = baseName[0].split("—")[0].split(" ").filter(f => !!f)
|
||||||
pnjName = pnjName.map(word => {
|
pnjName = pnjName.map(word => {
|
||||||
if (word == "VON")
|
if (word == "VON")
|
||||||
return word.toLowerCase();
|
return word.toLowerCase();
|
||||||
@ -227,7 +287,14 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
return word;
|
return word;
|
||||||
})
|
})
|
||||||
pnjName = pnjName.join(" ")
|
pnjName = pnjName.join(" ")
|
||||||
|
if (baseName[1]) {
|
||||||
|
let careerName = baseName[1].split(",")[0]
|
||||||
|
//console.log("CAREER", careerName)
|
||||||
|
let career = await __findItem(careerName, "career")
|
||||||
|
if (career) {
|
||||||
|
globalItemList.push(career)
|
||||||
|
}
|
||||||
|
}
|
||||||
// Get the carac values
|
// Get the carac values
|
||||||
let reg2 = XRegExp(carac_val, 'gi')
|
let reg2 = XRegExp(carac_val, 'gi')
|
||||||
let resCarac = XRegExp.exec(statString, reg2) // resr contains all carac found
|
let resCarac = XRegExp.exec(statString, reg2) // resr contains all carac found
|
||||||
@ -246,20 +313,23 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
for (let def of sectionData) {
|
for (let def of sectionData) {
|
||||||
def.regDef = XRegExp(def.toFind, 'gi');
|
def.regDef = XRegExp(def.toFind, 'gi');
|
||||||
let res = XRegExp.exec(statString, def.regDef);
|
let res = XRegExp.exec(statString, def.regDef);
|
||||||
if (res) def.index = res.index; // Get the index in the string
|
if (res) {
|
||||||
|
def.index = res.index // Position of the string in the whole statblock
|
||||||
|
def.lore = res.lore // Extraction of the lore, when present
|
||||||
|
} // Get the index in the string
|
||||||
//console.log(" Parsing", def.name, res);
|
//console.log(" Parsing", def.name, res);
|
||||||
}
|
}
|
||||||
// Sort to split position of various substring
|
// Sort to split position of various substring
|
||||||
sectionData.sort(function (a, b) { return a.index - b.index; });
|
sectionData.sort(function (a, b) { return a.index - b.index; });
|
||||||
|
|
||||||
let globalItemList = [];
|
|
||||||
// Then loop again and process each item type
|
// Then loop again and process each item type
|
||||||
for (let i = 0; i < sectionData.length; i++) {
|
for (let i = 0; i < sectionData.length; i++) {
|
||||||
let def = sectionData[i];
|
let def = sectionData[i];
|
||||||
if (def.index > -1) {
|
if (def.index > -1) {
|
||||||
let maxIndex = statString.length
|
let maxIndex = statString.length
|
||||||
if (sectionData[i + 1] && sectionData[i + 1].index > -1)
|
if (sectionData[i + 1] && sectionData[i + 1].index > -1) {
|
||||||
maxIndex = sectionData[i + 1].index
|
maxIndex = sectionData[i + 1].index
|
||||||
|
}
|
||||||
def.substring = statString.substring(def.index, maxIndex)
|
def.substring = statString.substring(def.index, maxIndex)
|
||||||
def.substring = XRegExp.replace(def.substring, def.regDef, "")
|
def.substring = XRegExp.replace(def.substring, def.regDef, "")
|
||||||
def.substring = XRegExp.replace(def.substring, regLine1, " ")
|
def.substring = XRegExp.replace(def.substring, regLine1, " ")
|
||||||
@ -267,13 +337,20 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
|
|
||||||
// Then create a table of it in termList, with specific sub-parsing rules
|
// Then create a table of it in termList, with specific sub-parsing rules
|
||||||
let termList = XRegExp.split(def.substring, regSep);
|
let termList = XRegExp.split(def.substring, regSep);
|
||||||
|
//console.log("Term list identified", termList)
|
||||||
|
let lastSkillName
|
||||||
for (let name of termList) {
|
for (let name of termList) {
|
||||||
let itemFound, subres, value;
|
let itemFound, subres, value;
|
||||||
if (def.secondParse) {
|
if (def.secondParse) {
|
||||||
subres = XRegExp.exec(name, XRegExp(def.secondParse, 'gi'))
|
subres = XRegExp.exec(name, XRegExp(def.secondParse, 'gi'))
|
||||||
name = subres.name.trim().replace("\n", "").replace("\r", "")
|
//console.log("Second pars", def, name, subres)
|
||||||
value = XRegExp.replace(subres.value, "(", "")
|
name = subres.name.trim().replace("\n", "").replace("\r", "")
|
||||||
value = XRegExp.replace(value, ")", "")
|
if (subres.value) {
|
||||||
|
value = XRegExp.replace(subres.value, "(", "")
|
||||||
|
value = XRegExp.replace(value, ")", "")
|
||||||
|
} else {
|
||||||
|
value = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
name = __patchName(name)
|
name = __patchName(name)
|
||||||
if (def.name == 'trait') {
|
if (def.name == 'trait') {
|
||||||
@ -281,63 +358,96 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
itemFound = await __findItem(name, "trait")
|
itemFound = await __findItem(name, "trait")
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
if (itemFound)
|
|
||||||
itemFound = itemFound.toObject()
|
|
||||||
if (itemFound && value && value.length > 0) {
|
if (itemFound && value && value.length > 0) {
|
||||||
if (name.toLowerCase() == 'weapon' || name.toLowerCase() == "bite" || name.toLowerCase() == "tail" ||
|
let number = value.match(/\d+/g);
|
||||||
name.toLowerCase() == 'arme' || name.toLowerCase() == "morsure" || name.toLowerCase() == "queue") {
|
if (number && (name.toLowerCase() == 'ranged' || name.toLowerCase() == 'weapon' || name.toLowerCase() == "bite" || name.toLowerCase() == "tail" ||
|
||||||
console.log(itemFound)
|
name.toLowerCase() == 'arme' || name.toLowerCase() == "morsure" || name.toLowerCase() == "queue")) {
|
||||||
itemFound.system.specification.value = Number(value) - Math.floor( Number(model.characteristics.s.initial) / 10)
|
//console.log(itemFound)
|
||||||
|
number = number[0] // Take first number ....
|
||||||
|
itemFound.system.specification.value = Number(number) - ((name.toLowerCase() == 'ranged') ? 0 : Math.floor(Number(model.characteristics.s.initial) / 10))
|
||||||
} else {
|
} else {
|
||||||
itemFound.system.specification.value = game.i18n.localize(value)
|
itemFound.system.specification.value = game.i18n.localize(value)
|
||||||
}
|
}
|
||||||
|
itemFound.name += "(" + value + ")"
|
||||||
}
|
}
|
||||||
if (!itemFound)
|
if (!itemFound)
|
||||||
ui.notifications.error("Trait non trouvé, à ajouter manuellement : " + name, { permanent: true })
|
ui.notifications.error("Trait non trouvé, à ajouter manuellement : " + name, { permanent: true })
|
||||||
|
|
||||||
} else if (def.name == 'skill') {
|
} else if (def.name == 'skill') {
|
||||||
try {
|
try {
|
||||||
itemFound = await __findSkill(name, value);
|
itemFound = await __findSkill(name, value);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
if (itemFound)
|
let newName = name
|
||||||
itemFound = itemFound.toObject();
|
if (!itemFound && lastSkillName) {
|
||||||
|
newName = lastSkillName + " (" + name + ")"
|
||||||
|
itemFound = await __findSkill(newName, value)
|
||||||
|
}
|
||||||
if (itemFound && subres && value) {
|
if (itemFound && subres && value) {
|
||||||
itemFound.system.advances.value = Number(value) - Number(model.characteristics[itemFound.system.characteristic.value].initial);
|
itemFound.system.advances.value = Number(value) - Number(model.characteristics[itemFound.system.characteristic.value].initial);
|
||||||
}
|
}
|
||||||
if (!itemFound)
|
lastSkillName = undefined
|
||||||
|
for (let keySkillGroup of skillGrouping) {
|
||||||
|
if (newName.includes(keySkillGroup)) { // useful to handle skills grouping
|
||||||
|
lastSkillName = keySkillGroup
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!itemFound) {
|
||||||
ui.notifications.error("Compétence non trouvée, à ajouter manuellement : " + name, { permanent: true })
|
ui.notifications.error("Compétence non trouvée, à ajouter manuellement : " + name, { permanent: true })
|
||||||
|
}
|
||||||
} else if (def.name == 'talent') {
|
} else if (def.name == 'talent') {
|
||||||
try {
|
try {
|
||||||
itemFound = await __findTalent(name);
|
itemFound = await __findTalent(name);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
if (itemFound)
|
|
||||||
itemFound = itemFound.toObject();
|
|
||||||
if (itemFound && subres && value)
|
if (itemFound && subres && value)
|
||||||
itemFound.system.advances.value = Number(value);
|
itemFound.system.advances.value = Number(value);
|
||||||
if (!itemFound)
|
if (!itemFound) {
|
||||||
ui.notifications.error("Talent non trouvé, à ajouter manuellement : " + name, { permanent: true })
|
ui.notifications.error("Talent non trouvé, à ajouter manuellement : " + name, { permanent: true })
|
||||||
} else if (def.name == 'trapping') {
|
|
||||||
try {
|
|
||||||
itemFound = await __findItem(name, "trapping");
|
|
||||||
}
|
}
|
||||||
catch { }
|
} else if (def.name == 'trapping') {
|
||||||
|
itemFound = await __findItem(name, "trapping");
|
||||||
|
if (!itemFound) {
|
||||||
|
itemFound = await __findItem(name, "weapon");
|
||||||
|
}
|
||||||
|
if (!itemFound) {
|
||||||
|
itemFound = await __findItem(name, "armor");
|
||||||
|
}
|
||||||
if (!itemFound && name) {
|
if (!itemFound && name) {
|
||||||
itemFound = new game.entities.ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "trapping", system: game.system.model.Item.trapping })
|
if (name.toLowerCase().includes("armor") || name.toLowerCase().includes("armure") || name.toLowerCase().includes("armour")) {
|
||||||
itemFound.system.trappingType.value = "misc"
|
itemFound = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "armor", system: game.system.model.Item.armor })
|
||||||
}
|
} else if (name.toLowerCase().includes("weapon") || name.toLowerCase().includes("arme")) {
|
||||||
if (itemFound)
|
itemFound = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "weapon", system: game.system.model.Item.weapon })
|
||||||
|
} else {
|
||||||
|
itemFound = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "trapping", system: game.system.model.Item.trapping })
|
||||||
|
itemFound.system.trappingType.value = "misc"
|
||||||
|
if (name.toLowerCase().includes("cloth")) {
|
||||||
|
itemFound.system.trappingType.value = "clothingAccessories"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
itemFound = itemFound.toObject()
|
||||||
|
}
|
||||||
|
} else if (def.name.includes('spell')) {
|
||||||
|
console.log("Found spells section!!!!", name, def, def.lore || "NO LORE")
|
||||||
|
// Lore management, firs pass
|
||||||
|
if ( def.lore ) {
|
||||||
|
let newName = name + " (" + def.lore + ")"
|
||||||
|
itemFound = await __findItem(newName, "spell");
|
||||||
|
console.log("Trying to find ", newName, itemFound)
|
||||||
|
}
|
||||||
|
if (!itemFound) { // If not found with Lore, try without the lore
|
||||||
|
itemFound = await __findItem(name, "spell");
|
||||||
|
}
|
||||||
|
if (!itemFound && name) { // Auto-create the spell name
|
||||||
|
itemFound = new ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name + "(To be checked/completed)", type: "spell", system: game.system.model.Item.spell })
|
||||||
itemFound = itemFound.toObject();
|
itemFound = itemFound.toObject();
|
||||||
|
}
|
||||||
} else if (def.name == 'mutation') {
|
} else if (def.name == 'mutation') {
|
||||||
try {
|
try {
|
||||||
itemFound = await __findItem(name, "mutation");
|
itemFound = await __findItem(name, "mutation");
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
if (itemFound)
|
|
||||||
itemFound = itemFound.toObject();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemFound)
|
if (itemFound)
|
||||||
globalItemList.push(itemFound);
|
globalItemList.push(itemFound);
|
||||||
}
|
}
|
||||||
|
2493
tools/careerv10.json
2493
tools/careerv10.json
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ local JSON = require"json"
|
|||||||
|
|
||||||
--local enjsonf = "/home/morr/foundry/foundrydata-dev/Data/modules/wfrp4e-dotr/lang/en.json"
|
--local enjsonf = "/home/morr/foundry/foundrydata-dev/Data/modules/wfrp4e-dotr/lang/en.json"
|
||||||
local careerv10 = "careerv10.json"
|
local careerv10 = "careerv10.json"
|
||||||
local goodC = "../compendium/wfrp4e-core.careers.json"
|
local goodC = "../compendium/wfrp4e-core.items.json"
|
||||||
|
|
||||||
local fp = io.open(careerv10, "r")
|
local fp = io.open(careerv10, "r")
|
||||||
local c10 = JSON.decode( fp:read("*a") )
|
local c10 = JSON.decode( fp:read("*a") )
|
||||||
|
Reference in New Issue
Block a user