AlphaTaylor

how do i Remove Bullet cam from spawning with weapons ?

12 posts in this topic

i removed bullet cam from traders and loot spawns but they still spawn via weapon spawns

because of

if (count(_magazineClassNames) > 0) then
                        {
                            _magazineClassName = selectRandom _magazineClassNames;
                            _numberOfMagazines = 2 + floor(random 3); 
                            _lootHolder addMagazineCargoGlobal [_magazineClassName, _numberOfMagazines];
                            _spawnedItemClassNames pushBack _magazineClassName;
                        };

 

i would like to remove the bullet cam from spawning anywhere

Share this post


Link to post
Share on other sites

Hello @AlphaTaylor

It SHOULD be an easy fix.  Search for where ' _magazineClassNames ' is being defined.  There, you will see all the mag names.  Just find the Cam mag and remove it from the list!

You MIGHT be able to do this as well thru the 'over write' section of Exile.  If this file is on the server side, I would do what I listed above.  However, if the mags are defined on the client side, you WILL have to use the 'over write' to do this.

Either way, it is a simple and fairly quick fix!

:)

Share this post


Link to post
Share on other sites
Advertisement
14 hours ago, Z80CPU said:

However, if the mags are defined on the client side, you WILL have to use the 'over write' to do this.

Wich won't work in this case, cuz the magazines are listed in the client side configfile (config.bin).

What you could try, i didn't tested it yet but basically something like that:

 

	case 2: 	
				{ 
					_lootHolder addWeaponCargoGlobal [_itemClassName, 1]; 
					if !(_itemClassName isKindOf ["Exile_Melee_Abstract", configFile >> "CfgWeapons"]) then
					{
						_magazineClassNames = getArray(configFile >> "CfgWeapons" >> _itemClassName >> "magazines");
						if (count(_magazineClassNames) > 0) then
						{
							_magazineClassName = selectRandom _magazineClassNames;
							_numberOfMagazines = 2 + floor(random 3); 
							
							if !(_magazineClassNames isEqualTo "Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag" OR "X" OR "Y" OR "Z") then
							{
							_lootHolder addMagazineCargoGlobal [_magazineClassName, _numberOfMagazines];
							_spawnedItemClassNames pushBack _magazineClassName;
							};
							
						};
					};
					_numberOfItemsToSpawn = -1;
				};

 

  • Like 1

Share this post


Link to post
Share on other sites

Well, you CAN 'un-bin' the file, but the overwrite would not work in this case (I do not think you can - Never tried nor heard of it being done).  This is why I said I was not sure where it is (the mag definitions are).  However, there is another two other options:

 

#1 - Replace the Cam bullet with a 'normal' bullet in the files.

Change:

Cam_mag = cam_bullet  * 6

 

To:

Cam_mag = normal_bullet  * 6

 

Just 'swap' the class names for the cam bullet with the normal bullet in ALL files (server and client (via over-writes)).

---  Where these (files/configs/defined) are, beats me, it is an option though  ---

 

#2 - Another viable option is a script could also be put in place where if the user has those bullets in his inventory, to swap them out with the normal ones.  this could be run on a 'trigger', such as when anything is added to the player's inventory or as a loop, such as checking every 5 seconds non-stop client-side, as a silly example.

 

It can be done, some methods are better than others, but it CAN be done...

 

Thanks @WURSTKETTE for letting me know where this was at...I had no idea where it might have been...now I know!  Thanks!  :)

And since you (@WURSTKETTE) appear (and probably do) to know more than me, CAN YOU modify the config.bin file via an over-write?  Based on what the original devs stated, ANY function can be over-written with this method...does it apple to the config.bin too?  I never had the need nor ever see anyone state such unless I missed it somewhere.

 

Thanks!

:)

 

Edited by Z80CPU

Share this post


Link to post
Share on other sites
4 hours ago, WURSTKETTE said:

Wich won't work in this case, cuz the magazines are listed in the client side configfile (config.bin).

What you could try, i didn't tested it yet but basically something like that:

 


	case 2: 	
				{ 
					_lootHolder addWeaponCargoGlobal [_itemClassName, 1]; 
					if !(_itemClassName isKindOf ["Exile_Melee_Abstract", configFile >> "CfgWeapons"]) then
					{
						_magazineClassNames = getArray(configFile >> "CfgWeapons" >> _itemClassName >> "magazines");
						if (count(_magazineClassNames) > 0) then
						{
							_magazineClassName = selectRandom _magazineClassNames;
							_numberOfMagazines = 2 + floor(random 3); 
							
							if !(_magazineClassNames isEqualTo "Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag" OR "X" OR "Y" OR "Z") then
							{
							_lootHolder addMagazineCargoGlobal [_magazineClassName, _numberOfMagazines];
							_spawnedItemClassNames pushBack _magazineClassName;
							};
							
						};
					};
					_numberOfItemsToSpawn = -1;
				};

 

this didnt worked for me  it messed up the loot spawn :)

have to try something else tomorow

Share this post


Link to post
Share on other sites
3 hours ago, Z80CPU said:

And since you (@WURSTKETTE) appear (and probably do) to know more than me, CAN YOU modify the config.bin file via an over-write?  Based on what the original devs stated, ANY function can be over-written with this method...does it apple to the config.bin too?  I never had the need nor ever see anyone state such unless I missed it somewhere.

Nope, unless making an own mod wich everyone need to download. But it's not possible to overwrite that file with cfg ExileCustomCode.

What might be a possible way is, to outsource the whole class CfgWeapons into the mission config.cpp, remove the mags and getArray from missionconfig:

_magazineClassNames = getArray(missionconfigFile >> "CfgWeapons" >> _itemClassName >> "magazines");

 

2 hours ago, AlphaTaylor said:

this didnt worked for me  it messed up the loot spawn

Right now i don't have any options to test it, was just a basic idea wich should work (prolly had a syntaxerror somewhere).

What exactly messed it up? Did you just copy pasta what i posted? 

 

What you could try and see if it just work for that one mag:

 

	case 2: 	
				{ 
					_lootHolder addWeaponCargoGlobal [_itemClassName, 1]; 
					if !(_itemClassName isKindOf ["Exile_Melee_Abstract", configFile >> "CfgWeapons"]) then
					{
						_magazineClassNames = getArray(configFile >> "CfgWeapons" >> _itemClassName >> "magazines");
						if (count(_magazineClassNames) > 0) then
						{
							_magazineClassName = selectRandom _magazineClassNames;
							_numberOfMagazines = 2 + floor(random 3); 
							
							if !(_magazineClassNames isKindOf "Exile_Magazine_5Rnd_127x108_Bullet_Cam_Mag") then
							{
							_lootHolder addMagazineCargoGlobal [_magazineClassName, _numberOfMagazines];
							_spawnedItemClassNames pushBack _magazineClassName;
							};
							
						};
					};
					_numberOfItemsToSpawn = -1;
				};

 

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.