Rydel,
While putting multiple item types in a single file works, I wouldn't recommend writing mods this way. I have written my program to follow the method dwarf fortress reads items from the raws. Its not based on the filename of the file, but by the first line of text inside the raw file. Furthermore, since Toady places items of different types into different files, I consider it good practice to follow his example, and do the same with mod files. This should help compatibility in the future should the way files are loaded ever change, and break this current implementation of the mod.
I have taken all of the items out of the item_mw.txt file, deleted that file, and separated them out into their own armor, helm, pants, etc. after doing that, I am able to run the export properly, and each item gets a subtype number.
I would be happy to give you the files if you like. Perhaps give me your name on the DF Forum, and I can PM you there?
Thanks
Edit: I found you on the forum, and went ahead and PM'd you the files. Hope they help!
comment last edited by Dragoon209 on Oct 08, 2014, 12:13:24 pm
Rydel,
I can't seem to reproduce the problem, it seems to work for me. Can you give me any more specifics as to what is not coming over?
Just in case there is any confusion, the program spits out a file for each Itemtype, not per file it finds items in. So for example, when I look in the Weapons.txt file, It lists the contents of both the standard weapons, and the added weapons from the mod. It lists the files it parsed through at the top, in the order it read them.
Code:
item_weapon.txt
item_weapon_mw.txt
0 [ITEM_WEAPON:ITEM_WEAPON_WHIP]
1 [ITEM_WEAPON:ITEM_WEAPON_AXE_BATTLE]
2 [ITEM_WEAPON:ITEM_WEAPON_HAMMER_WAR]
3 [ITEM_WEAPON:ITEM_WEAPON_SWORD_SHORT]
4 [ITEM_WEAPON:ITEM_WEAPON_SPEAR]
5 [ITEM_WEAPON:ITEM_WEAPON_MACE]
6 [ITEM_WEAPON:ITEM_WEAPON_CROSSBOW]
7 [ITEM_WEAPON:ITEM_WEAPON_PICK]
8 [ITEM_WEAPON:ITEM_WEAPON_BOW]
9 [ITEM_WEAPON:ITEM_WEAPON_BLOWGUN]
10 [ITEM_WEAPON:ITEM_WEAPON_PIKE]
11 [ITEM_WEAPON:ITEM_WEAPON_HALBERD]
12 [ITEM_WEAPON:ITEM_WEAPON_SWORD_2H]
13 [ITEM_WEAPON:ITEM_WEAPON_SWORD_LONG]
14 [ITEM_WEAPON:ITEM_WEAPON_MAUL]
15 [ITEM_WEAPON:ITEM_WEAPON_AXE_GREAT]
16 [ITEM_WEAPON:ITEM_WEAPON_DAGGER_LARGE]
17 [ITEM_WEAPON:ITEM_WEAPON_SCOURGE]
18 [ITEM_WEAPON:ITEM_WEAPON_FLAIL]
19 [ITEM_WEAPON:ITEM_WEAPON_MORNINGSTAR]
20 [ITEM_WEAPON:ITEM_WEAPON_SCIMITAR]
21 [ITEM_WEAPON:ITEM_WEAPON_AXE_TRAINING]
22 [ITEM_WEAPON:ITEM_WEAPON_SWORD_SHORT_TRAINING]
23 [ITEM_WEAPON:ITEM_WEAPON_SPEAR_TRAINING]
24 [ITEM_WEAPON:ITEM_WEAPON_HAMMER_MW]
25 [ITEM_WEAPON:ITEM_WEAPON_HAMMER_BIG_MW]
26 [ITEM_WEAPON:ITEM_WEAPON_HAMMER_ULTRA_MW]
27 [ITEM_WEAPON:ITEM_WEAPON_TRIDENT_MW]
28 [ITEM_WEAPON:ITEM_WEAPON_GLOVE_MW]
29 [ITEM_WEAPON:ITEM_WEAPON_CLAW_MW]
30 [ITEM_WEAPON:ITEM_WEAPON_CHOMP_MW]
31 [ITEM_WEAPON:ITEM_WEAPON_CHOMP_BIG_MW]
32 [ITEM_WEAPON:ITEM_WEAPON_FAN_MW]
33 [ITEM_WEAPON:ITEM_WEAPON_PARASOL_MW]
34 [ITEM_WEAPON:ITEM_WEAPON_PICK_SMALL_MW]
35 [ITEM_WEAPON:ITEM_WEAPON_AXE_SMALL_MW]
36 [ITEM_WEAPON:ITEM_WEAPON_PICK_BATTLE_MW]
37 [ITEM_WEAPON:ITEM_WEAPON_SHOOTER_MW]
38 [ITEM_WEAPON:ITEM_WEAPON_SLINGSHOT_MW]
39 [ITEM_WEAPON:ITEM_WEAPON_HAMMER_GLOVE_MW]
40 [ITEM_WEAPON:ITEM_WEAPON_CANNON_MW]
41 [ITEM_WEAPON:ITEM_WEAPON_FINGERSHOT_MW]
42 [ITEM_WEAPON:ITEM_WEAPON_RAYGUN_MW]
43 [ITEM_WEAPON:ITEM_WEAPON_SCEPTER_MAGIC_MW]
44 [ITEM_WEAPON:ITEM_WEAPON_ROD_STAR_MW]
45 [ITEM_WEAPON:ITEM_WEAPON_MALLET_BIG_MW]
46 [ITEM_WEAPON:ITEM_WEAPON_FAN_TRAINING_MW]
47 [ITEM_WEAPON:ITEM_WEAPON_PARASOL_TRAINING_MW]
48 [ITEM_WEAPON:ITEM_WEAPON_BAT_MW]
49 [ITEM_WEAPON:ITEM_WEAPON_SCIMITAR_MW]
50 [ITEM_WEAPON:ITEM_WEAPON_CLUB_SPIKED_MW]
51 [ITEM_WEAPON:ITEM_WEAPON_STAFF_MW]
You can see the Mushroom Kingdom weapons at the bottom of the list, starting at #24.
Does this help? Let me know!
Rydel wrote:
Dragoon209 wrote:
Rydel wrote:
The tool only appears to read the default files, not additional files added by mods. What do I need to do to get it to use files from the mod as well?
The script assumes that files are named in a specific way, mainly "itemtype_modname. Txt"
So new items might be item_YourMod.txt.
If you add the item type and and underscore to the front, it should work. Let me know!
Unfortunately, this mode didn't arrange them by type. Is it possible to modify the code to check each file in the raws folder and work off the tokens themselves?
Could you please send me the raw files you are trying to use? I want to make sure that any fix I make is going to solve your problem! Thanks
Rydel wrote:
The tool only appears to read the default files, not additional files added by mods. What do I need to do to get it to use files from the mod as well?
The script assumes that files are named in a specific way, mainly "itemtype_modname. Txt"
So new items might be item_YourMod.txt.
If you add the item type and and underscore to the front, it should work. Let me know!
Its up in the air... I could make another workshop for it. I'm a bit torn. Aside from the Molded leather reaction, There isn't a good reason that the reactions for crafting all the leather types would need to take place at the Tannery. Since it would involve sewing, soaking, boiling, plating, and imbuing the tortured souls of the murdered victims, It makes more sense that it would be at a different workshop. What would you call a Leather Upgrading Facility?
I liked the batch reactions, and since it was taking so much time to make the other additives, I thought it was fair to make it in batches of 2. Thanks for the heads up on the leather requirements for crafting! That also makes me feel better that if you were to forbid leather, except for the cool forgotten beast leather, you would definitely get your crazy monster armor.
The speed reduction is a combination of a few elements.
1. I thought that the (kinda OP) leather armor doesn't need any additional benefits, and should be heavier anyway. I mean, we are adding additional materials to it (Like lumps of bone and stone), so it would get heavy.
2. I was (am) a modding noob, and I directly copied the base material values.
3. I didn't find out how the weight was calculated for materials until it struck me to search 'weight' in the wiki. That was 5 minutes ago.
I plan to make Runic armor (being that its a long road to get there) have the added benefit of being the same weight as base leather, as its magic properties were pretty tame. I think a bunch of dwarves running around top speed in enchanted Runic Leather is pretty cool.
I'm still getting the hang of what all the properties are for, so if there is anything else I seem to have overlooked, feel free to ask. Again, thanks for all your helpful suggestions and observations.
Saint wrote:
*I've noticed that runic leather can utilize bones, as well as fresh corpses. I dunno if that's intentional or not (not a big deal IMHO).
It wasn't intentional, but I don't have issues with it. Since most reactions like this use the entire bone stack, It kinda balances it out. It will have to be addressed whenever that bug in modded reactions gets fixed. Thanks for the heads up!
Saint wrote:
[*]Making items out of the better leather can be difficult, as you would literally have to forbid every other leather to get your dwarves to use it (not much you can do about this)
Yeah, I have noticed this, and I knew it was going to be an issue when I started it, but I may have found a solution, and have started using it in my forts. I'm going to take some screen shots, and I will post it over at the forum when its done. Check there later on today. Basically, I have sorted the leather out with multiple stockpiles (Since each tier is a different material, and its sorted animal-material) I was able to make each one only accept a specific tier of leather. I then set those stockpiles to give to a workshop, and then I make suits of armor from there. Its not a perfect system, but once set up, it makes life much easier.
Saint wrote:
[*]"Studs" can get frustrating, as you need to make four to upgrade one leather piece and most of the "make stud" reactions produce only two to three. Consider changing the ratio? Maybe they produce "a pile of studs" and you only need one "pile" to upgrade?
Since this is the point where the armor starts to get a little more serious, I wanted to add a bit more effort to create the armor. Also, I thought it was silly to get the same amount of studs out of rat bones, and a stone block. However, Fun is more important here, and I think I am going to adjust to piles as you suggested. I have been play testing a lot the last few days with this in my fort, and it did get a bit annoying. I think I am also going to move the reactions from the Tanner, to the Leatherworks. It seems to make more sense there. Currently I have lots of dwarves running back and forth to the other side of my fort, because I built my tanner under a deep channel to provide light, and stop miasma. I don't want to built tannery workshops by my industries for fear that some of the overlapping dwarves would bring their rotting pieces in with them. I'm also working with the reaction changes sackhead posted on the forum to give more leather. Basically changing skin to a glob, which is dropped based on the animal size. Now, large creatures give much more leather! I think I am going to add it in as well.
Saint wrote:
[*]"Plate Leather" sounds weird, maybe call it "Molded Leather?"
The image in my head was that the dwarves would create lots of hard, studded leather plates, and then the leatherworker would arrange them into (probably uncomfortable) clothing. Your right though, Molded Leather sounds better. I'll probably change this.
Saint wrote:
[*]In the raws file reaction_LeatherUpgrade you have:
[REACTION:MAKE_UPGRADE_LEATHER4]
[NAME:3-make hardened leather plates(2) from stude strips]
Did you mean "Studded" strips?
This is why you should always have a peer review!
I have been playing with it the entire time, and I never noticed this! Oops. Yes, its a typo. I'll correct it. You can pretend, if you like, that its the french pronunciation of 'stud'.
Saint wrote:
[*]Also, you have the reactions produce two at a time:
-snip-
Aha! Why didn't I think of this! This is a fantastic solution. It never occurred to me to just have two products, and that way, you only have a strange leather switch when its being made into armor. Actually, I'm not sure how much leather is required to make the different pieces of armor... I should find out. I'll be adding your modded reactions shortly. Thank you for this!
Saint wrote:
These are all just little things I've noticed, you don't have to make any changes.
Otherwise, I love your mod! I modified the "wastelanders friend" mod with yours so I can upgrade leather, raising my Adventure Mod survival rate from 2% to a solid 3%, maybe even 3.5%.
I think the best indicator of success is the amount of feedback your work returns. 1 thoughtful and helpful comment like this is worth 40 downloads in my eyes. Even negative feedback is good as long as its detailed. It feels really good that somebody enjoys something I made, and your comment is very appreciated. I know I have been having lots of fun with it, and I'm just happy that others are hopefully finding it useful or fun as well.
Saint wrote:
This is pretty cool! I always thought that leather was woefully underpowered. It can be next to useless in combat against enemies using real armor.
I do like that you marked changes to the files with ##: it makes figuring out what exact changes you made easier. I am interested to see what you were going to do with the "Blood Extraction" reaction; it'd be rather dwarfy to boil your armor to iron-toughness in the blood of your enemies/kittens.
Thank you! I was in the same boat with leather. It seemed that it made almost no difference, and it usually went to waste. It feels great cranking out some really heavy duty Kobold Leather armor for my squads.
You are spot on with the blood boiling. My original idea was to make some use of the barrels of blood the merchants sometimes bring, and allow you to use it to harden the leather to iron strength, or maybe the runic leather (because it sounds pretty morbid
). This was switched to boiling in booze, because I was having trouble targeting some of the correct materials for the reactions. Plus, if I am going to allow you to use the blood barrels, I should probably allow you to make them as well. I was trying to find a good way to extract blood from corpses, and maybe use that for batch processing more leather at once.
I'm still looking for ways to balance, but I'm pretty happy with the initial results. My ideas the for next version involve adding some additional armor, reactions to create blood barrels, use those barrels to make some sort of enchanted armor, and perhaps find a way to upgrade already created armor with some bonuses.
Anyway, hope you enjoy it, and let me know if you find any bugs or balance issues!