Jump to content

RimBlock

Member
  • Posts

    1140
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by RimBlock

  1. I am currently taking a look at a way to flip vehicles due to a concussion wave from a particular effect (think explosion).

     

    The movement is being attempted by using the setvelocity on the chosen vehicle but something quite strange is appearing to happen.  When the setvelocity is applied, the vehicle is moved but then rubber bands back to the original position.  Subsequent attempts just make the vehicle judder and then spring back.

     

    Having a skim through the code, the Epoch Antihack has some code to prevent vehicle teleport based on vehicle speed > max speed of vehicle over a measured distance (the Epoch speed camera).    The strange thing is that even after not loading it (// out in the init.sqf) the same problem still occurs.

     

    This is on vanilla Epoch with not extra / custom antihacks and no mods that handle vehicles.

     

    My only thought now is that it is to do with vehicle ownership and the effect needing to be applied to the owning machine and then it will propagate over the network.

     

    Any pointers ?.

  2. You would need to change

    _classnameProtected = "Wooden_shed_DZ"; 

    into

    _classnameProtected = ""; 
    _ProtectedClasses = []; // put in all the classes you want to protect.

    You would then need to put all after

    _vehiclePlayer = (Vehicle Player);

    In a count loop (ie. { ....... }count _ProtectedClasses ;) and add after it

    _classnameProtected = _x;

    The

    }count _ProtectedClasses;

    needs to go before the last

    };

    That would probably work for multiple classes.

  3. Have the whole concept worked out for this sort of thing but will be developing for our E3 Dominion mod rather than A2.

     

    Having said that....

     

    What about making the reward based on the targets humanity ?.   The player on the server with the least / most humanity becomes the target  (depending if the hunter is a bandit / hero).

     

    1. Get all playable units

    2. Check they are actually players with isplayer

    3. Loop through them and

    3.1 Get players humanity (getvariable)

    3.2 Get players PlayerUID

    3.3 Store in to an array.

    4. Sort array by Humanity.

    5. get the First / Last entry depending on highest / lowest humanity required.

    6. Put a bounty on their head (something like the killboard could be used at the Hero / Bandit traders).

    7. Monitor if the target player logs off / gets killed and if so select another target.

     

    I would get the server to do the searching for a target and then update the clients via PV / Event handler to update the bounty message boards).  You could even 'tag' the target player object with something like bounty = true and search for it in the scripts that deal with player logoff / killed which if they find it, PV the server to tell it the target is not longer valid.  The server could then send a PV to the clients to get them to wipe their bounty boards until the next cycle or until the same player logs in again.

  4. 1. Have a look in the DB for the MTVR and note the worldpace values.

    2. Get the player to get in the MTVR and drive to someplace and then get out.

    3. Have a look in the DB for the MTVR and see if the worldpace values have changed.

     

    I suspect they have not.

     

    As Carl101 said, check the client and server RPT files for any errors.

  5. serverpublishfullobject is only used for the "Take Ownership" function to take over the plot item ownership.  Everything else uses the standard Epoch server create object scripts.

     

    Ok, do the players who are friendly to each other have the SteamIDs in their currentState field of their characters DB record (character_data table) ?.

     

    Do they get the "No plot pole nearby." error message ?.

     

    Does it stop friendlies from building new items, upgrading, downgrading and deleting or just building new items (each function uses a different script).

     

    Note that Vector Build is for A Plot for Life v2.34 / V2.35 and not V2.4 (it will probably work but will need a bit of playing around).

  6. Thanks for the appreciation to both of you.  It is always nice to hear the mods are being used, working well and are popular with the communities.

     

    @Dutchy

     

    I tend not to bundle mods together for a few reasons.

    1. Some people do not like to have their mods bundled.

    2. Different people approach the same problem from different angles.  This means you have to learn the underlying thought process behind the other persons mod in order to better understand not only what they did but why they did it.

    3. Bundling transfers support responsibilities for that mods functionality within your bundle to you (also linked to point 2).

    4. Trying to keep up with bugfixes / feature updates of all bundled mods can be very time consuming.

     

    Saying that, I have bundled Snap Pro in A Plot for Life as I know the code is stable and very unlikely to change.  I am also working with Raymix on Dominion so we have a good set of communication going and work well together.  I have also got the nod from Mikeeeyy to add his Precise Base Building in to the next A Plot for Life release but this mod is quite simple to add and so is no real hassle.  I will be adding a two tier scroll wheel menu system for plot management (like the one used for Better Refueling) .  This should be lighter than adding a gui code size wise (cut down the Kbs to transfer on player join) and easy to use with a few new options.  For doors, I quite like the padlock system but may add an option to booby trap the door (wrong code... oh where did that hand grenade come from .... Boom !).

     

    All the above planned features and also trying to find time for Dominion.

  7. @striker, i get this problem in the RPT. do you know this problem? i have snapbuilding v4 and precise base building updated

     

     1:15:52 "infiSTAR.de - AntiHack FULLY LOADED"
     1:15:53 "Res3tting B!S effects..."
     1:15:54 Error in expression <{
    _ownerID = format["00%1", _ownerID];!
    };
    if(_codeCount == 1) then {
    _ownerID =>
     1:15:54   Error position: <};
    if(_codeCount == 1) then {
    _ownerID =>
     1:15:54   Error Missing {
     1:15:54 File z\addons\dayz_server\system\server_monitor.sqf, line 205
     1:15:54 Error in expression <{
    _ownerID = format["00%1", _ownerID];!
    };
    if(_codeCount == 1) then {
    _ownerID =>
     1:15:54   Error position: <};
    if(_codeCount == 1) then {
    _ownerID =>
     1:15:54   Error Missing {
     1:15:54 File z\addons\dayz_server\system\server_monitor.sqf, line 205
    

    this is my server _monitor

    private ["_nul","_result","_pos","_wsDone","_dir","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue","_superkey","_shutdown","_res","_hiveLoaded"];
    
    dayz_versionNo = 		getText(configFile >> "CfgMods" >> "DayZ" >> "version");
    dayz_hiveVersionNo = 	getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
    
    _hiveLoaded = false;
    
    waitUntil{initialized}; //means all the functions are now defined
    
    diag_log "HIVE: Starting";
    
    waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)
    	
    // Custom Configs
    if(isnil "MaxVehicleLimit") then {
    	MaxVehicleLimit = 50;
    };
    
    if(isnil "MaxDynamicDebris") then {
    	MaxDynamicDebris = 100;
    };
    if(isnil "MaxAmmoBoxes") then {
    	MaxAmmoBoxes = 3;
    };
    if(isnil "MaxMineVeins") then {
    	MaxMineVeins = 50;
    };
    // Custon Configs End
    
    if (isServer && isNil "sm_done") then {
    
    	serverVehicleCounter = [];
    	_hiveResponse = [];
    
    	for "_i" from 1 to 5 do {
    		diag_log "HIVE: trying to get objects";
    		_key = format["CHILD:302:%1:", dayZ_instance];
    		_hiveResponse = _key call server_hiveReadWrite;  
    		if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
    			if ((_hiveResponse select 1) == "Instance already initialized") then {
    				_superkey = profileNamespace getVariable "SUPERKEY";
    				_shutdown = format["CHILD:400:%1:", _superkey];
    				_res = _shutdown call server_hiveReadWrite;
    				diag_log ("HIVE: attempt to kill.. HiveExt response:"+str(_res));
    			} else {
    				diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
    			
    			};
    			_hiveResponse = ["",0];
    		} 
    		else {
    			diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
    			_i = 99; // break
    		};
    	};
    	
    	_BuildingQueue = [];
    	_objectQueue = [];
    	
    	if ((_hiveResponse select 0) == "ObjectStreamStart") then {
    	
    		// save superkey
    		profileNamespace setVariable ["SUPERKEY",(_hiveResponse select 2)];
    		
    		_hiveLoaded = true;
    	
    		diag_log ("HIVE: Commence Object Streaming...");
    		_key = format["CHILD:302:%1:", dayZ_instance];
    		_objectCount = _hiveResponse select 1;
    		_bQty = 0;
    		_vQty = 0;
    		for "_i" from 1 to _objectCount do {
    			_hiveResponse = _key call server_hiveReadWriteLarge;
    			//diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
    			if ((_hiveResponse select 2) isKindOf "ModularItems") then {
    				_BuildingQueue set [_bQty,_hiveResponse];
    				_bQty = _bQty + 1;
    			} else {
    				_objectQueue set [_vQty,_hiveResponse];
    				_vQty = _vQty + 1;
    			};
    		};
    		diag_log ("HIVE: got " + str(_bQty) + " Epoch Objects and " + str(_vQty) + " Vehicles");
    	};
    	
    	// # NOW SPAWN OBJECTS #
    	_totalvehicles = 0;
    	{
    		_idKey = 		_x select 1;
    		_type =			_x select 2;
    		_ownerID = 		_x select 3;
    
    		_worldspace = 	_x select 4;
    		_intentory =	_x select 5;
    		_hitPoints =	_x select 6;
    		_fuel =			_x select 7;
    		_damage = 		_x select 8;
    		
    		_dir = 0;
    		_pos = [0,0,0];
    		_wsDone = false;
    		if (count _worldspace >= 2) then
    		{
    			if(count _worldspace == 3) then{
    				_vector = _worldspace select 2;
    				if(typename _vector == "ARRAY")then{
    					if(count _vector == 2)then{
    						if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
    							_vecExists = true;
    						};
    					};
    
    				};
    
    			};
    			_dir = _worldspace select 0;
    			if (count (_worldspace select 1) == 3) then {
    				_pos = _worldspace select 1;
    				_wsDone = true;
    			}
    		};
    		
    		if (!_wsDone) then {
    			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
    			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
    			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
    			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
    		};
    		_vector = [[0,0,0],[0,0,0]];
    _vecExists = false;
    _ownerPUID = "0";   
    if (count _worldspace >= 3) then{
        if(count _worldspace == 3) then{
                if(typename (_worldspace select 2) == "STRING")then{
                    _ownerPUID = _worldspace select 2;
                }else{
                     if(typename (_worldspace select 2) == "ARRAY")then{
                        _vector = _worldspace select 2;
                        if(count _vector == 2)then{
                            if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
                                _vecExists = true;
                            };
                        };
                    };                  
                };
    
        }else{
            //Was not 3 elements, so check if 4 or more
            if(count _worldspace == 4) then{
                if(typename (_worldspace select 3) == "STRING")then{
                    _ownerPUID = _worldspace select 3;
                }else{
                    if(typename (_worldspace select 2) == "STRING")then{
                        _ownerPUID = _worldspace select 2;
                    };
                };
    
    
                if(typename (_worldspace select 2) == "ARRAY")then{
                    _vector = _worldspace select 2;
                    if(count _vector == 2)then{
                        if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
                            _vecExists = true;
                        };
                    };
                }else{
                    if(typename (_worldspace select 3) == "ARRAY")then{
                        _vector = _worldspace select 3;
                        if(count _vector == 2)then{
                            if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
                                _vecExists = true;
                            };
                        };
                    };
                };
    
            }else{
                //More than 3 or 4 elements found
                //Might add a search for the vector, ownerPUID will equal 0
            };
        };
    }; 
    
    		if (_damage < 1) then {
    			//diag_log format["OBJ: %1 - %2", _idKey,_type];
    			
    			//Create it
    			_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
    			_object setVariable ["lastUpdate",time];
    			_object setVariable ["ObjectID", _idKey, true];
    			_object setVariable ["ownerPUID", _ownerPUID, true];
    			_lockable = 0;
    			if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
    				_lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
    			};
    
    			// fix for leading zero issues on safe codes after restart
    			if (_lockable == 4) then {
    				_codeCount = (count (toArray _ownerID));!
    				if(_codeCount == 3) then {
    					_ownerID = format["0%1", _ownerID];
    				};
    				if(_codeCount == 2) then {
    					_ownerID = format["00%1", _ownerID];!
    				};
    				if(_codeCount == 1) then {
    					_ownerID = format["000%1", _ownerID];
    				};
    			};
    
    			if (_lockable == 3) then {
    				_codeCount = (count (toArray _ownerID));
    				if(_codeCount == 2) then {
    					_ownerID = format["0%1", _ownerID];
    				};
    				if(_codeCount == 1) then {
    					_ownerID = format["00%1", _ownerID];
    				};
    			};
    
    			_object setVariable ["CharacterID", _ownerID, true];
    			
    			clearWeaponCargoGlobal  _object;
    			clearMagazineCargoGlobal  _object;
    			// _object setVehicleAmmo DZE_vehicleAmmo;
    			
    			_object setdir _dir;
    			if(_vecExists)then{
    			_object setVectorDirAndUp _vector;
    					}; 
    			_object setposATL _pos;
    			_object setDamage _damage;
    			
    			if ((typeOf _object) in dayz_allowedObjects) then {
    				_object setVariable["memDir",_dir,true]
    				if (DZE_GodModeBase) then {
    					_object addEventHandler ["HandleDamage", {false}];
    				} else {
    					_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
    				};
    				// Test disabling simulation server side on buildables only.
    				_object enableSimulation false;
    				// used for inplace upgrades && lock/unlock of safe
    				_object setVariable ["OEMPos", _pos, true];
    				
    			};
    
    			if (count _intentory > 0) then {
    				if (_type in DZE_LockedStorage) then {
    					// Fill variables with loot
    					_object setVariable ["WeaponCargo", (_intentory select 0),true];
    					_object setVariable ["MagazineCargo", (_intentory select 1),true];
    					_object setVariable ["BackpackCargo", (_intentory select 2),true];
    				} else {
    
    					//Add weapons
    					_objWpnTypes = (_intentory select 0) select 0;
    					_objWpnQty = (_intentory select 0) select 1;
    					_countr = 0;					
    					{
    						if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
    							_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
    						};
    						_isOK = 	isClass(configFile >> "CfgWeapons" >> _x);
    						if (_isOK) then {
    							_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
    						};
    						_countr = _countr + 1;
    					} count _objWpnTypes; 
    				
    					//Add Magazines
    					_objWpnTypes = (_intentory select 1) select 0;
    					_objWpnQty = (_intentory select 1) select 1;
    					_countr = 0;
    					{
    						if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
    						if (_x == "ItemTent") then { _x = "ItemTentOld" };
    						_isOK = 	isClass(configFile >> "CfgMagazines" >> _x);
    						if (_isOK) then {
    							_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
    						};
    						_countr = _countr + 1;
    					} count _objWpnTypes;
    
    					//Add Backpacks
    					_objWpnTypes = (_intentory select 2) select 0;
    					_objWpnQty = (_intentory select 2) select 1;
    					_countr = 0;
    					{
    						_isOK = 	isClass(configFile >> "CfgVehicles" >> _x);
    						if (_isOK) then {
    							_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
    						};
    						_countr = _countr + 1;
    					} count _objWpnTypes;
    				};
    			};	
    			
    			if (_object isKindOf "AllVehicles") then {
    				{
    					_selection = _x select 0;
    					_dam = _x select 1;
    					if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
    					[_object,_selection,_dam] call object_setFixServer;
    				} count _hitpoints;
    
    				_object setFuel _fuel;
    
    				if (!((typeOf _object) in dayz_allowedObjects)) then {
    					
    					//_object setvelocity [0,0,1];
    					_object call fnc_veh_ResetEH;		
    					
    					if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then {
    						_object setvehiclelock "locked";
    					};
    					
    					_totalvehicles = _totalvehicles + 1;
    
    					// total each vehicle
    					serverVehicleCounter set [count serverVehicleCounter,_type];
    				};
    			};
    
    			//Monitor the object
    			PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
    		};
    	} count (_BuildingQueue + _objectQueue);
    	// # END SPAWN OBJECTS #
    
    	// preload server traders menu data into cache
    	if !(DZE_ConfigTrader) then {
    		{
    			// get tids
    			_traderData = call compile format["menu_%1;",_x];
    			if(!isNil "_traderData") then {
    				{
    					_traderid = _x select 1;
    
    					_retrader = [];
    
    					_key = format["CHILD:399:%1:",_traderid];
    					_data = "HiveEXT" callExtension _key;
    
    					//diag_log "HIVE: Request sent";
    			
    					//Process result
    					_result = call compile format ["%1",_data];
    					_status = _result select 0;
    			
    					if (_status == "ObjectStreamStart") then {
    						_val = _result select 1;
    						//Stream Objects
    						//diag_log ("HIVE: Commence Menu Streaming...");
    						call compile format["ServerTcache_%1 = [];",_traderid];
    						for "_i" from 1 to _val do {
    							_data = "HiveEXT" callExtension _key;
    							_result = call compile format ["%1",_data];
    							call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
    							_retrader set [count _retrader,_result];
    						};
    						//diag_log ("HIVE: Streamed " + str(_val) + " objects");
    					};
    
    				} forEach (_traderData select 0);
    			};
    		} forEach serverTraders;
    	};
    
    	if (_hiveLoaded) then {
    		//  spawn_vehicles
    		_vehLimit = MaxVehicleLimit - _totalvehicles;
    		if(_vehLimit > 0) then {
    			diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
    			for "_x" from 1 to _vehLimit do {
    				[] spawn spawn_vehicles;
    			};
    		} else {
    			diag_log "HIVE: Vehicle Spawn limit reached!";
    		};
    	};
    	
    	//  spawn_roadblocks
    	diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
    	for "_x" from 1 to MaxDynamicDebris do {
    		[] spawn spawn_roadblocks;
    	};
    	//  spawn_ammosupply at server start 1% of roadblocks
    	diag_log ("HIVE: Spawning # of Ammo Boxes: " + str(MaxAmmoBoxes));
    	for "_x" from 1 to MaxAmmoBoxes do {
    		[] spawn spawn_ammosupply;
    	};
    	// call spawning mining veins
    	diag_log ("HIVE: Spawning # of Veins: " + str(MaxMineVeins));
    	for "_x" from 1 to MaxMineVeins do {
    		[] spawn spawn_mineveins;
    	};
    
    	if(isnil "dayz_MapArea") then {
    		dayz_MapArea = 10000;
    	};
    	if(isnil "HeliCrashArea") then {
    		HeliCrashArea = dayz_MapArea / 2;
    	};
    	if(isnil "OldHeliCrash") then {
    		OldHeliCrash = false;
    	};
    
    	// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
    	if(OldHeliCrash) then {
    		_nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
    	};
    	if (isDedicated) then {
    		// Epoch Events
    		_id = [] spawn server_spawnEvents;
    		// server cleanup
    		[] spawn {
    			private ["_id"];
    			sleep 200; //Sleep Lootcleanup, don't need directly cleanup on startup + fix some performance issues on serverstart
    			waitUntil {!isNil "server_spawnCleanAnimals"};
    			_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
    		};
    
    		// spawn debug box
    		_debugMarkerPosition = getMarkerPos "respawn_west";
    		_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
    		_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
    		_vehicle_0 setPos _debugMarkerPosition;
    		_vehicle_0 setVariable ["ObjectID","1",true];
    
    		// max number of spawn markers
    		if(isnil "spawnMarkerCount") then {
    			spawnMarkerCount = 10;
    		};
    		actualSpawnMarkerCount = 0;
    		// count valid spawn marker positions
    		for "_i" from 0 to spawnMarkerCount do {
    			if (!([(getMarkerPos format["spawn%1", _i]), [0,0,0]] call BIS_fnc_areEqual)) then {
    				actualSpawnMarkerCount = actualSpawnMarkerCount + 1;
    			} else {
    				// exit since we did not find any further markers
    				_i = spawnMarkerCount + 99;
    			};
    			
    		};
    		diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount];
    		
    		endLoadingScreen;
    	};
    
    	[] ExecVM "\z\addons\dayz_server\WAI\init.sqf";
    	allowConnection = true;	
    	sm_done = true;
    	publicVariable "sm_done";
    };
    
    

    i`m kindof stuck at my server because of this error. i tried to read all the comments. didnt helped much since i`m the only 1 with this error.

     

    Line 205 has a "!" after the ";".  Remove it and it should work better.

     

    Just a quick note for all. 

     

    Vectors v4 is currently for A Plot for Life v2.34 or v2.35 and not v2.4 (the latest).  I have cut out a number of checks and the variables used for those checks in v2.4.  The files in the Vector v4 release put those checks back in (as they were there in v2.34) but the variables the checks use have been removed.  There are also a few other structual changes in the code and a couple of helper functions added.  most of the changes from v2.35 -> v2.4 are code tidy / reduction and don't affect functionality.  You wont miss much by sticking with v2.35 (also available on the A Plot for Life download page) and it should fit right in with v4 of Vector Build.

     

    A Plot for Life v2.5 will have Mikeeeyys Precise building added thanks to Mikeeeyys kind agreement for me to include it so it may be better to stick with A Plot for Life v2.35 until that version comes out and Striker has had a chance to update the Vector build files to match it.

     

    If you have already installed v2.4 and have it working fine then great and enjoy the reduced file size.

  8. Ok, it appears that there is a call in the hiveext to get the objectID for an object in the DB (Found by JustChil).  Call 388 will get a DB objects objectID but it is currently only used for publishing vehicles and has a 10 second timeout if no response is received.

     

    I will have a look at adding the call to my publishFullObject script (part of A Plot for Lifes Take Ownership function).  This script gets hammered when someone take over a base ownership as the base objects all have to be deleted and recreated (no call to update the fields I need updated).  That should be a good stress test.  It will not remove the issue with dup ObjectUIDs sometimes occuring but if it is robust enough, it could remove the need for them.

  9. The issue has been reported on the Epoch GitHub here.

     

    The ObjectUID is only used as a unique object identifier until the server is restarted and the actual DB assigned objectID is read in to the ARMA server.

     

    For the running counter... it starts at 1 and increases on first run.  After that, as the objects are loaded on a server restart, the highest objectsUID is stored, incremented by one and is used as the starting point until the next server reboot.

     

    Very simple.  The only concern is that the ARMA engine cannot keep up with new objectUID requests and hands out a duplicate one.  Saying that though, the requests should be from calls to the function which are in a scheduled env so they will run and probably complete sequentially.  Should not be a problem with duplication but I guess I can test.  Speed is also not so much of a concern as it will be used for building / creating game world objects so does not need to be lightning fast.  Throttling it if need be should not cause any issues.

     

    Should be pretty easy to write.

     

    For people with objects in their DB already, a sql script to zero the objects objectUID in the DB will get over any historical issues.  If the server has the objectID then the objectUID is no longer required.

     

    I personally prefer an engineered solution rather than just picking a number out of a hat.  Admittedly the likelihood of the same number coming out twice is very low but there is still a chance.

  10. There are many ways the resulting number can be the same but the highest probability of it happening is probably with the situation you describe where the Z coord is below 0.0 and higher than 0 (ie 0.01xxx -> 0.09xxx) with objects.

     

    Randomising the Z if it rounds to 1 is ok and may we do the job but why randomise it at all rather than just keeping a running counter for allocation ?. 

  11. Hey RimBlock, 

     

    I have P4L installed on my 2 servers, the older server is running P4L 2.34 and the latest server is running 2.40. Both are running Napf. What I was wanting to know is can I just copy the newer server over to the older server (keeping the SQL database intact), get everyone to run the "Take Ownership" option from the plotpole and have their existing bases stay exactly where they are? I am also using Precise Build from Mikeeey and Snap Build Pro 1.4.1 on both servers.

     

    Hiya,

     

    From a DB point of view there is no difference between v2.34 and v2.4.  You should just be able to load your object table straight in and it will work.  For A Plot for Life, the buildables will still belong to the right players (the SteamID used is the same on all servers).  I suspect it will all work TBH without needing to Take Ownership.  Copying all the DB tables over should make sure it will all work fine.  v2.4 is really just a big tidy up of the code to reduce size and make it easier for people to integrate with other mods.  There are a few small additions but functionality and the way the scripts implement it is pretty much the same.

     

    Test if you can first but you should be pretty safe.

  12. Hey everyone, I try to run this plugin with plotmanagement. I've followed every step on their website: https://github.com/DevZupa/PlotManagement/blob/master/P4L_Epoch.md, but I've got the following error in the .RPT (about 100 times): 

    diag_log ("HIVE: S>
    21:01:29   Error position: <spawn_roadblocks;
    };
    
    diag_log ("HIVE: S>
    21:01:29   Error Undefined variable in expression: spawn_roadblocks
    21:01:29 File z\addons\dayz_server\system\server_monitor.sqf, line 334
    21:01:29 Error in expression <rom 1 to MaxDynamicDebris do {
    [] spawn spawn_roadblocks;
    };
    
    diag_log ("HIVE: S>
    21:01:29   Error position: <spawn_roadblocks;
    };
    
    diag_log ("HIVE: S>
    21:01:29   Error Undefined variable in expression: spawn_roadblocks
    21:01:29 File z\addons\dayz_server\system\server_monitor.sqf, line 334
    21:01:29 Error in expression <rom 1 to MaxDynamicDebris do {
    [] spawn spawn_roadblocks;
    };
    
    diag_log ("HIVE: S>
    21:01:29   Error position: <spawn_roadblocks;
    };
    
    diag_log ("HIVE: S>
    21:01:29   Error Undefined variable in expression: spawn_roadblocks
    21:01:29 File z\addons\dayz_server\system\server_monitor.sqf, line 334
    21:01:29 Error in expression <rom 1 to MaxDynamicDebris do {
    [] spawn spawn_roadblocks;
    };
    

     

    Does anyone what I'm doing wrong? 

     

    Probably better checking in Zupas thread as they are his install instructions.  I do not know what changes he has made to my code.

     

    You may wish to try installing with v2.34 though as I do not know if he has updated his side to work with v2.4 yet.

  13. My lack of clarity  :) .  I will amend the first post.  Thanks for highlighting.

     

    The numbers are converted to strings and then concatenated.

     

    11079.8,11834.3,-0.380997

    =

    X = 11079.8 * 10 = 110798 

    Y = 11834.3 * 10 = 118343

    Z = -0.380997 * 10 = -3.80997 * -10 (make positive) = 38.0997 round = 38

    DIR = 351.545 rounded = 352

     

    concat  110798 + 118343 + 38 + 352

    Calculated objectUID

    11079811834338352

     

    Stored ObjectUID

    11079811834338352

  14. The RPT file you posted said the error was on line 654 of your fn_selfactions.sqf file.  Putting the diag_log line in before that error (the if statement) will report what the error is.  If you have changed the fn_selfactions.sqf file so the error is no longer on line 654 then you will need to work oput where to put the diag_log line to match..  

  15. The easiest way to try and find out what is causing the problem is by using the diag log format command to report on what the variable is before it errors on that line.  It may produce quite a lot of debug lines in the client RPT file but it will show you what is getting passed to that line in the variables and will help to track back.

     

    Something like

    diag_log format["[fn_selfactions] Line 653 [dayz_combination: %1], [_ownerID: %2], [_playerUID: %3]",dayz_combination, _ownerID, _playerUID];
    

    At line 653 of the fn_selfactions.sqf file.

     

    When the bug hits, take a look at what the values were.

  16. So it sounds like it is an issue with the DB records being modified by other mods causing issues on your old install.

     

    Try a rebuild and then load the data in to the new DB b ut you may hit the same problem if the DB data has been previously changed in to a format that the current set of mod (including mine) are not designed to deal with.

     

    The fact that it happens after some time also seems to point to this as you may just have a few object in the DB that are causing the problem and it shows itself when the player encounters that object in the game world.

  17. Really depends on what you want the end result to be....

     

    With attachto you need to work out the offset from the model.  I am presuming that the default attach point is the model center.  You therefore need to work out the offset that would put the attachment on the sharks head.

     

    I have not touched A3Epoch but ...

     

    Something like

     "acc_pointer_IR" attachTo ["GreatWhite_F", [0.3,0,0.2]];

    You will then need to play with the figures to get the position just right.

     

    You can then use vectors to change the direction the attached item is pointed. 

    _allSharks = (position (vehicle player)) nearEntities ["GreatWhite_F", _mapsize]; 
    {
        "acc_pointer_IR" attachTo ["GreatWhite_F", [0.3,0,0.2]];
    }count _allSharks;
    
    

    If you wish to attach to everything then you could try...You would have to give _mapsize a value and it is not the most efficent way of doing it but it should work. It could also potentially be paired with my Ring Of Protection script but instead of killing player in range, the shark could be made to dotarget or you could get even funkier and play with vectors to make the lazers point at the nearest player if they were in range.

     

    Oh and client side or server side depends on how they are spawned and what is controlling them.  If they are client spawned then run the script on the client in a loop every 5 seconds or something (spawn the script and get it to uisleep after each scan).  Make _mapsize something outside of player swimming visual range that is further away than the distance the shark and player combined can cover during the sleep period and the lazers should spawn on the sharks in time for the player to see the shark.  Again, you can use the "Ring of Protection" script as a basic framework with some changes to get you going. 

     

    Further update: 

    You may find the sharks are setup as agents.  There are a number of agent control commands available as well which may be better at getting all the sharks.  Have a play. 

  18. @igoooor

     

    Thanks.  Yep that looks like a good fix.

     

    I will probably change it lightly to

     

    Find

    _nearestPole = _findNearestPole select 0;
    

    Change to

    if (_IsNearPlot > 0) then {_nearestPole = _findNearestPole select 0;}else{_nearestPole = objNull;};
    

    I will give this a test when home tonight (probably) and push it out in the next day or so (give or take New Year).

  19. What's the function with "take ownership". When does that work?

     

    Taken from the first post Core features

     

     

    Take Ownership is available from the plot pole to the plot poles owner and allows them to take ownership of all buildables in range excluding locked storage (safes / lockboxes), tents, locked doors. This can be changed as it is all controlled via variables. The core idea is that this will align peoples bases to the new system for steamID storage on legacy bases. It also means that raiders can raid a base, replace the plot pole, take ownership and not get full access to locked areas but not have 6 cycles to remove stuff etc after taking over. Depending on the size of the base, number of objects etc this could put a bit of load on the server / DB. It is also turn off or on-able via a variable so you can set it only to allow players to realign their bases and then disable the option.

     

    Taken from the install guide.

     

    Turn on Take Plot Ownership (take ownership of all items on a plot except locked items). This can be used to realign old bases to the A Plot of Life ownership system or for raiding and taking over bases.

     

    DZE_PlotOwnership = true;

×
×
  • Create New...