Complete Construction Set Tutorial and Important Links [WIP]

User avatar
ArcaneSaint
Posts: 255
Joined: Thu Sep 08, 2011 4:02 pm
Location: Belgium

Thu Mar 22, 2012 12:33 am

Hello everyone, after doing some work on the wiki page for the construction set I decided to start making a full step-by-step tutorial for making a modification for Kenshi. I will try to explain everything I know about its use, and try to answer all questions. I will also maintain a list of important modding-related FAQs and other guides, this way we'll have a central starting place for aspiring new modders.
I'll try to cover as much as possible, but I'm just one person, if you think something is missing from the guide, or you would like to add something, feel free to help. It would be especially great if someone were to make a guide to changing models/textures, as that's something I'm not really that good at.

Important Links:
Wiki entry for the Construction Set
Wiki entry for adding new towns
Quick Mod Guide -- by Chris
Tutorial - Adding Ronin Faction(Mod included!)(IMAGE HEAVY) -- by nate9090
Town Creation guide[May not always work] -- by omegamarcel
[TOOL] Kenshi Mod & Save Manager -- by Hellhound1

EDIT:
Dialog system documentation
Skinned character templates (Max 2010)

Tutorial:
During the course of this tutorial, I will walk you through the steps to make a small "Star Wars"-themed mod for Kenshi. This tutorial will handle adding new weapons, armor, characters and factions. It may be added to or extended in scope over time, but these are the subjects that will certainly be included.

1: Creating and opening your mod
First you'll have to create a "blank" .mod file for your mod. To do so go into the construction set and press "new", then you have to enter the name of your mod. Try to use something descriptive and unique, like "StarWars.mod" instead of "myMod.mod" (in the rest of this tutorial, I will refer to the mod as "StarWars.mod").
In order to begin editing your files press "open", make sure to select both gamedata.base and StarWars.mod. If you select only gamedata.base you will directly overwrite the core game files, which means all your changes will be gone next time you run the autoupdater, and you won't be able to share your mod with anyone. Once your mod has loaded you may notice that the window labeled "Game World" has been filled with a list of names and ID-tags, these are called Items. Double-clicking an Item will open an additional window with more details, but more about that later.
Attention: Make sure to press the "save" button before closing the construction set, there is no "Exit without saving?" reminder when you quit, and you may lose all progress.


2: Adding and Removing Items
Before we make the new weapon, I'd like to dedicate one section to the different actions available in the construction set regarding adding and removing items. When you right-click on an item, a menu with three choices will pop up. There are two ways to add a new entry: "New Item", which will create a blank template of an item corresponding to the current category, and "Duplicate Item", which will make an exact copy of the selected item, with a unique ID. Try either of these now, take you time, I'll wait.

Okay, time's up. You'll notice that the new item's name is in red, this marks that the item has been edited and will override the basic gamedata.base settings for that item when the mod is loaded. Now we'll move on to deleting the entry, but be careful not to delete any items you did not make yourself. Simply right-click the item and select "Delete Item", you'll notice nothing has happened. This is a known glitch in the Construction Set, the item has been deleted but the Game World window doesn't refresh, simply select any other category and then go back to the one where you deleted the item. You'll notice it's gone now.


3: Making a Lightsaber
Let's begin our mod in earnest by adding a lightsaber, shall we? We'll start by copying the "Katana-straight" item (located in the category Items->Weapons (mesh)), that way we'll already have all the animations linked to the correct positions and such. Now, open the copied item's details window (double click the item), and scroll all the way up to the field labelled Name, and change its contents to "Lightsaber". Next we'll change the damage modifiers, set blunt damage multiplier to zero, and cut, min cut and pierce damage multipliers to 1,5 (use a komma, not a decimal point!).
This may seem overpowered, but hey, when have lightsabers ever not been overpowered?
Now we'll adjust the price accordingly, scroll down to "value" and change it to 5000, a nice price for such a deadly tool (note, this is not necessarily the buying/selling price, as all merchants have been programmed to completely rip you off). If you scroll down a little more you can also change the description of the item, use your imagination!

4: Return of the Jedi
We've got our lightsaber finished now, but there's no way for us to actually acquire it in the game yet. Therefore we'll now create a new custom character that will wield a lightsaber. Let's make a copy of "Citizen" (under Character), open the copy and rename it to "Jedi". First thing we'll want to do is change his stats, at the right-hand side of the Jedi properties menu you will find a list of entries grouped under different things like "clothing" and "stats", these refer to the items and stat packages used by the Jedi. Right-click the entry under stats labeled "10" and select "remove from list" (the stat package where all stats are 10 is also named "10", so simply renaming it to "20" won't change any stats, you have to add a new stat package if you want custom stats). Now from the drop-down menu next to the "Add" button, select "stats" and press "Add", then double-click "40", this will give our Jedi the all-40 stat package, meaning all his skills are 40, you may want to add some randomization to these stats by changing the value in "stats randomise". Now from the drop-down menu select "weapons", and add the lightsaber we made. Now, simply adding a "lightsaber" entry won't actually add one to the inventory, for that we'll have to change the number next to "Lightsaber" to the amount we want the character to carry, in this case: 1.
There, we've now added a jedi with a lightsaber to the game. If you want you can give him some different clothes, a cloak perhaps. He won't actually spawn yet, but you can manually place him in the game if you enter edit mode while playing and place him in the world, and then you could get the lightsaber by killing him (that'll take quite a bit of skill though). Though this can be quite buggy and I recommend not saving your game after doing so.

Note: in the Item editor, on the right hand side (where a character's inventory is), underneath the dropdown menu, there are three buttons "1", "2" and "3". These are used to switch between displayed values, usually the first is used to determine the amount of a certain item, the second one to indicate a percentage for AI goals (how important is this task?), and the third I have not yet found a use for. I will refer to these values as val1, val2 and val3 respectively. So if I say "change the Wooden sandals val1 to 6", that means I want you to make sure the "1" option is selected, and then change the value next to "Wooden sandals" to 6.

5: On Factions, Divisions, and Spawn-areas

Ok guys, this is gonna be a big one, this chapter is about making your newly created character(s) spawn into the world. This includes creating a new faction, creating a new squad, assigning AI goals, and working with spawn-areas. I'll be splitting this one up into multiple parts, but I'll start by just giving you the general outlines and then we'll treat each step of the process in greater detail.

To have your custom character be part of the world, it will need to be spawned into the world (note: the following process is for "random" spawns, not for, say, shopkeepers). So first you'll have to create your character, then you add this character to a division, then you add this division to a faction and to a spawn-area. It's the divisions (squads) that are spawned, and determine AI goals for the character in it, whilst the faction relations determine how they interact with others. Note: One character can be used in multiple divisions, and I think one division can be used by multiple factions (though there a few ways in which that would make sense).
So remember: Character < Division < Faction

I'll also be assuming that you've read the previous parts of the tutorial and know how the basic parts like copying items and changing Item properties, so I won't be going over every single click/button press, if something's unclear just let me know.

5a: Divisions
We've already made a Jedi, so let's now make them run around by copying the Bandit squad (under Faction->Divisions) and renaming it to "Jedi patrol". Now you will notice on the right, where previously the inventory was listed there is now a list containing "AI Goals", "leader", "Leader AI Goals", etc.
Most of these are self-explanatory, "AI Goals" determine the behavior of the entire squad, so "Protect allies" means the squad will assist any squads in the same faction, and their own squad members (allies). The "leader" tab is for selecting the squad leader, his behavior is controlled by both "AI Goals" and "Leader AI Goals", you could add more than one leader in a squad, but I will come over and slap you if you do. Then there's the "squad" and "Squad AI Goals", these are for the non-leader squad members, usually these will only have the additional goal of "Follow leader", which will cause them to follow their leader where ever he goes.

Since we merely want our Jedi to run around through the desert the Bandit Squad already contains the AI packages we need, so now remove the bandits from the leader and squad tabs (note: currently there is a bug in the Construction set that if one Character is listed mutltiple times in a division, and you remove one mention ALL mentions in that division to that character are removed). Now add a Jedi as leader and as squad member, you can change how many of these will appear in a division by changing the value next to it (val1). Set both the leader Jedi and squad Jedi val1 to 1, if you wish you could also make two different characters, a Jedi Master and Padawan, with different stats, and use these as leader and follower. Basically your squad is now finished. You could add the self preservation goal to their AI list, which theoretically should make them think twice about taking on groups 40x their size, theoretically.

5b: Factions
As you may have noticed, nowhere in the previous segment did we tell the squad to not be like bandits, that's because relations with other instances of the squad is determined by the faction that spawned them. We will now create a Jedi faction, again we will start from a copy of the Dust Bandits faction, renamed to Jedi.
First thing we gotta do is make sure the Jedi don't act like bandits, after all, they're called Jedi not Sith. So go to the "relation" part and set "default relation" to 20, this will make them positive-neutral on all other factions. The other relations are pretty much standard, they will hate you if you attack them, like them if you help them, and attack you if they hate you. Now you'll want to remove the bandit mob and bandit squad from the squads list and replace them by the Jedi patrol. If you wish you can change the faction color as well.
Now to make those Jedi attack bandits and other evil-doers by adding some specific faction relations. Under the "relations" option select the Dust Bandits faction and set it to -50 (val1), other evil factions you might want to include are Raiders, Sand ninjas, Slavers and Starving Bandits.

5c: Spawn areas
At last, we have come to the topic on spawn areas, this one is fairly simple, just select the spawn area(s) you want the Jedi to appear in, and add the Jedi Patrol to the spawn list and set their val1 to 2 or 3. Val1 is the maximum number of squads of that type in the area at once, the spawns min and spawns max indicate the minimum and maximum number of squads spawned in a zone (each area consists of multiple zones), setting this number to a higher amount will increase the number of people runnning around at once (too high might negatively affect performance!). Add these Jedi Patrols to every single spawn area and they can appear anywhere in the world.

You should now be able to encounter your Jedi everywhere in the world, and if you're lucky you might be able to loot a lightsaber from one of them (good luck with that!).

Yours sincerely,
~~ArcaneSaint
They may take our bees, but they'll never take our piе!
[spoiler]Do spoiler tags work yet?[/spoiler]
[s]what about strike-trough?[/s]
Kenshi Modding Tutorial
This link kills spam

User avatar
ArcaneSaint
Posts: 255
Joined: Thu Sep 08, 2011 4:02 pm
Location: Belgium

Thu Mar 22, 2012 12:34 am

--RESERVED For FAQ--

There, what do you guys think of it? It's not finished yet though, I'll continue working on it the day after tomorrow.
They may take our bees, but they'll never take our piе!
[spoiler]Do spoiler tags work yet?[/spoiler]
[s]what about strike-trough?[/s]
Kenshi Modding Tutorial
This link kills spam

Prezo
Contributor
Posts: 48
Joined: Thu Mar 15, 2012 6:02 am
Location: Canberra Australia

Thu Mar 22, 2012 4:40 am

Good step by step, can't wait until you get to the changing models bit as that's what I haven't figured out yet (If you haven't figured it out and I do before you I'll let you know =P) I look forward to the continuation.

User avatar
ArcaneSaint
Posts: 255
Joined: Thu Sep 08, 2011 4:02 pm
Location: Belgium

Fri Apr 06, 2012 2:09 pm

Okay, new update is up, added two new links and how to create custom characters, next I'll be adding how to add custom squads and make them spawn.
I haven't added any images as they tend to make posts more difficult to read. If/when spoiler tags are implemented in the forum I'll start adding screenshots.
They may take our bees, but they'll never take our piе!
[spoiler]Do spoiler tags work yet?[/spoiler]
[s]what about strike-trough?[/s]
Kenshi Modding Tutorial
This link kills spam

User avatar
Blxz
Contributor
Posts: 1843
Joined: Mon Dec 19, 2011 1:11 pm
Location: Australia

Tue Apr 10, 2012 4:47 pm

Nice little guide. It seemed comprehensible enough even to a technical noob like me. Although I do want to add that a weapon with 1.5 damage is hardly overpowered; there are plenty of weapons that do similar and more. Still, I get your point...I'm just being facetious now.
p­ie

User avatar
ArcaneSaint
Posts: 255
Joined: Thu Sep 08, 2011 4:02 pm
Location: Belgium

Tue Apr 10, 2012 5:06 pm

Blxz wrote:Nice little guide. It seemed comprehensible enough even to a technical noob like me.
Thanks! :D
Blxz wrote:Although I do want to add that a weapon with 1.5 damage is hardly overpowered; there are plenty of weapons that do similar and more
Hmm, perhaps I should have been more clear on that point, the "1.5 cut/pierce/blunt damage mult" doesn't refer to the actual damage, I don't know the exact formula used but the final damage is calculated by different factors like the user's skill with that type of weapon, and weapon weight, which is then multiplied by the damage multiplier (and random chance + damage reductions also play a role in there somewhere). Knowing exactly how the formula works would be a great help now that I think about it, I'll try to look into it someday.

Most in-game swords have a cut damage multiplier around 0.8 to 1.1 (highest base-data sword, "ringed", has 1.2 multiplier), 1.5 is the maximum value for this multiplier. Therefore, someone wielding a weapons with multiplier 1.5 will deal 50% more damage than someone with equal skill/armor and a weapon with 1.0 multiplier. So yeah, 1.5 is way overpowered, but then again, lightsabers usually are.
They may take our bees, but they'll never take our piе!
[spoiler]Do spoiler tags work yet?[/spoiler]
[s]what about strike-trough?[/s]
Kenshi Modding Tutorial
This link kills spam

User avatar
brad1995
Posts: 84
Joined: Thu Oct 06, 2011 3:35 am
Location: Australia
Contact:

Sun Apr 15, 2012 1:13 am

This guide was very helpful, thanks !! :D
Chris_The_Great wrote:I'm sure glad there are vigilant citizens around like you, making sure my forum is always full of bees.

User avatar
txfirefighter
Posts: 552
Joined: Tue Dec 20, 2011 4:33 pm
Location: Texas

Wed Apr 18, 2012 5:56 pm

curious...

once we create a town (just trying to create an outpost for my squad) is it compatible with updates?

will this be our mod? i know that as the game progresses we will have the ability to build our own fort, however will it be with this method?

great article btw! wanna tackle it but i can get overwhelmed easily with this stuff :)
Valar Morghulis "All men must die."

[CENTER]Image[/CENTER]

User avatar
Dem1
Posts: 14
Joined: Tue Aug 07, 2012 9:09 am

Tue Aug 07, 2012 9:19 am

Thankyou for the great tutorial. this might be a noob question, but how do you enter edit mode? :oops: it's probably right in front of my face, I just can't find it.

User avatar
Alaswing
Posts: 68
Joined: Tue Aug 28, 2012 4:33 pm
Location: México

Tue Sep 11, 2012 3:22 pm

Thank you very much for this, it is very useful, any one know how do I do textures? or what software can i use?, i cant find texture files i can only find files like body.body etc.
Looking for the perfect game...

http://www.facebook.com/alasvic.bm

User avatar
ArcaneSaint
Posts: 255
Joined: Thu Sep 08, 2011 4:02 pm
Location: Belgium

Mon Dec 10, 2012 9:19 pm

There, added the part about adding a new faction and making it work in-game, if you have any questions feel free to ask.

Also, I noticed something weird while testing that latest part, and I'm not sure if it was a bug or just a new feature in Kenshi, but somehow the Jedi squad had managed to "convert" a couple of Dust bandits, who were now dressed in Jedi colours, and following them along. I checked the source files again and they were not originally part of the squad. So I either missed something or it was just a random bug.

Now I think the only big thing remaining is custom textures/models. Hmm, I'll see if I can find the tools I used to create the custom zombie skin textures, and then start looking into doing models.

EDIT: I totally forgot about custom races, I'll do a bit about that too. And armour/clothing, not really that difficult to figure out if you're familiar with weapons, but might still be a good idea to write a little something about that.
They may take our bees, but they'll never take our piе!
[spoiler]Do spoiler tags work yet?[/spoiler]
[s]what about strike-trough?[/s]
Kenshi Modding Tutorial
This link kills spam

neronix17
Posts: 66
Joined: Sat Mar 23, 2013 12:05 am
Location: Aberdeen, Scotland
Contact:

Sat Mar 23, 2013 7:14 pm

Pretty amazing that I posted about making a Star Wars mod before reading through this :D I generally try to learn tools like this by myself as I tend to understand it better but you are doing a great job with the tutorials, answered everything I've gotten stuck with so far.

sdiaz483
Posts: 1
Joined: Mon Mar 25, 2013 6:40 am

Mon Mar 25, 2013 8:28 pm

Next we'll change the damage modifiers, set blunt damage multiplier to zero, and cut, min cut and pierce damage multipliers to 1,5 (use a komma, not a decimal point!).
http://s17.postimg.org/d28aqc3n3/error.png

I'm getting that error for using the comma "," in the url I've provided an image of such error, why is this? This is for the lightsaber

shrikey
Posts: 1
Joined: Wed Mar 27, 2013 7:00 pm

Wed Mar 27, 2013 7:04 pm

Slightly confused as to how to make the Jedi spawn.
just select open the spawn area(s) you want the Jedi to appear in
Was the 'open' a typo, because I can't make sense of it if it is. Haven't been able to find how to spawn people otherwise. Would be great if someone could walk me through how to choose where things spawn.

User avatar
Dyderich
Posts: 21
Joined: Tue Mar 26, 2013 9:15 am
Location: Poland

Wed Mar 27, 2013 7:13 pm

I have tried that wiki information to create a Town but have not yet been able to do anything with this editor besides getting it to crash about every 1-2 minutes

You cannot place that Town Marker (the Phoenician looking avatar), save and then place buildings as all the buildings are tied to your character and you get the message Too Close to a City (blue coloured buildings you are trying to set down)

So if you cannot place buildings, how are you able to create a "new town"?? Is there no way to be inside the game without technically "Playing the Game"? Only thing I can do is place stuff down and then it is linked to my character/faction and I really cannot do much else as the editor loves to just crash constantly.

Any help would be appreciated...I am too newbie when it comes to modding/scripting still :(

User avatar
theunfrailhale
Posts: 25
Joined: Mon Apr 08, 2013 4:51 am

Mon Apr 08, 2013 5:36 pm

Thanks for the tutorial! I look forward to getting setup to learn some modding/modeling. One question that I have regarding user created content is how we might be able to program interactions, if thats even a possibility.

In your tutorial, we are editing a tool that already has interaction functions, but some have made mods for chairs and tables etc. which is fantastic, but are mod-ers able to program the chair so that characters can sit/interact with this chair? Im not sure if that kind of adjustment is a lower level than we have access in the game.

User avatar
ArcaneSaint
Posts: 255
Joined: Thu Sep 08, 2011 4:02 pm
Location: Belgium

Sun Apr 28, 2013 5:25 pm

shrikey wrote:Slightly confused as to how to make the Jedi spawn.
just select open the spawn area(s) you want the Jedi to appear in
Was the 'open' a typo, because I can't make sense of it if it is. Haven't been able to find how to spawn people otherwise. Would be great if someone could walk me through how to choose where things spawn.
The open was indeed a typo. In fact, upon re-reading that segment I realized it was full of typos, I must have been really tired when writing that last part. I think I've fixed it now.
I'll recap just for clarity though: Go to Biomes->Spawn areas, there select the spawn area you want to add a squad to, and add a "spawns" entry for the squad you want to spawn in that area. Each spawn area covers a part of the world, though I'm not sure exactly which places are covered by which lists, and if there are any overlaps.
They may take our bees, but they'll never take our piе!
[spoiler]Do spoiler tags work yet?[/spoiler]
[s]what about strike-trough?[/s]
Kenshi Modding Tutorial
This link kills spam

Luqin
Posts: 39
Joined: Thu Jun 06, 2013 11:00 am

Tue Jun 11, 2013 10:56 pm

Hi, i need little help with my modding. I created designeted boxes for my fabrics (so workers at looms dont stop when output is full), but i only managed to put them in-game by editor (press f12)..

How do i put my modded building in a building menu in-game between the other storage boxes?
Thank you.

Bloodwork
Posts: 6
Joined: Tue Sep 24, 2013 3:21 am

Tue Sep 24, 2013 7:56 pm

Do you have any info on how to mod in custom made models, textures and animations?

DatMerchant
Posts: 13
Joined: Tue Oct 29, 2013 4:28 pm

Thu Oct 31, 2013 12:17 am

Please add tutorials for custom models, and textures, like what programs to use and what plugins to use, etc.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests