Jump to content

Vehicle Spawn Points


RRP47

Recommended Posts

Is there a way, to adjust where vehicles spawn? They are spawning fine on the server, but they are all clumped up in 3 different spots on the map, and thats it. More than half the map won't spawn a vehicle. Just those three areas, lol. Is the position determined serverside? Does one of the 100 items in the mission sqm determine it? Any insight is greatly appreciated.

 

Should add I am building a Panthera Epoch server. Again, thanks in advance.

Link to comment
Share on other sites


_isShip=_vehClass isKindOf "Ship";
	if(_isShip ||(_vehClass isKindOf "Air"))then{
		if(_isShip)then{_position=[epoch_centerMarkerPosition,0,EPOCH_dynamicVehicleArea,10,0,4000,1]call BIS_fnc_findSafePos;
			_position=[_position,0,100,10,2,4000,0]call BIS_fnc_findSafePos;
		}else{
			_position=[epoch_centerMarkerPosition,0,EPOCH_dynamicVehicleArea,10,0,1000,0]call BIS_fnc_findSafePos;
		};
	}else{
		if(_increaseLimit)then{
		{
			_spawnPositionSize set[_forEachIndex,[_x select 0,(_x select 1)+1]];
		}forEach _spawnPositionSize;
		_allCitysDync=_allCitys;
	};
	_position=[];
	_start=diag_tickTime;
	waitUntil{
	
		if(_allCitysDync isEqualTo[])exitWith{
			_increaseLimit=true
		};
		_selectedCity=_allCitysDync select(floor random(count _allCitysDync));
		if(!isNil "_selectedCity")then{
		
			_find=_allowedTypes find(getText(_selectedCity >> "type"));
			if(_find >-1)then{
				_cityPos=getArray(_selectedCity >> "position");
				_range=getNumber(_selectedCity >> "radiusA")*1.3;
				_nearBy=count(_cityPos nearEntities[["LandVehicle","Ship","Air"],_range]);
				_limit=_spawnPositionSize select _find select 1;
				if(_limit > _nearBy)then{
					_roads=_cityPos nearRoads _range;
					if(_roads isEqualTo[])then{
						_allCitysDync=_allCitysDync-[_selectedCity];
					}else{
						_road=_roads select(floor random(count _roads));
						if(!isNil "_road")then{
							_position=getPosATL _road;
							if(_nearBy+1==_limit)then{
								_allCitysDync=_allCitysDync-[_selectedCity]
							};
						};
					};
				}else{
					_allCitysDync=_allCitysDync-[_selectedCity];
				};
			};
		};
		count _position==3 || diag_tickTime-_start>0.8
	};
	if(count _position==3)then{_position deleteAt 2;
		_position=[_position,0,10,10,0,2000,0]call BIS_fnc_findSafePos;
	}else{
		_increaseLimit=true;
	}};

This is the code that picks vehicle locations

 

For ship and helicopters it does completly random

 

But for landvehicles they only seem to keep close to actually defined city and roads :)

 

u might wanna change that code which normally you cannot btu since u got panthera running u might can  ^^

Link to comment
Share on other sites

I do have Panthera running, but i haven't altered any code aside from the config.cpp for the portals, static traders and shipping container locations. Altering that bit of code you posted would make the server not start due to the .dll am i correct?

Link to comment
Share on other sites

Is there a way to make the vehicles purchased from a merchant spawn at a specific location?  I have a trader that spawns choppers in trees for some reason.

 

I think that would be open to abuse once people noticed it was always the same spot, ie. someone would park a vehicle in the spot which would either stop the new one spawning or cause it to explode.

Link to comment
Share on other sites

I do have Panthera running, but i haven't altered any code aside from the config.cpp for the portals, static traders and shipping container locations. Altering that bit of code you posted would make the server not start due to the .dll am i correct?

 

FOr you yes : )

Link to comment
Share on other sites

Yeah it's very unfortunate they went with a Redis database, there's no easy scripting it and there's no good tools for it, I still don't understand why it was chosen over SQL which is used everywhere for everything.

 

 

 

Link to comment
Share on other sites

 

 

I love this line from vbawol: "Redis is much faster than mysql and has lower latency. It is mature and well supported and has many tools and resources available. " I work in the IT field mate, supporting a 20K user multi-national company and nobody had even heard of it. Google lies if there's so many tools around for it.

 

Also the third thread you posted clearly stated that it has it's advantages and disadvantages, I think the loss of ability to easily script controls over it and a decent interface to it are a couple of pretty big disadvantages to Redis, not to mention, as also stated in that thread, if you're running your DB on an SSD it makes little difference.

 

Edit: Oh wait, there's a couple of tools in my Google search, oh and some linux ones, so I have to run a linux machine to properly administer my database for a game server, LOL! Shouldn't be needed. Lets go with a long standing virtually global database standard used for all kinds of applications of all kinds of sizes vs something that some people use somewhere that's apparently a big thing that is nowhere near as mature as SQL.........

 

Now lets have a little look at Redis. It was released in 2009. It's first STABLE release was 5 MONTHS AGO!

 

And let's have a look at SQL: It was released officially in it's first iteration in 1974!!!! It's fucking older than most of the people on this forum!!!! First stable release in 1986, it's as old as my mrs, damn! I can't say I've seen an IT environment without an SQL database hidden away in some deep dark server in the cluster somewhere. That's how much it's used.

Link to comment
Share on other sites

I love this line from vbawol: "Redis is much faster than mysql and has lower latency. It is mature and well supported and has many tools and resources available. " I work in the IT field mate, supporting a 20K user multi-national company and nobody had even heard of it. Google lies if there's so many tools around for it.

 

Also the third thread you posted clearly stated that it has it's advantages and disadvantages, I think the loss of ability to easily script controls over it and a decent interface to it are a couple of pretty big disadvantages to Redis, not to mention, as also stated in that thread, if you're running your DB on an SSD it makes little difference.

 

Edit: Oh wait, there's a couple of tools in my Google search, oh and some linux ones, so I have to run a linux machine to properly administer my database for a game server, LOL! Shouldn't be needed. Lets go with a long standing virtually global database standard used for all kinds of applications of all kinds of sizes vs something that some people use somewhere that's apparently a big thing that is nowhere near as mature as SQL.........

 

Now lets have a little look at Redis. It was released in 2009. It's first STABLE release was 5 MONTHS AGO!

 

And let's have a look at SQL: It was released officially in it's first iteration in 1974!!!! It's fucking older than most of the people on this forum!!!! First stable release in 1986, it's as old as my mrs, damn! I can't say I've seen an IT environment without an SQL database hidden away in some deep dark server in the cluster somewhere. That's how much it's used.

 

Completely agree. Redis is a pile of shit.

 

Part of the reason why we ditched A3 Epoch.

Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...