Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Layer system for the creature graphics - Simplification  (Read 229 times)

Vordak

  • Bay Watcher
    • View Profile
Layer system for the creature graphics - Simplification
« on: December 11, 2022, 08:38:50 am »

It is easy to see, that the main code size of graphics_creatures_layered.txt is occupied by code with repeated operators (tokens).
It is proposed to introduce the possibility to extend the token's power to [LAYER_GROUP], and not just to a single [LAYER:].
Probably, here also needing the sub-types of token [LAYER_GROUP] and [END_LAYER_GROUP].

For example, for now a code looks like:
Code: [Select]
[LAYER_GROUP]
[LAYER:LIGHT_FACE_F1:DWARF_BODY:0:1]
[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
[TISSUE_MAY_HAVE_COLOR:PALE_PINK:PINK:TAUPE_PALE]
[CONDITION_RANDOM_PART_INDEX:HEAD:1:4]
[CONDITION_CASTE:FEMALE]
[LAYER:LIGHT_FACE_F2:DWARF_BODY:1:1]
[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
[TISSUE_MAY_HAVE_COLOR:PALE_PINK:PINK:TAUPE_PALE]
[CONDITION_RANDOM_PART_INDEX:HEAD:2:4]
[CONDITION_CASTE:FEMALE]
[LAYER:LIGHT_FACE_F3:DWARF_BODY:2:1]
[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
[TISSUE_MAY_HAVE_COLOR:PALE_PINK:PINK:TAUPE_PALE]
[CONDITION_RANDOM_PART_INDEX:HEAD:3:4]
[CONDITION_CASTE:FEMALE]
[LAYER:LIGHT_FACE_F4:DWARF_BODY:3:1]
[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
[TISSUE_MAY_HAVE_COLOR:PALE_PINK:PINK:TAUPE_PALE]
[CONDITION_RANDOM_PART_INDEX:HEAD:4:4]
[CONDITION_CASTE:FEMALE]

Suggested to:
Code: [Select]
[LAYER_GROUP]
[CONDITION_TISSUE_LAYER:BY_CATEGORY:ALL:SKIN]
[TISSUE_MAY_HAVE_COLOR:PALE_PINK:PINK:TAUPE_PALE]
[CONDITION_CASTE:FEMALE]
[LAYER:LIGHT_FACE_F1:DWARF_BODY:0:1]
[CONDITION_RANDOM_PART_INDEX:HEAD:1:4]
[LAYER:LIGHT_FACE_F2:DWARF_BODY:1:1]
[CONDITION_RANDOM_PART_INDEX:HEAD:2:4]
[LAYER:LIGHT_FACE_F3:DWARF_BODY:2:1]
[CONDITION_RANDOM_PART_INDEX:HEAD:3:4]
[LAYER:LIGHT_FACE_F4:DWARF_BODY:3:1]
[CONDITION_RANDOM_PART_INDEX:HEAD:4:4]
[END_LAYER_GROUP]

« Last Edit: December 16, 2022, 02:34:10 pm by Vordak »
Logged