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?
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!
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?
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
Dragoon209 wrote:
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
It's for Rise of the Mushroom Kingdom:
https://dffd.bay12games.com/file.php?id=8801
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!
Dragoon209 wrote:
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?
-SNIP-
You can see the Mushroom Kingdom weapons at the bottom of the list, starting at #24.
Does this help? Let me know!
It looks like it works for Weapons, since they use that name format, but the other items don't appear to show up, such as tools or toys, since they are all together in an item_mw.txt file.
For instance, mw-FOOD.txt lists
Code:
0 [ITEM_FOOD:ITEM_FOOD_BISCUITS]
1 [ITEM_FOOD:ITEM_FOOD_STEW]
2 [ITEM_FOOD:ITEM_FOOD_ROAST]
but is missing ITEM_FOOD_CANDY_MW, ITEM_FOOD_COOKIE_MW, ITEM_FOOD_SOUP_MW, ITEM_FOOD_POP_MW, ITEM_FOOD_SALAD_MW, ITEM_FOOD_MEAL_MW, and ITEM_FOOD_CAKE_MW.
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
Dragoon209 wrote:
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!
Unfortunately, I am not the mod creator, so doing this would make my graphics set incompatible with anyone using the unedited mod, as it will change the subtype numbering.