

The X2Item_ModExample_Weapon.uc its the one that takes care of defining the weapon template than then gets created by the game You could add an item only when a campaign is started by doing that code in the InstallNewCampaign function. This code takes care of finding the Template for the ModWeapon(a template contains the data relevant to a item, like the mesh it uses, or the damage, its what we are going to edit) NewXComHQState.AddItemToHQInventory(ItemState) `

Add the newly created item to the HQ inventory ItemState = ItemTemplate.CreateInstanceFromTemplate(NewGameState) Instantiate a new item state object using the template. ItemTemplate = ItemMgr.FindItemTemplate('ModWeapon_CV') The most important code its this //Make the changes to the HQ state. The X2DownloadableContentInfo_ExampleWeapon.uc file its the information of the mod, it can be called on a few different events, but the example uses OnLoadedSavedGame(), where it adds the weapon to the HQ inventory.
Download xcom 2 sdk mod mod#
The meat of the mod its the 2 script files, under Src/WeaponMod/Classes. The default config files in the weaponmod project just "link" to the WeaponMod mod so its identified. So if your mod its only config file edits, you can do those edits here and they will be added. If you add something here, when you add the mod it will be loaded by the engine. In the config folder you have some edits to the global configuration projects. But the other one, its the one that has the assets for the gun.

upk files, you can ignore the ModShaderCache one, that one its automatically generated and not even needed.
Download xcom 2 sdk mod how to#
That project its an example on how to add a rifle, with custom models. Explanation of WTF is the stuff in the WeaponMod project We are going to ignore it and create our own sword. The WeaponMod template adds a machinegun to the game, as a new type of weapon. That one will teach you how to setup your visual studio and create the project.
Download xcom 2 sdk mod install#
After the 66 gigabyte install its finished, then you will have an special version of xcom from the normal game, this one its unpacked and has all the scripts and data needed to change them, alongside the full unreal engine editor, albeit its the modified Xcom2 version.įollow the quickstart documentation at \XCOM 2 SDK\Documentation You need to have xcom 2 installed to be able to install them. Setting up your modįirst of all, you have to download the Xcom2 development tools in steam, wich are under the software category on your library. On this page ill explain how it works, and how can you create your own weapon, it doesnt have to be a sword, it can be ANY weapon of the game. This sword has more armor penetration than the best xcom2 sword, wich makes it a clear improvement(The creation of this mod was for fun and for experimentation, it was never the goal to actually do a balanced weapon). This mod adds a light sword to xcom, inspired by star wars, and the sword has its own stats, different from other weapons. Light sword xcom2 mod, with tutorial on how to create your own custom weapons.
