Jump to content

[Release] Hero Perks (Epoch pre-configured)


Recommended Posts

Matt L's Hero Perks
Version 1

Everyone knows it's harder to play the hero than the bandit, so why not give them some perks? What this does is runs a humanity check then if they have above 5000 humanity they spawn up north with a random skin in their inventory. Each perk is set up at 5k, 10k, 20k, and 30k, but can be easily changed. Each perk after 5k also gets a random spawn and random skin. At 10k you are given a motor bike, 20k gets you an SUV, and 30k gets you a mozzie with a box full of 3 randomly selected weapons, randomly selected item sets, and a randomly selected backpack. 

To Install: 

You will need PBO manager and Notepad ++
  1. This will conflict with any antihack, battle eye, and server cleanup routines. To fix the antihack (if using infistar) go into ahconfig and turn off the hack box check. I personally don't use battle eye so I can't help with writing exceptions. For most of you the server cleanup routine will be in the server_cleanup.fsm which is located in the dayz_server.pbo in the system folder, Ctrl + F for hacker and find the line that start with
    Code (Text):
    (vehicle _x != _x
    and change that line to resemble something like
    Code (Text):
    if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
    and if you're using Epoch this routine is in the server_functions.sqf, find it by searching for hacker once more then replace the vehicle line with
    Code (Text):
    if(vehicle _x != _x && (vehicle _x getVariable ["Mission",0] != 1) && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
  2. Next, go into your dayz_server\compiles folder and find server_playerSetup.sqf, (note this will be different for most mods, but this is what it is for Epoch) locate the line that looks like
    Code (Text):
    dayzPlayerLogin2 = [_worldspace,_state];
    and replace it with
    Code (Text):
    dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];
    and repack your dayz_server.pbo
  3. Next open your init.sqf in your dayz_mission.pbo and at the bottom add 
    Code (Text):
    //hero spawn
    herospawn = compile preprocessFileLineNumbers "CHANGE\FILE\PATH\HERE\heroperk.sqf";
    waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
    if (dayzPlayerLogin2 select 2) then
    {
        player spawn herospawn;
    };
    obviously adjust the file path to where you placed heroperk.sqf
  4. Download and edit to your liking

Credits -

Matt L http://opendayz.net/members/matt-l.7134/ for Coding
HollowAddiction for the idea and testing
CommanderRetra for helping with random skin and backpack assortment (bis_fnc_selectrandom).
Ebay for server cleanup example

At some point in the future I may release a version with added bandit negative effects like a small chance to spawn infected, or randomly spawning in the middle of nowhere or losing a tiny bit of blood every couple seconds for a couple minutes etc.

Link to comment
Share on other sites

There is a little thing in your code that needs to be changed

 

_cratemags = [_mags,_magss,_maggs] call BIS_fnc_selectRandom;
_crateweps = [_weapons,_weaponss,_weaponns] call BIS_fnc_selectRandom;
 
wont provide to get the needed ammo for the given weapon and wouldnt make sense thatway
Link to comment
Share on other sites

I like the idea.  Being a hero, especially solo, can be tricky.

 

Maybe a slight change to give a small care package at the heros plot pole at reaching the hero perk stages.  Maybe a weapon not available at the traders and some ammo (5 mags or something).

 

Saying that, another alternative may be to provide different discount levels for the heros with the hero trader (could do the same with the bandit trader for bandits too)  :) .  Of course there is little point in giving a 1 Gold bar discount with the traders if gold is not so hard to get anyway.

 

Thanks for the mod and nice idea.

Link to comment
Share on other sites

I like the idea.  Being a hero, especially solo, can be tricky.

 

Maybe a slight change to give a small care package at the heros plot pole at reaching the hero perk stages.  Maybe a weapon not available at the traders and some ammo (5 mags or something).

 

Saying that, another alternative may be to provide different discount levels for the heros with the hero trader (could do the same with the bandit trader for bandits too)  :) .  Of course there is little point in giving a 1 Gold bar discount with the traders if gold is not so hard to get anyway.

 

Thanks for the mod and nice idea.

 

It is customizable, changing items given would be easy

Link to comment
Share on other sites

 

There is a little thing in your code that needs to be changed

 

_cratemags = [_mags,_magss,_maggs] call BIS_fnc_selectRandom;
_crateweps = [_weapons,_weaponss,_weaponns] call BIS_fnc_selectRandom;
 
wont provide to get the needed ammo for the given weapon and wouldnt make sense thatway

 

If you look at the arrays we used weapons that have the same ammo for each array ie in one weapons array it gives M4 dmr and AK or some thing, so in each of the mags arrays it gives 30rnd nato, 30rnd ak, and a dmr mag

Link to comment
Share on other sites

I know hollowaddiction said he wouldn't be helping anyone with battleeye but, I was wondering if anyone could help me with fixing this?

 

 

 

27.05.2014 09:28:58: Genesis - #2 "FoodBox0" 7:66 [7004,7625,293]

It's from my createvehicle.log

Link to comment
Share on other sites

If you look at the arrays we used weapons that have the same ammo for each array ie in one weapons array it gives M4 dmr and AK or some thing, so in each of the mags arrays it gives 30rnd nato, 30rnd ak, and a dmr mag

ahh k didnt noticed that, but wouldnt it be easier to do arrays that are weaponsspecific?

Link to comment
Share on other sites

ahh k didnt noticed that, but wouldnt it be easier to do arrays that are weaponsspecific?

I did it the way I did so each player would get 3 standardized weapons to choose from, along with ammo for each weapon

Link to comment
Share on other sites

Very cool mod. I'll be testing it on my test server next week. Just a question: Instead of spawning items in a box for players, is it possible to have these hero players get a menu that they can select which items they want from a list? If you give them a box, they could store extra weapons in their backpack and sell them or give them away. I think a scroll menu where they select what they want would be pretty cool.

Link to comment
Share on other sites

Very cool mod. I'll be testing it on my test server next week. Just a question: Instead of spawning items in a box for players, is it possible to have these hero players get a menu that they can select which items they want from a list? If you give them a box, they could store extra weapons in their backpack and sell them or give them away. I think a scroll menu where they select what they want would be pretty cool.

You can, if you want to implement something like this I would recommend looking at ebays spawn / class selection script and combining the two :)

Link to comment
Share on other sites

  • 2 weeks later...

It will work in conjunction, infact im also running Matt L's Humanity Based loadouts along side this without any interference on my Epoch server

 

question. I had it working, kinda. only I got a shitload of rtp spam when using it and it only gave loadout 1.sqf. This familliar for you?

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...