VLM is a revisal of the armor and weapons used in Mass Effect 2, granting the player access to all available weapons and more...

Report RSS Weapon Categories and Load-out's

An overview of the programming behind the revised load-outs in VLM, with instructions on how to make your own changes...

Posted by on - Intermediate Client Side Coding

I n this tutorial I will be discussing how the load-out changes were made in the mod VLM for those of you who want to make either your own changes or merely wanting to know more about how it works. During this tutorial I will be referring to an installed copy of VLM version 1.1, which can be found here. I am presuming you know how to open the files and other basic stuff, I will be only talking about the code itself.

Mass Effect 2 Mod Manager Support

The load-out changes in VLM group weapons by class, rather than by type, so that a player or squad-mate could cary any weapon in that class in a particular weapon slot, rather than just one particular type. For example: where a player could chose to pick a sniper rifle from the load-out screen, now the player could also choose to carry an assault file or shotgun in the same 'slot' instead.

Weapon Categories

The first set of code under the heading [SFXGame.SFXPlayerSquadLoadoutData] is the weapon categories to which weapons are assigned to. These categories are what show up in the in-game user interface and by default include the following:

  • AssaultRifles
  • Shotguns
  • SniperRifles
  • AutoPistols
  • HeavyPistols
  • HeavyWeapons

The weapons contained in these categories by default should be fairly obvious, with the "HeavyWeapons" caterogy for example containing weapons such as the grenade launcher, rocket launcher and basically every other heavy weapon. An example entry looks like the following:

HeavyWeapons=(ClassName="SFXGameContent_Inventory.SFXHeavyWeapon_GrenadeLauncher")

The above code is essentially referencing the weapon (indicated by the class name) to a category, so effectively its saying: HeavyWeapon = GrenadeLauncher etc. So if you wanted the grenade launcher to show up in the UI category for say... auto pistols, then it would need to be AutoPistols = GrenadeLauncher, and the code would look like the following:

AutoPistol=(ClassName="SFXGameContent_Inventory.SFXHeavyWeapon_GrenadeLauncher")

The changes made here are only UI based, so the weapon wont magically be carried on your character where pistols are carried, but as the same place it was before making the change.

In the below two sets of code you can see the difference between stock Mass Effect 2 and VLM. I will be explaining the actual changes in a second.
Stock

AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_AutoPistol")
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_SMG",UnlockPlotID=Wpn_AutoPistol2)
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HeavyPistol")
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HandCannon",UnlockPlotID=Wpn_HeavyPistol2)

VLM

AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_AutoPistol")
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_SMG",UnlockPlotID=Wpn_AutoPistol2)
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HeavyPistol")
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HandCannon",UnlockPlotID=Wpn_HeavyPistol2)
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_AutoPistol")
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_SMG",UnlockPlotID=Wpn_AutoPistol2)
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HeavyPistol")
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HandCannon",UnlockPlotID=Wpn_HeavyPistol2)

Ok so the noticeable change you should see is that both categories contain the weapons of each other category, so for instance the auto pistols category now contains both all the auto pistols and the heavy pistols. There is no limit to how many weapons you could assign to a category, but remember a player or squad mate can only carry one of each weapon, so you can only carry one shotgun, even if you picked a different one multiple times in different categories. This is because the character model has specific placement shots for weapons, and for sake of argument if we say all shotguns are "slot 3" then even though a shotgun is now referred to as a Heavy Pistol, it is still a "slot 3" weapon and only one weapon of any type can be carried in this slot.

Load-outs

Now that the changes to the weapon categories have been made, its now time to adjust the actual load-outs themselves. Please refer to the below code:

PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerAdept,WeaponClasses=(LoadoutWeapons_HeavyPistols,LoadoutWeapons_AutoPistols,LoadoutWeapons_HeavyWeapons))
PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerEngineer,WeaponClasses=(LoadoutWeapons_HeavyPistols,LoadoutWeapons_AutoPistols,LoadoutWeapons_HeavyWeapons))
PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerSoldier,WeaponClasses=(LoadoutWeapons_AssaultRifles,LoadoutWeapons_Shotguns,LoadoutWeapons_HeavyPistols,LoadoutWeapons_SniperRifles,LoadoutWeapons_HeavyWeapons))
PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerSentinel,WeaponClasses=(LoadoutWeapons_HeavyPistols,LoadoutWeapons_AutoPistols,LoadoutWeapons_HeavyWeapons))
PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerInfiltrator,WeaponClasses=(LoadoutWeapons_HeavyPistols,LoadoutWeapons_AutoPistols,LoadoutWeapons_SniperRifles,LoadoutWeapons_HeavyWeapons))
PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerVanguard,WeaponClasses=(LoadoutWeapons_HeavyPistols,LoadoutWeapons_AutoPistols,LoadoutWeapons_Shotguns,LoadoutWeapons_HeavyWeapons))

You'll note that there is multiple declarations of PlayerLoadoutInfo, these each refer to the second declaration which player class they are relating to, such as the Infiltrator Class. Towards the end of each line of code you will see the statement Weapon-Classes, with in brackets being the weapon classes that the particular player class can equip. An Infiltrator can by default carry Sniper Rifles, Auto Pistols, Heavy Pistols and of course Heavy Weapons. If we were to give Infiltrators the ability to say... carry an assault rifle then we would simply change the code to as following:

PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerInfiltrator,WeaponClasses=(LoadoutWeapons_AssaultRifles,LoadoutWeapons_HeavyPistols,LoadoutWeapons_AutoPistols,LoadoutWeapons_SniperRifles,LoadoutWeapons_HeavyWeapons))

With the above changes the Infiltrator could now carry an Assault Rifle, as well as all the previous weapons they could already carry.

When you look at squad-mates you'll note a similar set of code to the above. In a way each squad-mate can just be thought of as a different player class from a programming point of view.

HenchLoadoutInfo=(ClassName=SFXPawn_Garrus,WeaponClasses=(LoadoutWeapons_AssaultRifles,LoadoutWeapons_SniperRifles))

There is basically no difference between the declaration of player load-outs and squad loud-outs, bar the exception of the initial declaration being "HenchLoadoutInfo", not "PlayerLoadoutInfo" and the Class name instead referring to the squad character (in this case Garrus) rather than a playable class.

Combining Light Weapons

Ok now is a quick run-through of how the above two sections tie together when making the simple change of merging the Auto Pistols and Heavy Pistols categories in the UI to be just one category.

In the first section I showed the below code, which is basically adding weapons from each category to the other.

AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_AutoPistol")
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_SMG",UnlockPlotID=Wpn_AutoPistol2)
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HeavyPistol")
AutoPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HandCannon",UnlockPlotID=Wpn_HeavyPistol2)
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_AutoPistol")
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_SMG",UnlockPlotID=Wpn_AutoPistol2)
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HeavyPistol")
HeavyPistols=(ClassName="SFXGameContent_Inventory.SFXWeapon_HandCannon",UnlockPlotID=Wpn_HeavyPistol2)

For compatibility purposes it makes more sense to use the default category names rather than say "LightWeapons".

Next we need to make the change to the player load-out:

PlayerLoadoutInfo=(ClassName=SFXPawn_PlayerInfiltrator,WeaponClasses=(LoadoutWeapons_AutoPistols,LoadoutWeapons_SniperRifles,LoadoutWeapons_HeavyWeapons))

In the above code I've essentially removed the "HeavyPistols" category from being declared.

Next step is a squad-mate...

HenchLoadoutInfo=(ClassName=SFXPawn_Garrus,WeaponClasses=(LoadoutWeapons_AutoPistols,LoadoutWeapons_AssaultRifles,LoadoutWeapons_SniperRifles))

In this example I've now given Garrus the ability to carry Auto Pistols, which is a front for the new Light Weapons Category created earlier.

There you have it! Both Auto Pistols and Heavy Pistols are now part of a single category for the player and Garrus, you should end up with something similar to the below screenshot. You can take extra steps to replicate this change for all squad-mates or do something similar for Assault Rifles, Shotguns and Sniper Rifles as done in VLM.

Loadout Screen - Available Loadouts

Considerations...

There are a few things to consider when making the above changes:

  • Firstly if you remove the default category names in a squad-mates load-out then they will not know the default weapon to carry during the game. An example would be if removing the category names for Jacob then you might meet him at the start of the game wielding two or more sniper rifles for example. The solution to this problem is to keep as many categories default where possible, or at least keep the first declared category using the default so the correct default weapon will show.
  • Secondly as I mentioned earlier, you cannot assign the same weapon to different categories and equip either it twice or one of the same type of weapon twice. So the best solution is that you keep weapons of a particular type confined to one slot and don't declare individual weapons more than once for a particular weapon category carried by a player class or squad-mate.
  • Finally, if you remove the default weapon a squad mate is supposed to be using from its default category then it will instead pick last declared weapon. So to preserve the default load-outs of squad-mates, try not to rename or remove weapons. In some situations it could also even lead to a game crash.
Comments
ZilverZamp
ZilverZamp

I was trying to just "unlock" the class restrictions of weapons, but no matter what change I do, ME2 wont fire. I just get an error. Do I have to change everything in order for that to work?(VLM style)

Reply Good karma Bad karma+1 vote
Vetron Author
Vetron

I've answered your other comment on the front page.

If your getting ME2 not launching that means you need to essentially 'fix' the Coalesced.ini before ME2 will launch. If you make your changes in the mod manager with the ini editor or load in your custom Coalesced.ini file after making changes then ME2 should launch without error, providing there's no programing errors etc.

For the sake of reference for other users reading this comment - here is a copy of my comment I replied with on the front page as to how to load an edited Coalesced.ini into the mod manager.

"To do this simply install VLM as usual and then fire up the included mod manager. In the Mod manager Click on the second tab, "INI editor". Click Load --> "Other Ini" and select your modded Coalesced.ini. After loading the file simply click "Create Mod" and give it an appropriate name.

If you then restart the mod manager or refresh the mod list it should then load up on the list with the name you gave it.

If your custom .ini doesn't mod any of the sections required by VLM mods, then you can activate both at same time and it will work fine. If not you'll just have to make some manual changes to make it work."

Reply Good karma+1 vote
ZilverZamp
ZilverZamp

Cool, thanks :D!!!

Reply Good karma Bad karma+1 vote
GaussMonger
GaussMonger

How do i modify the settings if i wanted to equip all the weapons types?

Reply Good karma Bad karma+1 vote
Vetron Author
Vetron

Basically you need to declare each weapon category for a player load-out. The lines you need to edit are the "PlayerLoadoutInfo" ones and "HenchLoadoutInfo" too if you wish.

Heres an example for the infiltrator load-out...

PlayerLoadoutInfo= (ClassName=SFXPawn_PlayerInfiltrator, WeaponClasses= (LoadoutWeapons_AssaultRifles, LoadoutWeapons_HeavyPistols, LoadoutWeapons_AutoPistols, LoadoutWeapons_SniperRifles, LoadoutWeapons_Shotguns, LoadoutWeapons_HeavyWeapons))

^ Basically your just adding or removing the "WeaponClasses" from the "PlayerLoadoutInfo". If you wanted every weapon equipped then you simply add all of them. Hope this helps.

Reply Good karma+2 votes
GaussMonger
GaussMonger

So, I have to copy what you wrote into the mod manager? or coalesced.ini?

Reply Good karma Bad karma+1 vote
!KICKASS!
!KICKASS!

is there any possible way to spawn your player with more than 3 weapons?

Reply Good karma Bad karma+1 vote
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

qaskew24
qaskew24

Have you or anyone modded the laser off the phalanx in ME2

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Mass Effect 2
Creator
Vetron
Contact
Send Message
Release date
Mod watch
Follow
Tutorial
Browse
Tutorials
Report
Report
Share
Related Mods
Related Games
Mass Effect 2
Mass Effect 2 Role Playing