Door Kickers 2: How to Create Weapon Mods

If you intend on creating other mods, please read this too as there are other parts that might be important.

 

Game directory
HOW TO MOD WEAPONS REALLY QUICK

most of this is copy-pasted from my own Discord message so it may be a bit messy.
Most of this pertains to the closed testing period, so I don’t know if there has been any changes to how weapons work since then.

Also, I will be referencing an Uzi mod I made a lot.

All of the game files are stored within
Steam\steamapps\common\DoorKickers2\data

\data\equipment\
This folder houses the actual files for weapons, ammo, and how the rangers fire said weapon.

`firearms_rifles` and `firearms_pistols` houses the actual weapon files per se. If you want to create a gun that uses the same ammo, same way of attacking as the default rifles then you will only have to edit this.

`firearms_ammo` is the type of ammo the weapons have. You can just reuse the ones meant for the rifles but if you are creating something new, then this one is important. It defines the firerate of the weapon, sound radius of the weapon, crit chance of the weapon etc etc

`firearms_attacktypes` is how the soldiers use the weapons. So for like say the M4 say at <25m they will use attacktype RangersRapidfire, for <INFm they will use RangersCarbineaimedfire. This file will allow you to create new files that determine how much bullets the ranger will waste at close range and at long range, how accurate he is, how long he will aim. So for example I made the uzi low damage with no rng, but he wastes a lot of bullets at cqb so it is kind of effective. There is also a crit chance thing which I assume is in addition to the other values

Both `firearms_rifles` and `firearms_pistols` reference `firearms_ammo` and `firearms_attacktypes`. they also reference other things which I will get into in a moment

\data\localization\
The `localization` folder in `\data\` has a `game.txt` file. Basically everything you read in the UI is in there. Weapon titles, weapon descriptions et cetera. They come in two parts, first is something I will call the tag, second is the actual text. So for the uzi’s title, I had inserted this into `game.txt`

@firearm_uzi_name=Uzi Sub-machine gun @firearm_uzi_desc=Using experimental tech to reduce overall length, the Uzi is a no-compromise subgun, firing at a slow, but controllable rate.\nThe perfect choice for special forces and personal defence!\n\nIn the 50s, at least.

For game files like in `equipment`, you will have to put the `@firearm_uzi_name` in there. The text you put afterwards is what the game will display.
Here is another example of a weapon description from the closed testing build that conveniently explains something else.

@firearm_mk18_name=Mk18 Carbine @firearm_mkl8_desc=veeeery long text testing auto-split of lines, if they don’t fit in a single line they should auto-split and go to the next line. One of the best technical innovations of Door Kickers 2, no longer need to split lines manually using \ n. We can still\ndo\nthat\nthough.
\data\models\weapons\
Specifically the `\models\weapons\` folder will have the 3d models for the weapons, texture files for said models and the UI icons.

For 3d models and textures, there is not much to do there because there is no documentation of how to export from blender to their proprietary formant, and also none for the other way around.

the UI icons are using .dds format. you can open this with I think some photoshop or the latest version of gimp. IDK why though but the files are all upside down.

\data\sounds\
The `sounds` folder will have your sounds. Fire sounds for weapons goes into `\sounds\sfx\weapons\`, and the files themselves have to be .WAV mono sound file, 16bit PCM.

DONT FORGET! You need to add your sound file to `sounds_library.xml` for each channel you can list different sound files, which I think is how the gunshot sound effect variety is done. Always remember though that `firearms_rifles` has max of 4 or so sound files for gunshot variety.
If you do not add anything to that xml file your game will crash upon trying to play that sound

Related Posts:

Leave a Comment