Space Engineers

Space Engineers

SHART | Script Handling Activation of Remote Timers
121 Comments
ZEALOT 12 Apr, 2024 @ 7:55am 
BEHOLD THE SHART
Whiplash141  [author] 9 Apr, 2024 @ 4:56pm 
@Terrance Hood:
CRAZY
Terrance Hood 9 Apr, 2024 @ 2:51pm 
Call me crazy, but the acronym "SHART" is probably not the best choice.

Just sayin'
JoeHan 29 Mar, 2024 @ 2:45pm 
Hi Whiplash - great job at first! ;)

I initially had some trouble understanding/defining subaddressing.
After a while of guessing, I understood it - so here's a little explanation for dummies like me! ;D
How to handle the parameters> primary,Timer Block 1

name to call from remote real name of the addressed block
fe1, Timer Block fe1


Receive timer subaddresses=
|fe1,Timer Block fe1
|fe2,Timer Block fe2

If the receivers name is forexample this will be called from remote as
"trigger foreexample fe1" or "trigger foreexample fe2"

The subadresses will not work for only one defined subadress and its also unnecessary.
Only one line in the receive timer subaddresses section wont work.
Yadokanium 14 Feb, 2024 @ 7:02pm 
Hello Whiplash141
No, I'm connecting with a connector, not a merge.
↓Video of when the problem occurred
https://d.kuku.lu/ctefm7w2y
↓Video of normal operation
https://d.kuku.lu/pg7gb5rum
Whiplash141  [author] 14 Feb, 2024 @ 8:20am 
Are you using merges on your main ship to connect the drones?
Yadokanium 14 Feb, 2024 @ 1:32am 
Hello
I built a ship that can carry two drones that automatically return and dock. I am using this script to send a return signal to the drone that sent it, but only one of the two drones did not return even after I sent the signal. Both drones use the same UID, and if I directly recompiled the script for the drone that didn't return, it would work, but without recompiling, it wouldn't work no matter what I tried. Is there any solution?

(supplement)
This event occurs the first time the world is loaded.
Whiplash141  [author] 31 Dec, 2023 @ 8:21am 
Ahh that will do it :)
Stollie 31 Dec, 2023 @ 3:35am 
I think I figured out what happened before as well, checking the PB on my carrier, it says when I do "trigger Drone 2" its sending it to "Drone" sub address "2", the UID on my Drone is "Drone 2". If I change it to "Drone2" instead no issues.

Which according to the above is expected behaviour so user error :D
Stollie 31 Dec, 2023 @ 1:51am 
Hey Whiplash,

Thanks for your help before.

Would it be possible to have this script not require a recompile to recognize the custom data changes?

I am using another script I wrote for setting up a new carrier drone (trying to make it as automated as possible) and in that script I'm parsing the custom data of my SHART PB to update with the correct information, however, it still requires the user to go in and hit the recompile button which could be easily missed during setup of a new drone and as far as I know there is no way to trigger a recompile of another PB block.
Stollie 22 Dec, 2023 @ 3:10am 
Same one every time, drone seems operational in any other way. Its OK though, my other method does the trick reliably every time, thanks for making this script, I couldn't make a proper carrier without it!
Whiplash141  [author] 22 Dec, 2023 @ 2:26am 
Is the one that it failed on consistently the same drone? Or does it switch which is failing?

The only way the script would not report an error and also fail to trigger the assigned timer is if the timer it is pointing at is inoperable via damage, power overload, or just plain doesn't exist any more.
Stollie 21 Dec, 2023 @ 6:03pm 
It only seemed to happen when I tried giving them all 'CarrierDrone' and then using a singular PB command of 'trigger CarrierDrone', it worked on 5 out of 6, the other one it didn't work on shows the received command yet wont trigger the Timer. All the timer blocks on each drone had the same name too - > "Timer - CarrierDrone - SHART".

A manual trigger of the timer through the ctrl-K menu into its terminal caused it to fire off just fine.
Stollie 21 Dec, 2023 @ 6:03pm 
1. Nope, I'm trying to create a 'General Carrier Drone' that shared a lot of the same names in the terminal for blocks, and I was do a copy and paste job in creative to make more of them.

2. No warnings and I checked the antenna was fully operational and functional, I also recompiled all scripts with no change.

3. Potentially, I start fresh with the drones before using a script to spawn in a Battle. I've been tweaking drones based on outcome, they should be pristine before the fight though.

I've found a workaround, I used your other script for renaming and made each Drone have a suffix of Drone 1, Drone 2, etc. then in the PB I gave them all a Unique ID and added then made a timer block to call them all back by passing the command 'trigger Drone1' then 'trigger Drone2' etc. that seems to work just fine.
Whiplash141  [author] 21 Dec, 2023 @ 2:55pm 
Interesting... Few questions:
1. Are these drones being built from a projection?
2. Is there any warning about the timers or antennas not being found?
3. Has the drone experienced any damage when this error occurs?
Stollie 21 Dec, 2023 @ 2:27am 
Hi Whiplash,

I've been using this with automatons to make a return to base command. It works most of the time, however, sometimes the drone will show the recieve command on the SHART PB on the Drone, yet it doesn't trigger the timer, yet it works on the other 5 drones and triggers their timers.

I've checked and double checked the settings and I'm not sure why it happens. I'm sending it to 6 drones at once - any tips on how I can troubleshoot?
Whiplash141  [author] 25 Nov, 2023 @ 1:11am 
If you make the fighters all have the same address, then you only need a single command to trigger all timers at that address :)
SkipperBobby 24 Nov, 2023 @ 11:36pm 
Is it possible to send a single command from a carrier to a bunch SHART enabled fighters much like a general recall command without having to put in each address in the command?
silverclover 23 May, 2023 @ 11:56pm 
When running PB " | " << Please tell me I need to clear this (This comment was written with a translator)
Whiplash141  [author] 25 Apr, 2023 @ 5:58pm 
Pssh I'm always down for others doing the hard part of creating content for my scripts lmao
Code Digits 25 Apr, 2023 @ 4:56pm 
With the latest Automatons release of SE this script is ESSENTIAL, use it to recall drones and cancel an attack, you can then use it on the drones to open hangar doors and let themselves back in.
I would be down to make some content related to using the script since the update if you're alright with that Whiplash141
Whiplash141  [author] 23 Jan, 2023 @ 7:59pm 
Are the versions of sender and receiver the same? And what argument are you inputting?
MedvePapus 22 Jan, 2023 @ 9:11am 
Not sure if it's just me but the script I used since 22 nov.23 has stopped working and the programmable block's screen spams "Unknown Command" and echoes the descriptions.
Nothing has been changed since I made it work back then.
MedvePapus 23 Nov, 2022 @ 2:27pm 
Got it. At
|open1, OpenHangar1T
|open2, OpenHangat2T
I used lowercase "L" instead of pipe "|".
Now it's fine.
But a suggestion, when I used L instead of |, it overwrote the entire custom data I had. Throwing an error or smth similar would be a bit more user friendly imo.
:steamhappy:
Whiplash141  [author] 23 Nov, 2022 @ 1:04pm 
What _precisely_ did you place in the custom data?
MedvePapus 23 Nov, 2022 @ 1:03pm 
I followed the instructions.
When I recompile the programmable block, it overwrites everything I changed in the custom data (i.e. unique id, subaddresses, etc...
No error or anything outputted.
Tecrys 9 Nov, 2022 @ 5:04am 
I'd like to share target locks with other ships, is that possible with this script? If not, do you know a way to do that?
Love your scripts, can't imagine playing SE without them. Thank you!
Lit Fuse 168 12 Aug, 2022 @ 8:57pm 
sorry about that, and thank you
Whiplash141  [author] 12 Aug, 2022 @ 10:43am 
1. SHART isnt a mod
2. Jump drives can only be triggered by a player in a ship controller. That is a built in game limitation
Lit Fuse 168 12 Aug, 2022 @ 10:01am 
isit just me or is Jump drive unable to work with the SHART mod?
Whiplash141  [author] 28 Jul, 2022 @ 7:56am 
user error. it places defaults if the inputs are invalid.
heavy 28 Jul, 2022 @ 4:22am 
ay bruh when i recompile SHART after editing the custom data it seems to reset it to default? is that user error or is it broken atm?
Misha 8 Jun, 2022 @ 7:22am 
oh damn.. it already exist...
I didn't find it and made my own.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2808968252
Whiplash141  [author] 15 May, 2022 @ 10:03pm 
Probably not.
ninjawizard 15 May, 2022 @ 8:46pm 
work with beacons too? because beacons have max dist 200km antena only 50km
Whiplash141  [author] 5 May, 2022 @ 7:38am 
Yup!
ninjawizard 5 May, 2022 @ 2:04am 
so the range is the range of the antena ?
ninjawizard 5 May, 2022 @ 2:03am 
wooah anybody else is thinking about remote orbial missile strikes here ? :O another great script whip! you are the best on SE scripting dude
sheepism1 31 Mar, 2022 @ 11:36am 
never trust a fart in the bath
Whiplash141  [author] 25 Mar, 2022 @ 10:40am 
Purely an unfortunate coincidence
Connorwk2008 25 Mar, 2022 @ 10:25am 
is no one going to talk about out the name shart
Tonatsi 9 Feb, 2022 @ 9:24am 
It's more a matter of common sense; When it gives you an example argument for the sender, it implies extremely clearly that you need a programmable block, and a way to trigger it with this specific argument. This is Space Engineers knowledge, not S.H.A.R.T knowledge.
baronjutter 8 Feb, 2022 @ 5:08pm 
I must have trouble reading, read the instructions many times and couldn't find any mention of a PB on the sending side. Just a reference to sending command via antenna but not exactly how. The setup on the receiving portion of the instructions are good and foolproof, but I became totally lost when it came to the sending instructions to the receiving system.
Whiplash141  [author] 8 Feb, 2022 @ 4:49pm 
> Explain that you need a PB running the script on the vehicle

That's in the instructions...
baronjutter 8 Feb, 2022 @ 3:37pm 
Took me quite a while to get this working, maybe I'm just dumb but it would be super helpful to explain a little more on the SENDING side of the process. Explain that you need a PB running the script on the vehicle, then setup a hotkey for the PB and then put the trigger argument in the pop-up window. Once I figured that out the script works very well and I LOVE it.
etopsirhc 5 Feb, 2022 @ 1:25pm 
man this is way cleaner and more professional looking than that one i made for splitsie a year or so ago. +1 and now using your version. lol
Tonatsi 6 Jan, 2022 @ 5:16pm 
Nice!
Whiplash141  [author] 6 Jan, 2022 @ 3:55pm 
Ok, code is updated and so is the documentation.
Whiplash141  [author] 6 Jan, 2022 @ 1:53pm 
So a sender can address any number of receivers. Currently a receiver is a 1 to 1 link to a particular timer block. I totally forgot I didn't push an update to make that no longer the case, so give me a couple of hours to write some docs.
Tonatsi 6 Jan, 2022 @ 9:36am 
You can set that up by having the target timer trigger the other timers. if you're doing that from the trannsmitter, a timer block with each separate command in it.