Jump to content
Sign in to follow this  
loyalguard

Sahrani electrical grids

Recommended Posts

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

segbannerij6sm5.jpg

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/index.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:

seggridmapvh5.jpg

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
Removed outdated DL links

Share this post


Link to post
Share on other sites

Defend the substation from attack because you don't have NVG Goggles biggrin_o.gifnotworthy.gif

Good work, can't wait to try this when I get home from work

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

I think this is as revolutionary script for ArmA as train addon with rails all over the island in OFP smile_o.gif))

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 !

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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 mad_o.gif ) 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.

Share this post


Link to post
Share on other sites

I must throw in my kudos, too.

This is a brilliant (pardon the pun) wink_o.gif 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:

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Excellent. You should sell this one to BIS. It would somehow extend and complete their ambience.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×