Jump to content
swift39

Issues on Dedicated Server (Briefing and add-ons not working)

Recommended Posts

First of all I should say that I am new to Arma3 and the scripting and inner workings, so please be patient...

 

Friends, Co-workers and myself have decided to get together and play Arma3 which lead to creating a "dedicated" server. The Server seems to be working fine with only one issue noticed, that in the Arma3 Shortcut the target path seems to drop the "-filepatching" on a regular basis which messes up the Zue_A3serverbriefing that is being used.

 

The main issue is I created some Zues missions that could be used to create on the fly Missions with the Ayres-Achilles mod. Which for the most part works as expected, with currently two frustrating issues that I have two weekends and countless hours during the week trying to resolve.

 

Problem #1

The ability to "save" in game issue came up and given the level of experience with some of our guys I decided to test and use Henrik Hansen's Zues ObjectEditor V.1.0. which works fine in Eden Editor testing on the MP platform.

 

Problem #2

The briefing does not display, again worked in the testing.

 

As I said both worked well testing through the Editor, but once placed onto the server, neither work properly. The Briefing does not display at all! and the Zues_ObjectEditor wont copy to clipboard, but seems to read the objectGrabber ".sqf" files.

 

The following is the .sqf files that I am using to achieve this...

 

init.sqf

Spoiler

call compile preprocessFileLineNumbers "Engima\Civilians\Common\Common.sqf";
call compile preprocessFileLineNumbers "Engima\Civilians\Common\Debug.sqf";
call compile preprocessFileLineNumbers "Engima\Traffic\Init.sqf";

// The following constants may be used to tweak behaviour

ENGIMA_CIVILIANS_SIDE = civilian;      // If you for some reason want the units to spawn into another side.
ENGIMA_CIVILIANS_MINSKILL = 0.4;       // If you spawn something other than civilians, you may want to set another skill level of the spawned units.
ENGIMA_CIVILIANS_MAXSKILL = 0.6;       // If you spawn something other than civilians, you may want to set another skill level of the spawned units.

ENGIMA_CIVILIANS_MAXWAITINGTIME = 300; // Maximum standing still time in seconds
ENGIMA_CIVILIANS_RUNNINGCHANCE = 0.05; // Chance of running instead of walking

// Civilian personalities
ENGIMA_CIVILIANS_BEHAVIOURS = [
	["CITIZEN", 100] // Default citizen with ordinary behaviour. Spawns in a house and walks to another house, and so on...
];

// Do not edit anything beneath this line!

ENGIMA_CIVILIANS_INSTANCE_NO = 0;

if (isServer) then {
	call compile preprocessFileLineNumbers "Engima\Civilians\Server\ServerFunctions.sqf";
	call compile preprocessFileLineNumbers "Engima\Civilians\ConfigAndStart.sqf";
	//CuratorModule = your curator module name; true = boolean, if civilians should be editable by zeus as well.
	[Zeus,true] execVM "ADV_zeus.sqf";
};

 

 initServer.sqf

Spoiler

[] execVM "initBriefing";
ZOE_ObjectSaves = ["GregsMods.sqf", "MikesModes.sqf"];
#include "zeus_objecteditor\ZOE_Functions.sqf";

 

initBriefing.sqf

Spoiler

//Briefing Notes

//waituntil {!isNull player};
//waitUntil { player == player };

switch (side player) do {
	
	case WEST: // BLUFOR briefing goes here
	{
		player createDiaryRecord ["Diary", ["TFA Radio", "TOWER uses TFAR Radio for Communications<br/><br/>Established Frequencies:<br/>Channel 1: 180.7<br/>Channel 2: Established in-game<br/>Channel 3: Established in-game<br/>Channel 4: Established in-game<br/>Channel 5: Established in-game<br/>Channel 6: Established in-game<br/>Channel 7: Established in-game<br/>Channel 8: Established in-game<br/>"]];
		
		player createDiaryRecord["Diary", ["Weather", "Weather is currently predefined when Mission Module was created.<br/>We are hope to have random weather optimization soon."]];

		player createDiaryRecord["Diary", ["Overview", "Welcome to the Obscure World of ER<br/>This Mission is set on the Island of Altis and is Vanilla.<br/>Administer rights are required to create units, set objects, taskings and set up mission play."]];
	};

	case EAST: // OPFOR briefing goes here
	{
	};

	case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here
	{
	};

	case CIVILIAN: // CIVILIAN briefing goes here
	{
	};
};

 

Description.ext

Spoiler

// Description.ext (Full description of attributes below)

author = "SWIFT"; 												// Author
onLoadName = "TOWER Zeus (Vanilla) - Altis"; 									// Mission name (temporary solution; actual name set in editor will be used later in the alpha)
onLoadMission = "ER Zeus Module (Vanilla). In game mission creation required. COS Enabled, TFR Enabled"; 	// Description
loadScreen =  "loadmission_TWR.jpg";
//briefingName = "Zues - Game Master";
	class Header
	{
		gameType = Zeus; 		// Game type, see 'class' columns in the table below
		minPlayers = 1; 		//min # of players the mission supports
		maxPlayers = 100; 		//max # of players the mission supports
	};
respawn = 2;				// Respawn type, see the table below
enableTeamSwitch = 1;
respawnButton = 1;
respawnDelay = 10;			// Delay in seconds before playable unit respawns.
ReviveMode = 1;				// 0: disabled, 1: enabled, 2: controlled by player attributes 
ReviveUnconsciousStateMode = 1;		// 0: basic, 1: advanced, 2: realistic 
ReviveRequiredTrait = 0;		// 0: none, 1: medic trait is required
ReviveRequiredItemsFakConsumed = 1;	// 0: first aid kit is not consumed upon revive, 1: first aid kit is consumed 
ReviveMedicSpeedMultiplier = 2;		// speed multiplier for revive performed by medic 
reviveDelay = 20;			// The time it takes to revive an incapacitated unit (default: 6 seconds). Having a Medikit will halve this time. 
reviveForceRespawnDelay = 10;		// The time it takes for an incapacitated unit to force their respawn (default: 3 seconds). 
reviveBleedOutDelay = 120;		// The time it takes for a unit to bleed out (default: 2 minutes). 
briefing = 1;
debriefing = 0;
showGPS = 1;
showCompass = 1;
showMap = 1;
showWatch = 1;
showUAVFeed = 1;
showSquadRadar = 1;
allowSubordinatesTakeWeapons= 1;
corpseManagerMode = 1;
corpseLimit = 15;
corpseRemovalMinTime = 10; 		//seconds
corpseRemovalMaxTime = 120; 		//seconds
wreckManagerMode = 1;
wreckLimit = 5;
wreckRemovalMinTime = 300; 		//seconds
wreckRemovalMaxTime = 1200; 		//seconds

 

 

I created the initServer.sqf to deal with multiple instance issues in both the briefing and objectEditor when in the init.sqf file. I don't understand why it would work in testing and not on the dedicated server.

 

Also I should note that when the objecteditor was in the init.sqf it worked, but when started would put multiple objects on the server which would create mass explosions.

 

Any assistance or advice would be greatly appreciated and thank you in advance for any responses.

 

Thank You

Greg

 

*** UPDATE ***

 

Ok made some progress tonight. I created a initPlayerLocal.sqf and placed the objecteditor commands in it.

 

initPlayerLocal.sqf

Spoiler

//initPlayerLocal

ZOE_ObjectSaves = ["GregsMods.sqf", "MikesModes.sqf"];
#include "zeus_objecteditor\ZOE_Functions.sqf";

 

 

Again it works fine in editor, and at least now works partially when placed on the server. It now allows it to complete once. When you attempt to do it again the server indicates that the process completed but when you paste into the file it pastes the last copy and not the updated one. I have the trigger set to repeatable, but doesn't appear to make a difference. Suggestions welcomed.

 

Thanks 

Greg

 

 

Edited by swift39
Updated progress

Share this post


Link to post
Share on other sites

Vérify that you don't have any sqf, called on server only, with player as command/variable. Player doesn't exist on dedicated.

Share this post


Link to post
Share on other sites

 

Thanks pierremgi...

 

I have looked and have not noticed any .sqf with the player as command/variable on the server only. It makes no sense to me why it works once then breaks. In Henrik Hansen's script I do not see anything that would indicate not being able to work on a dedicated server. 

 

 

Henrik Hansen's "GrabObjects" Function

Spoiler

ZOE_GrabObjects = {
	private ["_br","_tab","_myString","_curator","_i"];
	_curator =  getAssignedCuratorLogic player;
	if (isNull _curator) exitWith {"Zues Curator not assigned to player - include zues gamemaster in your mission"}; 
	_br = toString [13,10];
	_tab = toString [9];
 	_myString ="[" + _br;
	_i=0;
	{
		_myString = _myString + '[' + format['"%1",%2,%3,%4,objNull',typeOf _x,getPosATL _x,vectorDir _x,vectorUp _x] + ']';
		if ( _i < (count (curatorEditableObjects _curator)) - 1) then {_myString = _myString + ','};
		_myString = _myString + _br;
		_i=_i+1;
	} forEach (curatorEditableObjects _curator);
	_myString = _myString + ']';
	copytoclipboard _myString;
	hint format ["Grabbed %1 objects to clipboard",(count (curatorEditableObjects _curator))]; 
	_myString
};//function

 

What I have learned:

Works in Editor flawlessly.

Placing  the "init" lines in anything, but the "initPlayerLocal.sqf" causes duplication and mass explosions on start, and doesn't fix the paste issue.

The Trigger seems to work and indicates that the objects have been copied, but apparently they wont paste into notepad.

 

Is it possible it is a security issue within Arma or possibly windows, catches it on the first instance then disables it? Although there is nothing in the Event log.

 

On a positive note! I did sort out the Briefing display by placing it in the "initPlayerLocal.sqf" and discovered it has to be in the first line of the file. Now displays and without duplication

 

initPlayerLocal.sqf

Spoiler

//initPlayerLocal

[] execVM "initBriefing.sqf";
ZOE_ObjectSaves = ["GregsMods.sqf", "MikesModes.sqf"];
#include "zeus_objecteditor\ZOE_Functions.sqf"

 

 

Like I said I am at a loss with this and not finding a lot on the Forum about it. Any further ideas would be greatly appreciated. 

 

Thanks

Greg

 

Edited by swift39
Spelling

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

×