Synw with 4.3.0

This commit is contained in:
2021-11-26 12:54:58 +01:00
parent 6184241407
commit 897a22290a
4 changed files with 1082 additions and 606 deletions

View File

@ -0,0 +1,31 @@
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
--local talent_db = "../../WFRP4e-FoundryVTT/packs/talents.db"
local traitdb ='/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-core/packs/traits.db'
local f1 = io.open(traitdb)
local function trim1(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
local line = f1:read()
while line do
--print(line)
local trait = JSON.decode( line )
if trait.effects then
for _, effect in pairs(trait.effects) do
if effect.flags and effect.flags.wfrp4e and effect.flags.wfrp4e.script then
print( trait.name )
print( JSON.encode (trait.effects) )
print ()
end
end
end
line = f1:read()
end
f1:close()