Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: SCIENCE required - How does the naming scheme for Angels work?  (Read 1796 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
SCIENCE required - How does the naming scheme for Angels work?
« on: November 17, 2016, 07:59:21 pm »

Procedual creatures are not in the raws. But one can extract the world.dat to have a look at them. DEMON_1, DEMON_2, DEMON_3, no problem. Forgotten beasts and nightcreatures the same.

But divine beings, angels, vault guardians... they have a strange naming scheme, with ID like:
Code: [Select]
[CREATURE:HF1670 DIVINE_1]
[code][CREATURE:HF1670 DIVINE_2]
[code][CREATURE:HF1670 DIVINE_3]
[CREATURE:HF1437 DIVINE_1]
[CREATURE:HF1437 DIVINE_2]
[CREATURE:HF1437 DIVINE_3]
[CREATURE:HF1523 DIVINE_1]
[CREATURE:HF1523 DIVINE_2]
[CREATURE:HF1523 DIVINE_3]

Presumably they start with HF, then a 4 number code, then DIVINE_#.

Does anyone know which 4-number codes exist? I ask because I want to make a sprite-sheet for angels/guardians, like this:
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Nahere

  • Bay Watcher
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #1 on: November 17, 2016, 08:29:46 pm »

I'm not sure but I think the four digit code is the historical figure ID for the god they serve, so it would depend on worldgen.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #2 on: November 18, 2016, 10:10:40 am »

Do you know if its goes 0001 to 0234 to 1623, or rather 1 to 234 to 1623 ? Aka, is it always 4 numbers? How high can they go?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #3 on: November 20, 2016, 10:57:18 pm »

I'm not sure but I think the four digit code is the historical figure ID for the god they serve, so it would depend on worldgen.
That's exactly how it works - if you look closer at the generated raws, you will see "[SOURCE_HFID:###]" corresponding to the same "HF###" prefix on the creature tag, and that ID is the historical figure number of a deity.

For example, I just did a test on a sample world in 0.43.05, and I got this:

Code: [Select]
[CREATURE:HF66 DIVINE_2]
[NAME:Retainer of Cáccast:Retainers of Cáccast:retainer]
[CASTE_NAME:Retainer of Cáccast:Retainers of Cáccast:retainer]
[GENERATED]
[SOURCE_HFID:66]

and an XML dump from Legends gave me this:

Code: [Select]
<historical_figure>
<id>66</id>
<name>azoc the nightmare of jackals</name>
<race>HUMAN</race>
<caste>MALE</caste>
<appeared>-1</appeared>
<birth_year>-1</birth_year>
<birth_seconds72>-1</birth_seconds72>
<death_year>-1</death_year>
<death_seconds72>-1</death_seconds72>
<deity/>
<sphere>trickery</sphere>
<sphere>lies</sphere>
<sphere>treachery</sphere>
</historical_figure>

A check in Legends mode confirms that "Azoc the Nightmare of Jackals" is the English translation of the name "Azoc Cáccast Baktur".
« Last Edit: November 20, 2016, 11:00:46 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #4 on: November 21, 2016, 06:54:25 am »

Thank you.

I wonder if DF minds if I make a text-file with 10k entries, to cover all the divine beings made by historical figures 0-9999.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #5 on: November 21, 2016, 06:37:53 pm »

I have experience with that kind of thing for unrelated reasons. It will make loading take excessively long.

Anyway, I'd personally just scan the angel creature raws and insert new graphics raws into the folder at runtime.

jecowa

  • Bay Watcher
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #6 on: November 21, 2016, 07:35:09 pm »

10k entries would make like a 0.75 MB text file. Then you would have like 8 MB worth of Angel PNG files.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #7 on: November 22, 2016, 07:44:01 am »

10k entries would make like a 0.75 MB text file. Then you would have like 8 MB worth of Angel PNG files.
No, I would have a 64px x 64px png file. 4 sprites. I wouldnt do unique graphics for all of them, just redirect all creature-ids to that graphic.

Mh... maybe I use creature tiles for them. Dont make graphics, use the tileset instead of sprites. They all use tile 142, and all champions use tile 132.

I have experience with that kind of thing for unrelated reasons. It will make loading take excessively long.

Anyway, I'd personally just scan the angel creature raws and insert new graphics raws into the folder at runtime.
How?

Because that would be amazing for FBs and Demons and Titans too.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #8 on: November 22, 2016, 07:11:44 pm »

Okay, I tried making it, and if you print all the files concatenated together it's a perfectly valid graphics file, but for some insane reason it refuses to actually write the file:

Code: [Select]
local generated_graphics_file=dfhack.getSavePath()..'/raw/graphics/graphics_procedural.txt'

if dfhack.filesystem.exists(generated_graphics_file) and not ...=='force' then qerror('Procedural graphics already exist!') end

local titans={} --also FBs

local demons={}

local angels={}

for k,v in ipairs(df.global.world.raws.creatures.all) do
    if v.flags.GENERATED then
        if v.flags.CASTE_TITAN or v.flags.CASTE_FEATURE_BEAST then
            table.insert(titans,v)
        elseif v.flags.CASTE_DEMON or v.flags.CASTE_UNIQUE_DEMON then
            table.insert(demons,v)
        elseif v.source_hfid~=-1 then
            table.insert(angels,v)
        else
            table.insert(titans,v) --in the weird case
        end
    end
end

local tile_pages={
    angel={
        name="angels",
        file="placeholder/placeholder.png",
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    },
    demon={
        name="demons",
        file="placeholder/placeholder.png",
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    },
    titan={
        name="titans",
        file="placeholder/placeholder.png",
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    }
}

local graphics_file_1=[[graphics_generated

[OBJECT:GRAPHICS] ]]

for k,v in pairs(tile_pages) do
    graphics_file_1=graphics_file_1..'\n\n[TILE_PAGE:'..v.name..[[]
    [FILE:]]..v.file..[[]
    [TILE_DIM:]]..v.TILE_DIM[1]..':'..v.TILE_DIM[2]..[[]
    [PAGE_DIM:]]..v.PAGE_DIM[1]..':'..v.PAGE_DIM[2]..']'
end

local rng=dfhack.random.new()

local graphics_file_2=''

for k,v in ipairs(titans) do
    graphics_file_2=graphics_file_2..'\n\n[CREATURE_GRAPHICS:'..v.creature_id..']\n'
    graphics_file_2=graphics_file_2..'    [DEFAULT:'..tile_pages.titan.name..':'..rng:random(tile_pages.titan.PAGE_DIM[1])..':'..rng:random(tile_pages.titan.PAGE_DIM[2])..':AS_IS]'
end

local graphics_file_3=''

for k,v in ipairs(angels) do
    graphics_file_3=graphics_file_3..'\n\n[CREATURE_GRAPHICS:'..v.creature_id..']\n'
    graphics_file_3=graphics_file_3..'    [DEFAULT:'..tile_pages.angel.name..':'..rng:random(tile_pages.angel.PAGE_DIM[1])..':'..rng:random(tile_pages.angel.PAGE_DIM[2])..':AS_IS]'
end

local graphics_file_4=''

for k,v in ipairs(demons) do
    graphics_file_4=graphics_file_4..'\n\n[CREATURE_GRAPHICS:'..v.creature_id..']\n'
    graphics_file_4=graphics_file_4..'    [DEFAULT:'..tile_pages.demon.name..':'..rng:random(tile_pages.demon.PAGE_DIM[1])..':'..rng:random(tile_pages.demon.PAGE_DIM[2])..':AS_IS]'
end

actual_graphics_file=io.open(generated_graphics_file,'w')

actual_graphics_file:write('')

actual_graphics_file=io.open(generated_graphics_file,'a')

actual_graphics_file:write(graphics_file_1)

actual_graphics_file:write(graphics_file_2)

actual_graphics_file:write(graphics_file_3)

actual_graphics_file:write(graphics_file_4)

The splitting of the graphics file string into four parts was my insane attempt to try to get it not to do what it was doing, but it didn't work; regardless, this happens every time:

Code: [Select]
graphics_generated

[OBJECT:GRAPHICS]

[TILE_PAGE:angels]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[TILE_PAGE:titans]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[TILE_PAGE:demons]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_1]
    [DEFAULT:titans:13:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_2]
    [DEFAULT:titans:3:6:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_3]
    [DEFAULT:titans:4:12:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_4]
    [DEFAULT:titans:3:3:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_5]
    [DEFAULT:titans:12:7:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_6]
    [DEFAULT:titans:10:7:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_7]
    [DEFAULT:titans:6:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_8]
    [DEFAULT:titans:12:5:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_9]
    [DEFAULT:titans:14:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_10]
    [DEFAULT:titans:11:14:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_11]
    [DEFAULT:titans:2:4:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_12]
    [DEFAULT:titans:1:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_13]
    [DEFAULT:titans:5:7:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_14]
    [DEFAULT:titans:1:9:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_15]
    [DEFAULT:titans:12:1:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_16]
    [DEFAULT:titans:7:0:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_17]
    [DEFAULT:titans:0:4:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_18]
    [DEFAULT:titans:0:12:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_19]
    [DEFAULT:titans:10:13:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_20]
    [DEFAULT:titans:4:14:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_21]
    [DEFAULT:titans:10:5:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_22]
    [DEFAULT:titans:0:13:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_23]
    [DEFAULT:titans:14:8:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_24]
    [DEFAULT:titans:8:7:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_25]
    [DEFAULT:titans:3:13:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_26]
    [DEFAULT:titans:13:4:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_27]
    [DEFAULT:titans:8:2:AS_IS]

[CREATURE_GRAPHICS:TITAN_1]
    [DEFAULT:titans:0:14:AS_IS]

[CREATURE_GRAPHICS:TITAN_2]
    [DEFAULT:titans:0:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_1]
    [DEFAULT:titans:13:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_2]
    [DEFAULT:titans:11:6:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_3]
    [DEFAULT:titans:13:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_4]
    [DEFAULT:titans:5:10:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_5]
    [DEFAULT:titans:14:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_6]
    [DEFAULT:titans:4:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_7]
    [DEFAULT:titans:2:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_8]
    [DEFAULT:titans:13:0:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_9]
    [DEFAULT:titans:3:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_10]
    [DEFAULT:titans:6:11:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_11]
    [DEFAULT:titans:13:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_12]
    [DEFAULT:titans:12:11:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_13]
    [DEFAULT:titans:14:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_14]
    [DEFAULT:titans:4:2:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_15]
    [DEFAULT:titans:7:10:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_16]
    [DEFAULT:titans:12:1:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_17]
    [DEFAULT:titans:6:1:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_18]
    [DEFAULT:titans:3:0:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_19]
    [DEFAULT:titans:4:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_20]
    [DEFAULT:titans:10:6:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_21]
    [DEFAULT:titans:5:0:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_22]
    [DEFAULT:titans:4:13:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_23]
    [DEFAULT:titans:1:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_24]
    [DEFAULT:titans:1:6:AS_IS]

[CREATURE_GRAPHI

As you can see, it cuts off near the end there, always part way through creature_graphics_2. To my incredible horror, removing creature_graphics_2 entirely from the listing (another insane piece of debugging work to figure out what exactly is going on) makes the file fail to write at all. I don't understand what's happening in the slightest. I thought it might be that DF is stopping it  from writing, but then I put it into a folder that DF ought not be reading while a save's loaded and it continued to completely fail to work. I'm completely confused right now.

Also, you might notice night creatures get graphics, too; ain't that nice?

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #9 on: November 22, 2016, 08:36:41 pm »

As you can see, it cuts off near the end there, always part way through creature_graphics_2. To my incredible horror, removing creature_graphics_2 entirely from the listing (another insane piece of debugging work to figure out what exactly is going on) makes the file fail to write at all. I don't understand what's happening in the slightest. I thought it might be that DF is stopping it  from writing, but then I put it into a folder that DF ought not be reading while a save's loaded and it continued to completely fail to work. I'm completely confused right now.
I'm not sure how Lua handles file I/O within DFHack, but you might need to explicitly close the file after writing everything to make sure it doesn't all just get buffered in memory.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #10 on: November 22, 2016, 10:54:49 pm »

I cannot believe I didn't think of that.

It worked. Here you go:

Code: [Select]
local generated_graphics_file=dfhack.getSavePath()..'/raw/graphics/graphics_procedural.txt'

if dfhack.filesystem.exists(generated_graphics_file) and not ...=='force' then qerror('Procedural graphics already exist!') end

local titans={} --also FBs

local demons={}

local angels={}

for k,v in ipairs(df.global.world.raws.creatures.all) do
    if v.flags.GENERATED then
        if v.flags.CASTE_TITAN or v.flags.CASTE_FEATURE_BEAST then
            table.insert(titans,v)
        elseif v.flags.CASTE_DEMON or v.flags.CASTE_UNIQUE_DEMON then
            table.insert(demons,v)
        elseif v.source_hfid~=-1 then
            table.insert(angels,v)
        else
            table.insert(titans,v) --in the weird case
        end
    end
end

local tile_pages={
    angel={
        name="angels",
        file="placeholder/placeholder.png",
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    },
    demon={
        name="demons",
        file="placeholder/placeholder.png",
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    },
    titan={
        name="titans",
        file="placeholder/placeholder.png",
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    }
}

local graphics_file=[[graphics_generated

[OBJECT:GRAPHICS] ]]

for k,v in pairs(tile_pages) do
    graphics_file=graphics_file..'\n\n[TILE_PAGE:'..v.name..[[]
    [FILE:]]..v.file..[[]
    [TILE_DIM:]]..v.TILE_DIM[1]..':'..v.TILE_DIM[2]..[[]
    [PAGE_DIM:]]..v.PAGE_DIM[1]..':'..v.PAGE_DIM[2]..']'
end

local rng=dfhack.random.new()

for k,v in ipairs(titans) do
    graphics_file=graphics_file..'\n\n[CREATURE_GRAPHICS:'..v.creature_id..']\n'
    graphics_file=graphics_file..'    [DEFAULT:'..tile_pages.titan.name..':'..rng:random(tile_pages.titan.PAGE_DIM[1])..':'..rng:random(tile_pages.titan.PAGE_DIM[2])..':AS_IS]'
end

for k,v in ipairs(angels) do
    graphics_file=graphics_file..'\n\n[CREATURE_GRAPHICS:'..v.creature_id..']\n'
    graphics_file=graphics_file..'    [DEFAULT:'..tile_pages.angel.name..':'..rng:random(tile_pages.angel.PAGE_DIM[1])..':'..rng:random(tile_pages.angel.PAGE_DIM[2])..':AS_IS]'
end

for k,v in ipairs(demons) do
    graphics_file=graphics_file..'\n\n[CREATURE_GRAPHICS:'..v.creature_id..']\n'
    graphics_file=graphics_file..'    [DEFAULT:'..tile_pages.demon.name..':'..rng:random(tile_pages.demon.PAGE_DIM[1])..':'..rng:random(tile_pages.demon.PAGE_DIM[2])..':AS_IS]'
end

actual_graphics_file=io.open(generated_graphics_file,'w')

actual_graphics_file:write(graphics_file)

actual_graphics_file:close()

Should probably include extra logic for night creatures. Here's an example out file:

Code: [Select]
graphics_generated

[OBJECT:GRAPHICS]

[TILE_PAGE:titans]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[TILE_PAGE:angels]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[TILE_PAGE:demons]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_1]
    [DEFAULT:titans:8:9:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_2]
    [DEFAULT:titans:14:2:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_3]
    [DEFAULT:titans:9:4:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_4]
    [DEFAULT:titans:1:11:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_5]
    [DEFAULT:titans:12:2:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_6]
    [DEFAULT:titans:1:1:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_7]
    [DEFAULT:titans:8:12:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_8]
    [DEFAULT:titans:1:12:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_9]
    [DEFAULT:titans:0:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_10]
    [DEFAULT:titans:2:3:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_11]
    [DEFAULT:titans:6:7:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_12]
    [DEFAULT:titans:3:12:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_13]
    [DEFAULT:titans:3:6:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_14]
    [DEFAULT:titans:5:14:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_15]
    [DEFAULT:titans:4:6:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_16]
    [DEFAULT:titans:10:6:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_17]
    [DEFAULT:titans:4:3:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_18]
    [DEFAULT:titans:13:6:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_19]
    [DEFAULT:titans:13:7:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_20]
    [DEFAULT:titans:7:14:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_21]
    [DEFAULT:titans:10:5:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_22]
    [DEFAULT:titans:13:2:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_23]
    [DEFAULT:titans:9:2:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_24]
    [DEFAULT:titans:0:4:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_25]
    [DEFAULT:titans:12:6:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_26]
    [DEFAULT:titans:11:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_27]
    [DEFAULT:titans:1:6:AS_IS]

[CREATURE_GRAPHICS:TITAN_1]
    [DEFAULT:titans:11:6:AS_IS]

[CREATURE_GRAPHICS:TITAN_2]
    [DEFAULT:titans:10:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_1]
    [DEFAULT:titans:13:2:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_2]
    [DEFAULT:titans:7:0:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_3]
    [DEFAULT:titans:9:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_4]
    [DEFAULT:titans:10:12:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_5]
    [DEFAULT:titans:2:13:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_6]
    [DEFAULT:titans:9:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_7]
    [DEFAULT:titans:2:11:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_8]
    [DEFAULT:titans:6:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_9]
    [DEFAULT:titans:7:8:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_10]
    [DEFAULT:titans:9:13:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_11]
    [DEFAULT:titans:14:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_12]
    [DEFAULT:titans:8:13:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_13]
    [DEFAULT:titans:10:8:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_14]
    [DEFAULT:titans:4:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_15]
    [DEFAULT:titans:14:8:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_16]
    [DEFAULT:titans:13:0:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_17]
    [DEFAULT:titans:10:12:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_18]
    [DEFAULT:titans:6:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_19]
    [DEFAULT:titans:0:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_20]
    [DEFAULT:titans:10:8:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_21]
    [DEFAULT:titans:5:8:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_22]
    [DEFAULT:titans:5:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_23]
    [DEFAULT:titans:9:14:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_24]
    [DEFAULT:titans:6:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_25]
    [DEFAULT:titans:3:5:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_26]
    [DEFAULT:titans:5:6:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_27]
    [DEFAULT:titans:13:13:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_28]
    [DEFAULT:titans:7:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_29]
    [DEFAULT:titans:9:2:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_30]
    [DEFAULT:titans:4:5:AS_IS]

[CREATURE_GRAPHICS:HF48 DIVINE_1]
    [DEFAULT:angels:1:14:AS_IS]

[CREATURE_GRAPHICS:HF48 DIVINE_2]
    [DEFAULT:angels:7:11:AS_IS]

[CREATURE_GRAPHICS:HF48 DIVINE_3]
    [DEFAULT:angels:10:11:AS_IS]

[CREATURE_GRAPHICS:DEMON_1]
    [DEFAULT:demons:0:7:AS_IS]

[CREATURE_GRAPHICS:DEMON_2]
    [DEFAULT:demons:8:4:AS_IS]

[CREATURE_GRAPHICS:DEMON_3]
    [DEFAULT:demons:1:12:AS_IS]

[CREATURE_GRAPHICS:DEMON_4]
    [DEFAULT:demons:0:12:AS_IS]

[CREATURE_GRAPHICS:DEMON_5]
    [DEFAULT:demons:7:12:AS_IS]

[CREATURE_GRAPHICS:DEMON_6]
    [DEFAULT:demons:12:3:AS_IS]

[CREATURE_GRAPHICS:DEMON_7]
    [DEFAULT:demons:1:14:AS_IS]

[CREATURE_GRAPHICS:DEMON_8]
    [DEFAULT:demons:1:8:AS_IS]

[CREATURE_GRAPHICS:DEMON_9]
    [DEFAULT:demons:7:4:AS_IS]

[CREATURE_GRAPHICS:DEMON_10]
    [DEFAULT:demons:4:2:AS_IS]

[CREATURE_GRAPHICS:DEMON_11]
    [DEFAULT:demons:3:11:AS_IS]

[CREATURE_GRAPHICS:DEMON_12]
    [DEFAULT:demons:7:6:AS_IS]

[CREATURE_GRAPHICS:DEMON_13]
    [DEFAULT:demons:9:6:AS_IS]

[CREATURE_GRAPHICS:DEMON_14]
    [DEFAULT:demons:14:11:AS_IS]

[CREATURE_GRAPHICS:DEMON_15]
    [DEFAULT:demons:1:12:AS_IS]

[CREATURE_GRAPHICS:DEMON_16]
    [DEFAULT:demons:4:13:AS_IS]

[CREATURE_GRAPHICS:DEMON_17]
    [DEFAULT:demons:14:10:AS_IS]

[CREATURE_GRAPHICS:DEMON_18]
    [DEFAULT:demons:10:1:AS_IS]

[CREATURE_GRAPHICS:DEMON_19]
    [DEFAULT:demons:8:12:AS_IS]

[CREATURE_GRAPHICS:DEMON_20]
    [DEFAULT:demons:9:4:AS_IS]
« Last Edit: November 22, 2016, 10:56:54 pm by Putnam »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #11 on: November 23, 2016, 05:15:39 pm »

I tried it, but I'm not quite sure what to do with the results.

Code: [Select]
graphics_generated

[OBJECT:GRAPHICS]

[TILE_PAGE:titans]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[TILE_PAGE:demons]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[TILE_PAGE:angels]
    [FILE:placeholder/placeholder.png]
    [TILE_DIM:16:16]
    [PAGE_DIM:15:15]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_1]
    [DEFAULT:titans:1:0:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_2]
    [DEFAULT:titans:2:8:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_3]
    [DEFAULT:titans:2:12:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_4]
    [DEFAULT:titans:6:2:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_5]
    [DEFAULT:titans:0:8:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_6]
    [DEFAULT:titans:8:9:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_7]
    [DEFAULT:titans:4:11:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_8]
    [DEFAULT:titans:10:5:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_9]
    [DEFAULT:titans:12:2:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_10]
    [DEFAULT:titans:2:14:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_11]
    [DEFAULT:titans:14:10:AS_IS]

[CREATURE_GRAPHICS:FORGOTTEN_BEAST_12]
    [DEFAULT:titans:14:14:AS_IS]

[CREATURE_GRAPHICS:TITAN_1]
    [DEFAULT:titans:2:12:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_1]
    [DEFAULT:titans:5:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_2]
    [DEFAULT:titans:4:1:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_3]
    [DEFAULT:titans:14:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_4]
    [DEFAULT:titans:4:6:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_5]
    [DEFAULT:titans:8:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_6]
    [DEFAULT:titans:3:12:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_7]
    [DEFAULT:titans:8:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_8]
    [DEFAULT:titans:7:2:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_9]
    [DEFAULT:titans:14:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_10]
    [DEFAULT:titans:1:7:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_11]
    [DEFAULT:titans:0:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_12]
    [DEFAULT:titans:12:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_13]
    [DEFAULT:titans:11:14:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_14]
    [DEFAULT:titans:0:14:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_15]
    [DEFAULT:titans:3:10:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_16]
    [DEFAULT:titans:9:1:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_17]
    [DEFAULT:titans:1:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_18]
    [DEFAULT:titans:2:6:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_19]
    [DEFAULT:titans:14:6:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_20]
    [DEFAULT:titans:12:12:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_21]
    [DEFAULT:titans:13:8:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_22]
    [DEFAULT:titans:8:9:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_23]
    [DEFAULT:titans:9:4:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_24]
    [DEFAULT:titans:4:0:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_25]
    [DEFAULT:titans:7:3:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_26]
    [DEFAULT:titans:2:5:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_27]
    [DEFAULT:titans:5:14:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_28]
    [DEFAULT:titans:4:14:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_29]
    [DEFAULT:titans:10:5:AS_IS]

[CREATURE_GRAPHICS:NIGHT_CREATURE_30]
    [DEFAULT:titans:6:2:AS_IS]

[CREATURE_GRAPHICS:HF85 DIVINE_1]
    [DEFAULT:angels:5:7:AS_IS]

[CREATURE_GRAPHICS:HF85 DIVINE_2]
    [DEFAULT:angels:12:3:AS_IS]

[CREATURE_GRAPHICS:HF85 DIVINE_3]
    [DEFAULT:angels:8:12:AS_IS]

[CREATURE_GRAPHICS:DEMON_1]
    [DEFAULT:demons:9:5:AS_IS]

[CREATURE_GRAPHICS:DEMON_2]
    [DEFAULT:demons:11:6:AS_IS]

[CREATURE_GRAPHICS:DEMON_3]
    [DEFAULT:demons:13:14:AS_IS]

[CREATURE_GRAPHICS:DEMON_4]
    [DEFAULT:demons:9:5:AS_IS]

[CREATURE_GRAPHICS:DEMON_5]
    [DEFAULT:demons:6:8:AS_IS]

[CREATURE_GRAPHICS:DEMON_6]
    [DEFAULT:demons:0:5:AS_IS]

[CREATURE_GRAPHICS:DEMON_7]
    [DEFAULT:demons:7:8:AS_IS]

[CREATURE_GRAPHICS:DEMON_8]
    [DEFAULT:demons:7:2:AS_IS]

[CREATURE_GRAPHICS:DEMON_9]
    [DEFAULT:demons:8:11:AS_IS]

[CREATURE_GRAPHICS:DEMON_10]
    [DEFAULT:demons:7:2:AS_IS]

[CREATURE_GRAPHICS:DEMON_11]
    [DEFAULT:demons:11:7:AS_IS]

[CREATURE_GRAPHICS:DEMON_12]
    [DEFAULT:demons:4:11:AS_IS]

[CREATURE_GRAPHICS:DEMON_13]
    [DEFAULT:demons:9:3:AS_IS]

[CREATURE_GRAPHICS:DEMON_14]
    [DEFAULT:demons:7:8:AS_IS]

[CREATURE_GRAPHICS:DEMON_15]
    [DEFAULT:demons:12:8:AS_IS]

[CREATURE_GRAPHICS:DEMON_16]
    [DEFAULT:demons:14:2:AS_IS]

[CREATURE_GRAPHICS:DEMON_17]
    [DEFAULT:demons:6:8:AS_IS]

[CREATURE_GRAPHICS:DEMON_18]
    [DEFAULT:demons:0:6:AS_IS]

[CREATURE_GRAPHICS:DEMON_19]
    [DEFAULT:demons:14:11:AS_IS]

[CREATURE_GRAPHICS:DEMON_20]
    [DEFAULT:demons:9:3:AS_IS]

So it generated the creature graphics, but the X:Y coordinates seem a bit random. How should I prepare a .png to meet those? For example titans, forgotten beasts and nightcreatures use the same .png, but I have no way of knowing which ones will be FBs or titans. I cant make the graphics for it.

It also lacks a :DEFAULT] after the AS_IS.

You think this helps somehow with generating graphics that fit the ingame-description?

Since I can already give random sprites to nightcreatures, titans, FBs and demons, I'd rather have the script only work for angels. Maybe a 3:3 .png, with 9 different angels...

Or a difference for the nightcreatures. Nightcreatures are night-horrors, werebeasts and boogyemen, so getting nice graphics for them is hard. If I could distinguish those, that would be another step in the right direction.
« Last Edit: November 23, 2016, 05:24:28 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #12 on: November 23, 2016, 11:46:29 pm »

You need to replace the placeholder stuff with your actual graphics names and all the TILE_PAGE info with proper info. The X:Y coordinates are completely random, but limited to the PAGE_DIM you put in. It's true that night creatures will use the same .png, I should probably fix that.

You think this helps somehow with generating graphics that fit the ingame-description?

Nope, just helps with generating graphics that exist at all.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #13 on: November 24, 2016, 06:03:46 am »

But...

Either I'm super dumb right now, or that script is pointless.  :-\

It generates the procedual.txt for each genned world. But no procedual.png for it. And it does not fit a templateprocedual.png I could make in advance. So... it means that each player would have to make a custom procedual.png each time they generate a world. Correct?

Dont get me wrong, its great for the angel IDs, I can totally use it to give angels sprites. :) But why did you add the titans/fbs?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

DVNO

  • Bay Watcher
    • View Profile
Re: SCIENCE required - How does the naming scheme for Angels work?
« Reply #14 on: November 24, 2016, 07:34:28 am »

In the code,

just edit the filename for your angels into the placeholders. :P
 
Code: [Select]
local tile_pages={
    angel={
        name="angels",
        file="placeholder/placeholder.png", <- here
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    },
    demon={
        name="demons",
        file="placeholder/placeholder.png", <- & here
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    },
    titan={
        name="titans",
        file="placeholder/placeholder.png", <- 'n here
        TILE_DIM={16,16},
        PAGE_DIM={15,15}
    }
}
Logged
Al mondo mal non e senza rimedio

Reach me via Bitmessage ~ BM-2DC7sWixk2iSKThdX9thhyrxWBeWRXUEv9
Pages: [1] 2