Jump to content
Sign in to follow this  
MaxRiga

Discussion: Elecricity

Recommended Posts

Power will be able to be cut by damaging/destroying the substation.  I don't plan on including posts, poles, or towers(pylons) at this time because it far too many objects to manipulate and not as sporting as the substations (although I will outline a framework for mission makers to include this if they so desire as well as a way to stealthily cut the power.).

sorry about wasting a post!

how about if the substation is damaged then only half the town is blacked out but if is fully destoyed then the town will be fully blacked out

Share this post


Link to post
Share on other sites

@pauld-

Thanks for the suggestions!  In order to make this as realistic as possible I have been doing some research on power transmissin systems and substations and will try to accurately mimic their real world functions.

I thought about the "engineer" aspect while in the planning stages.  With the framework I am creating it would completely possible for a scripter or mission make to give engineers the capability of repairing or re-activating substations.  The same for a reverse.  If you didn't want to destroy a power station and wanted to use a more stealthy alternative, that will also be possible to script and limit it to engineers or whomever is deemed appropriate for the mission.  Again, I will not include these features as I am only trying to simluate a system, but I will lay out some basic concepts on how to use the sytem to do these things in my release notes.

Re: the partial destroyed/partial blackout suggestion, trying to work in concert with the research I've done, I have set the threshold for blackout at 50% damage.  That is what I have determined where most real world substations would completely fail and so that is what I am going with for now.  That being said, Corazol and Ortego both have two substations.  When either of them fail only the lights on the side of town they supply switch off.

Share this post


Link to post
Share on other sites

to Loyalguard

i'm really glad that u r trying to make electrical grid whole over the island but still ... if any car ( including AI ) hits any single electrical post then the grid line is going to be out of power?

Share this post


Link to post
Share on other sites
to Loyalguard

i'm really glad that u r trying to make electrical grid whole over the island but still ... if any car ( including AI ) hits any single electrical post then the grid line is going to be out of power?

Max-

After I get the overall grid built and working I will look into your utility pole idea. It would not knock out the whole city I think, but it should knock out nearby lights. This might be hard to do for the whole Island, but, I will provide a framework for a mission maker to be able to more easily include this option for cities they use in their missions.

Share this post


Link to post
Share on other sites

there is no destroy model for the transformer station or for power cables. What is that about. or am i mistaken

Share this post


Link to post
Share on other sites
Quote[/b] ]there is no destroy model for the transformer station

No biggie. Simply setpos some nice fires into it when they get destroyed. Should do the trick.

Share this post


Link to post
Share on other sites

i have notcied on a few occasions when a power line is blown up, or hit by something, it drops onto the ground but it disapears soon as it hits the ground

Share this post


Link to post
Share on other sites
to Loyalguard

i'm really glad that u r trying to make electrical grid whole over the island but still ... if any car ( including AI ) hits any single electrical post then the grid line is going to be out of power?

Max-

After I get the overall grid built and working I will look into your utility pole idea.  It would not knock out the whole city I think, but it should knock out nearby lights.  This might be hard to do for the whole Island, but, I will provide a framework for a mission maker to be able to more easily include this option for cities they use in their missions.

I was saying about electricity posts not only inside of the city but on the routes/roads between the cities. Stupid AI very often hits it without the reason, specially if it drives tanks. So I wander it might simply destroy all electricity grid between electro-station and cities.

Share this post


Link to post
Share on other sites

The script is moving along at a decent pace. It takes a lot of trial and error to get the "shutdown" zones correct, especially since some of the lights "powered" by a substation are several towns and often over 1500m or more away. I have to make sure there is not too much net traffic and/or lag caused by the "seraching" for lights and shutting them down. I hope to have the majority of it done by the end of the week.

I unfortunately have some potentially bad news regarding utility poles along the roads. If I am not mistaken, I believe they are actually treated the same way trees are and are embedded in the gae. If so, there is no way for me to monitor their damage level because they do not have a class. Plus, there is such a large number of them in it would require dozens (if not more) extra game logics in order to be able to monitor them. I will continue to look into it, but do not have much hope. Sorry!

Share this post


Link to post
Share on other sites
I unfortunately have some potentially bad news regarding utility poles along the roads. If I am not mistaken, I believe they are actually treated the same way trees are and are embedded in the gae. If so, there is no way for me to monitor their damage level because they do not have a class. Plus, there is such a large number of them in it would require dozens (if not more) extra game logics in order to be able to monitor them. I will continue to look into it, but do not have much hope. Sorry!

The road side power poles do not have a class, but that doesn't mean you can't check their damage level. It just means that "finding" them with nearobjects etc will be a bit harder. You could use Kronsky's string library to find them by removing the object index from the returned string for the object and create a hard coded list of object IDs. Creating a generic script that checks all posts on Sahrani in anything close to real time will be a real challenge.

Share this post


Link to post
Share on other sites
The road side power poles do not have a class, but that doesn't mean you can't check their damage level. It just means that "finding" them with nearobjects etc will be a bit harder. You could use Kronsky's string library to find them by removing the object index from the returned string for the object and create a hard coded list of object IDs. Creating a generic script that checks all posts on Sahrani in anything close to real time will be a real challenge.

fasad-

Thanks for the tip. I will look into that option, but as you echoed, even once identified, they will be a pain to find. Since Game Logics can only find objects within 50m it would take countless extra game logics to track all of them. Not to mention in theory the large electrical towers are carrying the primary load in any case and a downed pole would probably only mean a local outage.

Once I get the main grid up I will look into all the other smaller grid considerations.

Share this post


Link to post
Share on other sites
Since AI boys can see in the dark just as well as during daylight hours (even if they ain't got no NV goggles), the player actually should save lampposts & stuff like that, not blow `em up smile_o.gif

I ran a test on that and found that the AI sight does change on the light level. Lying prone I had an ai walk towards me (safe mode) from 200m;

Dark no NVG = ~15m

Dark + NVG = ~30m

Daylight = 60-70m

Lying under a street lamp makes no difference to these ranges but I would say that if we can black out a town, mission makers should drop the AI abilities to reflect upon that.

Now whether this holds up once you have been detected I don't know.

Share this post


Link to post
Share on other sites

I think also the weather during nights affect AI nightvision. If it clear skies and full monn they see quite good. I'm not sure about this thou..

Share this post


Link to post
Share on other sites

I suggest you focus on the power centers rather than the poles. It will already add a lot if we are able to repair/damage them and effect all related areas.

I can see some SF moving in and cutting out the lights before the squad goes in smile_o.gif. Is it possible to effect the AI's vision (ones without the NV) when it goes dark ??

Share this post


Link to post
Share on other sites
How did you execute the script? huh.gif

What line did you use in the trigger?

I think you were asking Balschoiw, so I don't want to speak for him, but, I just finished my demo mission and here is how it is triggered (using the guidance in this OFPEC thread: Obj Complete when bridge destroyed - NOTE: I used a power station in Corazol instead of a bridge and a game logic names as such)

In the condition field enter:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(getDammage (position powerGL nearestObject 489499) > 0.8)

In the activation field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">res=[getPos player, 3000]execVM""lightsoff.sqf"

And of course make sure to include the lightsoff.sqf as posted above in the mission folder.

What this does is when the powerstation is destroyed (in my case by multiple satchel charges) the trigger activates the lightsoff script and every lamppost within 3000m is switched off!

Here is a demo video:

Blackout! on YouTube

I can't get this to work sad_o.gif

I put down a trigger activated by no one, so it should be active all the time, right?

Condition: (getDammage (position GL nearestobject 488815) > 0.1)

On Act: res=[getPos player, 10000]execVM"lightsoff.sqf"

the object is the power station south-west of corazol. GL is the gamelogic I placed right over that power station. I then set-up a seperate trigger activated by blufor which setdamage 1's that power station. The station blows at start of mission and no lights go off.... I dunno.....

Share this post


Link to post
Share on other sites
I can't get this to work sad_o.gif

I put down a trigger activated by no one, so it should be active all the time, right?

Condition: (getDammage (position GL nearestobject 488815) > 0.1)

On Act: res=[getPos player, 10000]execVM"lightsoff.sqf"

the object is the power station south-west of corazol. GL is the gamelogic I placed right over that power station. I then set-up a seperate trigger activated by blufor which setdamage 1's that power station. The station blows at start of mission and no lights go off.... I dunno.....

Yes trigger should be activated by none. I can't say exactly why it doesn't work but try the code below instead. The condition has the GL look for transformers (there are two types hence the OR) instead of having to look for a specific object id. The Activation works without having to call a script for simplicity. It also turns off lights in proximity to the GL, not the player. Do you really want to turn off lights in a 10,000m radius? That is a lot for the script to do and could cause some lag-like effects.

Corrected in Edit:

Condition:

(getDammage (position GL nearestObject "Land_trafostanica_mala") > .5) OR (getDammage (position GL nearestObject "Land_trafostanica_velka") > .1);

Activation:

{_x switchlight "off"} foreach (position GL nearObjects ["streetlamp",10000]);

I'm also not sure why your setdamage trigger is firing at the beginning of the mission...what are the parameters? Maybe just try to blow the substation with a satchel instead. BTW, the powerstation SW of Corazol is the trickiest on the island b/c of its size/

p.s. My script for powering the whole island and controlling the lights is in final beta with initial release in a few days hooefully...fully documented and easy to insert in any mission

Share this post


Link to post
Share on other sites

Setdamage 1 is firing at the beginning of mission just for testing purposes. As soon as I get in, transformer blows, lights should go out. That was the plan. I was also using that script lightsout.sqf, which I see you didn't use... how can I implement that? also, thanks for your help, I will try what you have given right now.

Share this post


Link to post
Share on other sites

; prepLamps.sqs - you can blame WarWolf for this script

; damages ALL types of streetlamps within radius from the given position

; _just_ enough so you can kill the lightbulb with a single bullet

; night missions with NVGs are lots more realistic using a few of these!

; usage:

; [position, radius] exec "prepLamps.sqs"

_pos = _this select 0;

_rds = _this select 1;

_lst = _pos nearObjects ["StreetLamp", _rds]

{_x setDamage 0.299999} forEach _lst

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  

×