Space Engineers

Space Engineers

Simpler Transmit Receive 2
43 Comments
Spicie 30 Sep, 2022 @ 6:05pm 
As an IT student, I know how having spaghetti code feels lmao
cjb  [author] 30 Sep, 2022 @ 4:55pm 
@Dominus yup, still works. Just tested out in one of my build worlds, even the LCD mirroring seems fine.

One of these days I might go rewrite it so I'm happier with the code, but the bits and pieces all seem to be working fine.
Spicie 30 Sep, 2022 @ 12:44pm 
This is exactly what I'm looking for to make a remote hangar opener that isn't sensor based.
Does this script still work?
Mako 25 Dec, 2020 @ 7:01am 
Thank you. Happy Holidays!
cjb  [author] 28 Nov, 2020 @ 7:15pm 
@Mako - thanks for checking and feel free to repost it!
Mako 28 Nov, 2020 @ 11:24am 
@cjb I would like to export this to Mod.io to use on XBOX and dedicated game servers. I would credit you of course. Or alternatively, could you post it there? I did a few of these for Isy with his permission. If you would like to see how they are posted on Mod.io, you can check out one of them here.

https://spaceengineers.mod.io/isys-inventory-manager-from-steam

Thanks,
cjb  [author] 11 Mar, 2020 @ 5:42pm 
@BroedipusRex it's been awhile since I wrote the script, so that seems like a reasonable way to make sure things still work :D

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2019885241
BroedipusRex 8 Mar, 2020 @ 12:09pm 
@cjb this script is amazing, I've used the Simpler Transmit and Receive for so many things over the years. The new settings have me slightly confused, but am still tinkering. Would it be possible for you to upload a test world with specific examples? Currently I'm trying to send a communication from grid A to grid B. B then runs a timer block, then sends the content of an LCD on B, to grid an LCD on A. Additionally, to get the debug output on the Programmable Block large display it should just be [<Programmable Block:1], correct? Thanks again for keeping this up to date!
cjb  [author] 17 Feb, 2020 @ 4:07am 
@Boobies The script was written to use the IntergridCommunicationSystem API and it seems like that doesn't need any antenna assignment anymore.

The script is still working in my test world, so I think you can just skip that step.
Boobies 16 Feb, 2020 @ 7:14pm 
Hi, as above, how exactly do you 'Assign this programmable block to the the antenna'? Cheers mate
d0pl 26 Jul, 2019 @ 7:28am 
Im under the impression that the way it works is as follows: if you can access the grid (terminal) of a grid, the program will talk directly to that grid. A direct comms line isnt necessary, and the signal could be passing trough dozens of varied relay grids, none of which need a programmable block.

I havent actually gone into creative to fully test this, but its the only way I can think of to explain why my laser antenna relay setup actually works. If true, its a real win for relays!
cjb  [author] 20 Jul, 2019 @ 4:56pm 
@d0pl I will take your word for it there - I definitely haven't tried relay setups. Or laser antennas with this script, for that matter.

If that works but has some tricks or gotchas, feel free to let me know and I'll update the description with the info.
d0pl 19 Jul, 2019 @ 4:51pm 
Hold up, some testing with the laser relay indicates that the antennas work as relays naturally. I could update an LCD screen just fine with this setup: [ship with script, laser antenna] - [station without script, laser antenna] - [station with script, also laser connected].
d0pl 19 Jul, 2019 @ 3:57am 
Is a transponder function possible? I have a Laser Antenna network which uses a relay instead of talking to the base grid directly, and since Im also transmitting some LCDs, I feel like it would be wasteful to mirror each LCD and timer block on the relay grid.
cjb  [author] 18 Jun, 2019 @ 6:07pm 
@EagleEyes ok updated. I don't know why it would throw an exception at that point specifically, so I'm not sure if the message/command will get lost or not.

I'll keep my eye open for that happening to see if there's anything better I can do with it.
cjb  [author] 18 Jun, 2019 @ 5:33pm 
@EagleEyes I'm not sure why it would throw an exception at that point, but I can at least stop it from causing the PB to require a recompile to keep working. I'm fighting with the tools at the moment, but once those are working again I'll upload an update.
EagleEyes 18 Jun, 2019 @ 1:28pm 
Hi, I sometimes get an error when receiving a command: Caught exception during execution of script: Object reference not set to an instance of an object. at Program.ReceiveCommand() at Program.Main(String arg) at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.<>c__DisplayClass46_0.<ExecuteCode>b__0(IMyGridProgram ...and a lot more

Any idea ?
Sorarse 17 Jun, 2019 @ 11:43pm 
It's not a problem, as there is another Tx/Rx mod I can use that allows me to do the same thing. It takes a little more setting up, but it works fine.
cjb  [author] 17 Jun, 2019 @ 3:27pm 
@Sorarse hmm, that exact thing is working in my test world.

You could add a LCD on the sending and receiving grids and then set a line in the PB's custom data to get some status messages. If you put config::broadcastLogPanelName::PanelNameHere (and recompile the PB), it will log messages about what commands it sends and receives.

That might help identify which side has stopped working as expected.
Sorarse 17 Jun, 2019 @ 6:47am 
New update installed, which very nicely removed the compile warning messages, but I can't get it to remotely open my doors. Bummer.
Sorarse 17 Jun, 2019 @ 6:30am 
I don't know if there has been an update to SE that has broken this mod, but yesterday it was working, and now it's not.

I use the Tx/Rx function to remotely open my hangar doors. The PB on the ships is set to Tx only = true and on the base the PB is set to Rx only = true. I have not changed the name of the associated timer block, which still works fine if you start it directly, so I am not sure where the problem has arisen.

I will try the updated version that removes the compile warnings to see if that makes a difference and will report back.
ETHREAL1 7 Jun, 2019 @ 6:20pm 
ok
cjb  [author] 7 Jun, 2019 @ 6:17pm 
@ETHREAL1 well that was easier than I expected. Published an update that removes the warnings and can push messages to any block that has a text surface (and matching name).

So for anything with only one LCD, it will work as normal (plus you can have multiple matching displays now) and for anything with more than one LCD, the first LCD in the block will receive the text.
ETHREAL1 7 Jun, 2019 @ 5:50pm 
ok, take your time
cjb  [author] 7 Jun, 2019 @ 5:40pm 
Ah, I see - yeah lots of deprecated functions. I'll go look at least at updating to remove the warnings.

Unfortunately supporting the cockpit LCDs and the regular LCDs require different code (why Keen, why!) so that no promises as to when I'll get to that. I'd like it too though, so at least I have motivation for it :)
cjb  [author] 7 Jun, 2019 @ 5:30pm 
@ETHEREAL1 could you be more specific about what isn't working, is it just the cockpit LCDs? I'm running the most recent release and the script + regular LCDs seem to work fine, so I need some pointers as to what isn't working.
ETHREAL1 7 Jun, 2019 @ 1:37am 
with all the new cockpit lcd updates the entire LCD system has be redone, can you please update this so that LCDs (and preferable also the cockpit LCDs, look at the same system ALCD2 and isy uses) work again?
cjb  [author] 1 Jun, 2019 @ 5:24pm 
@Syngather could you be more specific on the errors you're getting? I don't get any issues using the script with the current version of SE.
Syngather 31 May, 2019 @ 11:46pm 
I am getting a bunch of errors when I first try to run this script, is this going to be updated its a great script.
DreadAngel 22 Apr, 2019 @ 6:56am 
Yes I put the name of the Timer block to the Prog block, but I didn't put anything on the argument window poping when I set Run in the toolbar, I will try that thank you.
cjb  [author] 20 Apr, 2019 @ 2:55pm 
@DreadAngel It sounds like you almost have it.

When you trigger the Programmable block on the sending ship, you have to put in the name of the Timer block.

The name of the programmable blocks do not matter.

So if you are trying to trigger it from the cockpit's toolbar, for instance, you would pick the Programmable block with this script on the sending ship and pick "Run" and in the window that pops up, you type the name of the remote Timer block.

If that doesn't help, I'll see if I can figure out some screenshots to illustrate.
DreadAngel 19 Apr, 2019 @ 9:40am 
Hello,
I try to do a remote hangar door but I can't find where does the problem comes from. I did name the Prog block in the ship as the Timer block in the base and assigned both Antennas their respective prog block. I tried many different things. I don't understand how the Prog block and the timer that will open the doors are connected by the script or the game. Can you help me?
I based that on the tutorial made by Splitsie
cjb  [author] 24 Mar, 2019 @ 7:23am 
Okay, probably the last update for a bit. Fixed what might be a bug or at least a difference in the API documentation. Busy and/or frequent updates are more likely to make it through, but it still has the general limits of he grid communication system.
catcraft 24 Mar, 2019 @ 6:22am 
Oh, okay, that worked. Thanks!
cjb  [author] 24 Mar, 2019 @ 6:02am 
Meant to also say, after you change the custom data make sure to hit Recompile.
cjb  [author] 24 Mar, 2019 @ 6:01am 
@CatCraftYT increase the maximum characters for the LCD. By default the receiver only keeps 512 characters, so for things like the ship floor plan scripts, it might have to be really big.

Like all the configuration variables defined in the script, you can do the config from the PB Custom Data

For example, to allow 8000 characters, you'd use
config::maxMessageLogLength::8000
catcraft 23 Mar, 2019 @ 9:50pm 
It seems with monospace images the script only transmits the first few little bits
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1692255820
cjb  [author] 23 Mar, 2019 @ 9:40am 
In fact, just fixed some bugs with multiline lcd transmit and being able to send on channels.

So lcd:myChannelName::lcdName should work now and should allow multiple lines of text.
cjb  [author] 23 Mar, 2019 @ 8:55am 
@CatCraftYT let me know if you have any problems with the LCD broadcast. I literally added it over the last 45 minutes and made a bunch of changes as I went. My little test rigs all work, but it doesn't have a lot of 'real' use so far heh :)
catcraft 23 Mar, 2019 @ 8:41am 
Oohh
cjb  [author] 23 Mar, 2019 @ 8:38am 
@CatCraftYT I had a go at adding LCD transmit. On the sending side, if you use lcd:<panel name> it will broadcast that LCD's contents.

On the receiving side, if you have an exactly matching LCD, it will receive the content (otherwise it will go to the generic one configured for text: messages).
cjb  [author] 21 Mar, 2019 @ 7:06am 
@CatCraftYT I think the receiving side would be pretty straightforward, it probably "just works". On the sending side, you would need to do some work in a programmable block to get text out and send it to the sending PB.

It seems like a very common request, so I may take a look at adding another sub-command on the sending side where you can pass an LCD name.
catcraft 20 Mar, 2019 @ 4:42am 
Can I copy-paste text on an existing panel to another remote panel with this?