DayZ Electrical Power Grid

pinkamenapie

New Member
Well, I did a lot of research when I first found this mod into how I could integrate it into DayZ, to give both survivors and bandits something additional to do with their days...

But surprisingly, other than a few people who claimed to have successfully integrated it into their private test servers, I found no real write ups on how to go about it... So, with a large amount of trial and error, I finally have it up and running on my private hive server...

I figured I'd take a few minutes to try and help out others with this too (though, admittedly there are a few things that I don't have completely worked out, like getting streetlights and houses to light up in conjunction with this mod, however a number of other secondary lights works now, like some lights at the top of some of the towers and the runway lights at NWAF)...

So, without further ado...

You can download the scripts for this mod here:
http://forums.bistudio.com/showthread.php?124123-AEG-ArmA-Electrical-Grids-(Script-Pack-and-Addon)

Included in the download are two different versions... The first is the "add on" version, which requires both client and server to have this version installed in order to get it working... The few people I heard that got this mod working used the "add on" version of the script, however, since I hate forcing my users to download stuff, I opted with the script that gets added to the mission file...

Once you download and extract the files, you need to unpack your PBO for MPMissions... Once you unpack your MPMissions PBO, open it up and drop the folder labeled "AEG" into the main folder where description.ext, init.sqf, and mission.sqm files...

Once the AEG folder is copied over, open up description.ext first and add the following lines at the bottom...

Code:
//AEG Sounds
 
class CfgSounds
{
    sounds[] = {}; 
    #include "AEG\Sounds\AEG_Sounds.hpp"
};
 
//Dialogs
 
#include "AEG\Dialogs\AEG_Dialogs.hpp"

Save the file and close it... Next, open the file init.sqf... Add the following lines of code at the bottom:

Code:
//AEG Configs
AEG_manual = true;
AEG_NVG = true;
AEG_explode = 25;
AEG_password = "p@$$word1234567";
 
onTeamSwitch {[_from, _to] execVM "AEG\Scripts\AEG_team.sqf";};
 
ID959522=position player nearestObject 959522;
ID959522 switchLight "on";

The entries added under //AEG Configs are configurable options found (with explanation) in the "missionmaker.txt" file that was included with the AEG package...

I included the line for "onTeamSwitch", because it was mentioned as being needed in the section on how to install the script version of this mod in "missionmaker.txt", however, I suspect that it may still function without it, since everyone in DayZ is lumped under "BLUFOR" anyways...

The last line was also just my attempt at getting the lights to work (since I was under the impression that rMod unbanned the lights and they were just turned off)... While some of the lights are now on (secondary lights that is), I still do not have working streetlights or house lights... I am still working the issue, but would appreciate any additional help on this piece of the puzzle...

Finally, open up your mission.sqm file and add the following lines:

{Actually, strike that, I forgot just how many lines there were... Instead, I added my mission.sqm file to this post so you guys can look at what is needed}

Once you have all these changes, you can go ahead and package it all back up into a PBO using PBOview or whatever other program you choose to use...

Upload the pbo to your MPMissions file located on your server, then find your scripts.txt file (to add exceptions, so that you can continue running BattlEye while running this mod)... Replace the appropriate lines with the lines I have provided below to ensure that you will not get kicked upon log in...

Code:
5 createVehicle !"\"createVehicle\"," !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object =  _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;" !"ace getVariable _onStr)};" !"_smoke = "#particlesource" createVehicleLocal getPos _logic;" !"_smoke setParticleCircle [0, [0, 0, 0]]"

Code:
5 createVehicleLocal !"\"createVehicleLocal\"," !"_point = \"Logic\" createVehicleLocal getPosATL _unit;" !"_object =  _type createVehicleLocal _position;" !"_fl = \"#particlesource\" createVehicleLocal getpos _v;" !"_lightArea = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_lightSpark = \"#lightpoint\" createVehicleLocal (getPosATL _flare);" !"_source = \"#particlesource\" createVehicleLocal getpos (_this select 0);" !"_source = \"#particlesource\" createVehicleLocal _pos;\n_source setParticleParams" !"_smoke = \"#particlesource\" createVehicleLocal _pos;\n_smoke attachto [_v,[0,0,0],\"destructionEffect1\"];" !"_Crater= \"CraterLong\" createvehiclelocal [_pos select 0, _pos select 1, 0];\n_Crater setdir (_dir + (180 * _i));" !"ace getVariable _onStr)};" !"_smoke = "#particlesource" createVehicleLocal getPos _logic;" !"_smoke setParticleCircle [0, [0, 0, 0]]"

Code:
5 onTeamSwitch !"\"onTeamSwitch\"," !"AEG\Scripts\AEG_team.sqf"

With all these added, you should be good to go... If you have any issues, post them here and I can try helping you through them...

Upon log in, if you open your map up, you will notice a bunch of colored circles representing the power grid for that area... If you go to Cherno or Elektro, you will also now notice smoke rising up out of the smoke stacks and if you approach the transformers behind it, you will notice the loud hum of electricity and if you approach them, you will notice an option to trip the circuit breaker...

If you get all this, then you are good to go...

Now, if only we could get a solution to getting the lights back on so that it can integrate with this mod and we would definitely be getting somewhere...

(I also envision the ability to use the fuel pumps at gas stations if the power is on for the area, but that is another day's work)

Enjoy,
CPL
 

Attachments

  • mission.sqm.txt
    73.5 KB · Views: 184
Back
Top