Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Graphics for custom noble positions?  (Read 1303 times)

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Graphics for custom noble positions?
« on: February 03, 2021, 01:38:19 am »

Does anyone know exactly how graphics are selected for noble positions? I am specifically looking at the dwarven Baron, Count, Duke, and Monarch roles.

In the entity file they're defined as:
Code: [Select]
[POSITION:MONARCH]
[NAME_MALE:king:kings]
[NAME_FEMALE:queen:queens]
[POSITION:DUKE]
[NAME_MALE:duke:dukes]
[NAME_FEMALE:duchess:duchesses]
[POSITION:COUNT]
[NAME_MALE:count:counts]
[NAME_FEMALE:countess:countesses]
[POSITION:BARON]
[NAME_MALE:baron:barons]
[NAME_FEMALE:baroness:baronesses]

You get the idea. The positions each have male and female name variants, as do the associated 'consort' positions. The thing is, in graphics sets you can create specific sprites for BARON and BARONESS. My question is, is that hard-coded? Or is it referencing the NAME_MALE and NAME_FEMALE tokens?

If I created another nobility position:
Code: [Select]
[POSITION:MARQUESS]
[NAME_MALE:marquess:marquesses]
[NAME_FEMALE:marchioness:marchionesses]

Would I still be able to define separate sprites for the male and female versions, or not?

I intend to test this either way, but it isn't as though you can immediately get nobility of both genders to show up, it doesn't seem quick to test.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Graphics for custom noble positions?
« Reply #1 on: February 09, 2021, 08:56:13 am »

The thing is, in graphics sets you can create specific sprites for BARON and BARONESS. My question is, is that hard-coded? Or is it referencing the NAME_MALE and NAME_FEMALE tokens?
How exactly did you come to that conclusion? The "graphics_example.txt" says you can use position tokens from entity raws (with "MANAGER" and "FORCED_ADMINISTRATOR" as examples) and doesn't say anything about "BARON"/"BARONESS". In fact, it doesn't seem to say anything at all about caste-specific tiles.

Looking at the "df-structures" data used by DFHack, all of the graphics set information is stored at the creature level rather than the caste level, so gender/caste-specific tiles aren't actually possible right now.
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.

Rekov

  • Bay Watcher
  • Elf Aficionado
    • View Profile
Re: Graphics for custom noble positions?
« Reply #2 on: February 09, 2021, 05:31:26 pm »

The thing is, in graphics sets you can create specific sprites for BARON and BARONESS. My question is, is that hard-coded? Or is it referencing the NAME_MALE and NAME_FEMALE tokens?
How exactly did you come to that conclusion? The "graphics_example.txt" says you can use position tokens from entity raws (with "MANAGER" and "FORCED_ADMINISTRATOR" as examples) and doesn't say anything about "BARON"/"BARONESS". In fact, it doesn't seem to say anything at all about caste-specific tiles.

I came to this conclusion based on examining Meph's and Vettlingr's tilesets, and by reading the wiki.

Example from graphics_Meph_dwarves.txt
Code: [Select]
[DUKE:MDF_DWARVES:7:17:AS_IS:DEFAULT]
[DUKE_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[DUCHESS:MDF_DWARVES:7:17:AS_IS:DEFAULT]
[DUCHESS_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[COUNT:MDF_DWARVES:8:17:AS_IS:DEFAULT]
[COUNT_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[COUNTESS:MDF_DWARVES:8:17:AS_IS:DEFAULT]
[COUNTESS_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[BARON:MDF_DWARVES:9:17:AS_IS:DEFAULT]
[BARON_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[BARONESS:MDF_DWARVES:9:17:AS_IS:DEFAULT]
[BARONESS_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[KING:MDF_DWARVES:10:17:AS_IS:DEFAULT]
[MONARCH:MDF_DWARVES:10:17:AS_IS:DEFAULT]
[KING_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]
[QUEEN:MDF_DWARVES:10:17:AS_IS:DEFAULT]
[QUEEN_CONSORT:MDF_DWARVES:2:17:AS_IS:DEFAULT]

Duke, Count, Baron, and Monarch are position tokens. All of the rest are not POSITION tokens, but are either NAME_MALE/NAME_FEMALE tokens, or are SPOUSE_MALE/SPOUSE_FEMALE tokens.

That having been said, if you look at this list on the wiki, those are listed as position tokens, so maybe they are? But basically that's what I'm asking. What exactly is going on here?


Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Graphics for custom noble positions?
« Reply #3 on: February 17, 2021, 09:07:13 pm »

I honestly don't know how those would work, unless the game is taking the displayed position names and converting them to uppercase and replacing spaces with underscores.

It's also possible that the wiki is wrong and the game is just ignoring those entries...
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.