Tutorial: Mod Basics - BLCM/BLCMods GitHub Wiki
Note: this is an old tutorial. The information may still be useful, you will probably be better served by the new one, Tutorial: Getting Started Making Mods.
Getting Started
To begin your project, first thing you must do is have a specific goal set out for your self. For this example we will simply be adding projectiles and mag size to the Norfleet, because it wasn't OP enough already ;D.
Now to start off with you will have to have access to the Gibbed save editor, available here through here you can access gear and the names the internal system uses to address them.
The rest of the tutorial will assume you are familiar with the Basics of Gibbed.
Dumping Objects for information
Now that we have a weapon and know what we want to do with it, we get to open it up and see how the thing works. Using the command "obj dump"
followed by the barrel of the item we want to look through; the console will provide a list of all the objects attributes.
In this example we will type "obj dump GD_Weap_Launchers.Barrel.L_Barrel_Alien_Maliwan_Norfleet"
into the console window.
DON'T FREAK OUT, I know it looks like a lot of stuff but it gets easier and easier to read over time.
For our purposes we are looking for the "weapon attribute effects"
(Shown Below) this is what controls how the gun fires compared to its non unique counterpart.
Getting Object information from OpenBLCMM
OpenBLCMM includes an "Object Explorer" which can be used to view object dumps as well. Obviously its data has been pre-dumped from Borderlands, so it won't contain any changes made by mods, but it's a very useful tool to know you can use. Access it via OpenBLCMM's Tools
menu.
Modifying Attributes
When modifying Weapon attributes the easiest way to do things is to keep the various modifiers handy in a separate file, for convenience they will be provided here and can be copied into whatever text editor you are using.
The hardest part of weapon attributes, is not actually modifying them, that is easy and there will be lines provided showing what to type into your favorite text editor; the hardest part actually is not making typos, and figuring out how you messed up.
This is your only warning, YOU WILL MESS UP... A LOT.
That is okay, it wont destroy your game if you do. The most important things to remember is 2,1,3. That is an easy way to remember how many parenthesis you need to include per each weapon attribute. To show what I mean read closely through this example for a jakobs spin gun.
((AttributeToModify=AttributeDefinition'D_Attributes.Weapon.WeaponProjectilesPerShot',ModifierType=MT_PreAdd,BaseModifierValue=(BaseValueConstant=0.000000,BaseValueAttribute=AttributeDefinition'D_Attributes.WeaponManufacturer.Weapon_Is_Jakobs',InitializationDefinition=None,BaseValueScaleConstant=2.000000),((AttributeToModify=AttributeDefinition'D_Attributes.Weapon.WeaponBarrelSpinDownDuration',ModifierType=MT_PreAdd,BaseModifierValue=(BaseValueConstant=0.000000,BaseValueAttribute=AttributeDefinition'D_Attributes.WeaponManufacturer.Weapon_Is_Jakobs',InitializationDefinition=None,BaseValueScaleConstant=8.000000)))
It starts with 2 parenthesis each time you start an attribute, they will end in one, and your last attribute modifier will close with three. This ensures that all the effects will be applied correctly. Note that not all weapons will need to have the manufacturer specified.here is a file containing some basic weapon attribute modifiers
Actually Doing it :D
Now for the our super Norfleet we will be increasing the projectile count and shortening the reload speed to something a bit more Usain Bolt.
First we grab that Projectiles Per shot line from the console (or in the log file at C:\Users\Name\Documents\My games\Borderlands 2\WillowGame\Logs
) And Change it up a wee bit
type this in to start:
set GD_Weap_Launchers.Barrel.L_Barrel_Alien_Maliwan_Norfleet WeaponAttributeEffects(2)=(AttributeToModify=AttributeDefinition'D_Attributes.Weapon.WeaponProjectilesPerShot',ModifierType=MT_PreAdd,BaseModifierValue=(BaseValueConstant=2.000000,BaseValueAttribute=None,InitializationDefinition=None,BaseValueScaleConstant=1.000000))
now lets take out that "(2)=
" and change the base value constant to something a little better, like 15
set GD_Weap_Launchers.Barrel.L_Barrel_Alien_Maliwan_Norfleet WeaponAttributeEffects ((AttributeToModify=AttributeDefinition'D_Attributes.Weapon.WeaponProjectilesPerShot',ModifierType=MT_PreAdd,BaseModifierValue=(BaseValueConstant=15.000000,BaseValueAttribute=None,InitializationDefinition=None,BaseValueScaleConstant=1.000000)))
yeah that's better, now lets do the same for the mag size
set GD_Weap_Launchers.Barrel.L_Barrel_Alien_Maliwan_Norfleet WeaponAttributeEffects ((AttributeToModify=AttributeDefinition'D_Attributes.Weapon.WeaponClipSize',ModifierType=MT_Scale,BaseModifierValue=(BaseValueConstant=9.000000,BaseValueAttribute=None,InitializationDefinition=None,BaseValueScaleConstant=1.000000)))
Now It's Done :D
There will be more info coming to the wiki but the best way to learn is by exploring yourself, happy modding Vault Hunters