Jump to content

Photo
- - - - -

Sahrani electrical grids


  • Please log in to reply
17 replies to this topic
Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 13 December 2007 - 17:23 #1

Sahrani Electrical Grids
Version: 1.05
Version Release Date: 08 January 2008
Created by: Loyalguard

Downloads
(File Size 163K)
Mirrors Courtesy of:
-OFPEC
-Armaholic
-Assault Mission Studio

Posted Image

About the Sahrani Electrical Grids
The Sahrani Electrical Grids (SEG) is a package of scripts that simulate electrical power grids on Sahrani by turning off street lamps when the substation that they are "connected to" by the simulation receives more than 50% damage. It also includes an option for mission makers to enable players to manually turn power off and on.

Features
-Every street lamp across the entire Island is connected to one of seven electrical substations.
-Substation transformers emit an electrical humming noise when energized.
-Damaging a substation more than 50% will automatically switch off street lamps corresponding to that substation.
-Mission makers can choose to allow players to turn power off and on manually without damaging substations.
-Mission makers can choose to exclude substations and electrical grids not pertinent to their missions.
-Fully independent Multiplayer and Join in Progress compatibility.
-Completely single player compatible (but unnecessary code may be executed causing additional use of system resources).
-Easy to implement into any mission - 100% scripting - No addons required - no dependence on external parameters or variables.
-ArmA Version 1.08 or later required (compatibility with previous versions not tested).
-Fully functional Island wide demo mission included.

Known Issues, Bugs or Errors
None as of version 1.05.

Changelog

Version 1.05
-Adjusted how JIP updates are conducted for newly joining players so that the SEG JIP update will not prevent other JIP code required for the mission from running.

Version 1.01
-Adjusted how custom sounds for SEG are included in the mission maker's Description.ext file to avoid conflict with other potential custom sounds.

Sahrani Electrical Grids (Beta & Discussion Thread) at OFPEC - http://www.ofpec.com...ex.p....30605.0

How the Electrical Grids Were Designed
There are seven electrical substations physically represented on the Island of Sahrani (five in the South and two in the North). There are no power stations/plants on the Island, however, the substations on each side of the Island are connected in series through power transmission lines suspended from towers (pylons). The grid zones simulated by SEG are:

Paraiso - Covers Paraiso proper as well as Somato, Gulan, Balmopan, and Estrella.
Ortego North - Covers the northern half of Ortego.
Ortego South - Covers the southern half of Ortego.
Dolores - Covers Dolores and Cayo.
Corazol West - Covers Corazol west of the international border.
Corazol East - Covers Corazol east of the international border along with Obregan, Mercalillo, Gaula, and Everon.
Bagango - Covers Bagango proper as well as Carmen, Tandag, Eponia, Pesadas, Pacamac, Hunapu, Mataredo, Isla Victoria, Cabo Santa Lucia, Masbete, and Pita.

Color-Coded Grid Zone Map - Cities/Towns/Substations of the same color on the same side of the island are connected:
Posted Image

What SEG Does Not Do
SEG only turns off street lamps. It does not turn off traffic lights, water/radio tower lights, lighthouses, or other light sources as these objects do not have a "switch off/on" options. It also does not affect the airports as it is presumed there are emergency generators at each airport.

Possible Applications for SEG
Coop Missions: There are some existing missions by various authors that include "cutting power" to substations as objectives. SEG provides a framework for easily creating these types of objectives.

Team vs. Team Missions: In addition to the possibility for TvT objectives, the script also provides for "blackout scenarios" for night ops or persistent missions.

Realistic Game Immersion: For all game types; Coop, TvT, Role-playing; this script makes ArmA more realistic and increases immersion by giving the power substations and the street lights across the island actual functionality.

For more information on how to incorporate SEG into objectives in your mission see SEG_Readme.txt included with the download.

Acknowledgments
The creator would like to thank the following individuals for their ideas, evaluation, suggestions, reviews, and code snippets that helped make this script possible:
OFPEC forums: Mandoble, bardosy, LCD, LeeHunt
BIS Forums: Balschoiw, pauld, lebson506th
TacticalGamer.com Forums: Strag, Shiner

Edited by Loyalguard, 02 April 2010 - 05:22.
Removed outdated DL links

LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

ArmaVidz
ArmaVidz

    Master Gunnery Sergeant

  • Members
  • 1189 posts

Posted 13 December 2007 - 20:24 #2

Defend the substation from attack because you don't have NVG Goggles Posted Image Posted Image

Good work, can't wait to try this when I get home from work
Okay, I am forum lurking lol.

Dwarden
Dwarden

    BI Developer

  • 9647 posts
  • LocationBrno, Czech Republic

Posted 13 December 2007 - 22:39 #3

this is really nice, thanks a lot

logististic! where are these carbon graphite bombs Posted Image
http://en.wikipedia....i/Graphite_bomb

Posted Image


and EM shockwave from nuclear explosion gets nice sideeffect...

RealTimeChat ~ARMA2 in Your browser (w/o Java), RealTimeChat ~ARMA3 in Your browser (w/o Java),
irc.GameSurge.net/ARMA2 (external IRC clients) irc.GameSurge.net/ARMA3 (external IRC clients)
ARMA 3 Feedback Tracker: http://feedback.arma...y_view_page.php
~100k fans @STEAM ARMA 2 + ARMA 2: OA + ARMA 3: + ~2k @XFIRE A2:OA
Follow my Twitter: http://twitter.com/FoltynD or my Facebook http://facebook.com/FoltynD


Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 13 December 2007 - 22:46 #4

Vidz & Dwarden-

Thanks!

That graphite bomb looks awesome...add-on anyone?

BTW, the EM pluse effect is totally doable! The power to each grid is ultimately controlled by a global/public boolean variable. All of the variables are listed in the readme so all you would have to do is is trigger a change in the variable tied to a nuke and lights out!
LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

MaxRiga
MaxRiga

    Staff Sergeant

  • Members
  • 240 posts

Posted 14 December 2007 - 04:38 #5

I think this is as revolutionary script for ArmA as train addon with rails all over the island in OFP Posted Image))
It is fantastic job and I believe mission makers have to use it for sure! Going to try it on the weekend. Thank you once again !

Kroky
Kroky

    Master Gunnery Sergeant

  • Members
  • 1240 posts

Posted 14 December 2007 - 05:14 #6

It would be nice to have these scripts as an addon to make it work in ArmA as default!

Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 14 December 2007 - 09:50 #7

It would be nice to have these scripts as an addon to make it work in ArmA as default!

I would be happy to consider making it a mod/addon but I never really thought about it becuase I am not really adding any content...so...I don't have any experience with addon editing so it may take me a bit.

But, it would probably have to be a single-player only addon because many of the effects associated with SEG are local (hence the heavy dependence on global/public variable to make it work in MP/JIP), so if all clients weren't running it in MP different players would see the lights in diferent states potentially.  However, being singleplayer only I can strip a lot of the MP features to make it run even more smoothly with fewer resources required.  Stay tuned...
LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

VanhA
VanhA

    Sergeant

  • Members
  • 121 posts

Posted 14 December 2007 - 10:38 #8

This is fantastic. I'm going to use this in my next mission for sure! Posted Image

Pillage
Pillage

    Sergeant

  • Members
  • 156 posts

Posted 14 December 2007 - 12:14 #9

But, it would probably have to be a single-player only addon because many of the effects associated with SEG are local (hence the heavy dependence on global/public variable to make it work in MP/JIP), so if all clients weren't running it in MP different players would see the lights in diferent states potentially. However, being singleplayer only I can strip a lot of the MP features to make it run even more smoothly with fewer resources required. Stay tuned...

If I could I would like to +1 vote for NOT doing this. I think it should be like the many other addons that require both client and server to have the addon installed. No slimming it down for single player only.

I am hoping to create a mission template combining your SEG, an air transport system between the 4 airfields (unfortunately the DC3 from QG is buggy as hell Posted Image ) and the public transport system from Sarahni Life. So I can merge it in one lot into any of my missions, having this in addon form would negate the need for me to implement every time. Either way, kudos to you.

TRexian
TRexian

    Master Gunnery Sergeant

  • Members
  • 1227 posts

Posted 14 December 2007 - 14:23 #10

I must throw in my kudos, too.

This is a brilliant (pardon the pun) Posted Image addition. Don't be surprised if you get alot of requests to make it part of some significant addons. Plus, your methodology will probably be used in any new terrains that are built, too.

I could even see people using generators for local, base-sized compounds.

Great job.

:thumbs:

Shins
Shins

    Sergeant

  • Members
  • 125 posts

Posted 14 December 2007 - 16:15 #11

Can these scripts be executed serverside? I'm thinking that you could use Doolittle's GSC on a dedi server to make all missions use this.

(for those that don;t know it Doolittle's GSC lets you call scripts and commands in an SQF on the server. The scripts and commands are then applied to any mission run on that server).

Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 14 December 2007 - 16:52 #12

Thanks everyone for your comments so far!

@Pillage - I will keep that in mind if I go the addon route

@TRexian -

Quote[/b] ]I could even see people using generators for local, base-sized compounds.


I agree...I give instructions on how to do that for airports and the like.

@Shins-

I'm not sure, Doolittle would probably have to shed more light on it. My initial thought would be "no" I think. The reason is that it seems that Doolittle's GSC, if I understand correctly, is mostly intended for a script that only needs to run once per client. In order for SEG to work as intended three of the five scripts in the pack are executed at varying times by triggers depending on associated power events (a substation being damaged) and actions (manually turning power off/on) that occur in the mission. I'm not sure this could be properly implemented with GSC...but I am always open to ideas and testing so I will look into it for you.

In early development of SEG, it only consisted of a single script which would probably be more compatible with GSC, but, I could not make SEG truly MP/JIP compatible without adding more scripts to assist with managing the required public variables and broadcasting them.

-Thanks again all!
LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

Balschoiw
Balschoiw

    Bavarian Battlesmurf

  • Members
  • 6856 posts

Posted 14 December 2007 - 17:59 #13

Excellent. You should sell this one to BIS. It would somehow extend and complete their ambience.
Posted ImagePosted ImagePosted Image
Online 1.08 face reference gallery
UPDATED ! My interim musicspace with excerpts from commercial productions UPDATED !
NOTE to 1.08 users who have missing weapons: Remove custom addons !

Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 14 December 2007 - 18:23 #14

Version 1.01 Released
(Minor Setup Fix)


There was a small setup issue for mission makers with regards to the Description.ext file and class CfgSounds only if other custom sounds were being included in the mission. This has been permanently fixed. First post has been updated with changelog and link to new version (v1.01). I apologize for any inconvenience. Changelog is repeated below:

Changelog

Version 1.01
-Adjusted how custom sounds for SEG are included in the mission maker's Description.ext file to avoid conflict with other potential custom sounds. See "Mission Maker Instructions" Step 3 in SEG_README.txt.




LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

lebson506th
lebson506th

    Sergeant

  • Members
  • 110 posts

Posted 07 January 2008 - 19:54 #15

I tried adding this to a slightly modified version of Evolution for our 506th servers, and after i added this script, it wiped every player's score when they changed roles.

IE: I joined as a Rifleman in 1-1-A, got 30 points.
I changed to an Engineer in 1-1-Whatever, and when i finished reloading, i was back to 0.

This doesn't happen without this script =/

Thoughts?

Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 07 January 2008 - 20:17 #16

I tried adding this to a slightly modified version of Evolution for our 506th servers, and after i added this script, it wiped every player's score when they changed roles.

IE: I joined as a Rifleman in 1-1-A, got 30 points.
I changed to an Engineer in 1-1-Whatever, and when i finished reloading, i was back to 0.

This doesn't happen without this script =/

Thoughts?

I am sorry that it is causing some problems. Perhaps there is a conflict with the join in progress code (that would seem to be the first place to look). I'll get back to you as soon as possible!

*EDIT*: Update

I think I have found the conflict. I think it has to do with multiple instances of the onPlayerConnected command. Both Evo and my SEG script-pack use it. On the Biki (Talk:onPlayerConnected), it was suggested that it can only be used once per mission. If so, SEG's instance is probably interfering with or preventing Evo's from doing what it needs to do to retrieve a player's previous score (if any). A solution is the works and hopefully in place in the next 24 hrs.




LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

Thread Starter
Loyalguard
Loyalguard

    Master Sergeant

  • Members
  • 658 posts

Posted 08 January 2008 - 21:14 #17

Version 1.05 Released
(Additional Minor Setup Fix)


This release corrects possible code conflicts for JIP players. There has been no change in the functionality of the script pack.

It appears that in ArmA there can only be one instance of the onPlayerCommand in a mission regardless if they are both in the init.sqf or seperate script files. If the onPlayerConnected command is used anywhere else in the mission only one of the commands will be executed. This will most likely lead to an incomplete JIP update or other conflict with onPlayerConnected dependencies.

In order to avoid such problems I have changed how the SEG JIP update script is executed. The changes I have implemented will also require the mission maker to make some small adjustments in how SEG is integrated into a mission. The additional steps are included in the review SEG_README.txt included with the download.

I have tested this fix extensively on a multiple client connected dedicated server with the included demo mission. I have also integrated SEG into some other popular persistent missions that use onPlayerConnected as described above without difficulty or loss of function.

If you do not use onPlayerConnected in your mission and are already using SEG, there is no need to update your mission to Seg 1.05. However, all new missions with SEG or missions using onPlayerConnected should use v 1.05 to ensure full compatibility.

If you have any questions on how to incorporate this latest version in your mission or any questions on SEG please let me know!

Possible Future Releases
As previewed by the ArmA 1.09 beta patch, some new possibilities for SEG may open up to be able to include the option to repair/re-build workstations. This may be possible due to this fix: 5164 - Fixed: Building ruins were not visible for JIP-ed players. I am still looking into it and will post updates if relevant.
LoyalGuard
Former OFPEC Editors Staff Member | Former ACE1 Dev Team Member
My ArmA Projects
"...brain-hurting expressions of realism like Loyalguard’s functioning Chernarus Electrical Grid." -PC Gamer

Profanwolf
Profanwolf

    Lance Corporal

  • Members
  • 53 posts

Posted 18 January 2011 - 21:22 #18

Does this by any chance work with the CAA1 release of sahrani for arma2?