Alrighty, first tutorial to teach you how to mod Cortex Command. Since they are so easy, we will start with devices, or to call them the correct term, HDFirearms. Here is a simple definition for one, called the SMG. You can find it in Base.rte if you look around a bit.
Actually, before we go any further, here is some basic sytax.
All variable names are case sensitive and must be tabbed correctly. Thus, "Adddevice" would produce an error, as well as
AddDevice = HDFirearm
PresetName = SMG (lack of tab)
To have CC ignore a line of text, use '//' at the point at which you want CC to stop reading. Using '/*' and '*/' you can have CC ignore more than one line at a time.
So, a line reading "//AddDevice = HDFirearm" would be totally ignored, whereas a line reading "AddDevice = HDFirearm//HeldDevice" would only ignore the "HeldDevice" part. The same applies to the '/*' and '*/' tags, you simply place them around what you want CC to stop reading.
Now, on to the good stuff. After this block of text (with annotations), I'll tell you how to make your own .rte, which is how you distribute and activate/deactivate mods.
AddDevice = HDFirearm//Begins definition of a device that an actor can hold that shoots when you press the fire button PresetName = SMG//The displayed name in the buy menu, also used to refer to it in code AddToGroup = Weapons//The group to add it to, more on that later Mass = 10//How heavy the weapon is. This affects your actor's ability to fly and how far it will fly when shot out of your hands. Also, in some instances, how easily it can crush actors it flies into HitsMOs = 0//Does this weapon hit other MOs? (MOs are anything you see ingame, except terrain.) GetsHitByMOs = 1//Is this weapon affected by other MOs? If both are 0, this object will simply phase through other MOs, but it will always impact terrain SpriteFile = ContentFile FilePath = Base.rte/Devices/SMGs/SMG.bmp//Definition of where the sprite is. It always starts in the root cortex command folder, so always put the .rte of your mod unless you're drawing from one of the standard .rtes FrameCount = 2//If this sprite is animated, how many frames it has. Sprites with more than one frame must have frame numbers in the filename, so stating that the sprite name is "sprites/Grenade.bmp" and a framecount of 2 means that you must have "Grenade000.bmp" and "Grenade001.bmp" in that folder.However, if FrameCount = 1, you need not add the 000s and can just use "Grenade.bmp" SpriteOffset = Vector//This is the offset for the center of gravity for the object. It starts in the bottom right corner, and I found it is best to always set it to the center of a sprite to make measuring easier. X = -7//Negative because we are going left Y = -4//Negative because we are going up EntryWound = AEmitter//What wound should be applied when a bullet enters this object CopyOf = Dent Metal ExitWound = AEmitter//What wound should be applied when a bullet exits this object (if it went all the way through) CopyOf = Dent Metal GoldValue = 20//How much this object costs in oz, can be negative if you want to cheat. AtomGroup = AtomGroup//This is for another tutorial. It defines the collision atoms for the object. For now, leave it the same AutoGenerate = 1 Material = Material CopyOf = Military Stuff Resolution = 4 Depth = 0 DeepGroup = AtomGroup//Again, for a later tutorial. This has to do with erasing terrain. AutoGenerate = 1 Material = Material CopyOf = Military Stuff Resolution = 4 Depth = 10 DeepCheck = 1 JointStrength = 75//How strong the grip of your actor on this weapon is JointStiffness = 0.5//Not sure, I think it has to do with how much of the impulse of a shock is applied to the joint JointOffset = Vector//From the SpriteOffset, where should the primary hand be placed on the weapon? X = -3//Negative is left Y = 3//Positive is down DrawAfterParent = 0//Draw the hand after (layered on top) or before (layered underneath) this weapon? StanceOffset = Vector//Where should the weapon be moved when an actor is not in sharp mode? X = 6 Y = 5 SharpStanceOffset = Vector//Where should the weapon move to when an actor is in sharp mode? X = 7 Y = -2 SupportOffset = Vector//Where should the secondary hand be on the weapon? X = 5 Y = 4 SharpLength = 165//How far should the sharp aimer be able to extend from the weapon? Magazine = Magazine//The magazine that should be applied to this weapon CopyOf = Magazine SMG ParentOffset = Vector//Where on the weapon should the magazine be placed X = 3 Y = 1 Flash = Attachable//For a later tutorial CopyOf = Muzzle Flash SMG FireSound = Sound//A listing of sounds to use when firing. Filepath again starts in the root folder AddSample = ContentFile FilePath = Base.rte/Devices/SMGs/M1601.wav AddSample = ContentFile FilePath = Base.rte/Devices/SMGs/M1602.wav AddSample = ContentFile FilePath = Base.rte/Devices/SMGs/M1603.wav AddSample = ContentFile FilePath = Base.rte/Devices/SMGs/M1604.wav AddSample = ContentFile FilePath = Base.rte/Devices/SMGs/M1605.wav AddSample = ContentFile FilePath = Base.rte/Devices/SMGs/M1606.wav EmptySound = Sound//Sound for when the weapon is empty AddSample = ContentFile FilePath = Base.rte/Devices/EmptyClick3.wav ReloadStartSound = Sound//Sound for when the magazine is discarded and reloading begins AddSample = ContentFile FilePath = Base.rte/Devices/ReloadStart.wav ReloadEndSound = Sound//Sound for when the new magazine is placed AddSample = ContentFile FilePath = Base.rte/Devices/ReloadEnd.wav RateOfFire = 800//How many rounds should be fired a minute? Reducing the number means you can't fire as often (and the initial delay after reload is greater), raising the number lets you fire more quicker (and smaller initial delay after reload) ReloadTime = 1500//How long between the discarding of the magazine and the replacing should take FullAuto = 1//If you can hold down the fire button to continue to fire FireIgnoresThis = 1 ShakeRange = 12//How many degrees should the rounds be rotated at random coming from the muzzle SharpShakeRange = 3//Same as ShakeRange, but for when in sharp mode NoSupportFactor = 3//What to multiply the ShakeRanges when the secondary hand is destroyed ParticleSpreadRange = 3//How far the particles in a round should be spread, most useful for shotguns ShellSpreadRange = 8//How far spread the shells should be from the EjectionOffset ShellAngVelRange = 2//The variance of the rotation speed of the shells MuzzleOffset = Vector//Where the muzzle is on the gun, also off the SpriteOffset X = 10 Y = 0 EjectionOffset = Vector//Where the shells should come from, from the SpriteOffset X = 1 Y = -1 AddGib = Gib//You can just copy and modify this block as much as you want, variable names are self-explanitory GibParticle = MOPixel CopyOf = Spark Yellow 1 Count = 6 Spread = 2.25 MaxVelocity = 20 MinVelocity = 8 AddGib = Gib GibParticle = MOPixel CopyOf = Spark Yellow 2 Count = 5 Spread = 2.25 MaxVelocity = 20 MinVelocity = 8 AddGib = Gib GibParticle = MOPixel CopyOf = Drop Oil Count = 4 Spread = 2.25 MaxVelocity = 10 MinVelocity = 1 AddGib = Gib GibParticle = MOSParticle CopyOf = Gib Metal Rust Micro A Count = 6 Spread = 2.25 MaxVelocity = 15 MinVelocity = 5 AddGib = Gib GibParticle = MOSParticle CopyOf = Gib Metal Grey Micro A Count = 4 Spread = 2.25 MaxVelocity = 15 MinVelocity = 5 AddGib = Gib GibParticle = MOSRotating CopyOf = Gib Device Small K Count = 1 Spread = 2.25 MaxVelocity = 10 MinVelocity = 1 AddGib = Gib GibParticle = MOSRotating CopyOf = Gib Device Small I Count = 1 Spread = 2.25 MaxVelocity = 10 MinVelocity = 1 GibWoundLimit = 3
So, now you can copy and paste that into a txt file and rename it to "SMG.ini" or whatever and package it into a folder, renamed to "Mod.rte" or whatever (the .rte is actually in the name, it remains a folder). How do you get it to be an actual mod archive? There's not much to it. First, create another text file and name it "Index.ini". In it, place these lines:
DataModule ModuleName = MODNAME IncludeFile = Mod.rte/SMG.ini
Any more problems and you should post here.
And that's it for tutorial 1. We covered most of HDFirearms today, next time we'll get into sprites and how to totally change a weapon. Right now you can only change what applies directly to the gun, not what it shoots or the magazine.
I strongly recommend you make TONS of different SMG edits to limber up your modding skills and start on memorizing certain variable names and syntax, like PresetName or the way offsets work.
For those files, here's the topic. You may find it more helpful than I.
Azukki's Templates [http://datarealms.com/forum/viewtopic.php?f=1&t=10247]