Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: veok on August 04, 2011, 03:37:33 pm

Title: Veok's Standardized Leather Mod
Post by: veok on August 04, 2011, 03:37:33 pm
Ever been bothered by perfectly dwarfy artifacts utterly ruined because the dwarf grabbed Blue Peahen leather instead of Giant Tiger leather? Tired of your dwarves being garbed in a mishmash of stingray and squirrel leather items?

Presenting: Veok's Standardized Leather Mod! available at Dwarf Fortress File Depot (http://dffd.wimbli.com/file.php?id=4779) (manual install)

There is also a version of vanilla DF with this mod pre-installed, also available at Dwarf Fortress File Depot (http://dffd.wimbli.com/file.php?id=4780)

This mod will reduce the many different types of leather in the game.

All creatures without a [MULTIPLY_VALUE:X] will give "Animal Leather" when butchered.

All creatures with [MULTIPLY_VALUE:2] will give "Rare Leather" when butchered.

All creatures with [MULITPLY_VALUE:3] will give "Exotic Leather" when butchered.

Creatures with [Multiply_VALUE:4] (or higher) will keep their individual leather types, as will procedurally generated creatures (Forgotten Beasts, Nightcreatures, Demons, and their ilk).

The purpose of this mod is to reduce the leather products from each of Dwarf Fortress' 322 creatures to a smaller variety. This means, for instance, you will no longer have to be bothered with dozens upon dozens of leathers when muddling about the equipment screen.

New in 1.01
 - Leather Bags are now "bags" instead of coffers.
 - Got rid of the majority of leather types from preferences and the equipment screen.

Known Issues:
- Skin from sentient races is homogenized. Surely, we should make an exception for Elf Leather items, no?

Installation Instructions:
- Extract files to Dwarf Fortress / RAW / Objects.
- The three .txt files should just live in your RAW folder (b_detail_plan_veok, inorganic_leather_veok, tissue_template_veok)
- Double click and run the "LeatherReplacer.exe" application. Feel free to delete this afterwards. (This will go through your RAWs and update the body definition of each creature to point to the new materials, as outlined above)
- Enjoy!

Compatibility:
- Compatible with Genesis mod.
- The LeatherReplacer.exe is usable with any other creature-adding mods, as long as their added raw files contain "creature" in their name.
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 04, 2011, 05:16:47 pm
Note to self: When releasing a mod, be sure to actually *link* to the mod in question.

OP updated to point to the DFFD url, as expected.
Title: Re: Veok's Standardized Leather Mod
Post by: krisslanza on August 04, 2011, 06:06:20 pm
Now this sounds pretty cool... how does it turn out when you make armor and stuff from it? Just be called like... "Animal Leather Breastplate, "Rare Leather Breastplate, or "Exotic Leather Breastplate"?

I personally haven't had the giant issues with mandates yet - I end up restarting before then as I tweak things - but I can see this could come in handy... and it would help me with my "EVERYTHING MUST BE UNIFOOOOORM" if I try to make leather stuff...
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 04, 2011, 06:28:43 pm
Now this sounds pretty cool... how does it turn out when you make armor and stuff from it? Just be called like... "Animal Leather Breastplate, "Rare Leather Breastplate, or "Exotic Leather Breastplate"?

I personally haven't had the giant issues with mandates yet - I end up restarting before then as I tweak things - but I can see this could come in handy... and it would help me with my "EVERYTHING MUST BE UNIFOOOOORM" if I try to make leather stuff...

'Make Leather Armor' produces an 'Armor' item, rather than something more specific like you have with metal armors. Otherwise, you are correct. You should get "Animal Leather Armor" or "Rare Leather Armor", etc.

I'm going to go and upload a pre-installed DF Vanilla version onto DFFD soon; I'm sure some folks will prefer it to having to engage the Ruby script manually.
Title: Re: Veok's Standardized Leather Mod
Post by: krisslanza on August 04, 2011, 06:35:39 pm
I'm unsure if I'd get around to releasing it officially, but if I did, would it be acceptable if I included your mod with it? I'm considering using it myself to try it out.
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 05, 2011, 12:15:11 am
Okay! Pre-installed version is up as well!

I'm unsure if I'd get around to releasing it officially, but if I did, would it be acceptable if I included your mod with it? I'm considering using it myself to try it out.

Assuming your sentence was meant to start with: "I'm developing a mod but,"

The answer is yes, as long as you give me credit!
Title: Re: Veok's Standardized Leather Mod
Post by: krisslanza on August 05, 2011, 01:41:33 am
Okay! Pre-installed version is up as well!

I'm unsure if I'd get around to releasing it officially, but if I did, would it be acceptable if I included your mod with it? I'm considering using it myself to try it out.

Assuming your sentence was meant to start with: "I'm developing a mod but,"

The answer is yes, as long as you give me credit!

Well, if you go with PROPER sentence structure... :P
But yes of course! I'm too unskilled in Coding to do things like this. I'm only Dabbling Coder.
Title: Re: Veok's Standardized Leather Mod
Post by: BigFatStupidHead on August 07, 2011, 03:38:25 am
Absolutely beautiful. Now if only you could do the same thing for fat and tallow...
Title: Re: Veok's Standardized Leather Mod
Post by: Pan on August 07, 2011, 12:56:30 pm
I was on vacation in Thailand the past few days, and the tour brought us to several stores along the way from Bangkok to various attractions. One of the shops was a leather store, and I was surprised to see fish and stingray leather in there.

But anyway, great idea, this mod. I'll be sure to try it.
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 07, 2011, 05:01:06 pm
Absolutely beautiful. Now if only you could do the same thing for fat and tallow...

Unfortunately, the way I handled this mod means that despite regular leather types being (mostly) unobtainable, they still *exist*, and so show up in equipment material and stockpile screens.

Before I expand the mod, I need to experiment and see if I can't find a better implementation for this.
Title: Re: Veok's Standardized Leather Mod
Post by: Knight Otu on August 08, 2011, 07:38:32 am
Absolutely beautiful. Now if only you could do the same thing for fat and tallow...
If you just want to get rid of the tallow entries in the stockpiles and are willing to do the editing yourself, you can use the procedure in this post (http://www.bay12forums.com/smf/index.php?topic=87584.msg2392435#msg2392435) as the template. I don't think it works easily for fat, though.
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 08, 2011, 10:10:19 am
Absolutely beautiful. Now if only you could do the same thing for fat and tallow...
If you just want to get rid of the tallow entries in the stockpiles and are willing to do the editing yourself, you can use the procedure in this post (http://www.bay12forums.com/smf/index.php?topic=87584.msg2392435#msg2392435) as the template. I don't think it works easily for fat, though.

Hm. That looks like it might be superior to my implementation. Investigating!
Title: Re: Veok's Standardized Leather Mod
Post by: BigFatStupidHead on August 08, 2011, 11:51:49 am
Absolutely beautiful. Now if only you could do the same thing for fat and tallow...
If you just want to get rid of the tallow entries in the stockpiles and are willing to do the editing yourself, you can use the procedure in this post (http://www.bay12forums.com/smf/index.php?topic=87584.msg2392435#msg2392435) as the template. I don't think it works easily for fat, though.

Ah, the myriad wonders that this board holds! Thanks for unearthing that post for us; it looks very useful.
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 08, 2011, 11:47:03 pm
(http://thecannizzaros.files.wordpress.com/2011/06/good-news3.jpg)

Looks like I'll be able to combine the method from Knight Otu's link with how I'm currently seperating existing modifications.

Fingers crossed, that should eliminate the "preferences for leather that doesn't exist" stuff, while keeping the rarest leathers still on the beasts.

So consider mod version 1.01 fully in development!
Title: Re: Veok's Standardized Leather Mod
Post by: TomiTapio on August 09, 2011, 04:13:25 am
How do the different leathers work as armor? All are the same?

I should do a "thin leather" which makes lousy armor but okay bags and clothes. Eg, cat, bat, dog, elf...
My plan is to have four armor-strengths of leather: cat & human class, pig cow & giraffe class, elephant & troll class, ultra mythical class (iron?).
Title: Re: Veok's Standardized Leather Mod
Post by: veok on August 09, 2011, 10:21:07 pm
How do the different leathers work as armor? All are the same?

I should do a "thin leather" which makes lousy armor but okay bags and clothes. Eg, cat, bat, dog, elf...
My plan is to have four armor-strengths of leather: cat & human class, pig cow & giraffe class, elephant & troll class, ultra mythical class (iron?).

In vanilla DF, all leather is equal*. Only the value differs. My mod doesn't change that.

*I am 97% sure.
Title: Re: Veok's Standardized Leather Mod (Version 1.01)
Post by: veok on August 11, 2011, 04:36:45 pm
Mod updated to 1.01.

Credits to Knight Otu for their help in developing this new release.

Pre-Installed version is currently uploading, manual install has already finished.

New in 1.01
 - Leather Bags are now "bags" instead of coffers.
 - Got rid of the majority of leather types from preferences and the equipment screen.
Title: Re: Veok's Standardized Leather Mod
Post by: ohgoditburns on September 07, 2011, 06:55:28 pm
Can this be done with bones as well? Hair? Ivory?
Title: Re: Veok's Standardized Leather Mod
Post by: BigFatStupidHead on October 18, 2011, 08:49:03 pm
Hey Veok,
  Just de-exotic'd all the animals in your raws, so I took some time to look at what you did. Being as you are the coder for this particular mod, were there any particularly surprising pitfalls or errors that you had when putting together the (commonality)_ANIMAL_MATERIALS templates? It looks like it will be trivial to make all the different commonality templates for thee different animal materials, but I want to know what I'm getting myself into.
Title: Re: Veok's Standardized Leather Mod
Post by: Meph on December 27, 2011, 06:05:19 pm
Just downloaded it and will try it out. Since it is compatible with other mods I would very much like to add it to a mod I am making, to improve user-friendliness.

The idea behind it is awesome :) Would like to this for a lot of things in the game, more user-friendliness without removing content.

It would be great to see something like this for other items as well, fat, bone...
Title: Re: Veok's Standardized Leather Mod
Post by: DarthBoogalo on December 27, 2011, 07:10:44 pm
This is beautiful and I love you.
 8)
Title: Re: Veok's Standardized Leather Mod
Post by: BigFatStupidHead on December 27, 2011, 08:59:14 pm
It would be great to see something like this for other items as well, fat, bone...

As I mentioned before, I worked more on this to try to remove different bone, fat and tallow. I can't get bone or fat to not list its source animal, but products made from them are named without. Bone bolts for bone crossbows!
Title: Re: Veok's Standardized Leather Mod
Post by: rephikul on December 27, 2011, 09:17:06 pm
It would be great to see something like this for other items as well, fat, bone...

As I mentioned before, I worked more on this to try to remove different bone, fat and tallow. I can't get bone or fat to not list its source animal, but products made from them are named without. Bone bolts for bone crossbows!
Are you sure about that? I have a system not unlike yours for titans and it manage to condense all of the entries. See:
(http://i.imgur.com/u4wOU.png)
Title: Re: Veok's Standardized Leather Mod
Post by: BigFatStupidHead on December 27, 2011, 10:40:45 pm
Are you sure about that? I have a system not unlike yours for titans and it manage to condense all of the entries. See:  ...
Well, I'm sure that -I- didn't manage to do it! I've actually been keeping an eye on your mod for just this reason; learning some methods I haven't thought of. I mostly want to clear the hundreds of fat entries out of my stocks screen!
Title: Re: Veok's Standardized Leather Mod
Post by: Meph on December 30, 2011, 11:39:19 am
Just wanted to report that I tested this and it works well, but I have gaint bat, gaint olm, gaint toad, elephant and rhinoceros leather left... dont know if this is because of my modding or bug.

Anyway, great work :)
Title: Re: Veok's Standardized Leather Mod
Post by: BigFatStupidHead on December 30, 2011, 07:15:16 pm
Yes, Veok only changed animals with a value multiplier of x1, x2, and x3. Rhinos, elephants, and lions are x5 and thus untouched. I think he missed the giant creatures you mentioned because they are giant vermin, and don't usually have leather.

The real bug with this system is that with less leather types to choose between, the more rare stuff shows up as often as the cheap stuff. I think DF doesn't weight the randomizer, so you see bins of giant olm leather as often as generic animal leather.
Title: Re: Veok's Standardized Leather Mod
Post by: Meph on December 30, 2011, 09:18:42 pm
Ahhh... thanks for the info. I already fixed it by assigning rare leather to all the mentioned animals by hand, but good to know the reason behind it. That also fixes the problem you mentioned with the rarer leather types showing up too often: There are no more leather types left now :)
Title: Re: Veok's Standardized Leather Mod
Post by: Ashnal on January 04, 2012, 08:15:18 pm
Hey Veok, I was curious about this mod so I looked to see how it worked.

After taking a look I found that in general, the only file you need for this change is the creature file. The materials and tissues you created are quite unnecessary copies of things that already exist. You can just have the creature material created, then edit the existing

Second, if you want to completely remove the name prefix from leather, you can by defining a static inorganic material.

For my tests, I used the four genesis leather types. I copied each leather types template info into an inorganic material definition, then changed the corresponding skin templates tanning reaction line to point to the inorganic material.

Ex:

[MATERIAL_TEMPLATE:TOUGHSKIN_TEMPLATE]
     [MATERIAL_REACTION_PRODUCT:TAN_MAT:INORGANIC:TOUGHLEATHER]

However I also found that this ends up with the specific creature leather value information being discarded as the creature material is never referenced.

Also, I don't think your mod is compatible with the genesis leather types. Since your replacer replaces each creatures skin with your custom skin types, genesis creatures lose their tougher skin.
Title: Re: Veok's Standardized Leather Mod
Post by: Meph on February 21, 2012, 03:50:37 pm
I just wanted to note, that your (veoks) system is superior to the proposed other ones, and mine is included in that. I remade most things to be standardized, and behold: since they are inorganic mats, nothing is stockpiled.

I already made a fake plant for all wood types, and will continue using your system with fake animals for the animal mats.
Title: Re: Veok's Standardized Leather Mod
Post by: Balin on February 25, 2012, 09:17:05 pm
Veok,

Thanks for the mod, it really helps with the clutter of 30 different kinds of leather mittens.
Is it possible to mod wool and bone as well?
Title: Re: Veok's Standardized Leather Mod
Post by: Meph on February 26, 2012, 02:14:28 pm
Yes, it is possible. I am using it for pretty much every material, altough I have the problem that hair/thread does not get recognized, since it is a inorganic mat, instead of an animal mat. Stockpiling is difficult with this setup.
Title: Re: Veok's Standardized Leather Mod
Post by: HraTaika on April 22, 2012, 03:30:52 pm
Good idea this one! Would like to see this implemented in the vanilla version too!

Anyways, a stand-alone update for the newest version of DF in the sights?

Title: Re: Veok's Standardized Leather Mod
Post by: knuspergold on September 11, 2014, 04:05:20 pm
I know this topic is more than two years old but i still hope someone can help me to get this mod working for the new release. There are more than one creature.txt and i am not really sure what to replace...

so any help is highly appreciated.
Title: Re: Veok's Standardized Leather Mod
Post by: Meph on September 11, 2014, 06:47:11 pm
I know this topic is more than two years old but i still hope someone can help me to get this mod working for the new release. There are more than one creature.txt and i am not really sure what to replace...

so any help is highly appreciated.
It works exactly like before, nothing that affects their tissues and materials has changed.
Title: Re: Veok's Standardized Leather Mod
Post by: Mir on September 28, 2014, 12:48:06 am
I followed the instructions in http://www.bay12forums.com/smf/index.php?topic=87584.msg2392435#msg2392435 (http://www.bay12forums.com/smf/index.php?topic=87584.msg2392435#msg2392435) precisely, and it doesn't appear to work. I created a new world and everything.

This is DF 40.13.

I'm trying to work out how to make this work... I want to build mod packs that work with PyLNP for simplifying all the things. I've seen a bunch of mods out there that simplify, but they also do a ton of other things too... and I don't want all the extras.

Veok's mod works, so I'm digging into that... it would sure be nice to expand it to cover bone, tallow, probably thread and cloth... etc.
Title: Re: Veok's Standardized Leather Mod
Post by: Sprocket809 on September 28, 2014, 04:53:57 am
Is there a linux version?
Title: Re: Veok's Standardized Leather Mod
Post by: Mir on September 28, 2014, 01:50:42 pm
Veok's mod just changes RAW files... it'll work with any OS version of DF.
Title: Re: Veok's Standardized Leather Mod
Post by: Sprocket809 on September 29, 2014, 10:59:49 am
It seems the .exe file won't work on my os though, even when I run it through Wine...  :(
Title: Re: Veok's Standardized Leather Mod
Post by: 0x517A5D on September 30, 2014, 02:52:47 pm
It seems that Veok never released his/her actual Ruby script that does the work.  I don't understand why.  Maybe because of dependencies.

I glommed a copy (on Windows) by creating a bunch of copies of the raws files in a junk directory, running LeatherReplacer.exe in that directory, suspending the Ruby interpreter while it was buzzing away, and tracking down the LeatherReplacer.rb script somewhere inside the TEMP directory.

I think that would be harder to do under Linux/Wine just because of the extra layers involved.

Wine.  What happens you move the LeatherReplacer.exe into the raw/objects directory, then manually invoke it inside that directory with 'wine LeatherReplacer.exe' ?
Title: Re: Veok's Standardized Leather Mod
Post by: Mir on October 01, 2014, 04:15:26 pm
Oh, I completely forgot the .exe wouldn't work outside Windows. I was (foolishly) just thinking about the fact that the final result is just RAW changes. Sorry!

I'm still trying to figure out exactly how all his changes work... I'm working on creating a mod plugin for PyLNP that will do the same thing as his mod. It'll be a while, probably, but I'll leave a note here once that's available somewhere.