Fix Talent, prayer and db
This commit is contained in:
parent
c3766f17c3
commit
58f6c81cbd
@ -1,5 +1,23 @@
|
|||||||
{
|
{
|
||||||
"label": "Prières",
|
"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": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"id": "An Invitation ",
|
"id": "An Invitation ",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
"name": "WH4-fr-translation",
|
"name": "WH4-fr-translation",
|
||||||
"title": "Traduction du module WH4 en Français.",
|
"title": "Traduction du module WH4 en Français.",
|
||||||
"description": "La traduction du module WH4.",
|
"description": "La traduction du module WH4.",
|
||||||
"version": "0.39",
|
"version": "0.40",
|
||||||
"minimumCoreVersion" : "0.5.1",
|
"minimumCoreVersion" : "0.5.1",
|
||||||
"author": "LeRatierBretonnien",
|
"author": "LeRatierBretonnien",
|
||||||
"esmodules": ["babele-register.js"],
|
"esmodules": ["babele-register.js"],
|
||||||
|
37
tools/foundry_wh4_fill_talents.lua
Normal file
37
tools/foundry_wh4_fill_talents.lua
Normal 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
1
tools/talents.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user