Tried the script and it works well, too well in fact, as because it prints the symbols of every people group, i can;t see all of the symbols on the command line due to there being way too many symbols on my extra large world haha.
Think I'm gonna see if i can make it blurt out a .txt in windows or something so that i can at least find the symbols i need more easily with a search function.
Thanks a lot for the scripts!
EDIT:
Managed to read some documentation and made it possible for the script to write a file with all the symbol info, it should also overwrite it every time it's used, so no spam with 1000000000 different symbols from multiple worlds every time it's used. It seems the console only managed to get around the last ¼ of the symbols on the world, so this paired with legends mode and legends viewer will let me give to my D&D players all the symbol info we need/want.
Again, thank you all for the help, this has also helped me get a bit more familiar with DFHack to extract info for future campaigns.
Code here:
imp = df.itemimprovement_art_imagest:new()
str = df.new('string')
file = io.open("civ-symbols.txt", "w+")
for _,i in pairs(df.global.world.entities.all) do
for j,_ in pairs(i.resources.art_image_types) do
if i.resources.art_image_types[j] == 0 then
imp.image.id = i.resources.art_image_ids[j]
imp.image.subid = i.resources.art_image_subids[j]
img = imp:getImage(nil)
desc = nil
for _,e in pairs(img.elements) do
e:getName1(str, false, true)
if desc == nil then
desc = str.value
else
desc = desc .. " and " .. str.value
end
end
desc = desc .. "."
for _,p in pairs(img.properties) do
-- TODO - once DFHack is updated to 0.47.05-r6 or later, use this line instead of the one below
-- p:getName(str, img, true)
p:getName(str, img, nil)
desc = desc .. " " .. str.value
end
desc = "The symbol of " .. dfhack.TranslateName(i.name, true) .. " is called " .. dfhack.TranslateName(img.name, true) .. ". It depicts " .. desc
print(desc)
file:write(desc .. "\n")
end
end
end
file:close()
str:delete()
imp:delete()