Space Engineers

Space Engineers

SHART | Script Handling Activation of Remote Timers
121 kommentarer
ZEALOT 12. apr. 2024 kl. 7:55 
BEHOLD THE SHART
Whiplash141  [ophavsmand] 9. apr. 2024 kl. 16:56 
@Terrance Hood:
CRAZY
Terrance Hood 9. apr. 2024 kl. 14:51 
Call me crazy, but the acronym "SHART" is probably not the best choice.

Just sayin'
JoeHan 29. mar. 2024 kl. 14:45 
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 kl. 19:02 
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  [ophavsmand] 14. feb. 2024 kl. 8:20 
Are you using merges on your main ship to connect the drones?
Yadokanium 14. feb. 2024 kl. 1:32 
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  [ophavsmand] 31. dec. 2023 kl. 8:21 
Ahh that will do it :)
Stollie 31. dec. 2023 kl. 3:35 
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 kl. 1:51 
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 kl. 3:10 
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  [ophavsmand] 22. dec. 2023 kl. 2:26 
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 kl. 18:03 
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 kl. 18:03 
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  [ophavsmand] 21. dec. 2023 kl. 14:55 
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 kl. 2:27 
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  [ophavsmand] 25. nov. 2023 kl. 1:11 
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 kl. 23:36 
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. maj 2023 kl. 23:56 
When running PB " | " << Please tell me I need to clear this (This comment was written with a translator)
Whiplash141  [ophavsmand] 25. apr. 2023 kl. 17:58 
Pssh I'm always down for others doing the hard part of creating content for my scripts lmao
Code Digits 25. apr. 2023 kl. 16:56 
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  [ophavsmand] 23. jan. 2023 kl. 19:59 
Are the versions of sender and receiver the same? And what argument are you inputting?
MedvePapus 22. jan. 2023 kl. 9:11 
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 kl. 14:27 
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  [ophavsmand] 23. nov. 2022 kl. 13:04 
What _precisely_ did you place in the custom data?
MedvePapus 23. nov. 2022 kl. 13:03 
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 kl. 5:04 
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 kl. 20:57 
sorry about that, and thank you
Whiplash141  [ophavsmand] 12. aug. 2022 kl. 10:43 
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 kl. 10:01 
isit just me or is Jump drive unable to work with the SHART mod?
Whiplash141  [ophavsmand] 28. juli 2022 kl. 7:56 
user error. it places defaults if the inputs are invalid.
heavy 28. juli 2022 kl. 4:22 
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. juni 2022 kl. 7:22 
oh damn.. it already exist...
I didn't find it and made my own.
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2808968252
Whiplash141  [ophavsmand] 15. maj 2022 kl. 22:03 
Probably not.
ninjawizard 15. maj 2022 kl. 20:46 
work with beacons too? because beacons have max dist 200km antena only 50km
Whiplash141  [ophavsmand] 5. maj 2022 kl. 7:38 
Yup!
ninjawizard 5. maj 2022 kl. 2:04 
so the range is the range of the antena ?
ninjawizard 5. maj 2022 kl. 2:03 
wooah anybody else is thinking about remote orbial missile strikes here ? :O another great script whip! you are the best on SE scripting dude
Abraham Lincoln 31. mar. 2022 kl. 11:36 
never trust a fart in the bath
Whiplash141  [ophavsmand] 25. mar. 2022 kl. 10:40 
Purely an unfortunate coincidence
Connorwk2008 25. mar. 2022 kl. 10:25 
is no one going to talk about out the name shart
Tonatsi 9. feb. 2022 kl. 9:24 
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 kl. 17:08 
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  [ophavsmand] 8. feb. 2022 kl. 16:49 
> Explain that you need a PB running the script on the vehicle

That's in the instructions...
baronjutter 8. feb. 2022 kl. 15:37 
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 kl. 13:25 
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 kl. 17:16 
Nice!
Whiplash141  [ophavsmand] 6. jan. 2022 kl. 15:55 
Ok, code is updated and so is the documentation.
Whiplash141  [ophavsmand] 6. jan. 2022 kl. 13:53 
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 kl. 9:36 
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.