Jump to content

[HowTo] add Chernarus-Spawnselection


jOoPs

Recommended Posts

People asked for it and here it is... All necessary files are included in the zip-archive. The rest is basic knowledge.

 

first a list of modified files (which are not part of zip-archive!)
 

- description.ext
- init.sqf

- mission.sqm

 

(dayz_server.pbo)
- compile/
server_playerSetup.sqf

 

added folders and files (content of zip-archive)
 
- dayz_code/config/
  - RscDisplaySpawnSelecter.hpp

 
- dayz_code/system/
  - player_monitor.fsm

  - player_monitor.sqf

 

------------------
 
download the attached zip-archive  and extract the file(s) from client-folder into your missionfolder. Copy and replace the file(s) from server-folder in your dayz_server.pbo. If you use other folderstructures/filenames, change the given paths. for DZE v1.0.4 download player_monitor-104.zip and replace with the given from first zip-archive!
 
------------------
 
in description.ext add at bottom ...
#include "dayz_code\config\RscDisplaySpawnSelecter.hpp"

 

 

in init.sqf add to listed variables
dayz_spawnselection = 1; // DayZ Spawnselection / 1 = enabled // 0 = disabled, No current spawn limits.

 

in init.sqf delete following line ...
_playerMonitor =     [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

and replace with that one...

_playerMonitor =     [] execVM "dayz_code\system\player_monitor.sqf";

 

 

in mission.sqm replace class Markers with that ones...

	class Markers
	{
		items=18;
		class Item0
		{
			position[]={7839.6055,381.33774,8414.7324};
			name="center";
			type="Empty";
		};
		class Item1
		{
			position[]={-7245.377,365.98782,19535.367};
			name="respawn_west";
			type="Empty";
		};
///////////////////////////// spawnselector - begin /////////////////////////////
		class Item2
		{
			position[]={4932,0,1989};
			name="spawn0"; //spawn_balota
			type="Empty";
		};
		class Item3
		{
			position[]={2236,0,1923};
			name="spawn1"; //spawn_kamenka
			type="Empty";
		};
		class Item4
		{
			position[]={8738,0,2122};
			name="spawn2"; //spawn_cherno
			type="Empty";
		};
		class Item5
		{
			position[]={10909,0,2422};
			name="spawn3"; //spawn_elektro
			type="Empty";
		};
		class Item6
		{
			position[]={13510,0,5249};
			name="spawn4"; //spawn_sol
			type="Empty";
		};
		class Item7
		{
			position[]={12048,0,8352};
			name="spawn5"; //spawn_berezino
			type="Empty";
		};
///////////////////////////// spawnselector - end /////////////////////////////
		class Item8
		{
			position[]={6326.4805,304.99265,7809.4888};
			name="Tradercitystary";
			text="Trader City Stary";
			type="mil_circle";
			colorName="ColorBlack";
		};
		class Item9
		{
			position[]={4361.4937,3,2259.9526};
			name="wholesaleSouth";
			text="Wholesaler";
			type="mil_dot";
			colorName="ColorBlack";
		};
		class Item10
		{
			position[]={13532.614,3.0083523,6355.9497};
			name="boatTraderEast";
			text="Wholesaler";
			type="mil_dot";
			colorName="ColorBlack";
		};
		class Item11
		{
			position[]={7989.3354,0.30462033,2900.9946};
			name="BoatDealerSouth";
			text="Boat Dealer";
			type="mil_dot";
			colorName="ColorBlack";
		};
		class Item12
		{
			position[]={12060.471,158.85699,12638.533};
			name="AirVehicles";
			text="Aircraft Dealer";
			type="mil_dot";
			colorName="ColorGreen";
		};
		class Item13
		{
			position[]={1606.6443,289.70795,7803.5156};
			name="BanditDen";
			text="Bandit Camp";
			type="mil_dot";
			colorName="ColorRed";
		};
		class Item14
		{
			position[]={11447.91,317.27109,11364.536};
			name="Klen";
			text="Trader City Klen";
			type="mil_circle";
			colorName="ColorGreen";
		};
		class Item15
		{
			position[]={13441.16,1.1406164,5429.3013};
			name="BoatDealerEast";
			text="Boat Dealer";
			type="mil_dot";
			colorName="ColorBlack";
		};
		class Item16
		{
			position[]={4064.2258,365.13501,11665.938};
			name="TradercityBash";
			text="Trader City Bash";
			type="mil_circle";
			colorName="ColorBlack";
		};
		class Item17
		{
			position[]={12944.227,210.19823,12766.889};
			name="HeroTrader";
			text="Hero Camp";
			type="mil_dot";
			colorName="ColorBlue";
		};
	};

 

thats all

 

credits for main-code/graphics goes to thevisad

 

note:

- never set spawnArea to 0 ...or you spawn at map-center

- markers are changed for chernarus instance 11

- you need 6 spawnpoints in marker-class ... look for comments

- spawn0 to spawn5 marker are used for random

 

Chernarus-Spawnselection.zip

player_monitor_1042.zip

player_monitor_1051.zip

Link to comment
Share on other sites

Nice work!

 

Only thing is, is there a way you can let us novices know what we need to add to each file instead, since as an example, our server is using AxeCops Multiple Character support, which uses the player_monitor files already. I had a brief look, however things like the links (ie: link88[] = {74,68};) I dont understand, but if explained could add in manually.

Link to comment
Share on other sites

Its documented, what needs to added/changed or replaced in each file. if you want to combine that one with AxeCops Multiple Character mod you should use the BI FSM-Editor, compare both player_monitor.fsm files and change it... hint: first take a look into an untouched player_monitor.fsm, so you can see what has changed in both.

Link to comment
Share on other sites

Yeah, it works perfekt. jOoPs, you're personally my Hero of the day! ^^ Big thx for your work and the sharing. Using with the MultiChar from AxeCops works also perfect. The FSM-Editor is pretty simple to use. I've used the editor first time and combine the two player_monitor.fsm files at a few minutes. I like to share my player_monitor.fsm, but there is everytime a error like "You aren't permitted to upload this kind of file" or "This upload failed". :(

Link to comment
Share on other sites

Yeah, it works perfekt. jOoPs, you're personally my Hero of the day! ^^ Big thx for your work and the sharing. Using with the MultiChar from AxeCops works also perfect. The FSM-Editor is pretty simple to use. I've used the editor first time and combine the two player_monitor.fsm files at a few minutes. I like to share my player_monitor.fsm, but there is everytime a error like "You aren't permitted to upload this kind of file" or "This upload failed". :(

good to hear.. not all filetypes are allowed - make a zip-file and try it again :)

This works great thanks jOoPs

The one issue I have though is that it skips past the gender selection screen (it's on screen for about 0.1 second before it moves past and goes to the spawn selection), is there a way to get both active ?

the modifications i made didnt conflict with it... the gender select works on all my servers.

Link to comment
Share on other sites

There is something wrong with the random spawn. I am getting errors in RPT when spawnselection == 9

Generic error in expression.

I am using a custom spawn script, that gives a bike to user on fresh spawn...loading it with:

    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (dayzPlayerLogin2 select 2) then
    {
       [] execVM "newspawn\DRNSpawn.sqf";
    };

Now this gives an error when the player selects random spawn, and it looks that in server_playerSetup.sqf line :             if (_spawnSelection == 9) then {

is not executing properly....as if _spawnSelection doesnt get set properly from the .fsm file.

dayzPlayerLogin2 does gets set properly when a player selects a location...but it doesnt get executed on random spawn

Link to comment
Share on other sites

There is something wrong with the random spawn. I am getting errors in RPT when spawnselection == 9

Generic error in expression.

I am using a custom spawn script, that gives a bike to user on fresh spawn...loading it with:

    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (dayzPlayerLogin2 select 2) then
    {
       [] execVM "newspawn\DRNSpawn.sqf";
    };
Now this gives an error when the player selects random spawn, and it looks that in server_playerSetup.sqf line :             if (_spawnSelection == 9) then {

is not executing properly....as if _spawnSelection doesnt get set properly from the .fsm file.

dayzPlayerLogin2 does gets set properly when a player selects a location...but it doesnt get executed on random spawn

 

 

ehm... this is not part of this post... and randomspawn works how it should be. the above code is part of Post it there!

Link to comment
Share on other sites

ehm... this is not part of this post... and randomspawn works how it should be. the above code is part of Post it there!

 

ehhmm i know....i just kept the filename ...inside it i just spawn a bike where the player is.

The thing is that in the server_playerSetup.sqf i did this:

if (_spawnSelection == 9) then {
    // random spawn location selected, lets get the marker and spawn in somewhere
    if (dayz_spawnselection == 1) then { _mkr = "spawn" + str(floor(random 6)); } else { _mkr = "spawn" + str(floor(random 5)); _spawnbike=true; };
} else {
  // spawn is not random, lets spawn in our location that was selected
  _mkr = "spawn" + str(_spawnSelection); _spawnbike=true;
};

and then further down:

dayzPlayerLogin2 = [_worldspace,_state,_spawnbike];

so in the init.sqf i can do this and catch if spawnbike is true....so i know to spawn it:

    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (dayzPlayerLogin2 select 2) then
    {
       // player spawn p2_newspawn;
       [] execVM "custom\spawnbike.sqf";
    };

spawnbike.:

private ["_position","_ebayspawnvehicle"];

	diag_log("DEBUG: spawning new player at" + str(_position));

		player setPosATL _position;
		//-----------vehcile spawn----------------------------------------------------
		titleText ["Spawning with a bike! (bike wont save after restart)", "PLAIN DOWN", 5];
		sleep 2;
		titleFadeOut 1;
		_ebayspawnvehicle = 'Old_bike_TK_INS_EP1' createVehicle (position player);
		_ebayspawnvehicle setVariable ["Mission",1,true];
		clearMagazineCargo _ebayspawnvehicle;
		clearWeaponCargo _ebayspawnvehicle;

But like i said .... when random spawn is selected something must be wrong cause i get an error in  if (dayzPlayerLogin2 select 2) then

because in the player setup sqf "if (_spawnSelection == 9)"  is not set.

Btw _spawnSelection has to be declared in private declaration...not that it solves the problem though.

Link to comment
Share on other sites

dayzPlayerLogin2 = [_worldspace,_state,_spawnbike];

 

this wont work, coz you passed an third parameter which will not used in further processing.. dayzPlayerLogin2 uses two parameters - take a look into player_monitor.fsm!

so it has nothing to do with variable _spawnSelection - which is in "original" DayZ 1.8 also not declared as private... ;)  if you change the player_monitor.fsm to use a third parameter, you need to change all the dayzPlayerLogin2 calls in epoch...

if (_spawnSelection == 9) then {
    // random spawn location selected, lets get the marker and spawn in somewhere
    if (dayz_spawnselection == 1) then { _mkr = "spawn" + str(floor(random 6)); } else { _mkr = "spawn" + str(floor(random 5)); };
} else {
  // spawn is not random, lets spawn in our location that was selected
  _mkr = "spawn" + str(_spawnSelection);
};
_spawnbike = true;

or try it this way...

Link to comment
Share on other sites

So people have to manually download a new dayz_code in order to join a server which has this included?

 No why do you think that ?

 

And to answer my previous problem yes its my AH that stops it working as intended for me but for my players it works fine :D so good all is working as intended !

Link to comment
Share on other sites

 No why do you think that ?

 

And to answer my previous problem yes its my AH that stops it working as intended for me but for my players it works fine :D so good all is working as intended !

 

Well when I downloaded the files I saw a Client and Server folder, so I just assumed that players had to download something also.

Link to comment
Share on other sites

good to hear.. not all filetypes are allowed - make a zip-file and try it again
.zip works ^^ So here is now the player_monitor.fsm file to use together MultiChars (by AxaCop) with Spawnselection (by jOoPs). So here is now the player_monitor.fsm file to use together MultiChars (by AxaCop) with Spawnselection (by jOoPs). Works for all Chars like.... Login -> MultiChar Menu -> Respawn -> Spawnmenu

player_monitor.zip

Link to comment
Share on other sites

 

Good job.

 

Why this is in player_monitor.sqf?

_void = [] execVM "\z\addons\dayz_code\external\R3F_Realism\R3F_Realism_Init.sqf";

 

in older versions of DZE it was in the missionfiles embedded, now its in dayz_code.pbo...

Link to comment
Share on other sites

I have this on a server but its doesn't work, i asked someone who knew allot about scrips and he suggested that the anti hack we had on the server was stopping it. To be more accurate he said it was the anti tp. But our ant hack consists on many diffident ones together. Does anyone have any good ideas on what could be done ? thanks

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
×
×
  • Create New...