• 1
Havoc302

Trouble spawning loot on upper levels of A2 buildings

Question

So we've been doing some extensive testing and found that the way Exile spawns loot, converting from ARMA's different methods of finding the surface of an object is actually breaking loot spawns on upper floors in a lot of A2 buildings. We run a Namalsk server and have found that the centre point and sometimes the bottom of the model of buildings is way underground, one of them we found looked fine at ground level but it's centre point was actually 9m underground. We've tried 3 different Exile Loot Spawn Position Creator tools and none of them have been able to give us coordinates that'd spawn loot on the upper levels. So we went looking and found that there's some code in the spawning of loot where if it can't work out where the floor is it tries to put it 0.05m above what it thinks is the ground floor, this is putting the loot under the ground for a lot of our A2 buildings. Can this option be toggled please so we can have just absolute positions and let us fix it manually should they end up floating.

Share this post


Link to post
Share on other sites

14 answers to this question

  • 0
1 hour ago, Havoc302 said:

So we've been doing some extensive testing and found that the way Exile spawns loot, converting from ARMA's different methods of finding the surface of an object is actually breaking loot spawns on upper floors in a lot of A2 buildings. We run a Namalsk server and have found that the centre point and sometimes the bottom of the model of buildings is way underground, one of them we found looked fine at ground level but it's centre point was actually 9m underground. We've tried 3 different Exile Loot Spawn Position Creator tools and none of them have been able to give us coordinates that'd spawn loot on the upper levels. So we went looking and found that there's some code in the spawning of loot where if it can't work out where the floor is it tries to put it 0.05m above what it thinks is the ground floor, this is putting the loot under the ground for a lot of our A2 buildings. Can this option be toggled please so we can have just absolute positions and let us fix it manually should they end up floating.

I've noticed the same thing on Chernarus. What file did you find the section where it tries to raise the loot up 0.05m?

Share this post


Link to post
Share on other sites
Advertisement
  • 0

You mean this? It is actually correct. It uses ATL (Above Terrain Level) and only prevents you from spawning loot below the terrain surface.

	// z is the same as in PositionASLW when over sea and is the same as in PositionATL when over land.
	// There is no AGLtoATL ? 
	_lootPosition = ASLToATL (AGLToASL (_building modelToWorld _x));
	
	// Do not spawn loot inside the terrain 
	if (_lootPosition select 2 < 0.05) then
	{
		_lootPosition set [2, 0.05];
	};

I don't think this is a bug :) 

Share this post


Link to post
Share on other sites
  • 0

Never had problems with this. Help me remember to post my custom loot positions for buildings on Namalsk when (if, living life like a rockstar here, haha!) I get home tonight!

 

no, who am I kidding. It's when I get home. Not if. Never if :(

Share this post


Link to post
Share on other sites
  • 0

We're seeing different behaviour from it though, it was an issue with A2 buildings ported to A3 when they were first done, detection of the floors didn't work right. That code looks like if it thinks there's no floor within 0.05m then set the height of the We're seeing different behaviour from it though, it was an issue with A2 buildings ported to A3 when they were first done, detection of the floors didn't work right. That code looks like if it thinks there's no floor within 0.05m then set the height of the loot spawn to 0.05m, is that 0.05m relative to the model or the world? Because I personally went through, twice now and set loot spawns in buildings only to never see those positions spawn anything and they're always on the upper floors.

Share this post


Link to post
Share on other sites
  • 0
25 minutes ago, Havoc302 said:

We're seeing different behaviour from it though, it was an issue with A2 buildings ported to A3 when they were first done, detection of the floors didn't work right. That code looks like if it thinks there's no floor within 0.05m then set the height of the We're seeing different behaviour from it though, it was an issue with A2 buildings ported to A3 when they were first done, detection of the floors didn't work right. That code looks like if it thinks there's no floor within 0.05m then set the height of the loot spawn to 0.05m, is that 0.05m relative to the model or the world? Because I personally went through, twice now and set loot spawns in buildings only to never see those positions spawn anything and they're always on the upper floors.

did you set the number of guarenteed lootspawns to 30 to check?

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.