Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Changing color of divine metals in existing save [STEAM]  (Read 973 times)

McOrigin

  • Bay Watcher
    • View Profile
Changing color of divine metals in existing save [STEAM]
« on: February 16, 2023, 10:49:36 am »

Hello,

I hope this is the right sub-forum. I have found two different divine metals in my current fort: "singing metal" and "pock-marked metal".
I was a little bit underwhelmed when I learned the both look exactly like iron. I had expected something more .. impressive.

I want the pock-marked metal to be black and the singing metal to be white.

If I checke the "inorganic_metal.txt", I see that iron uses
Code: [Select]
[DISPLAY_COLOR:0:7:1]
[BUILD_COLOR:0:7:1]

So I saved an uncompressed save and opened the "world.sav" in Notepad++ and found both divine metals at the start of the file. Looking at "singing metal", it should be different to iron from my understanding:
Code: [Select]
[DISPLAY_COLOR:7:0:1]
[BUILD_COLOR:7:0:1]
Interestingly it renders exactly like iron in game: metal bars, constructed floor, weapons and furniture look exactly like iron.

Anyhow, I changed both tokes to 7:7:1 which i copied from "silver" and hoped it would render ingame. Unfortunately, it did not change anything at all. My pock-marked metal battle axe still looks like made from iron.

Comparing iron and steel in "inorganic_metal.txt", both use the same color tokens but render slightly different color in game. Clearly I am missing something here and would appreciate some help to have items made from divine metals look cool.



Here is the (cleaned) edited code for reference:

Code: [Select]
inorganic_generated
[OBJECT:INORGANIC]
[INORGANIC:DIVINE_1]
[GENERATED]
[DIVINE]
[DISPLAY_COLOR:7:7:1]
[BUILD_COLOR:7:7:1]
[STATE_COLOR:ALL_SOLID:WHITE]
[USE_MATERIAL_TEMPLATE:METAL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:singing metal]
[MATERIAL_VALUE:200]
[SPEC_HEAT:7500]
[MELTING_POINT:NONE]
[BOILING_POINT:NONE]
[ITEMS_WEAPON]
[ITEMS_WEAPON_RANGED]
[ITEMS_AMMO]
[ITEMS_DIGGER]
[ITEMS_ARMOR]
[ITEMS_ANVIL]
[ITEMS_HARD]
[ITEMS_METAL]
[ITEMS_BARRED]
[ITEMS_SCALED]
[SOLID_DENSITY:1000]
[LIQUID_DENSITY:1000]
[MOLAR_MASS:20000]
[IMPACT_YIELD:1000000]
[IMPACT_FRACTURE:2000000]
[IMPACT_STRAIN_AT_YIELD:0]
[COMPRESSIVE_YIELD:1000000]
[COMPRESSIVE_FRACTURE:2000000]
[COMPRESSIVE_STRAIN_AT_YIELD:0]
[TENSILE_YIELD:1000000]
[TENSILE_FRACTURE:2000000]
[TENSILE_STRAIN_AT_YIELD:0]
[TORSION_YIELD:1000000]
[TORSION_FRACTURE:2000000]
[TORSION_STRAIN_AT_YIELD:0]
[SHEAR_YIELD:1000000]
[SHEAR_FRACTURE:2000000]
[SHEAR_STRAIN_AT_YIELD:0]
[BENDING_YIELD:1000000]
[BENDING_FRACTURE:2000000]
[BENDING_STRAIN_AT_YIELD:0]
[MAX_EDGE:12000]
[SPHERE:MUSIC]
Logged

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Changing color of divine metals in existing save [STEAM]
« Reply #1 on: February 16, 2023, 10:01:14 pm »

Procgen items/materials cant get proper graphics currently, at least until toady allows use to use the divine_x in raws.
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Changing color of divine metals in existing save [STEAM]
« Reply #2 on: February 16, 2023, 11:06:45 pm »

Procgen items/materials cant get proper graphics currently, at least until toady allows use to use the divine_x in raws.
But Divine is in the graphics raws. And there's a graphic in the graphics set for it.
Likely the issue is it's being pulled from one of the non-colored images (ELF, HUMAN, GOBLIN and KOBOLD_WIELDABLES). Which, as the OP said, all look like Iron right now.



« Last Edit: February 16, 2023, 11:10:27 pm by Shonai_Dweller »
Logged

McOrigin

  • Bay Watcher
    • View Profile
Re: Changing color of divine metals in existing save [STEAM]
« Reply #3 on: February 17, 2023, 02:50:53 am »

It's even the constructed floor and the bar in the stockpile which look like iron, even though the divine material looks like it should use a color token.

And while a lot of the found divine artifacts are subvariants with modifiers like 'crescent', 'curvy' etc. and thus lack a proper sprite, normal weapons and armor have a sprite, but it's colored like iron and not according to the color tokes of the procedurally generated divine metals in 'world.sav'.

While the two divine metals I found that I could smelt had somewhat unexpected color tokens, I found artifacts made of 'crashing metal', 'clear blue' metal and 'black metal' which by world.sav should have different color tokes, but are equally displayed as made from iron.

Maybe this is an outright bug?


Well, I still don't understand why iron and steel use the same color tokens but render slightly differently in color in game. I will experiment futher to see if I can swap color of copper and silver.


EDIT:
Swapping the [STATE_COLOR:ALL_SOLID:COPPER] and [STATE_COLOR:ALL_SOLID:SILVER] in inorganic_metal.txt did the trick for common items like bars and bins: My copper bins are now rendered silver. That's interesting, because I did not modifiy the [DISPLAY_COLOR] and [BUILD_COLOR] at all.

However, the [STATE_COLOR] for the divine metals in question is already WHITE and BLACK respectively, but the items are rendered as GREY like iron. But at least this explains while iron and steel are rendered slighly different ingame: steel is [BLUE-GRAY] while iron is [GREY].

And while I was able to make steel black by just changing
Code: [Select]
[STATE_COLOR:ALL_SOLID:BLUE-GRAY] to
[STATE_COLOR:ALL_SOLID:BLACK]
in 'inorganic_metal.txt', which renders constructed doors, cabinets and armor in the inventory black as expected, it does NOT for the military dwarves wearing steel armor:



That's unexpected again..

[/EDIT]




« Last Edit: February 17, 2023, 03:30:44 am by McOrigin »
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Changing color of divine metals in existing save [STEAM]
« Reply #4 on: February 17, 2023, 03:07:22 am »

Do weapons even use colour tokens in the graphical game?
Why would there be different sprites for each metal if they did?
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Changing color of divine metals in existing save [STEAM]
« Reply #5 on: February 17, 2023, 03:13:57 am »

the color token you tried to edit only affects the color in ASCII mode, for the graphics it will refer to a [STATE_COLOR:ALL_SOLID:x] token.

they do show up in arena mode as the golden divine metal color, when wielded. But the items show up as gray. Im guessing they arent generated with a unique state_color

And no, i dont think they do use state color in creature layers. something about creature layers not using the color palette like tiles and furniture and the items do.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

McOrigin

  • Bay Watcher
    • View Profile
Re: Changing color of divine metals in existing save [STEAM]
« Reply #6 on: February 17, 2023, 03:21:42 am »

Thanks for the feedback and input! Your comments are consistend with what I found out and edited above. Too bad.
I was sooo loking forward to a 'black knight' champion.
Logged