Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [PREMIUM] Just a heads up, already filed a bug report  (Read 1611 times)

Elbow

  • Bay Watcher
    • View Profile
[PREMIUM] Just a heads up, already filed a bug report
« on: January 26, 2023, 06:14:13 pm »

Are you pulling your hair out and going bald because some of your military dwarves mysteriously keep going bald themselves? Are you freaking out because the dwarf you told to equip that full suit of bismuth bronze armor isn't wearing it, and now it's missing? Are you a modder who used the vanilla graphics_creatures_layered.txt as the basis for your modded race, only to discover your seemingly perfectly functional mod was causing problems with bismuth bronze? Well, it's not your fault. This is a vanilla problem - the vanilla layered graphics RAWs do not specify any sprites for items made of bismuth bronze, and the fix is super easy. Like, "one find and replace" easy.

Open graphics_creatures_layered.txt (or the equivalent file in your mod if you're dabbling with modding) in NotePad++. Open the Find and Replace window (Ctrl+H) and turn regular expressions on:
FIND:
 \[CONDITION_MATERIAL_TYPE:METAL:BLACK_BRONZE\]
REPLACE:
[CONDITION_MATERIAL_TYPE:METAL:BLACK_BRONZE]\n            [CONDITION_MATERIAL_TYPE:METAL:BISMUTH_BRONZE]

(You can probably do this without regular expressions turned on as well if that's intimidating for you or whatever, just remove the "\"s in the FIND string and "\n" in the replace. Using regex just keeps the raw file tidy.)

Et voila, your mysteriously unarmored baldies should now look like the badasses you always intended them to be. This was also probably a problem with wielded bismuth bronze weapons/picks/axes (almost certainly - no bismuth bronze sprites whatsoever are specified in the layered creatures raws, but I haven't seen the issue with my own two eyes so I'm couching this in uncertainty).

BEFORE:



AFTER:




NOTE:I don't know if updating the vanilla RAWs manually will import them to an existing save. Tested with my BF's vanilla save and a modded vanilla RAW, and unless he screwed something up in a major way it doesn't work for unmodded games without generating a new world. I know for a fact that it's compatible with existing saves when it comes to editing the appropriate file in the "installed mods" folder (see the pics above, that's my 'deep dwarf' race, and it's the same deep dwarf in both pics).  If updating the vanilla RAWs truly doesn't work for existing saves, as long as you have even *one* mod running you can maybe work around this by adding a text file which will cut the accursed vanilla file and also adding your edited copy of the vanilla file to any mod's graphics folder (or even by adding a graphics folder to an installed mod with no graphical component and doing the same - I haven't experimented with any of this though so take with a huge grain of salt).
« Last Edit: January 26, 2023, 11:28:20 pm by Elbow »
Logged

Blue_Dwarf

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #1 on: January 26, 2023, 07:21:23 pm »

Interesting. Does this work with other items? I have an artifact thin gauntlet that's missing a sprite.
Logged
Crafting Statistics 42.06Farming Statistics

Blue Dwarf has been happy lately. He did some !!science!! recently. He admired a fine forum post lately. He was enraged by a forum troll recently. He was upset by the delayed release of the new version of Dwarf Fortress lately. He took joy in planning a noble's death recently.

Elbow

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #2 on: January 26, 2023, 07:40:36 pm »

Interesting. Does this work with other items? I have an artifact thin gauntlet that's missing a sprite.

Hmmm, if it's an artifact it should be using the artifact sprite, but if it's a bismuth bronze artifact maybe it could be causing problems with the [CONDITION_MATERIAL_FLAG:NOT_ARTIFACT] token? Can't see why that would be the case, but ToadyCode works in mysterious ways. (Like, if it's checking to see if it's bronze, then black bronze, then checking if it's an artifact and changing the sprite based on that, adding bismuth bronze could maybe fix it.)

If they're wielding a weapon (picks and axes count) and shield, you won't see them wearing gauntlets of any sort - every RH gauntlet sprite has [SHUT_OFF_IF_ITEM_PRESENT:WIELD:WEAPON:ANY] and the shield covers the other hand.
« Last Edit: January 26, 2023, 07:49:34 pm by Elbow »
Logged

Blue_Dwarf

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #3 on: January 26, 2023, 08:15:46 pm »

It's a "thin steel right gauntlet".
Logged
Crafting Statistics 42.06Farming Statistics

Blue Dwarf has been happy lately. He did some !!science!! recently. He admired a fine forum post lately. He was enraged by a forum troll recently. He was upset by the delayed release of the new version of Dwarf Fortress lately. He took joy in planning a noble's death recently.

Elbow

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #4 on: January 26, 2023, 09:05:33 pm »

It's a "thin steel right gauntlet".

Ahh - just the right gauntlet? If they're carrying a weapon/pick/axe you won't see it at all like I said, all varieties of right gauntlet including artifacts will have their sprites disabled if the person wearing it is holding any kind of weapon item. That seems like the only conceivable explanation (at least from what I can glean from the raws, but I'm dumb so I might be overlooking something and there could always be a backend reason this isn't showing up on whoever has it equipped).

If it is equipped and it is because right gauntlet sprites are disabled by wielding a weapon, you could edit the RAWs to make it show up while holding a weapon (assuming your game's modded and one of my workaround ideas actually works - no guarantees there), but you probably wouldn't want to - it'd almost certainly look wonky as heck/wouldn't look like it was holding the weapon at all. If you're a talented sprite artist you could conceivably make a mod that wouldn't necessitate hiding right gauntlets when you equip weapons, but it would be an absolute ton of work. Maybe Kitfox's artists will get around to that eventually? Fingies crossed.  :P

EDIT: Oh, also, if it's on a vanilla animal-person you won't see any armor. They aren't layered sprites, so you're SOL in that department probably until Adventure Mode comes out (I imagine making layered sprites for every variety of animal person in preparation for when you can play as a Moose Woman adventurer is what will be keeping the aforementioned Kitfox artists busy for the next year or so).
« Last Edit: January 26, 2023, 09:12:08 pm by Elbow »
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #5 on: January 26, 2023, 10:42:00 pm »

Terrific was just studying some workshop mods to work out how they did this. Figured it was something simple.
Probably should be posted in mods forum with a searchable Subject line too.
Logged

Elbow

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #6 on: January 26, 2023, 11:13:03 pm »

Terrific was just studying some workshop mods to work out how they did this. Figured it was something simple.
Probably should be posted in mods forum with a searchable Subject line too.

Not sure what the forum etiquette is wrt crossposting threads, feels kind of spammy in an unspoken-rules-of-forum-use kind of way but that might just be a personal hang up of mine. I was considering posting this to the modding board initially. Still not 100% sure if this was the appropriate subforum, but figured this'd be the place to post it for a more general community-wide heads up. If Toady wants to move this over there (or to some other board) or if you want to make a thread about it over there yourself, I have no objections anyway. :)
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #7 on: January 26, 2023, 11:47:42 pm »

Terrific was just studying some workshop mods to work out how they did this. Figured it was something simple.
Probably should be posted in mods forum with a searchable Subject line too.

Not sure what the forum etiquette is wrt crossposting threads, feels kind of spammy in an unspoken-rules-of-forum-use kind of way but that might just be a personal hang up of mine. I was considering posting this to the modding board initially. Still not 100% sure if this was the appropriate subforum, but figured this'd be the place to post it for a more general community-wide heads up. If Toady wants to move this over there (or to some other board) or if you want to make a thread about it over there yourself, I have no objections anyway. :)
Maybe post a link in one of the general raws threads.
So long as we can search for the word "Bismuth" in the modding forum and find our way here for the solution everyone should be happy. :)
Logged

Elbow

  • Bay Watcher
    • View Profile
Re: [PREMIUM] Just a heads up, already filed a bug report
« Reply #8 on: January 27, 2023, 12:11:27 am »

Maybe post a link in one of the general raws threads.
So long as we can search for the word "Bismuth" in the modding forum and find our way here for the solution everyone should be happy. :)

Smort, alright. Done and done. Hopefully it helps some people out down the line.
Logged