How to spawn Magazines along with Weapons?

Dealman

New Member
I'm using rMod in order to have more weaponry on my Server, currently, I'm having most weapons spawn at Crash Sites with a higher chance of finding a weapon and a low chance for ammo - where as Wrecks have a high chance for ammo and very low for weapons. At the moment, this is working fairly nicely, it adds a whole different atmosphere!

But I'm interested in having some weapons spawn with ammo next to them, in case we'd want to change this for anotehr instance. I found this in server_monitor.sqf, I believe this is where I would achieve what I want.

Does anyone how to manipulate this code? I'm not a programmer of any kind so any help on this matter would be greatly appreciated!

Code:
if (count _intentory > 0) then {
//Add weapons
_objWpnTypes = (_intentory select 0) select 0;
_objWpnQty = (_intentory select 0) select 1;
_countr = 0;
{
_isOK = isClass(configFile >> "CfgWeapons" >> _x);
if (_isOK) then {
_block = getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
if (!_block) then {
_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
};
};
_countr = _countr + 1;
} forEach _objWpnTypes;
 
//Add Magazines
_objWpnTypes = (_intentory select 1) select 0;
_objWpnQty = (_intentory select 1) select 1;
_countr = 0;
{
_isOK = isClass(configFile >> "CfgMagazines" >> _x);
if (_isOK) then {
_block = getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
if (!_block) then {
_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
};
};
_countr = _countr + 1;
} forEach _objWpnTypes;
 
Isn't it automatic? I know when I added the M1115 it spawns in with between 0 and 3 Lapua magazines without any manipulation on my part. Does that not happen with rMod?
 
No it doesn't, but the L115 isn't banned is it? As far as I know, it's just not included in the loot table. Just like G36.
 
No it doesn't, but the L115 isn't banned is it? As far as I know, it's just not included in the loot table. Just like G36.
You are correct, but I thought rMod unbanned items. If they were truly unbanned I would think they'd spawn in the same way the normal stuff does.

You might need to shoot the rMod creator a line and ask him if he has any ideas since he would know more about how his mod works. If the magazines aren't in the loot pool it may not be possible to make them spawn alongside their weapons as normal.
 
I believe the code I posted above can be used to solve this rather nicely, but I'm not entirely sure as to how to manipulate the code.
 
I'm looking at the servermonitor.sqf, I think the section you took that from is the part that spawns instance_vehicles into the map from the database. I'm not sure that's actually loot spawning, I think that's what puts saved items back in the vehicles inventory when the server loads. My programming knowledge is 10 years old though...

Would you paste in your changes to vehicle wrecks to spawn ammo for the weapons rMod enabled? I might have an idea if you've managed to spawn multiple magazines. Do multiple mags appear in the same pile?
 
I'm looking at the servermonitor.sqf, I think the section you took that from is the part that spawns instance_vehicles into the map from the database. I'm not sure that's actually loot spawning, I think that's what puts saved items back in the vehicles inventory when the server loads. My programming knowledge is 10 years old though...

Would you paste in your changes to vehicle wrecks to spawn ammo for the weapons rMod enabled? I might have an idea if you've managed to spawn multiple magazines. Do multiple mags appear in the same pile?

They don't spawn with ammo, neither at Heli Crashes or Wrecks. :(
 
Back
Top