- Edited
Hello!
So, the new update for Automation ++ (Auto ++) is comming out soon, including the complete weapons extension. I also wanted to share this simple guide to allow you to make your own Automation ++ compatible weapons. I've tried to make the process as easy and hassle free as possible. I grantee your mod will be completely unaffected by these changes, and will still work as normal even without Automation ++ installed. I've also included an example mod, which includes a modified small laser blaster, which is Automation ++ compatible. So, let's get started!
Step 1
First off, you'll want to locate the PartCrew
component in your part, and rename it RealPartCrew
. We are renaming it, because we are going to be replacing the PartCrew component with a multitoggle, so the weapon will function with the weapon controller and crew. Next, add these components to your part:
WeaponControllerBuffToggle
{
Type = BuffToggle
BuffType = AutoWeaponsEnable
}
PartCrew
{
Type = MultiToggle
Toggles = [WeaponControllerBuffToggle, RealPartCrew]
Mode = Any
}
You can see the new PartCrew
component is a MultiToggle
which will be toggled by either the WeaponControllerBuffToggle
or RealPartCrew
components. Since it is named PartCrew
, any past reference to the PartCrew
toggle will treat the MultiToggles
state as the PartCrew
's state. Therefore, you will not need to change any other components. Neat eh?
Step 2
You'll also want to add
ReceivableBuffs = [AutoWeaponsEnable]
to your part definition file. This will allow the part to recieve AutoWeaponsEnable
buffs, and therefore be controlled by a weapon controller. If you forget this, the weapon will not function despite the presence of an weapon controller. Repeat steps 1 - 2 for each weapon.
Step 3
At this point, your weapon should work with a weapon controller or with standard crew control. However, there is one problem with your mod at the moment. Should Automation ++ be disabled, or not installed at all, the game will crash if your mod is loaded. This is because the weapon requires the AutoWeaponsEnable
buff to exist, in order to be loaded. Since Automation ++ has this buff, when it is disabled, the weapon fails to load. As much as it would be great for me to get cheap downloads because people need Automation ++ to use a mod, it probably isn't so great for you.
To fix this, we'll have your mod include it's own copy of the buff. Simply add in a new action to your mod.txt file to add the required buff:
{
Action = Overrides
OverrideIn = "<buffs/buffs.txt>"
Overrides
{
AutoWeaponsEnable
{
CombineMode = Max
Icon
{
Texture
{
File = "buff_enable.png"
MipLevels = 2
SampleMode = Linear
}
Size = [2, 2]
}
RectBorderColor = [0, 255, 84, 160]
RectFillColor = [0, 255, 84, 64]
IconTextFormatKey = "Misc/Null"
}
}
}
Also be sure to include the buff_enable.png
texture file and the IconTextFormatKey
in your mod. These can both be found in the example mod.
Step 4
Be sure to test your mod before releasing it as an update! If you have any troubles when following this guide, tell me immediately and I will fix any problems. Also look at the example mod if you are having any troubles. Thanks!
oh, and I should probably just put this thing here:
creative commons 3.0 license, yadda yadda, yadda, you can use this stuff so long as you own up to it, we done yet?