Space Engineers

Space Engineers

Not enough ratings
SmartZones
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
47.204 KB
30 Oct, 2019 @ 2:19pm
30 Oct, 2019 @ 3:06pm
2 Change Notes ( view )

Subscribe to download
SmartZones

In 1 collection by jouster500
Jousters SE-PB Toolbox
8 items
Description
Players Script:
Are you troubled with the fact that constant maintenance of Safe Zones requires a steady supply of Zone Chips? Don't you just wish your Safe Zones activate when necessary or just simply expunge threats? With smart zones, you can rest easy knowing that the script will take care of your grids while you are away.

In theory, the amount of attacks a typical stationary grid may come under fire because is limited. While its true, zones cost an hour per chip to maintain, its not like your grid is always being attacked 24/7. It is to this end, constantly running the safe zone when there is no apparent threat is just simply not ideal, hence this script was born.

By taking into account damage, activated turrets, tripped sensors, and even missing blocks, a SafeZone will activate. If a block is still missing, an adjustable threshold (default 50/100) of total blocks is below, turrets or sensors still detecting enemies, the zone will fully activate for its entire duration intimidating attackers from waiting out the full duration. If any detected blocks are damaged, the zone will currently act as a small emp, launching to its full size, hopefully damaging unsuspecting grids and players in the process. In the process of all of this, the prescience of a safe zone is not made apparent until its full activation is achieved, allowing for these sneaky scenarios for the unwary.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setup:
This script is mostly handsfree, but please run with "store" command on your first time, so data can be dumped to
safe zones custom data to promote stable behavior. Please keep in mind this is only currently reading the first line so it may/may not play nice with other scripts using safe zones.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Commands:
"store" = will dump all custom safezone thresholds to custom data. This takes priority over whats read from the sliders themselves, so adjust in the custom data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Custom Data:
"[ssj5]SliderX|SliderY|SliderZ|SliderSphere"
is the form that is present in terms of ordering within the safe zone blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Notes:
Honestly, this script took WAY longer than anticipated. It doesn't help the fact that this code cant rely on a reliable interface which would make this code a lot more sensible ( Bug can reported on here[support.keenswh.com] ). The amount of work-arounds i needed to use was immense, and it would have been so much nice for them to rectify this, but I digress.

I wanted to wash my hands clean of this pet project as I have to attend to my own studies for school atm. I do have plans to expand on this script to include more sensible outputs, and even a dynamic zone setter relative to the available power, but this is beyond the current scope. I merely wanted to get the base cases as defined in and working so some semblance of functionality is present.

This is designed for multiplayer, but alas, I do not have the time for thorough debugging in that realm. Please, If you experience any believed-bugs of this during your use, report to me ASAP.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Demonstration of the block at hand would be very much welcomed. I lack recording software to fully showcase what this is supposed to, hence it may be difficult to describe with just pictures alone. Actions speak louder than words after all.

-If you have enjoyed this script and got any cool photos of the script working during its uses, please share. I'm also looking for a new thumbnail if possible, but as stated before, time constraints are throwing everything off kilter.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WARNING:
While this is meant to be an additional safety feature for grids, it is by no means the metaphorical silver bullet to preventing all raids. A key issue lies in the fact that activation time of the safe zones is capped at 2 minutes, which in the scope of battles, can be an eternity. I can and will be adding controls that can perhaps activate zones ahead of time, or even just allow for prolonged use for combat situations, but until then, please don't rely solely on this script.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TODO:
-Add remote warning system to allow earlier activation
-Supply a combat control that will drain chips at the cost of using the safe zone in a combat manner
Popular Discussions View All (1)
0
30 Oct, 2019 @ 3:34pm
Share your photos/videos of the script during use!
jouster500
30 Comments
kinngrimm 11 Mar, 2023 @ 3:51pm 
i am so very much looking forward to a more performance optimized version :) cheers mate
btw should you look for a group to play with let me know. I am just starting out on a conmquest/rp/pvp server and am lookikng for people to join in and who better than someone who is proficient with safezones =)
jouster500  [author] 10 Mar, 2023 @ 8:48pm 
If the performance threshold is causing it to fail in multiplayer, I will definitely start looking at it this weekend. Whats the point of a smartly activating safe zone if it doesnt even meet the use case for being used in multiplayer?

I know whats most likely causing it, and the fact that script was made before safe zones had their API released (its doing its thing more deficiently than whats possible).
kinngrimm 8 Mar, 2023 @ 6:16pm 
One thing i didn't qutie get in the script was the treshold. Was that the damage to the whole base which needed to be done before it activates? In my case i just printed a new mobile base and when i put the smartzone up it constantly wanted to activate it, even though there was no damage nore any enemies. The thereafter it swapped into the next phase to power it down, but that woulld take like an hours and depending on how restrive one had set the SZ, thats just not an option aslong someone is still around.

I will give it another go under different circumstance, other than that have a good one and i am looking forward to the next version =)
kinngrimm 8 Mar, 2023 @ 6:16pm 
On the count of enemy and friend detection and by that either putting it up automaticly or determining if there are still faction members around.... players have built in antena which acts as relay station. So aslong something is relayed within a certain area someone is there. Might need to put antenas in the 8 corners of a base and adjust their range, But if that then would work reliably i got no issue doing so.
In terms of enemies i stumbled upon a radar script which uses empty turrest or more like their rotors as early warning signals to see if enemies are close.
kinngrimm 8 Mar, 2023 @ 6:16pm 
kk :) well when you do, here some more thoughts on what a smart zone might do :) as i recently tried your script on a multiplayer server.

Decreasing the zone to the bare minimum including switching between shapes so that one could safe on energy..

Cycle reduction as server hosts are restricting heavily the lag from scripts, so the script needs some slow down options to reduce its performance impact as my programable block repeatibly was smoked before i gave up.
jouster500  [author] 8 Mar, 2023 @ 4:58pm 
I have not made any changes since. Most of my focus has been on updating transferCtrls, and right now im a but burnt out from SE development. Make no mistake I still do intend to implement your suggestion.

As for the new blocks, id have to see what they could do in their full implementation before seeing if its possible to integrate it.
kinngrimm 2 Mar, 2023 @ 5:18pm 
hi there been a while, did you make any changes since? Do you think the new controller blocks for the upcoming update could be made use of in conjunction with your script?
kinngrimm 24 Feb, 2022 @ 4:00am 
The part with scanning the grid and allways refreshing the timer when a friendly interacts with it, that part sounds like a good way forward as the user is passivly triggering the script without needing to remember.
jouster500  [author] 23 Feb, 2022 @ 6:00pm 
In addition to the timeout, I can also look for grid interaction/people using controllers and have that count as the same basis for a refresh. If you are using the grid, and you do something, then obviously someone is still there so we can wait a little longer. This avoids having to send an explicit command over and over.
jouster500  [author] 23 Feb, 2022 @ 5:59pm 
You ever been in an elevator/lift? Some of them have an open button to open the doors for whatever reason. Typically the doors will close after a set amount of time but you can press the open button if you want to hold the door open for someone just a little while longer. Another analogy is hitting snooze on an alarm clock over and over for just for a little extra sleep.

So lets say you deactivate the safe zone. Now in two hours, if someone doesnt choose to refresh or let the thing know “hey im still here” the safe zone will activate. If someone says they are still here, then in another 2 hours, the safe zone will attempt to activate, and will repeat the waiting every time someone refreshes. This means it would only activate if someone forgot to send a refresh signal.