This War of Mine

This War of Mine

37 ratings
Adding new items through modkit of This War of Mine
By toomanynights
Some would say that This War of Mine workshop is bugged and you don't have an opportunity to add a new item. While the first statement could be true, the second one isn't 100% correct. You actually have that opportunity, and thise quide will tell you how.
Introduction And Stuff
So if you felt a bit confused when you first tried to add a new item through This War of Mine modkit, then you’re just like me. It seems like for now modkit is a bit bugged and you can’t add a new item just like that.
I’ve spent a few evenings trying to make it work, and it seems I made it. So this here is a guide on how to add a new item to This War of Mine.
Boring Technical Hypothesis
Modkit seems to work with two main components: Storyteller.exe, that actually is an interface for editing .xml’s, and “ModTools.exe”, which appears to be a console utility that extracts stuff from game, converts it into simple .xml files, and then grabs your .xml’s and puts ‘em back into game.

The directory structure of mod is quite easy itself: “Items”, “Localisations” and other folders contain much like what they say. But whenever there’s a folderful of .xml’s, there’s also a .bin file.

I believe that it contains a list of .xml’s that will be brought from mod to the game. But the thing is that whenever you just add or duplicate item through modkit, it won’t just appear in that .bin. It should, but I guess it's a modkit bug. So now we’ll do it manually.
Starting to Add That Item
First off you’re gonna have to create a new mod. Since we’re doing things right here, this item will have its own icon, so when you create a mod - be sure to push “Extract Textures” checkbox.

This thing is gonna take a while, but when it’s done - go to the “Items” branch and choose item that you want to be the example of your own.
There you can see items that never appear in game, like “PocketTools”. Funny thing is that they are in that .bin already, so actually you could just edit one of them and be happy, BUT I STRONGLY RECOMMEND NOT TO DO THAT, because two mods with similar item edited will have conflicts and you won’t even see it coming.

So in this instance it’ll be “Filter”, go and duplicate this item.

Your Filter2 will appear instantly, but don’t forget to change its name on your right as well.

Becoming Godparent
Now let’s change Filter2’s name and description in order to give it a personality.
You can see when the item keeps its name and description in “StringDescription” and “StringName” rows:

Go there now: “Localization strings” - “Game string group” - “Groups” - “Items” - “Groups” - “Fuels” - “Strings”. Notice that when you’re working on something different than Filter, group can be different as well.

Duplicate Filter’s name and description. Notice that after being duplicated, it’ll lose all its content.

I wanna keep things ordered, so I’ll change new strings’ names into “Filter2_Name” and “Filter2_Description” and fill all the rows, except for “Ancient” and “Portuguese” (vanilla items are like that as well). Please don’t be lazy and fill all the languages, use the translator if you’re not a polyglot. The community will hopefully fix the translation difficulties for you if your mod goes worldwide.
By the way, it appears like your localization strings won't survive first saving anyways. So don't bother very much before first saving (just fill only one language), and then come back and fill the whole bunch of languages.

And here comes the tricky part! See that little “Description” thing? Open it up and make sure that “#checked” tag is right where it belongs - in “Notes”, Without it after saving your mod all the rows will go empty and won’t show in game.

So, when you’re done with that, go back to your “Filter2” and edit name and description rows.

Making Custom Icon
Now, when the name and description are ready to go, it’s time to change the item’s icon. In order to do that, first look at which icon sheet the parent item used.

Now you know it’s UI/KosovoIcons/ Then go there. You can use “folder” icon on top to make it faster.

When you’re there, find and duplicate it. Let’s name it “”. Also find and make it’s own clone, “”.
Of course you could use empty cells, or just replace unused icons with your own. But again, I do not recommend you that to avoid conflicts with other people’s mods.

When you’re done duplicating, open “_a” sheet with, say, Paint NET[] editor.

I can’t see anything, so I’ll add a new layer, move it to background and paint it black.


As you can remember, Filter had icon #18, but if you count here, you can clearly see it’s on a position #19. I don’t know why. Let’s just deal with it and replace filter’s icon with something we need.
Oh, by the way, be sure to paste your picture onto NEW layer. It’ll make your life easier, believe me.

And now, NOT forgetting to remove the black layer, save this stuff.
Rinse & repeat with “_o” texture.
Go back to your item and point your Filter2 onto your new icons.

Messing With Bins
I guess it’s not the end of editing options of your item, but rest of them are more obvious, so I guess you can do it yourself. So now we’re moving to another tricky part: manual adding your item into config.

Before you start messing with bins, save your mod. If while saving you see a dialogue where it asks you to add your item (not icons or something, but "xml" file of item), then you won't need to manually edit .bins, go on to the next step.

Otherwise go into “Items” folder of your mod and open “config.bin” with any HEX editor (I prefer “Hex Editor Neo[]”).
See that messed up list? Find where the parent item’s mentioned.

As you can see, every item is written like “.Filter.xml.”. But it won’t work if you just put “.Filter2.xml.” after Filter.xml, because regular dot is Hex-translated into “2e”, and you need to start your item with “01” and end with “00”. So copy&paste until you get the “Filter2.xml” right.

Now save that config and go back to your modkit. Pack your mod with blue arrow. When it asks you if you want to pack your new textures, say “OF COURSE I WANT THAT!”.

By the way, do NOT attempt to save and/or pack your mod while editing one of .bin's or textures. This will end up with unreadable error and you'll probably lose all your progress since last saving.
Holding Your Breath…
It’s a precious moment. Especially for me after all those hours of testing.
Go in game. Be sure to disable all mods instead of a newly born, reload the game, and then start a new scenario (you saw it coming, right?). Then go to your workshop, if your item is supposed to be there, and…

There it goes! Now you only have to go to the main menu, “Modding center”, and upload your mod to Workshop.

Yeah. I would say “it was easy, wasn’t it?”, but I know it wasn’t so I don’t wanna be too ironic.
It could be easier, yes, but please let’s be thankful to 11 Bit Studios. Those guys made a really awesome game, and they even gave us an opportunity to change it the way we want. It doesn’t work perfectly now, but let’s be patient about the bugfix and use this workaround in the meantime.

If you find this guide helpful, please take part in propagating it further, because more TWOM players know this stuff - more interesting mods are coming.

Finishing Touches
There’s one more thing in This War of Mine modding tools that doesn't work 100% correctly. Files are packed quite well, but not all of them are being sent into Workshop, so you will see 'em, but your subscribers won't.

I’ve sent a detailed bugreport to 11BitStudios, and I believe they will fix this thing soon.
Until then you can do the following:

Go to ..\Steam\steamapps\common\This War of Mine\Mods. Use Mods.list to find your mod's ID.
Copy all files, except for the directory, that contain your ID.
Paste ‘em into a folder with the same name as your mod’s Steam ID. Just create that folder nearby. You can find your mod’s Steam ID if you visit your mod’s Steam page:

Go to that folder. Remove "ID_" prefix of each file (so "5a7d0b1aabf846bd888c2fa138d_common.dat" should become just "common.dat").
Pack that stuff into archive (not only files, but the folder you’ve created as well!).

And ask your subscribers to unpack it with replacing into ...\Steam\steamapps\workshop\content\282070

The example of how it can be organized is here:

There's also a way to do it without additional archives. For that you need to use 2.0 version of modkit.

If you find this guide helpful, please take part in propagating it further, because more TWOM players know this stuff - more interesting mods are coming.
< >
Iridescent Lightning Oct 21 @ 5:17am 
Yet another thing. How to make sure that the icons in dds. file won't tangle each other. How do the game "count" them. Do I just need to separate them a little bit and pray? Or there is a certain radius for every little partten where you're new icon is valid and can be counted.
Iridescent Lightning Oct 21 @ 5:05am 
I guess I just miss the best period of modding. It's still very fun thought. Even more intriguing than the game itself. I managed to add a broken crowbar like you mentioned in the essay and a new firearm. It took me hours to figure out why the new rifle and the old one keep replacing eachother. Naturally I thought the game can't tell them apart. It turned out that you can't just left a blank on "ingredient". It surely allows you make something out of the air but what it really did was all of your stuff in the inventory will be used in a single craft no matter you have a thing or not. So the former gun was used as ingredient for the next gun craft. Loop. :D
toomanynights  [author] Oct 21 @ 4:25am 
@Iridescent Lightning You're right, this guide was written at the very beginning of modding era, I believe most bugs were fixed ever since.
Unfortunately I don't know any way to send dual team to scavenge missions, other than to play TWOM boardgame where this is possible and even recommended %-)
Iridescent Lightning Oct 20 @ 9:01pm 
Thanks for sharing. Good things is it seems the bug you reported in the essay has been fixed. I didn't mess with config.bin and my New Item was still added in the game anyhow. It automatically generated a new .bin file which has a same name of what ever the item you had changed.
Do you how to achieve duel scavenger searching a certain location? I looked through all the Configs and just could not find anything relevant. I think it's a pretty cool feature, making the game more realistic.
Trhso May 27 @ 2:23am 
Hi, can you help me about how to get back changes what i made? I chenge loot at some map (church _bandit) and it seems it causing crash game, so i need get fixed pool back to its original state.
Where could I get the version 2 of modkit???
[SVSB] Mike Mar 15 @ 4:28pm 
someone's probs already said this but the reason it's #19 in the image and #18 in the toolkit is because code starts at 0
toomanynights  [author] Feb 5 @ 12:48am 
@Deloitte0111 If there's a way to do that, I'm unaware of it, unfortunately. As far as I'm concerned, it can't be done.
Deloitte0111 Feb 4 @ 6:25pm 
@toomanynights,I just wonder If there is any chance to make new items That can show in the shelter like med,cannedfood,raw food
toomanynights  [author] Feb 4 @ 6:38am 
@Deloitte0111 It's probably best if you create a topic in "Workshop discussions" here:
There's plenty of folks who mostly can reply to almost any question.