-
Notifications
You must be signed in to change notification settings - Fork 9
Weapon Config (and MasterConfig.cs)
Your weapon configuration is where everything comes together.
It starts with the stuff you shouldn't really touch:
using static WeaponThread.WeaponStructure;
using static WeaponThread.WeaponStructure.WeaponDefinition;
using static WeaponThread.WeaponStructure.WeaponDefinition.HardPointDef;
using static WeaponThread.WeaponStructure.WeaponDefinition.ModelAssignmentsDef;
using static WeaponThread.WeaponStructure.WeaponDefinition.HardPointDef.HardwareDef.ArmorState;
using static WeaponThread.WeaponStructure.WeaponDefinition.HardPointDef.Prediction;
using static WeaponThread.WeaponStructure.WeaponDefinition.TargetingDef.BlockTypes;
using static WeaponThread.WeaponStructure.WeaponDefinition.TargetingDef.Threat;
namespace WeaponThread {
partial class Weapons {
This simply initiates the file and tells the code where stuff is supposed to be. Don't worry too much about it.
After that is the first part of the file that you will edit, to make it unique:
WeaponDefinition YourUniqueWeaponName => new WeaponDefinition {
YourUniqueWeaponName
is, simply, a unique name for YOUR weapon. Some typical naming conventions:
-
WL_AutoCannonSmall
-
KR_SuperLaserBlaster
-
HS_MissileLauncher
Tip: name your weapon file the same as YourUniqueWeaponName, to keep things clean
namespace WeaponThread
{
partial class Weapons
{
internal Weapons()
{
// file convention: Name.cs - See Example.cs file for weapon property details.
//
// Enable your config files using the follow syntax, don't include the ".cs" extension:
// ConfigFiles(Your1stConfigFile, Your2ndConfigFile, Your3rdConfigFile);
ConfigFiles(YourUniqueWeaponName);
}
}
}
Very straightforward, and if you followed that tip above, you should simply haveConfigFiles(YourUniqueWeaponName)
- since YourUniqueWeaponName is the definition and the file name, causing no issues.
With all that out of the way, you can look to the sidebar for more specific help, or pick one of the links below
If you have suggestions or implementations, please raise them in the Discord! Thank you!
Please donate to DarkStar's Patreon!
WeaponCore Quick Links
Weapon Properties (Page in Progress)
Multi-Turret Creation (Page in Progress)
Weapon - Targeting & Hardpoint
Weapon - Critical Reactions/Warheads
Weapon - Minimal Configurations
Ammo - Electronic Warfare System (EWAR)
Ammo - Guidance System (Homing, Mines, Self-Guided)
Armor System (Page in Progress)