_______________________________________________________________________ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adding Armors:by Drumstix42 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- --- --- --- --- --- --- --- - _______________________________________________________________________ STEP #1: ----- -------------- Player.cs -------------- ----- 1a) You'll first need to make your Armor's properites such as when you define a weapon's attributes. You'll need to copy one of the 3 player Datablocks, either the light, medium, or heavy. Their datablocks are pretty long. Do a search for either: LightPlayerDamageProfile MediumPlayerDamageProfile or HeavyPlayerDamageProfile It's best to find out its starting line# and last line# of its datablock first. Now go ahead and copy one of these datablocks. It's usually easiest to keep the same sized armors around each other. So if you copied the 'LightPlayerDamageProfile' Datablock, just paste it right under it. It's also best to keep spaces between what you pasted and what was already there. This keeps things easier to find. There are one or two things you can change, one of them being manditory. For now, I'll just assume you copied the Light armor. This first line is what you'll need to change: datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile The part you have to change is the: (LightMaleHumanArmor) All you have to do is give a new name, replacing Light with anything you'd like to name your armor. The second thing you can change is if you'd like your new armor to have its own damage profile. This meaning you'd be able to have your new armor have different damage properites compared to the Light armor: : LightPlayerDamageProfile As before, you would replace Light with your armor's name. If you would your new armor to have the same damage properties at the light, you would then leave it as is. There are many variables that you can change in your new armor such as speed, energy use, heat multipler, and it's load out which is most important. Your new armor's load out capabilitescan be found under and some above: // Inventory restrictions Above thats part are 3 lines: maxWeapons = 3; // Max number of different weapons the player can have maxGrenades = 1; // Max number of different grenades the player can have maxMines = 1; // Max number of different mines the player can have Each line is pretty self explanitory. This shows this armor can hold 3 different weapons, 1 type of grenade, and 1 type of mine. Under the '//Inventory restrictions' are the lines that tell if an armor can have a weapon and how much ammo and if it can carry a pack or deployable. For weapons/ packs/deployables, 1 means it can carry it, and 0 means it can't. Then for ammo, the number represents the ammo amount. Like said, pretty simple. 1b) Next, we have to make sure your new armor can be used as a BioDerm and as a Female. If we don't, BAD things will happen. So, we now scroll down passed all the armor datablocks and we reach the smaller datablocks of BioDerm and Females. Still assuming we're doing a light class armor we would copy the Female Datablock: //---------------------------------------------------------------------------- datablock PlayerData(LightFemaleHumanArmor) : LightMaleHumanArmor { shapeFile = "light_female.dts"; waterBreathSound = WaterBreathFemaleSound; jetEffect = HumanMediumArmorJetEffect; }; And paste it right under as before. You then change where it says Light twice on the first line, to the name of your armor. Next, we scroll down past the females and reach the BioDerms. Before each BioDerm datablock, there are BioDerm foot prints datablocks which we should just ignore. Copy the LightBioDerm datablock: datablock PlayerData(LightMaleBiodermArmor) : LightMaleHumanArmor { shapeFile = "bioderm_light.dts"; jetEmitter = BiodermArmorJetEmitter; jetEffect = BiodermArmorJetEffect; debrisShapeName = "bio_player_debris.dts"; //Foot Prints decalData = LightBiodermFootprint; decalOffset = 0.3; waterBreathSound = WaterBreathBiodermSound; }; And paste it right under. Once again, changing the Light twice in the first line to your armors name. Now done the hardest part of adding an armor to your mod, you may now save player.cs and exit! STEP #2: ----- -------------- damageTypes.cs -------------- ----- ~**!Most Importantly: This Step is ONLY needed, if you decided you want yournew armor to have it's own damage profile!**~ Scroll all the way to the bottom of the file where the Armor damage profiles are kept: // PLAYER DAMAGE PROFILES I would then copy the LightPlayerDamageProfile and paste it right under as usual: datablock SimDataBlock(LightPlayerDamageProfile) { damageScale[$DamageType::Blaster] = 1.3; damageScale[$DamageType::Bullet] = 1.2; damageScale[$DamageType::ELF] = 0.75; damageScale[$DamageType::ShockLance] = 1.0; .....all the way down to..... damageScale[$DamageType::Ground] = 1.0; damageScale[$DamageType::Explosion] = 1.0; damageScale[$DamageType::Lightning] = 1.0; }; And if your catching on, you would change the Light in '(LightPlayerDamageProfile)' to your armors name, just as we did in player.cs if you changed it to have its own damage profile. For now, just leave all the numbers the same, for you can come back later when you want to ajust it's damage properties. Now, save your file and exit. On to the next step! STEP #3: ----- -------------- inventoryHud.cs -------------- ----- In this step we will put in very simple code to make your new armor show up on the inventory hud in-game. This step is very simple. First scroll down a little to about line# 20. Here you see a simple list of existing armors: $InvArmor[0] = "Scout"; $InvArmor[1] = "Assault"; $InvArmor[2] = "Juggernaut"; And right under that we see another list: $NameToInv["Scout"] = "Light"; $NameToInv["Assault"] = "Medium"; $NameToInv["Juggernaut"] = "Heavy"; The first list we see tells the game what text to show in the hud. The second list takes the text and tells the game what the armor really is. Ass you can see each list does this. It prints Scout in the list, and works of the 'Light' datablock. Now to add your armor is quite simple. It's usually good to keep the armor sizes in order. So lets make our lists look like this: $InvArmor[0] = "Scout"; $InvArmor[1] = "ARMOR's TEXT TO APPEAR GOES HERE"; $InvArmor[2] = "Assault"; $InvArmor[3] = "Juggernaut"; $NameToInv["Scout"] = "Light"; $NameToInv["ARMOR's TEXT TO APPEAR GOES HERE"] = "NAME OF ARMORS DATABLOCK"; $NameToInv["Assault"] = "Medium"; $NameToInv["Juggernaut"] = "Heavy"; And that's all for inventoryHud.cs. Exit and Save! STEP #3: ----- -------------- Player.cs -------------- ----- I'm not to sure what this does besides tell the game how long your armors name is. Anyway, do a search for this: function Player::getArmorSize(%this) The part we're looking at is this: if (getSubStr(%dataBlock, 0, 5) $= "Light") return "Light"; else if (getSubStr(%dataBlock, 0, 6) $= "Medium") return "Medium"; else if (getSubStr(%dataBlock, 0, 5) $= "Heavy") return "Heavy"; else return "Unknown"; All we need to do is add in your armor and make the second number 0, ?) equal how many letters your armor is. For an example, lets say your armors name is Dominion, your code would then look like this: else if (getSubStr(%dataBlock, 0, 8) $= "Dominion") return "Dominion"; And all together, like this: if (getSubStr(%dataBlock, 0, 5) $= "Light") return "Light"; else if (getSubStr(%dataBlock, 0, 6) $= "Medium") return "Medium"; else if (getSubStr(%dataBlock, 0, 5) $= "Heavy") return "Heavy"; else if (getSubStr(%dataBlock, 0, 8) $= "Dominion") return "Dominion"; else return "Unknown"; And that's it! You've now hopefully adding a new armor to your mod. Congradulations! And good luck.