Space Engineers

Space Engineers

Cargo Fill Triggers
25 Comments
Citra Joe  [author] 2 Mar, 2024 @ 9:49am 
In the PB, the right panel should show some status information. If the relevant cargo volume numbers don't look right to you, the cargo group may not be configured correctly.
It also shows whether it was able to find timer blocks for the trigger ON / OFF states - those are timer names, not group names. I'd make sure all of those show YES for the triggers you want to act on. If they all look ok, check your timer blocks, and make sure the right ones are named as expected - do they do what you expect when you click "Trigger Now" ?
ShadowGames 2 Mar, 2024 @ 8:09am 
Hey mate, thanks for the reply. I activated the experimental mode + allow scripts.
Script is loaded in the PB, runs without errors. In the script I adjusted the cargo block to the group of cargo blocks I have saved before. During drilling there are no warnings and the drill is not stopped when reaching 90% cargo capacity. What could be missing?
Citra Joe  [author] 29 Feb, 2024 @ 6:39pm 
@ShadowGames Do other scripts appear in the in the PB's script list? Do you have Experimental Mode enabled? Does the server (if relevant) allow scripts? I just checked and it's still on my list.
Rough process I followed:
From the PB, scroll down to Edit, then Browse Scripts, script was listed for me on the left. Selected the script, copy to editor. There are some basic instructions in the process.
Hopefully it's not a keen change causing problems
ShadowGames 29 Feb, 2024 @ 4:18pm 
Newby just got his first cool miner ship and wonders how to get intel about cargo capacity.
The instructions in the description are not clear to me. I have subscriped this script, but it does not appear in the PB (I restarted SE before). So does this mod work or what do I need to do?
Citra Joe  [author] 27 Feb, 2022 @ 11:12pm 
I'm glad it's been helpful!
Kalibr 26 Feb, 2022 @ 2:59pm 
Thanks for the script! It saved us from rebuilding our base :)
Armigus 15 Nov, 2021 @ 8:37pm 
Confirmed the mod works. Mind that you are setting up 3 fill states: green (below warn), yellow (warn), and red (max allowed fill). Yellow can be entered from green or red and you have timers for both that might not be needed.
Armigus 13 Nov, 2021 @ 4:52pm 
Testing the mod right now. The data you keep in the block screen can and should be made available to an LCD or even a corner LCD. Main LCD would show total and used capacity like the block screen and corner would simply be "Fill: "+fill bar. Color of either could be influenced by WarnColor and MaxColor variables in custom data of LCD.
Deadmeat 4 Aug, 2021 @ 3:03am 
This works great and is a wonderful tool to have. I do not know how I managed before I had it. I am using 2 sets of lights, 1 set for warning (yellow flashing) and 1 set for max (red flashing), and 4 timer blocks. It took less than 2 mins to set up and when I hit max it shuts down my drilling rig,
Nildayan 21 Mar, 2021 @ 10:27pm 
Just tried this out on a survivor world to simplify things and keep my Nanobots Drill system from overwhelming my base's storage (again), and it dropped right in and worked like a charm. Thanks!
Cypherus 7 Dec, 2020 @ 6:59am 
Yes, but I must confess that I haven't tried with the lights in survival yet but it works with pistons and drills flawlessly.
About the "one time event" and the need for a "MaxedOff" timer I didn't need it in my case---I'm just using 1 timer, the "MaxedON."
I have a rover-miner with 4 large containers and I set the script to 98%, lol. The script stops my pistons and drills as expected. Then, I made an experiment and threw some ore out which lowered my cargo to 83%. I just started the drills and pistons again and they resumed their operations and the script started running again because it stopped everything again once the cargo max cap reached 98%. It became very handy for me since my 4 cargo fills up before my pistons can extent to their full length, so I just use my cargo-rover to take the ore from my miner-rover and, then, I start my pistons and drills again.
Citra Joe  [author] 5 Dec, 2020 @ 4:42am 
Glad it worked in survival at least! I wrote and tested it in creative, so I know it can work, but I'm not sure what's going on in your test case.
The "one time event" means the trigger only happens once per state change , meaning once maxed, the MaxedOn won't trigger again until MaxedOff is triggered, then it can be triggered again.
I use it for pistons and drills too, and it usually works pretty well for me, though I tend to change the number to something lower than 90% heh.
Cypherus 5 Dec, 2020 @ 4:37am 
I tried the script in my Survival game but instead of using a light I used just 1 timer MaxON (90%) to turn off my pistons and drills. It worked!!!!! Now I don't know if the problem was the light or the Creative mode.
In the guide it says that it's a one time event. So how do I make it run again? I just need to empty my cargo and the script will reset and stop my drills and pistons again once my containers reach 90%?
Cypherus 5 Dec, 2020 @ 1:25am 
@Citra Joe, they are. It shows "Maxed Timer Blocks Found" - "[ON/OFF]=[YES/YES] and "Cargo Blocks in Group = 4." I gave it another try, I deleted and built the programmable block again and the timers. I set it all up again and the script was showing the infomartion above. So I added a rotating light and I turned it off. In The MaxedON timer I set it to turn on the light and in the MaxedOFF timer I set it to turn off the light. Then I went to do some mining with 0 cargo to test it but when all cargos were already 98% full the lights didn't turn on even though the percentage is 90 (default.) But the funny thing is that in the programmable block it shows that the MaxedON timer has been triggered, lol. I'm testing it first in Creative, maybe it only works on Survival?
Citra Joe  [author] 4 Dec, 2020 @ 7:59pm 
@Cypherus - make sure the off timer block name is correct - I just tested, and my timer got triggered correctly - the light turned off.
Cypherus 4 Dec, 2020 @ 6:47pm 
Mine is not working properly. I tried first with a rotating red light. I used the MaxOn and MaxOff options. One to turn on the light (full) and the other to turn it off. The programmable block shows that it found both timer blocks and my 2 cargo containers but the lights doesn't turn off, ever!
Then I tried FritzHugo3 suggestion and the same thing happens. The rotaring red light is ALWAYS On even if the script says it has triggered the OFF timer. And both timers are set to 1sec delay.
FritzHugo3 29 Jan, 2020 @ 12:21pm 
Ok, have find it out. Manual - You need
1 programmable block and load the script on it (maybe "edit" buttom, i played with german language)
this was all here.

Group youre Storrageboxes with the Name:
Cargo - Capacity Tracking

(both timer 1 second or lower)
Timer 1 named:
Timer - Cargo Maxed On
(it say if the cargo is 90% full - trigger this signal)
Click on "setup actions" and there search the objekt you like to put out.
maybe here a Lamp for testing. Rightclik on it and say "switch on"
(make the lamp red - if cargo full is 90% and more the lamp goes on)
(of course, if you want to stop a pistons you must say "switch of" to stop the pistons

...
FritzHugo3 29 Jan, 2020 @ 12:21pm 
...

Timer 2 named:
Timer - Cargo Warning Off
(it say if the cargo is under 75% - trigger this signal)
Click on "setup actions" and make the same like timer 1 with the other switch (if timer 1 On, here off, is timer one the lamp off, here on)

of course you can use Cargo Maxed On and Cargo Maxed Off, but than flips ervry time over and under 90% and with Timer - Cargo Maxed On and Timer - Cargo Warning Off there is a time buffer. i find its nicer.

I tested it bevor with a red lamp before used it on my bin mining pistons. (Better before the miner breaking ;-) )


I hope it helped other people.

realy Steam only 1.000 character?
Anbd for all program writer, not all peoples can programming. Please write always a little manual. But thx for the script After hioures i have it.
FritzHugo3 29 Jan, 2020 @ 8:31am 
Please can anybody say me what i must do?
I have grouped my Gargo in
Cargo - Capacity Tracking
The script are compiled at the programmable block

What must i do with the timer, Programmblock, Piston?

Im testing here over an houres and dont know how it work.
Sorry im a total beginner and the most other scripts i have saw in the workshop has an manual.

What must i (and maybe other newbes) do to tell the System, Piston stop, whenn its 90% and restart, when is 90% full.

Thank you for helping.
Belfontan 20 Apr, 2019 @ 5:10pm 
Works very well, even with timer blocks (because no continuesly triggering, only once per Event).
Thank you very much.
Xander 15 Apr, 2019 @ 5:49pm 
Wow thanks Citra! working great, and for the quick response.
Citra Joe  [author] 15 Apr, 2019 @ 5:36pm 
@Xander Script has been updated - I just tested and verified that it should work
Citra Joe  [author] 15 Apr, 2019 @ 5:25pm 
@Xander I think I broke it when I was setting up percentages - off by 100 issue. Let me verify and update to fix
Xander 15 Apr, 2019 @ 4:55pm 
I have everything set up, but its not triggering the timer. Does this still work?
Dr. Distortion 30 Mar, 2019 @ 9:40am 
Very nice. Thank you!