Jump to content
Sign in to follow this  
wolffy.au

cB - BIS Ambient Animals working on Dedicated

Recommended Posts

Download:

http://creobellum.org/node/182

I've made some changes to BIS Ambient Animals to get it to work on Dedicated Servers and Multiplayer.

Here are the changes made:

  • Enabled debug markers through global variable BIS_Animals_debug
  • Changed random locations to use BIS_fnc_findSafePos
  • SpawnRadius is affected by all players

To use in your missions, simply drop the modules in the Editor as normal, and include the CA directory from the demo mission attached in your mission directory. This will override the BIS code with the fixes above.

Share this post


Link to post
Share on other sites

What is there to fix? Didnt they fix the ambient civillians and animals on dedicated in one of the recent patches? Im sure they did, but I can be wrong tho :)

Share this post


Link to post
Share on other sites
Here are the changes made:

  • Enabled debug markers through global variable BIS_Animals_debug
  • Changed random locations to use BIS_fnc_findSafePos
  • SpawnRadius is affected by all players

Animals have never worked on dedicated servers.

The problem was around the use of 'player', which isn't useful on a dedicated server.

The despawn was also broken (which is why animals seemed to continue to multiply the longer you were around).

Lastly, animals spawned randomly, sometimes in water - BIS_fnc_findSafePos fixes that too.

All of this became visible, once the debug markers were enabled - which is another thing I've added. :)

Share this post


Link to post
Share on other sites

Thanks Wolffy .... always love your scripts and stick them into my missions.

Good job !

Share this post


Link to post
Share on other sites

Of course on dedicated servers too ... I remember the first patch versions of ArmA II having huch problems with the animal module spawning animals everywhere multiplied with the player count.

However I used the blacklist zones quite often in critical areas such as airports and military bases.

Share this post


Link to post
Share on other sites

When I tested it recently, it worked fine on SP and MP hosted, but didn't work at all on dedicated servers. I also remember at the beginning playing A2 with Ambient Animals all over Utes airfield, but soon after they stopped working.

These patches fix all that.

Share this post


Link to post
Share on other sites

Damn, I'll immediatelly remove the BIS' bugged module. This single module could be causing the lag we have :/

Share this post


Link to post
Share on other sites
Damn, I'll immediatelly remove the BIS' bugged module. This single module could be causing the lag we have :/

Or you can copy my CA folder into your mission and fix everything! :)

Share this post


Link to post
Share on other sites

The wiki didnt have anything on this module. Where would I find the commands to make more animals and maybe make it so its only spawns cows or something?

Thanks for sharing

Share this post


Link to post
Share on other sites
The wiki didnt have anything on this module. Where would I find the commands to make more animals and maybe make it so its only spawns cows or something?

Its not designed that way - I have thought myself of adding dogs, but there is a bit of work involved.

Share this post


Link to post
Share on other sites

Hi Wolffy.au. Nice work!

I found this one in Armaholic. I was doing some research with Ambient modules for our Arma 2 community, and I tested your modification.

Just a few comments about it:

1. In your changes, you made a mistake with some code, so now blacklist markers are not working (it´s giving a script compilation error when you run the game with a blacklist marker). This is just because you moved some code in the Animals_Main.fsm, and when it´s trying to see if the spawn position is in a blacklist zone it crashes.

This line:

	{
	 if (_x distance _Pos < (triggerarea _x select 0)  ) then {_Pos = [0,0];}; 
} foreach _triglist;

should be below this code:

		_PosList = [];
	_randrefpoint = [getpos _x, 10, _SpawnRadius, 1, 0, 50, 0] call BIS_fnc_findSafePos;
	_PosList = selectbestplaces [_randrefpoint,_FindPlaceRadius,_favouritezones,10,5];
	_PosSelect = _PosList select (floor random (count _PosList));
	_Pos =  _PosSelect select 0; 

This mus be done for every spawn box you have.

2. The main problem here is that this module is not using object variables (using setvariable), so if you want to spawn more animales you must do some tricky things. It could be changed that way. You only need to do some recode.

3. To spawn other animals you must do some fsm code, but it should be more practical to recode that part entirely.

Again, great job. I hope you find this info useful. And sorry to "wake up" this thread again.

BR, Kepchu

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×