Jump to content

Purchased Vehicles Not Spawning?


hambeast

Recommended Posts

Ok, so dumb question.

 

(btw, I googled this with no luck and tried searching the forums but... no filter option so...)

 

Last I played was in the closed alpha stages, when there was a cap on total server vehicles.  If you bought one and the cap was reached, the vic wouldn't spawn.

 

Is this still implemented?  If so, is there a setting somewhere that I can change to up the cap on vehicles?

 

 

The reason being, I had a player purchase a vehicle today and it did not spawn.  Admin came down to check and there were no vehicles within 200-300m of the trader.  Admin then attempted to purchase another vehicle and reported that he was unable to locate the vehicle he purchased as well.

 

"ADMIN: [Agent 0x3532a640,[],["B_Truck_01_covered_EPOCH"],B Alpha 1-2:1 (XXXXXXX) REMOTE,"wknclfle"]
Link to comment
Share on other sites

Check your epochconfig.hpp and add a few to each, you really need to check your Redis database and check your traders or delete a few in there and try again.

sorry could you be more specific?  Do you mean add extras to the allowed list?

 

Also, does this array control the amount that spawn in or the amount that are allowed to be in the game at one time?

 

Found this code in the server.sqf not sure if im allowed to post or not but mods pls remove if I'm not.

if(!isNil "EPOCH_allowedVehiclesList")then{
_vehicleSlotLimit=0;
{_vehicleSlotLimit=_vehicleSlotLimit+(_x select 1)}forEach EPOCH_allowedVehiclesList;
EPOCH_VehicleSlotsLimit=_vehicleSlotLimit;
};

This looks to me like it is indeed limiting the total allowed vehicles...

 

However, when I look in Epoch_server_makeNPCTrade.sqf I don't see any reference to this variable at all!

 

I see this:

_slot=EPOCH_VehicleSlots select 0;
EPOCH_VehicleSlots=EPOCH_VehicleSlots-[_slot];
EPOCH_VehicleSlotCount=count EPOCH_VehicleSlots;
publicVariable "EPOCH_VehicleSlotCount";
_vehObj=createVehicle[_item,_position,[],0,"NONE"];
_vehObj call EPOCH_server_setVToken;
addToRemainsCollector[_vehObj];
_vehObj disableTIEquipment true;
clearWeaponCargoGlobal    _vehObj;
clearMagazineCargoGlobal  _vehObj;
clearBackpackCargoGlobal  _vehObj;
clearItemCargoGlobal   _vehObj;
_vehObj lock true;
_lockOwner=getPlayerUID _plyr;
_plyrGroup=_plyr getVariable["GROUP",""];

Ok, we created the vic, set some variables on it...

 

No sign on deletion here...   Making sure we made it into this code block:

 

13:21:08 "_current_crypto: 1576 _cIndex:10"
13:21:08 "_item: B_Truck_01_covered_EPOCH"
13:21:08 "_itemWorth: 1100"
13:21:08 "_currQty: 1 >= 1"

 

Proving that we indeed meet the following conditions.  We know we have the qty to buy, we know we have the crypto to buy, and we know we have the right type of vehicle (LandVehicle)

diag_log format["_currQty: %1 >= %2",_currQty,_itemQty];
if (_currQty >=_itemQty)then{
if (_current_crypto >=_itemWorth)then{
if (_item isKindOf "Air" || _item isKindOf "Ship" || _item isKindOf "LandVehicle")then{

And now we are headed into the vehicle spwning code.

 

as long as this gets met we will be good

if !(EPOCH_VehicleSlots isEqualTo[])then{

fairly certain that this is being met.

 

 

The only thing I can think of are these two functions called shortly after the vehicle is created:

_vehObj call EPOCH_server_save_vehicle;
_vehObj call EPOCH_server_vehicleInit;

I'll dig into them and see if they actually delete the vehicle for some reason but it isn't happening in this sqf.

 

 

Not sure if I've found a bug or it was intended to be this way, but it should definitely not allow purchases (or at least block it) if the vehicle limit for that type of vehicle has been reached.

 

edit: ok I think I found the bug in this.

 

doesn't look like it actually is checking to see if the vehicle has hit the max limit for that type (maybe?)

 

as this line is getting called (the pushback is the important one)

_vehObj call EPOCH_server_vehicleInit;
_returnOut pushBack _item;

Since _returnOut contains _item now, our final check will return true, causing the player to be charged for the vehicle, even if the vehicle was never able to be spawned in.

 

edit again...: ok confirmed this line in my config.  So it is possible that I had reached the cap.

{"B_Truck_01_transport_EPOCH",2},

 

 

edit again:  Ok, I checked the referenced functions of vehicleInit and server_save_vehicle, neither of them seem to delete the vehicle, although it is possible that it is handled by the AH.  I think I'm done digging through this for now.

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

×
×
  • Create New...