Space Engineers

Space Engineers

(Obsolete) Loop Computers
133 Comments
BCMortis 22 Apr, 2018 @ 4:21pm 
@Digi
My point still stands, however. As Vas mentioned, there are a lot of scripts you don't want to loop that often, and with only three pre-set options it makes for a lot of script-based lag that's just not needed. Again, if you don't want to continue the mod, at least open it up so someone else can continue to update. So far, it still works for me, but there's no telling when Keen will break something.
Vas 22 Apr, 2018 @ 2:44am 
Yea, the self looping doesn't actually let you specify how often it loops. You can choose 1, 10, or 100 ticks I believe. Thats it. Whcih is pretty horrible in some cases. One of the scripts I added the 100 to, the image flickers on it constantly, its horrible. Of course that could be bad code or SE's fault. But I still don't need it to update that often.
Digi  [author] 22 Apr, 2018 @ 12:19am 
If PB scripts are not being updated, their inability to self loop is the least of your problems :P
BCMortis 21 Apr, 2018 @ 3:08pm 
Have to agree, there's tons of scripts where the author just isn't going to update to include self-looping, or scripts where they won't add it because they prefer setting timers over the pre-set repeats Keen added to scripts. When Keen said they were adding a way for programable blocks to loop themselves, I thought they were adding the same functionality as your mod. Really upset to find out it was a hardcoded timer in the scripts themselves and not something users could adjust. This mod is certainly not obsolete and doesn't interfeer with scripts that automatically loop. If you just don't want to continue to update the mod yourself, please
let someone else take over.
Anach 4 Apr, 2018 @ 5:46am 
I have to agree with Vas, not everyone will add loops to their scripts, as many like to use timer blocks. We can all go and learn how to add looping to our scripts ourselves, but why do that when we can use a loop computer. :)
Vas 14 Mar, 2018 @ 12:25am 
I kinda figured out how to update the script to do what I wanted, but eh. Would have been nicer if the devs would have just given us a UI like your mod did.
Vas 13 Mar, 2018 @ 11:38pm 
This doesn't look obsolete. You have to code your loops in, which means you need programmers to update old scripts. I don't even understand the page so I can't update these scripts to run looped.
PhantomX 10 Dec, 2017 @ 4:35am 
As I see they added that feature in, I say your method is what they should have done, I ask that you keep this up to date man. Some of us arent all that good at the programming aspect of the game while actualll add slider (Which from what I understand is injecting the same command into the script). I hate to see this go down, but I understand if you dont want to, but I do thank you for a very useful mod and blame Keen for being stupid and not looking to the modding community and seeing what is needed to be done to fix the game.
DeAnti 4 Dec, 2017 @ 7:51pm 
Great MOD rip
megapro 30 Nov, 2017 @ 11:21am 
I think I've used this pretty much from day one you published it nice to have it in the vanilla game now.
Dark_453 29 Nov, 2017 @ 9:39pm 
"Sad_Brother 18 Nov @ 7:00am
lol :) even obsolete mod need to be fixed"

Keen added self Triggered PB's so this is no longer needed.. Hence Obsolete.
Sad_Brother 17 Nov, 2017 @ 11:00pm 
lol :) even obsolete mod need to be fixed
Emmepathic 17 Nov, 2017 @ 8:39pm 
just wanna say thanks, this mod was a lifesaver for many of my builds, thanks for the hard work!
Digi  [author] 17 Nov, 2017 @ 5:28pm 
Right, found the issue, apparently it worked fine if you had another mod that also added something to PB (which I did, control module, since I had to fix that too).

Fixed, again xD hopefully there are no more surprises.
Dying Dark Star 17 Nov, 2017 @ 4:54pm 
i do love this mod but it's now obsolete :steamsalty: i don't know how to write code so for me this is simple and easy
Cardboard Overlord 17 Nov, 2017 @ 4:18pm 
But if you're going to phase this out, anyway, then I'll totally understand if it's wasted effort to fix it. People will update their scripts soon enough. No worries, man.
Cardboard Overlord 17 Nov, 2017 @ 4:15pm 
2017-11-18 00:10:41.391 - Thread: 1 -> Exception occured: System.NullReferenceException: Object reference not set to an instance of an object.
at Digi.LoopComputers.LoopPB.<Init>b__8_0()
at Sandbox.MySandboxGame.ProcessInvoke()
at Sandbox.MySandboxGame.Update()
at Sandbox.Engine.Platform.Game.UpdateInternal()
at Sandbox.Engine.Platform.Game.RunSingleFrame()
at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass1.<Run>b__0()
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at SpaceEngineers.MyProgram.Main(String[] args)
Cardboard Overlord 17 Nov, 2017 @ 4:14pm 
I rebooted, verified the game files, deleted and re-downloaded the mod file, and started a new singleplayer "Star System" world in creative mode. The only mod activated was Loop Computers. The game loaded fine, but as soon as I place a PB the game immediately quit to desktop.
Cardboard Overlord 17 Nov, 2017 @ 3:52pm 
I'm in singleplayer (I only ever play singleplayer), but I'm running other mods. I just uninstalled this and the game loaded ok. However, after a few minutes it had problems browsing scripts from the PB (perpetual loading icon, couldn't select any existing ones), and then the game stalled at the prompt for quicksave and I had to close SE through Task Manager.

This was with your mod uninstalled, so maybe there's something else going on in my game just now. Maybe another mod is wrecking things. I'll reboot Windows/Steam and try a few other things. Sorry if this was a false alarm.

Where would I find the crash log?
Digi  [author] 17 Nov, 2017 @ 3:35pm 
Crash log? I tested it on my end and it worked fine, so I imagine you're not in singleplayer?
Cardboard Overlord 17 Nov, 2017 @ 3:26pm 
I spoke too soon. Now it's crashing my game.
Cardboard Overlord 17 Nov, 2017 @ 2:53pm 
Awesome. Thanks :)
Digi  [author] 17 Nov, 2017 @ 2:22pm 
Ah, there seems to be an issue with PBs and gamelogic components for mods.
Updated and fixed.
Cardboard Overlord 17 Nov, 2017 @ 1:32pm 
@ Apsyc... Haha :)

@Digi... Actually, it doesn't seem possible to use it. The slider has disappeared. I agree with the script authors setting it up best. We already had a few examples of self-managed scripts before these changes (e.g. DAS which had variable timing (which is broken now)). I think it's a good thing. Just a bummer while we wait for updates, I suppose.
N-Trippy 17 Nov, 2017 @ 1:10pm 
So long, and thanks for all the "ticks!"
Digi  [author] 17 Nov, 2017 @ 1:06pm 
Thing is the scripter knows best what their script should run at, so it makes more sense for them to do it rather than the end user.

You can still use this if you want, I'm only gonna remove it if it reaches 0 subs :}
Sad_Brother 17 Nov, 2017 @ 12:13pm 
If you are non-scripter, chances are you are use other people code. It means code would be updated 'eventually'.
Thanks, Digi !
Cardboard Overlord 17 Nov, 2017 @ 11:59am 
A simple slider on the PB, vs having to write the function (which I don't really understand) into any script that I want to control: I'd hardly say this is obsolete. Your way was so much more intuitive for non-scripters like me. Wish I could still use it.
Digi  [author] 17 Nov, 2017 @ 9:32am 
Since SE v1.185 added the ability for PB scripts to self-loop this mod is kinda obsolete, it will no longer receive updates.
a 21 May, 2017 @ 8:47am 
@Slaughter Lord: you can run as many programming blocks at once with a single timer block as you can fit on its toolbar (all 9 pages of it). However, making it repeat itself instantly with Trigger Now causes the timer block to run EVERY SINGLE TICK (60 times per second!), which combined with a heavy script can severely impact the simulation speed (i.e cause lag).

This mod however, does not touch the timer blocks, it just allows you to set the repeat interval on the programming block itself, also in much more granularity than the buggy timerblock, allowing you to choose to run 1 block every 0.5 seconds, and another one every 10 seconds, without causing lag.
ConTaGious 21 May, 2017 @ 1:44am 
Hi Digi,
I've been trying to find a blunt answer to this question online for a while and im guessing the reason i can't is because its obvious to every1 but me lol. but i'm wondering if 1 timer can run multiple PBs on a loop? So if 2 scripts required the same setup conditions on timer of (run PB, then Trigger Now itself, then Start itself) if i could use 1 timer to do that,.. that is, do it w/out negative consequences?

If not tho, then looks like your mod is the solution, thank you.
Digi  [author] 20 May, 2017 @ 6:59pm 
Nope. The default is to not repeat and the slider value is saved on the block.
Drats666 20 May, 2017 @ 5:11pm 
so I have a quick question. I have seen other mods that try to do the same thing, combine a programming block with a timer block. however they all have one major flaw. when server restarts all the timers get to set always run. I am sure I don't need to explain why some scripts should never run in a constant loop. does this mod have that problem?
a 18 May, 2017 @ 2:21am 
I already removed the timer block from the server entirely, this mod is the last loose end for me ;) I've tried the scripter rank but it didn't work for me, regardless this solution would be more waterproof in the end. I'd also love a timerblock without the trigger-now exploit, but that doesn't seem possible right now.
Digi  [author] 18 May, 2017 @ 12:28am 
I don't know if it's even possible to prevent people from using the old trigger-now so why limit this one when they can use the old one anyway?

I strongly suggest you use the scripter rank and give it to only people who understand the load they add to the server with PB scripts; but not just the repeating part, there are plenty of exploits that go past the limits. The slider is only accessible by scripter roles if they're enabled.
a 17 May, 2017 @ 1:58pm 
Hey Digi, I really love this mod BUT I'd love a version that does not allow the player to run faster than every 0.3s due to the extreme load the 'trigger now' repeat-every-tick exploit causes on the server.

Could you make a version that is basically the exact same, except can't go faster than once every 0.3s or ~40 ticks?
Digi  [author] 7 Mar, 2017 @ 11:07pm 
Well apparently the argument in the terminal is client side only and synchronizing it would take more time, right now I'm just gonna remove that feature for the mod to be consistent in SP and MP.
Digi  [author] 7 Mar, 2017 @ 2:15pm 
It works fine here, the argument you type in the terminal is passed to the program when the mod runs it.

pb.TryRun(pb.TerminalRunArgument);

That's what I do to run it, if it doesn't work I'll need more details to replicate it.
And I'm not sure what you mean by "placed to manually run", if you mean timer blocks, they're irrelevant here.
Varaxian 7 Mar, 2017 @ 12:46am 
Still showing broken for me. Fresh download of the mod as well. Will not run arguments unless placed to manually "run"
Weaver 4 Mar, 2017 @ 1:06pm 
Yay :D
Digi  [author] 4 Mar, 2017 @ 6:18am 
Fixed :}
Weaver 26 Feb, 2017 @ 12:36am 
@Digi it seems that it's not using the default argument on autorunning, only when i push the run button manually
Âmøur 24 Feb, 2017 @ 12:22pm 
@Digi thank you for such a prompt and clear answer, although it is negative. I will keep looking for person who will be able to fulfill a plan.
Digi  [author] 24 Feb, 2017 @ 9:42am 
I see, you want to limit the PB use in DS... well, the limits you suggested seem to hinder usability more than it would help performance frankly, so I'm not really interested in doing any of those things you listed.

You should request these on the forum or in discord or something, someone might be interested in doing them.

If you worry so much about PB scripts you should use the scripter rank and give it only to people you can trust... or simply disable the PB ability altogether, as people who want to loop their scripts rapidly will find ways to do it anyway :P

Also, on nr. 2, I meant that the PB script itself can have a function to turn itself off after X repeats which is something the player needs to add, not the DS admin, that was before I understood that you wanted to enforce the limit.
Âmøur 24 Feb, 2017 @ 1:36am 
@Digi I hope you can understand what I'm asking
Thanks you.
Âmøur 24 Feb, 2017 @ 1:35am 
@Digi
Part 1.
1) Yes, your mod dose not replace anything, but could you add same mod to your workshop but that adds "new PB with self looping" in G menu. So there will be 2 types of PB and it will grant more flexible settings for SESE Block Enforcement Settings - Blocks per player.
2) Ok this is good news, but it is quite hard to work with code for people who dose not have programming education. I searched for that string that is written in description but i didnt found it. I got now clues what do i have to change.
How do i see it:
Scrollbar
Name of scrollbar = Number of repeats
Variable = 1, 2, 3... 100
3) I suggest to make a line that allows players to set how ofter 1 loop will repeat.
How do i see it:
Scrollbar
Constant/Name of scrollbar = 1 repeat
Variable = 10, 13, 15 seconds and etc, but not less then 10 seconds
4) I mean prevent the vanilla timers from running "new PB with self looping".
Âmøur 24 Feb, 2017 @ 1:34am 
@Digi
Part 2
Your current mod is quite nice for single game, but if i will use it on Dedicated server it will kill servers SimSpeed. ( 25+ players using LoopingPB with 0.17 sec repeat time guaranteeing bad end ). I offer to make same working mod but that will allow players to use scripts on DS only when they really need them, other way for example debris that usually appears in game can contain Loop Computer that will keep making endless number script of repeats. With my suggestions loops will automatically turn off after X repeats, players wont be able to restart them with vanila Timers (The way i see players able to restart loop run is Button push or Cockpit panel push) and wont overload server with fast repeating loops that are usualy set for ~ 1 second.
Digi  [author] 23 Feb, 2017 @ 1:38pm 
1) This doesn't replace anything, it adds an option to all PBs. And I see no reason to make it a separate block.

2) The PB script can turn off the loop after X repeats, see description for the code to adjust the slider.

3) Not sure I understand this, but 1 repeat for each 10 seconds sounds like a 10 second loop to me which is already a thing.

4) You mean prevent the vanilla timers using 'trigger now' on themselves to trigger every tick ? Or just prevent timers from running PBs ? Either way, I'm not sure if they're possible to do, but that's more of a game issue that should be solved somehow and the purpose of this mod is to show how to solve it: by giving people the option to repeat at the exact frequency they need.
Âmøur 23 Feb, 2017 @ 1:09pm 
@Digi could you please give me an answer: are you interested in that changes and will you implement them? (may be in a short future); Becouse i need to plan a gameplay on my server and look for other mod if you are not interested in this.
Thanks you.
Âmøur 22 Feb, 2017 @ 12:48pm 
@Digi
Request and suggestion.
1) Could you make a mod with separate Loop Program Blockinstead of replacement version.
2) Could you make the finite number of repeats (example: Block can self repeat only 5 times or 20 times; the player can choose an amount of repeats, by analogy with the timeline)
3) Could you limit time intervals: 1 repeat for each 10+ seconds (but not less than 10 seconds)
4) Some how to forbid Timer blocks communicate with Loop Program Blocks (with other words: to forbid players use Loop PB via Timer)