Insurgency

Insurgency

30 ratings
Inventory loadout/preset
By Linothorax
A guide describing how to install specified workshop items correctly, how to use the loadout/presets and other small tidbits.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Guide for following workshop items:

Advanced options, loadout/preset
Loadout/Presets

Screenshots are from a linux installation of Insurgency but can be applied to windows or mac as well
Installation
Subscribing to item
Click on "+ Subscribe"


Steam should download the workshop item now, if it doesn't, start the game and close it again.

Copy VPK
Open folder in which steam downloads workshop items.
i.e. (/Steam/steamapps/workshop/content/222880)



Here you can see all your workshop items, which you downloaded.
Now search for one of those folders, depending which workshop item you subscribed.
Advanced options, loadout/preset - 1238653345
Loadout/Presets - 1258859293

Go inside it and copy the .vpk file.


Now open your insurgency game folder and move into the custom folder.
i.e. (/Steam/steamapps/common/insurgency2/insurgency/custom)
If there is no custom folder create one.


Paste the .vpk which you copied into this folder.


That's it, you are basically done.

Creating autoexec/own config
That we don't need to press the button ingame all the time, we create a autoexec file which does this for us and we can add custom things to it as well.

Move one folder up and into the cfg folder.


Now copy a existing file or create a new one.


Rename the copied file to autoexec.cfg (If you are on windows and you have file extensions hidden (default from win7 up, I guess) just call it autoexec, if you name it autoexec.cfg it will be called autoexec.cfg.cfg)

Now open the new file with a text editor and remove everything wich is inside it.
Once everything is gone, add this one line to finish the basic configuration.
exec linoInit
Save the file and you are ready.

The file should get executed automaticly without adding launch options, if it doesn't load add following to your launch options.
+exec autoexec

If for some reason it still doesn't work, there is a button "Init loadout" in the inventory which loads all the needed things.
Updating
Because we moved the files into our custom folder they don't update.
To get around this and give you a easy overview of the version you use I added a second workshop item which I use for version checking.

  1. Subscribe to workshopitem: version_file
  2. Once downloaded you can check ingame if there is a new version available.
    1. For the "Advanced options, loadout/preset" workshop item
      Click on the "Check Version" button in the ingamemenu
    2. For the "Loadout/Presets"
      Click on the small cog in the inventory far left bottom
  3. It will get current version and the version of the version_file and show it to you.
  4. If the version numbers are different, copy the .vpk file from the workshop path to the custom folder again and overwrite the old .vpk file. If you check the version number again it should be same.

Why does it show a error "couldn't execute yadda yadda"?
1. If you don't have subscribed to the version_file workshop item it'll show you some similar error, however you then can't see version numbers either. Solution? subscribe to the workshop item.
2. Because I use this version checking file for multiple workshop items, and you don't have subscribed to the other ones on the list it'll show the error. Is it bad? no, wasn't able to hide it from you. Just check the version numbers for the workshop items you got.
ID-Lists
For the loadout/presets you need IDs for the weapons, upgrades and gears.
They can be/are different for each theater (If lines got changed in the theater file).
I currently have ID-Lists for the default theaters and custom theaters which can be found HERE or HERE.

How do you get ids?
It is quite easy, Nullifidian showed me that there is a pretty neat command.

  1. Open your Console, while you are on the Server for which you want to create a loadout and type
    listtheateritems
    This will print all items you can add/upgrade into the console.

    For example the output could look like this:

    weapon_mp5a4 weapon_uzi weapon_colt9mm weapon_katana Weapons: 4 weapon_mod_mp5sd6 base_standard base_heavybarrel base_recoilstock base_silencer Weapon Upgrades: 5 grenade_m79 grenade_m79_smoke grenade_m79_incen Explosives: 3 ins_chest_rig ins_chest_carrier Player Gear: 2

  2. Copy the output into a text editor (one which shows you which line you are on makes it easier)
  3. Slice the content into different files, search for
    :
    and cut/paste everything which is above it into a new file (at the end you should have 4 files, weapons - weapon upgrades - explosives - player gear )

    Below is a example, the numbers represent the line numbers.
    --- NEW FILE WEAPON 1 weapon_mp5a4 2 weapon_uzi 3 weapon_colt9mm 4 weapon_katana 5 Weapons: 4 --- NEW FILE UPGRADES 1 weapon_mod_mp5sd6 2 base_standard 3 base_heavybarrel 4 base_recoilstock 5 base_silencer 6 Weapon Upgrades: 5 --- NEW FILE EXPLOSIVES (the explosives can be ignored, but left in for full example) 1 grenade_m79 2 grenade_m79_smoke 3 grenade_m79_incen 4 Explosives: 3 --- NEW FILE GEAR 1 ins_chest_rig 2 ins_chest_carrier 3 Player Gear: 2

  4. Now you should look for your item and check the line number (or count from top to bottom, top starting at 1)


It is quiet easy, but time consuming if not done by script.
Get the theater files for the server you would like to create loadouts for.
Normally they are somewhere on the workshop, if not they should be downloaded to your steam workshop folder (search each folder, sort by date/time) or if it some old config look inside your game folder i.e. insurgency2/insurgency/scripts/theaters/

Once you got the files look for the ones which contain followin in the name:
(randomname_custom_weapon)
randomname_gear
randomname_weapon_upgrades
randomname_weapon

Open the file you want the IDs for and start counting from top to bottom, look for the 'full' weapon/upgrade/gear names i.e "weapon_rpg" by default they are indented with two(2) tabs (or 8 spaces).

Once you got all the IDs you need to fiddle a bit, for example you sometimes need to append the IDs from custom_weapon file to the weapon file or opposite.

If you don't want to fiddle create a discussion in the workshopitem with [Request] as tag in title and link to workshop item with theater files -- EXAMPLE HERE -- if I have time I'll take a look and paste the IDs in a new discussion.
I'll read theater if they have the default indention.

Create loadout/preset
Folder structure
Go into your game folder and into your custom folder.
Should look like this for example:


Now create a new folder with a name you like, I'll call it "MyPresets".
Inside this folder create a folder called "cfg" and inside that folder create a folder called "linoCFG" and inside that one create a folder "loadout" and now two more "ins" and "sec".
Example:


Create presets
In the example we want to create a preset for a "Security" class because of that we go inside the "sec" folder. Inside this folder we create a file called "rifleman1.cfg", this will create a preset for the rifleman class. (For windows users make sure you don't have double file extension i.e. rifleman1.cfg.cfg)

Filename - Reference:
_Insurgents_ bomber1.cfg bomber2.cfg bomber3.cfg fighter1.cfg fighter2.cfg fighter3.cfg gunner1.cfg gunner2.cfg gunner3.cfg scout1.cfg scout2.cfg scout3.cfg sniper1.cfg sniper2.cfg sniper3.cfg specialist1.cfg specialist2.cfg specialist3.cfg striker1.cfg striker2.cfg striker3.cfg _Security_ breacher1.cfg breacher2.cfg breacher3.cfg marksman1.cfg marksman2.cfg marksman3.cfg recon1.cfg recon2.cfg recon3.cfg rifleman1.cfg rifleman2.cfg rifleman3.cfg sniper1.cfg sniper2.cfg sniper3.cfg specialist1.cfg specialist2.cfg specialist3.cfg support1.cfg support2.cfg support3.cfg

Once you have that, open the file, the commands used to buy the weapons, upgrades and gear are:
inventory_buy_weapon [ID] inventory_buy_upgrade [SLOT] [ID] inventory_buy_gear [ID]

Please read ID-List section for info on optaining IDs.

The file gets read from top to bottom, which means that the commands at the top get executed first.
This means that the weapons/upgrade/gear, which are at the top will get bought first 'until' there is no more points.

In the upgrade command there is a slot parameter, because upgrades can only be applied to weapons they need to have a 'parent' ID, this ID is dynamic as well.
It changes depending on how you build your preset.
For example if you buy the Pistol first it'll have the slot ID 0, however normally there is the knife which gets added by the game before which then pushes the ID for the Pistol to 1.
Here a template for coop with default theater.

// RIFLEMAN 1 // COOP - PRESET // AMMO - BELT inventory_buy_gear 5 // sec_chest_rig // ARMOR inventory_buy_gear 3 // sec_heavy_armor // KNIFE SLOT 0 // PRIMARY SLOT 1 inventory_buy_weapon 1 // weapon_m16a4 // PRIMARY UPGRADES inventory_buy_upgrade 1 47 // ammo_ap_m16a4 inventory_buy_upgrade 1 9 // siderail_flashlight_rail inventory_buy_upgrade 1 80 // underbarrel_foregrip_sec1 inventory_buy_upgrade 1 13 // barrel_heavybarrel // SECONDARY SLOT 2 inventory_buy_weapon 3 // weapon_m9 // SECONDARY UPGRADES inventory_buy_upgrade 2 23 // ammo_ap_m9 // GRENADES SLOT 3 inventory_buy_weapon 26 // weapon_m67



Next save the file and start up your game to test it, you can make changes to the file while the game is running if something is wrong etc.

Only thing which I didn't manage to get working was that the second grenade doesn't get loaded into the inventory, even if enough points are available.
Customization
All the buttons have a own alias bound to them and an own 'variable' for the string.
Don't like what a button does? Just change the alias to what you want it to do and be happy :-P

Don't like the sound the buttons make when pressed? Disable them or just change them.
Add following code in your autoexec below the exec linoinit to 'mute' the sound.
alias soundBtn var_empty
Note: Never overwrite the alias "var_empty" it is heavily used in the loadout/preset configuration.

Want a different sound?
Add this and change the file which get loaded.
alias soundBtn "play /ui/sfx/cl_click.wav;"

To enable visiual feedback add following to the autoexec:
closecaption 1 cc_subtitles 1

Don't need three(3) slots only want to use one(1) or two(2)?
Add this to the config, to only have one(1) slot being loaded
alias varRiflemanCounttwo varRiflemanCountone alias varRiflemanCountthree varRiflemanCountone
or for two(2)
alias varRiflemanCounttwo varRiflemanCountone

Reference for other classes:
alias varRiflemanCountone alias varRiflemanCounttwo alias varRiflemanCountthree alias varFighterCountone alias varFighterCounttwo alias varFighterCountthree alias varSupportCountone alias varSupportCounttwo alias varSupportCountthree alias varGunnerCountone alias varGunnerCounttwo alias varGunnerCountthree alias varReconCountone alias varReconCounttwo alias varReconCountthree alias varStrikerCountone alias varStrikerCounttwo alias varStrikerCountthree alias varBreacherCountone alias varBreacherCounttwo alias varBreacherCountthree alias varBomberCountone alias varBomberCounttwo alias varBomberCountthree alias varMarksmanCountone alias varMarksmanCounttwo alias varMarksmanCountthree alias varScoutCountone alias varScoutCounttwo alias varScoutCountthree alias varSecSniperCountone alias varSecSniperCounttwo alias varSecSniperCountthree alias varInsSniperCountone alias varInsSniperCounttwo alias varInsSniperCountthree alias varSecSpecialistCountone alias varSecSpecialistCounttwo alias varSecSpecialistCountthree alias varInsSpecialistCountone alias varInsSpecialistCounttwo alias varInsSpecialistCountthree

The autoexec can look like this for example :
18 Comments
sirius 11 Dec, 2024 @ 1:01pm 
Yup, just figured it out :) Thank you Lino! So no one figured how to get two smoke grenades in both explosive slots?
Linothorax  [author] 11 Dec, 2024 @ 11:49am 
Hi, it needs to be a number, follow the steps in 'ID-Lists'
sirius 10 Dec, 2024 @ 9:41pm 
Can we use commands like inventory_buy_weapon on the console? Like nothing happens when I do "inventory_buy_weapon weapon_taurusjudge" (the ID exists in listtheateritems)
[R&L]Dan_Laixer 27 Jul, 2023 @ 11:24am 
Thanks a lot, I think I found what I was looking for: Source SDK BASE 2013 Multiplayer
Linothorax  [author] 27 Jul, 2023 @ 10:55am 
Hello, you can find a full example here: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/1238653345/1693785035822618184/

However it has been a while so don't know if it will still work.
[R&L]Dan_Laixer 27 Jul, 2023 @ 3:25am 
I'm trying to change the subtitles. Which version of captioncompiler.exe did you use to compile subtitles_english.txt?
JY Otaku 10 May, 2020 @ 8:45am 
i subscribed to the advanced option but seems like i forgot to subscribe to the version checking mod so i guessed thats why it didnt work but seems to be working fine now.
Thanks for the help tho
Linothorax  [author] 10 May, 2020 @ 8:12am 
JY Otaku 10 May, 2020 @ 2:19am 
i followed this guide word for word up to creating loadout/preset sections but when i join the server there is no sections for me to select the loadout preset i made what should i do?
AnormaL 20 Jul, 2018 @ 11:48am 
You can use programs like Link Shell Extension to link your workshop to custom mods in the game folder. That makes automatic update whenever workshop updates! :steammocking: