Today's lesson is #4, how to make Attachables and AEmitters.

First up, Attachables. Why them first? Because they're easy.
Attachables are useful, especially in editing Actors, for armor plating, but you can do much more than you may think with them. Special Attachables are found in Actor definitions for legs, arms, heads, feet and hands, and on Craft and Doors. Basically, anything you see that has a hinge on an MO is likely an attachable.

To make a MOSRotating into an Attachable, you need only add 3 extra lines, or rather one extra statement and two lines, and change the opening line.

AddEffect = Attachable
	PresetName = Basic Attachable
	Mass = 1
	Sharpness = 0
	HitsMOs = 0
	GetsHitByMOs = 0
	SpriteFile = ContentFile
		FilePath = Base.rte/Null.bmp
	FrameCount = 1
	SpriteOffset = Vector
		X = 0
		Y = 0
	AtomGroup = AtomGroup
		AutoGenerate = 1
		Material = Material
			CopyOf = Air
		Resolution = 1
		Depth = 0
	DeepGroup = AtomGroup
		AutoGenerate = 1
		Material = Material
			CopyOf = Air
		Resolution = 1
		Depth = 1
	DeepCheck = 0
	AddGib = Gib
		GibParticle = MOSParticle
			CopyOf = Fire Puff Small
		Count = 3
		Spread = 3.14
		MaxVelocity = 10
		MinVelocity = 4
		InheritsVel = 1
	JointOffset = Vector
		X = 0
		Y = 0
	JointStrength = 1000
	JointStiffness = 0.5

As you can see, we changed the first line from "AddAmmo = MOSRotating" to "AddEffect = Attachable" and added some lines to the bottom.

And that's pretty much it for Attachables. One last thing, to attach an Attachable to another MO (must be MOSRotating or higher, including other Attachables), use the following code block.
	AddAttachable = Attachable
		CopyOf = Basic Attachable
		ParentOffset = Vector
			X = 0
			Y = 0

This will attach the Attachable at 0,0 on the parent MO, or right on the SpriteOffset.

Now, AEmitters, perhaps the single coolest MO of Cortex Command, barring the ones you can control.
An AEmitter is pretty much just a MOSRotating that can emit stuff, so it looks very similar.

AddEffect = AEmitter
	PresetName = Basic AEmitter
	Mass = 1
	HitsMOs = 0
	GetsHitByMOs = 0
	SpriteFile = ContentFile
		FilePath = Base.rte/Null.bmp
	FrameCount = 1
	SpriteOffset = Vector
		X = 0
		Y = 0
	AtomGroup = AtomGroup
		AutoGenerate = 1
		Material = Material
			CopyOf = Air
		Resolution = 1
		Depth = 0
	GibImpulseLimit = 0.000001

	AddEmission = Emission
		EmittedParticle = MOSParticle
			CopyOf = Basic MOSParticle
		ParticlesPerMinute = 6000
		BurstSize = 1
		Spread = 0
		MaxVelocity = 0
		MinVelocity = 0
		PushesEmitter = 0
		StartTimeMS = 100
		StopTimeMS = 1000
	EmissionEnabled = 1
	EmissionsIgnoreThis = 1
	BurstSize = 1
	BurstScale = 1
	BurstTriggered = 1
	BurstSpacing = 500
	EmissionDamage = 0
	FlashOnlyOnBurst = 0

As you can see, there is quite a few things to talk about in the block offset from the rest of the definition. So, let's get to it.

Outside that block is more variables for controlling various bits of the AEmitter.

And that is only the tip of the iceburg for AEmitters. You can do some pretty crazy stuff with them, but for now that is enough. Take a look inside the basegame files for examples, especially the flak cannon and Coalition rocket launcher.