Fix Talent, prayer and db

This commit is contained in:
LeRatierBretonnien 2020-04-10 16:31:13 +02:00
parent c3766f17c3
commit 58f6c81cbd
5 changed files with 1065 additions and 839 deletions

View File

@ -1,5 +1,23 @@
{
"label": "Prières",
"mapping": {
"pduration": {
"path": "data.duration.value",
"converter": "spells_duration_range_target_damage"
},
"prange": {
"path": "data.range.value",
"converter": "spells_duration_range_target_damage"
},
"ptarget": {
"path": "data.target.value",
"converter": "spells_duration_range_target_damage"
},
"pdamage": {
"path": "data.damage.value",
"converter": "spells_duration_range_target_damage"
}
},
"entries": [
{
"id": "An Invitation ",

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
"name": "WH4-fr-translation",
"title": "Traduction du module WH4 en Français.",
"description": "La traduction du module WH4.",
"version": "0.39",
"version": "0.40",
"minimumCoreVersion" : "0.5.1",
"author": "LeRatierBretonnien",
"esmodules": ["babele-register.js"],

View File

@ -0,0 +1,37 @@
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
local talent_db = "../../WFRP-4th-Edition-FoundryVTT/packs/talents.db"
local talent = "../compendium/wfrp4e.talents.json"
local f1 = io.open(talent_db)
local f2 = io.open(talent)
local strjson = f2:read("*a")
f2:close()
local talents = JSON.decode(strjson)
local function trim1(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
local line = f1:read()
while line do
--print(line)
local db_talent = JSON.decode( line)
for _, mytalent in pairs(talents.entries) do
if mytalent.id == db_talent.name then
mytalent.tests = db_talent.data.tests.value
end
end
line = f1:read()
end
f1:close()
local jsonout = JSON.encode( talents )
local fout = io.open("talents.json", "w+")
fout:write( jsonout )
fout:close()

1
tools/talents.json Normal file

File diff suppressed because one or more lines are too long