xstreme

[Release] xsSpawn | Ground Spawn or Halo Selection

267 posts in this topic

11 minutes ago, jmayr2000 said:

Are you ever going to update this mod to 1.04?

Heavens! Did you really need to quote the whole op? 

Anyway, this works just fine with 104...

Share this post


Link to post
Share on other sites
Advertisement

I added all the right code to the file, read every line of the old file from 1.03 the last version that worked fine. Added all the missing code to the new file. and it still doesn't work. See below

 

Spoiler
/**
 * ExileServer_object_player_createBambi
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID", "_requestingPlayer", "_spawnLocationMarkerName","_thugToCheck","_HaloSpawnCheck","_bambiPlayer","_bambiPlayer", "_accountData", "_escapeEnabled", "_direction", "_position", "_spawnAreaPosition", "_spawnAreaRadius", "_clanID", "_clanData", "_clanGroup","_player","_escapeAccountdata", "_devFriendlyMode", "_devs", "_parachuteNetID", "_spawnType", "_parachuteObject"];
_sessionID = _this select 0;
_requestingPlayer = _this select 1;
_spawnLocationMarkerName = _this select 2;
_bambiPlayer = _this select 3;
_accountData = _this select 4;
_escapeEnabled = getNumber(configFile >> "CfgSettings" >> "Escape" >> "enableEscape") isEqualTo 1;
_direction = random 360;
if (_escapeEnabled) then
{
 _position = getArray(configFile >> "CfgSettings" >> "Escape" >> worldName >> "startingLocation");
 (uniformContainer _bambiPlayer) call ExileClient_util_containerCargo_clear;
 _bambiPlayer linkItem "ItemGPS";
}
else
{
 if ((count ExileSpawnZoneMarkerPositions) isEqualTo 0) then
 {
  _position = call ExileClient_util_world_findCoastPosition;
  if ((toLower worldName) isEqualTo "namalsk") then
  {
   while {(_position distance2D [76.4239, 107.141, 0]) < 100} do
   {
    _position = call ExileClient_util_world_findCoastPosition;
   };
  };
 }
 else
 {
  _spawnAreaPosition = getMarkerPos _spawnLocationMarkerName;
  _spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius");
  _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
  while {surfaceIsWater _position} do
  {
   _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
  };
 };
};
_name = name _requestingPlayer;
_clanID = (_accountData select 3);
if !((typeName _clanID) isEqualTo "SCALAR") then
{
 _clanID = -1;
 _clanData = [];
}
else
{
 _clanData = missionNamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]];
 if(isNull (_clanData select 5))then
 {
  _clanGroup = createGroup independent;
  _clanData set [5,_clanGroup];
  _clanGroup setGroupIdGlobal [_clanData select 0];
  missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData];
 }
 else
 {
  _clanGroup = (_clanData select 5);
 };
 [_player] joinSilent _clanGroup;
};
_bambiPlayer setPosATL [_position select 0,_position select 1,0];
_bambiPlayer disableAI "FSM";
_bambiPlayer disableAI "MOVE";
_bambiPlayer disableAI "AUTOTARGET";
_bambiPlayer disableAI "TARGET";
_bambiPlayer disableAI "CHECKVISIBLE";
_bambiPlayer setDir _direction;
_bambiPlayer setName _name;
_bambiPlayer setVariable ["ExileMoney", 0, true];
_bambiPlayer setVariable ["ExileScore", (_accountData select 0)];
_bambiPlayer setVariable ["ExileKills", (_accountData select 1)];
_bambiPlayer setVariable ["ExileDeaths", (_accountData select 2)];
_bambiPlayer setVariable ["ExileClanID", _clanID];
_bambiPlayer setVariable ["ExileClanData", _clanData];
_bambiPlayer setVariable ["ExileHunger", 100];
_bambiPlayer setVariable ["ExileThirst", 100];
_bambiPlayer setVariable ["ExileTemperature", 37];
_bambiPlayer setVariable ["ExileWetness", 0];
_bambiPlayer setVariable ["ExileAlcohol", 0];
_bambiPlayer setVariable ["ExileName", _name];
_bambiPlayer setVariable ["ExileOwnerUID", getPlayerUID _requestingPlayer];
_bambiPlayer setVariable ["ExileIsBambi", !_escapeEnabled];
_bambiPlayer setVariable ["ExileXM8IsOnline", false, true];
_bambiPlayer setVariable ["ExileLocker", (_accountData select 4), true];
_bambiPlayer setUnitTrait ["UAVHacker" ,true];
if (_escapeEnabled) then
{
 _escapeAccountdata = format["getEscapeAccountStats:%1", getPlayerUID _requestingPlayer] call ExileServer_system_database_query_selectSingle;
 _bambiPlayer setVariable ["ExileWins", (_escapeAccountdata select 0)];
 _bambiPlayer setVariable ["ExileMatches", (_escapeAccountdata select 1)];
};
_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode");
if (_devFriendlyMode isEqualTo 1) then
{
 _devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
 {
  if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
  {
   if ((name _requestingPlayer) isEqualTo (_x select 1))then
   {
    _bambiPlayer setVariable ["ExileMoney", 500000, true];
    _bambiPlayer setVariable ["ExileScore", 100000];
   };
  };
 }
 forEach _devs;
};
_parachuteNetID = "";
_thugToCheck = _sessionID call ExileServer_system_session_getPlayerObject;
_HaloSpawnCheck = _thugToCheck getVariable ["playerWantsHaloSpawn", 0];
if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteSpawning")) isEqualTo 1 && {!(_escapeEnabled)}) then
{
 _position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")];
 if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then
 {
  clearWeaponCargo _bambiPlayer; // clears items
  clearMagazineCargo _bambiPlayer; // clears items
  _bambiPlayer forceAddUniform "exile_uniform_woodland";
  _bambiPlayer addItemToUniform "Exile_Item_DuctTape";
  _bambiPlayer addItemToUniform "Exile_Item_JunkMetal";
  _bambiPlayer addItemToUniform "Exile_Item_InstaDoc";
  _bambiPlayer addWeapon "ItemMap";
  _bambiPlayer addWeapon "ItemRadio";
  _bambiPlayer addWeapon "ItemCompass";
  _bambiPlayer addWeapon "ItemWatch";
  _bambiPlayer addWeapon "ItemGPS";
  _bambiPlayer addWeapon "Exile_Item_XM8";
  _bambiPlayer addMagazines ["hlc_12Rnd_357SIG_B_P226", 3];
  _bambiPlayer addWeapon "hlc_pistol_P226R_357Combat";
  _bambiPlayer setPosATL _position;
  _spawnType = 2
 }
 else
 {
  _parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"];
  _parachuteObject setDir _direction;
  _parachuteObject setPosATL _position;
  _parachuteObject enableSimulationGlobal true;
  _parachuteNetID = netId _parachuteObject;
  _spawnType = 1;
 };
}
else
{
  clearWeaponCargo _bambiPlayer; // clears items
  clearMagazineCargo _bambiPlayer; // clears items
  _bambiPlayer forceAddUniform "exile_uniform_woodland";
  _bambiPlayer addItemToUniform "Exile_Item_DuctTape";
  _bambiPlayer addItemToUniform "Exile_Item_JunkMetal";
  _bambiPlayer addItemToUniform "Exile_Item_InstaDoc";
  _bambiPlayer addWeapon "ItemMap";
  _bambiPlayer addWeapon "ItemRadio";
  _bambiPlayer addWeapon "ItemCompass";
  _bambiPlayer addWeapon "ItemWatch";
  _bambiPlayer addWeapon "ItemGPS";
  _bambiPlayer addWeapon "Exile_Item_XM8";
  _bambiPlayer addMagazines ["hlc_12Rnd_357SIG_B_P226", 3];
  _bambiPlayer addWeapon "hlc_pistol_P226R_357Combat";
  _bambiPlayer setPosATL _position;
 _spawnType = 0;
};
if (getNumber(missionConfigFile >> "CfgSimulation" >> "enableDynamicSimulation") isEqualTo 1) then
{
 if ((canTriggerDynamicSimulation _bambiPlayer) isEqualTo false) then
 {
  _bambiPlayer triggerDynamicSimulation true;
    _bambiPlayer enableDynamicSimulation true;
 };
};
_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
if !(_escapeEnabled) then
{
 _bambiPlayer call ExileServer_object_player_database_insert;
 _bambiPlayer call ExileServer_object_player_database_update;
};
[
 _sessionID,
 "createPlayerResponse",
 [
  _bambiPlayer,
  _parachuteNetID,
  str (_accountData select 0),
  (_accountData select 1),
  (_accountData select 2),
  100,
  100,
  0,
  (getNumber (configFile >> "CfgSettings" >> "BambiSettings" >> "protectionDuration")) * 60,
  _clanData,
  _spawnType
 ]
]
call ExileServer_system_network_send_to;
if (_escapeEnabled) then
{
 [
  _sessionID,
  "escapeVariables",
  [
   (_escapeAccountdata select 0),
   (_escapeAccountdata select 1)
  ]
 ]
 call ExileServer_system_network_send_to;
};
[_sessionID, _bambiPlayer] call ExileServer_system_session_update;
true

P.S I used the same software everyone used. Notepad ++

Edited by jmayr2000

Share this post


Link to post
Share on other sites
1 hour ago, jmayr2000 said:

I added all the right code to the file, read every line of the old file from 1.03 the last version that worked fine. Added all the missing code to the new file. and it still doesn't work. See below

 

  Hide contents
/**
 * ExileServer_object_player_createBambi
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID", "_requestingPlayer", "_spawnLocationMarkerName","_thugToCheck","_HaloSpawnCheck","_bambiPlayer","_bambiPlayer", "_accountData", "_escapeEnabled", "_direction", "_position", "_spawnAreaPosition", "_spawnAreaRadius", "_clanID", "_clanData", "_clanGroup","_player","_escapeAccountdata", "_devFriendlyMode", "_devs", "_parachuteNetID", "_spawnType", "_parachuteObject"];
_sessionID = _this select 0;
_requestingPlayer = _this select 1;
_spawnLocationMarkerName = _this select 2;
_bambiPlayer = _this select 3;
_accountData = _this select 4;
_escapeEnabled = getNumber(configFile >> "CfgSettings" >> "Escape" >> "enableEscape") isEqualTo 1;
_direction = random 360;
if (_escapeEnabled) then
{
 _position = getArray(configFile >> "CfgSettings" >> "Escape" >> worldName >> "startingLocation");
 (uniformContainer _bambiPlayer) call ExileClient_util_containerCargo_clear;
 _bambiPlayer linkItem "ItemGPS";
}
else
{
 if ((count ExileSpawnZoneMarkerPositions) isEqualTo 0) then
 {
  _position = call ExileClient_util_world_findCoastPosition;
  if ((toLower worldName) isEqualTo "namalsk") then
  {
   while {(_position distance2D [76.4239, 107.141, 0]) < 100} do
   {
    _position = call ExileClient_util_world_findCoastPosition;
   };
  };
 }
 else
 {
  _spawnAreaPosition = getMarkerPos _spawnLocationMarkerName;
  _spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius");
  _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
  while {surfaceIsWater _position} do
  {
   _position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
  };
 };
};
_name = name _requestingPlayer;
_clanID = (_accountData select 3);
if !((typeName _clanID) isEqualTo "SCALAR") then
{
 _clanID = -1;
 _clanData = [];
}
else
{
 _clanData = missionNamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]];
 if(isNull (_clanData select 5))then
 {
  _clanGroup = createGroup independent;
  _clanData set [5,_clanGroup];
  _clanGroup setGroupIdGlobal [_clanData select 0];
  missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData];
 }
 else
 {
  _clanGroup = (_clanData select 5);
 };
 [_player] joinSilent _clanGroup;
};
_bambiPlayer setPosATL [_position select 0,_position select 1,0];
_bambiPlayer disableAI "FSM";
_bambiPlayer disableAI "MOVE";
_bambiPlayer disableAI "AUTOTARGET";
_bambiPlayer disableAI "TARGET";
_bambiPlayer disableAI "CHECKVISIBLE";
_bambiPlayer setDir _direction;
_bambiPlayer setName _name;
_bambiPlayer setVariable ["ExileMoney", 0, true];
_bambiPlayer setVariable ["ExileScore", (_accountData select 0)];
_bambiPlayer setVariable ["ExileKills", (_accountData select 1)];
_bambiPlayer setVariable ["ExileDeaths", (_accountData select 2)];
_bambiPlayer setVariable ["ExileClanID", _clanID];
_bambiPlayer setVariable ["ExileClanData", _clanData];
_bambiPlayer setVariable ["ExileHunger", 100];
_bambiPlayer setVariable ["ExileThirst", 100];
_bambiPlayer setVariable ["ExileTemperature", 37];
_bambiPlayer setVariable ["ExileWetness", 0];
_bambiPlayer setVariable ["ExileAlcohol", 0];
_bambiPlayer setVariable ["ExileName", _name];
_bambiPlayer setVariable ["ExileOwnerUID", getPlayerUID _requestingPlayer];
_bambiPlayer setVariable ["ExileIsBambi", !_escapeEnabled];
_bambiPlayer setVariable ["ExileXM8IsOnline", false, true];
_bambiPlayer setVariable ["ExileLocker", (_accountData select 4), true];
_bambiPlayer setUnitTrait ["UAVHacker" ,true];
if (_escapeEnabled) then
{
 _escapeAccountdata = format["getEscapeAccountStats:%1", getPlayerUID _requestingPlayer] call ExileServer_system_database_query_selectSingle;
 _bambiPlayer setVariable ["ExileWins", (_escapeAccountdata select 0)];
 _bambiPlayer setVariable ["ExileMatches", (_escapeAccountdata select 1)];
};
_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode");
if (_devFriendlyMode isEqualTo 1) then
{
 _devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
 {
  if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith
  {
   if ((name _requestingPlayer) isEqualTo (_x select 1))then
   {
    _bambiPlayer setVariable ["ExileMoney", 500000, true];
    _bambiPlayer setVariable ["ExileScore", 100000];
   };
  };
 }
 forEach _devs;
};
_parachuteNetID = "";
_thugToCheck = _sessionID call ExileServer_system_session_getPlayerObject;
_HaloSpawnCheck = _thugToCheck getVariable ["playerWantsHaloSpawn", 0];
if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteSpawning")) isEqualTo 1 && {!(_escapeEnabled)}) then
{
 _position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")];
 if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then
 {
  clearWeaponCargo _bambiPlayer; // clears items
  clearMagazineCargo _bambiPlayer; // clears items
  _bambiPlayer forceAddUniform "exile_uniform_woodland";
  _bambiPlayer addItemToUniform "Exile_Item_DuctTape";
  _bambiPlayer addItemToUniform "Exile_Item_JunkMetal";
  _bambiPlayer addItemToUniform "Exile_Item_InstaDoc";
  _bambiPlayer addWeapon "ItemMap";
  _bambiPlayer addWeapon "ItemRadio";
  _bambiPlayer addWeapon "ItemCompass";
  _bambiPlayer addWeapon "ItemWatch";
  _bambiPlayer addWeapon "ItemGPS";
  _bambiPlayer addWeapon "Exile_Item_XM8";
  _bambiPlayer addMagazines ["hlc_12Rnd_357SIG_B_P226", 3];
  _bambiPlayer addWeapon "hlc_pistol_P226R_357Combat";
  _bambiPlayer setPosATL _position;
  _spawnType = 2
 }
 else
 {
  _parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"];
  _parachuteObject setDir _direction;
  _parachuteObject setPosATL _position;
  _parachuteObject enableSimulationGlobal true;
  _parachuteNetID = netId _parachuteObject;
  _spawnType = 1;
 };
}
else
{
  clearWeaponCargo _bambiPlayer; // clears items
  clearMagazineCargo _bambiPlayer; // clears items
  _bambiPlayer forceAddUniform "exile_uniform_woodland";
  _bambiPlayer addItemToUniform "Exile_Item_DuctTape";
  _bambiPlayer addItemToUniform "Exile_Item_JunkMetal";
  _bambiPlayer addItemToUniform "Exile_Item_InstaDoc";
  _bambiPlayer addWeapon "ItemMap";
  _bambiPlayer addWeapon "ItemRadio";
  _bambiPlayer addWeapon "ItemCompass";
  _bambiPlayer addWeapon "ItemWatch";
  _bambiPlayer addWeapon "ItemGPS";
  _bambiPlayer addWeapon "Exile_Item_XM8";
  _bambiPlayer addMagazines ["hlc_12Rnd_357SIG_B_P226", 3];
  _bambiPlayer addWeapon "hlc_pistol_P226R_357Combat";
  _bambiPlayer setPosATL _position;
 _spawnType = 0;
};
if (getNumber(missionConfigFile >> "CfgSimulation" >> "enableDynamicSimulation") isEqualTo 1) then
{
 if ((canTriggerDynamicSimulation _bambiPlayer) isEqualTo false) then
 {
  _bambiPlayer triggerDynamicSimulation true;
    _bambiPlayer enableDynamicSimulation true;
 };
};
_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
if !(_escapeEnabled) then
{
 _bambiPlayer call ExileServer_object_player_database_insert;
 _bambiPlayer call ExileServer_object_player_database_update;
};
[
 _sessionID,
 "createPlayerResponse",
 [
  _bambiPlayer,
  _parachuteNetID,
  str (_accountData select 0),
  (_accountData select 1),
  (_accountData select 2),
  100,
  100,
  0,
  (getNumber (configFile >> "CfgSettings" >> "BambiSettings" >> "protectionDuration")) * 60,
  _clanData,
  _spawnType
 ]
]
call ExileServer_system_network_send_to;
if (_escapeEnabled) then
{
 [
  _sessionID,
  "escapeVariables",
  [
   (_escapeAccountdata select 0),
   (_escapeAccountdata select 1)
  ]
 ]
 call ExileServer_system_network_send_to;
};
[_sessionID, _bambiPlayer] call ExileServer_system_session_update;
true

P.S I used the same software everyone used. Notepad ++

You are missing the override of this part, without it you will not be able to successfully pick a spawn type.

if (_HaloSpawnCheck isEqualTo 1) then 
{
	_position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")]; 
	if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then
	{
		_bambiPlayer addBackpackGlobal "B_Parachute";
		_bambiPlayer setPosATL _position;
		_spawnType = 2;
	}
	else 
	{
		_parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"];
		_parachuteObject setDir _direction;
		_parachuteObject setPosATL _position;
		_parachuteObject enableSimulationGlobal true;
		_parachuteNetID = netId _parachuteObject;
		_spawnType = 1;
	};
}
else
{
	_spawnType = 0;
};

Get a program called "DiffMerge" its not a perfect way to combine files but it makes it easier to compare and change things if you aren't sure yourself. I am not certain if you can just ignore that Exile Escape stuff you need to merge, fingers crossed for you.

Share this post


Link to post
Share on other sites

I'm having issues with adding a new logo or background. The color of the image is off, much like the negative of a photograph. I have resized the images to match that of the original, and I have tried other images just to test/debug the issue. Anyone have a similar problem in the past and found a solution?

Share this post


Link to post
Share on other sites
6 hours ago, Beowulfv said:

I'm having issues with adding a new logo or background. The color of the image is off, much like the negative of a photograph. I have resized the images to match that of the original, and I have tried other images just to test/debug the issue. Anyone have a similar problem in the past and found a solution?

You don't have a extra dialog control? Should look similar to below in xsSpawnDiaglog.hpp.

		class xsSpawnLogo: xsSpawnRscPictureKeepAspect
		{
			idc = 1101;
			x = 0.0771875 * safezoneW + safezoneX;
			y = 0.054 * safezoneH + safezoneY;
			w = 0.156 * safezoneW;
			h = 0.156 * safezoneH;
			text = "xs\spawn\xslogo.paa";
		};
colorText[] = {1,1,1,1};

Remove the above if you have that control in the logo dialog. If not, how are you exporting and what file type are you using as your logo?

also this.

https://forums.bohemia.net/forums/topic/157041-wrong-color-with-paa-files/

Share this post


Link to post
Share on other sites
25 minutes ago, Pattoh said:

You don't have a extra dialog control? Should look similar to below in xsSpawnDiaglog.hpp.


		class xsSpawnLogo: xsSpawnRscPictureKeepAspect
		{
			idc = 1101;
			x = 0.0771875 * safezoneW + safezoneX;
			y = 0.054 * safezoneH + safezoneY;
			w = 0.156 * safezoneW;
			h = 0.156 * safezoneH;
			text = "xs\spawn\xslogo.paa";
		};

colorText[] = {1,1,1,1};

Remove the above if you have that control in the logo dialog. If not, how are you exporting and what file type are you using as your logo?

also this.

https://forums.bohemia.net/forums/topic/157041-wrong-color-with-paa-files/

I have the dialog, there is no colorText in any of the classes for the logo or background. I have always used TextView2 to convert PNG to PAA.

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.