Support | News | Classic | F.A.Q. | Discord | Discussions | Wiki | Roadmap
  • 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!

example mod

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?

Fancy

Oh lol, I just realised I made a fatal flaw in the example mod/guide
hang on a tick

    fixed

      somebody toucha ma weapon controller

      So who will make their mods compatible with Automation++ weapon controller?

      RedAndCosmoteer ooh me, me me!

      23 days later

      in what way is it modified suspiciuon intensified

      DanielTheMooCow this is just meant to show people how to make their weapons compatible.

      Catelyn the modified laser

        Catelyn i wont download an example mod that has one unkown weapon on it

          DanielTheMooCow sigh the mod is just an example of how to do it

            DanielTheMooCow as an example

              DanielTheMooCow argh that is the normal laser blaster with some slight adjustments to show how to make your stuff compatible, this isn't a mod for the normal players, this is a mod for other modmakers.

                DanielTheMooCow The modified laser blaster is a regular laser blaster that is modified so that it works with Automation ++'s weapon controller. That's the modification!

                  DanielTheMooCow suspiciuon intensified

                  This is the grammar police. That word is spelt "suspicion".

                  (and yeah, everyone else is right. The mod is for modders)

                  DanielTheMooCow It's literally a vanilla laser blaster but modified to make it compatible with automation++, the main mod already does that.

                    Ultranova spelled wrong on purpose cause i have grammerly

                    17 days later

                    where is download for up to date automation++