3. Modifying your first weapon - Paneedah/VMW-Balance-Packs GitHub Wiki
Modifying individual weapons finally made simple! But remember, you are pretty limited in terms of what you can do currently.
- We can only play with
enabled,damageandrecoil.
But that's enough for this basic tutorial.
So.. where do I start?
You start by adding gunConfigurations to your balance pack! Don't worry, it's easy.
- For simplicity, I will not be using any globalparameters.
An example for editing the M4A1 with balance packs:
{
"packName": "PandaPack",
"version": "1.0",
"packManagerVersion": "1.0",
"gunConfigurations": [
{
"name": "m4a1",
"enabled": true,
"damage": 5.0,
"recoil": 0.7
}
]
}
It looks confusing! I know. But let's break it down.
The gunConfigurations will contain all of your, well, "gun configurations". You will put each individual gun configuration inside of here. So, what does the above configuration do..?
name: "m4a1"specifies which weapon we are trying to modify. It is an identifier, otherwise, how would the code know which weapon to modify!?enabled: truesetting this to 'true' is redundant. I am showing it here for demonstration reasons, personally, I wouldn't include it if you want to change stats of a weapon (only include it if you're setting it to false).damage: 5.0sets the damage of the M4A1 to 5.recoil: 0.7sets the recoil of the M4A1 to 0.7.
So how would I go around modifying multiple weapons at a time?
That is a lot easier than you think. Here is an example:
{
"packName": "PandaPack",
"version": "1.0",
"packManagerVersion": "1.0",
"gunConfigurations": [
{
"name": "m4a1",
"enabled": true,
"damage": 5.0,
"recoil": 0.7
},
{
"name": "ak15",
"enabled": false
}
]
}
So, what does this do?
Modifies two weapons! I kept the M4A1 the same, so it still does the same thing as mentioned above in this page. However, it now also modifies the AK-15 by disabling it.
Setting enabled to false simply disables a weapon and makes it unobtainable / unusable in-game.