Jump to content

[Release] Loadout+ v1.1


Spodermayt

Recommended Posts

Hey Spodermayt, did you manage to find a way for me to use your script with Chernarus spawn selection ?

No biggie if not but yours is the only random loadout script out and it works :) just a shame it clashes

Not sure, i thought that the idea of dayz is to survive, so i didn't add that ;) But i think its not the spawnselection thats the problem. Can you tell me if it works that you call the loadout+.sqf before epoch variables?

here:

startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];

dayZ_instance = 11;
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;

player setVariable ["BIS_noCoreConversations", true];
enableRadio false;
enableSentences false;

//loadout m8//
execVM "YourPath/loadout+.sqf";

spawnShoremode = 1; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500
MaxVehicleLimit = 300; // Default = 50
MaxDynamicDebris = 500;
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 30; // Default = 30 
dayz_paraSpawn = false;
dayz_minpos = -1; 
dayz_maxpos = 16000;
dayz_sellDistance_vehicle = 10;
dayz_sellDistance_boat = 30;
dayz_sellDistance_air = 40;
dayz_maxAnimals = 5; // Default: 8
dayz_tameDogs = true;
/* and so on */

Try it and if it doesn't work tell me. Then ill add that script myself and test.

Link to comment
Share on other sites

Not sure, i thought that the idea of dayz is to survive, so i didn't add that ;) But i think its not the spawnselection thats the problem. Can you tell me if it works that you call the loadout+.sqf before epoch variables?

here:

<snip>

Try it and if it doesn't work tell me. Then ill add that script myself and test.

 

Nope, still freezes with a grey screen :(

Thanks for trying though, I'd love to use this :)

Link to comment
Share on other sites

Nope, still freezes with a grey screen :(

Thanks for trying though, I'd love to use this :)

It's how he's executing it. In my experience, spawn selection doesn't like adding gear before it get initialized. So, we use 

rdmspwn = compile preprocessFileLineNumbers "loadout.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn rdmspwn;
};

and add _randomSpot in server_playerSetup in the dayzplayerlogin array, then make your own loadout.sqf using addMagazine / addWeapon.

Link to comment
Share on other sites

Any chance of a bit more info please :)

I get what you mean but have no idea what files are affected.

the rdmspwn bit goes at the bottom of the init, then in your server files find server_playerSetup.sqf and find dayzPlayerLogin2 = ["blah","blah"]; and in the dayzPlayerLogin2 array add _randomSpot

Link to comment
Share on other sites

the rdmspwn bit goes at the bottom of the init, then in your server files find server_playerSetup.sqf and find dayzPlayerLogin2 = ["blah","blah"]; and in the dayzPlayerLogin2 array add _randomSpot

I thought something like this would work, had no idea how the spawnselection affected files. Well good if it works.

Link to comment
Share on other sites

Well it no longer gives me the freeze screen but the random loadouts are not being applied :unsure: spawning with a torch, bandage, patrol pack and pain killers, everytime i respawn.

But it's progress :)

if you're still trying to use the epoch loadout variables that's why. You can't. addMagazine is your friend in this situation.

Link to comment
Share on other sites

Ok so it is loading the default Epoch loadout, the part of the loadout+ script i'm using is :

 

 
// Select a loadout 0-4
_loadout=floor(random 4); //Change this as you like, remember it starts with 0. In this case we have 5 options to spawn with.
if (_loadout == 0) then {
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","10x_303"];
DefaultWeapons = ["ItemMap","LeeEnfield"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 1) then {
DefaultMagazines = ["ItemBandage","ItemPainkiller","15Rnd_W1866_Slug"];
DefaultWeapons = ["Winchester1866","ItemMap"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 2) then {
DefaultMagazines = ["ItemBandage","ItemPainkiller","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
DefaultWeapons = ["M9SD","ItemMap"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 3) then {
DefaultMagazines = ["ItemBandage","BoltSteel","BoltSteel","BoltSteel"];
DefaultWeapons = ["ItemToolbox","ItemMap","Crossbow"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 4) then {
DefaultMagazines = ["ItemBandage"];
DefaultWeapons = ["MeleeHatchet","ItemMap"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

 

Matt, do you mean use :

addMagazine instead of DefaultMagazines ?

Link to comment
Share on other sites

Ok so it is loading the default Epoch loadout, the part of the loadout+ script i'm using is :

 
// Select a loadout 0-4
_loadout=floor(random 4); //Change this as you like, remember it starts with 0. In this case we have 5 options to spawn with.
if (_loadout == 0) then {
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","10x_303"];
DefaultWeapons = ["ItemMap","LeeEnfield"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 1) then {
DefaultMagazines = ["ItemBandage","ItemPainkiller","15Rnd_W1866_Slug"];
DefaultWeapons = ["Winchester1866","ItemMap"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 2) then {
DefaultMagazines = ["ItemBandage","ItemPainkiller","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
DefaultWeapons = ["M9SD","ItemMap"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 3) then {
DefaultMagazines = ["ItemBandage","BoltSteel","BoltSteel","BoltSteel"];
DefaultWeapons = ["ItemToolbox","ItemMap","Crossbow"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

if (_loadout == 4) then {
DefaultMagazines = ["ItemBandage"];
DefaultWeapons = ["MeleeHatchet","ItemMap"];
DefaultBackpack = ["DZ_Patrol_Pack_EP1"];
DefaultBackpackWeapon = "";
};

Matt, do you mean use :

addMagazine instead of DefaultMagazines ?

// Select a loadout 0-4
_loadout=floor(random 4); //Change this as you like, remember it starts with 0. In this case we have 5 options to spawn with.
if (_loadout == 0) then {
{player addMagazine _x;} forEach ["ItemBandage","ItemBandage","ItemPainkiller","10x_303"];
{player addWeapon _x;} forEach ["ItemMap","LeeEnfield"];
player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 1) then {
{player addMagazine _x;} forEach ["ItemBandage","ItemPainkiller","15Rnd_W1866_Slug"];
{player addWeapon _x;} forEach ["Winchester1866","ItemMap"];
player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 2) then {
{player addMagazine _x;} forEach  ["ItemBandage","ItemPainkiller","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
{player addWeapon _x;} forEach ["M9SD","ItemMap"];
player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 3) then {
{player addMagazine _x;} forEach  ["ItemBandage","BoltSteel","BoltSteel","BoltSteel"];
{player addWeapon _x;} forEach["ItemToolbox","ItemMap","Crossbow"];
player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 4) then {
player addMagazine "ItemBandage";
{player addWeapon _x;} forEach ["MeleeHatchet","ItemMap"];
player addBackpack "DZ_Patrol_Pack_EP1";
};
Link to comment
Share on other sites

Yay :d Cheers Matt, I owe you a beer or 3

and thank you Spordermayt for the original script.

 

Richie is a happy chappy now B)

Good to hear you got that working :)

You could add removeMagazine/weapon to get rid of the default loadout tho :p

(Or add the empty loadout into your init.)

If i were you i'd leave it like that :) Happy survivin!

Link to comment
Share on other sites

I know a decent amount about scripting and try to help out where I can. Like I said, I wrote a neat little script for loadouts for my buddies server (his is overwatch and 100% pvp) that completely randomizes the weapons (and has blacklists etc) which I am willing to post up for you guys to use/edit/study if anyone requests. It's still kind of a work in progress but it's 99% functional

Link to comment
Share on other sites

I know a decent amount about scripting and try to help out where I can. Like I said, I wrote a neat little script for loadouts for my buddies server (his is overwatch and 100% pvp) that completely randomizes the weapons (and has blacklists etc) which I am willing to post up for you guys to use/edit/study if anyone requests. It's still kind of a work in progress but it's 99% functional

Pastebin link or something? I've really scripted for a few weeks, and am kinda interested how you did it :p

Link to comment
Share on other sites

  • 1 month later...

hi

 

i use this random loadout and humanity based loadout

private ["_loadout","_humanity"];
_loadout = floor (random 4);
_humanity = (player getVariable["humanity",0]);

if (_loadout == 0) then {
    {player addMagazine _x;} forEach ["DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X26","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 1) then {
    {player addMagazine _x;} forEach ["DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X26_b","ItemFlashlight","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 2) then {
    {player addMagazine _x;} forEach ["DDOPP_3Rnd_X3","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X3_b","ItemFlashlightRed","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 3) then {
    {player addMagazine _x;} forEach ["DDOPP_3Rnd_X3","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X3","ItemFlashlight","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_humanity <= -24999) then {
    removeAllWeapons player;
    removeAllItems player;
    removeBackpack player;
    {player addMagazine _x;} forEach ["7Rnd_45ACP_1911","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["revolver_EP1","ItemFlashlightRed","ItemMap"];
    player addBackpack "DZ_TerminalPack_EP1";
};
        
if (_humanity >= 24999) then {
    removeAllWeapons player;
    removeAllItems player;
    removeBackpack player;
    {player addMagazine _x;} forEach ["7Rnd_45ACP_1911","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["revolver_EP1","ItemFlashlightRed","ItemMap"];
    player addBackpack "DZ_TerminalPack_EP1";
};
Link to comment
Share on other sites

 

hi

 

i use this random loadout and humanity based loadout

private ["_loadout","_humanity"];
_loadout = floor (random 4);
_humanity = (player getVariable["humanity",0]);

if (_loadout == 0) then {
    {player addMagazine _x;} forEach ["DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X26","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 1) then {
    {player addMagazine _x;} forEach ["DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","DDOPP_1Rnd_X26","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X26_b","ItemFlashlight","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 2) then {
    {player addMagazine _x;} forEach ["DDOPP_3Rnd_X3","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X3_b","ItemFlashlightRed","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_loadout == 3) then {
    {player addMagazine _x;} forEach ["DDOPP_3Rnd_X3","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["DDOPP_X3","ItemFlashlight","ItemMap"];
    player addBackpack "DZ_Patrol_Pack_EP1";
};

if (_humanity <= -24999) then {
    removeAllWeapons player;
    removeAllItems player;
    removeBackpack player;
    {player addMagazine _x;} forEach ["7Rnd_45ACP_1911","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["revolver_EP1","ItemFlashlightRed","ItemMap"];
    player addBackpack "DZ_TerminalPack_EP1";
};
        
if (_humanity >= 24999) then {
    removeAllWeapons player;
    removeAllItems player;
    removeBackpack player;
    {player addMagazine _x;} forEach ["7Rnd_45ACP_1911","ItemBandage","ItemBandage","ItemPainkiller"];
    {player addWeapon _x;} forEach ["revolver_EP1","ItemFlashlightRed","ItemMap"];
    player addBackpack "DZ_TerminalPack_EP1";
};

Allright thanks for sharing

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

×
×
  • Create New...