Stationeers

Stationeers

View Stats:
123 Sep 4, 2024 @ 2:33am
Every update breaks IC10?
Noticed that after updates my ugly code stops working, it reminds me of Space Engineers when every update the developers broke a programmable block.

Does your code often stop working? I noticed that it is dangerous to use stack, references etc, for example, you need to keep an eye on stack at program startup otherwise at the next start of initialization there may be garbage in stack and break your program, well 128 lines of code is not enough, you have to use kludges.

#fireass
< >
Showing 1-7 of 7 comments
Golden Dragon Sep 4, 2024 @ 3:21am 
50% of scripts I use made in 2022.
teravisor Sep 4, 2024 @ 4:03am 
Stack is persistent. So if you put 10 variables, then because of some change whole program restarts on game load, you will still have those 10 variables. My guess is you don't expect it to happen.
Maybe try resetting sp (stack pointer register) to 0 to make sure you're working with "empty" (at least logically) stack at beginning of program?
By references you mean reference ID of objects? I've yet to use those, I handle it with sbn/lbn and fixed names, that way even if reference changes, program still works. Although I don't think references should change, but I've never tested that.

I've yet to see an actual reason (outside of trying to write your own AI, idk) to have more than 128 lines in single chip. In almost all cases you can separate logic into multiple chips and have them interact with each other. It's enough to do a lot of stuff from controlling a furnace to aligning dish if you have a separate chip doing just that.

P.S. or maybe I'm too new to this and haven't encountered that problem yet.
Last edited by teravisor; Sep 4, 2024 @ 5:13am
JeanDeaux Sep 4, 2024 @ 4:53am 
I would tend to agree that the root cause is likely how you are managing the stack than a bug in Stationeers.
But why would OP's problems happen every update instead of also otherwise?
JeanDeaux Sep 4, 2024 @ 5:49am 
An update "might" cause the MIPS code to "restart" instead of the usual "resume". If this is the case, then if the first set of instructions isn't to clear the stack, then he's probably got an unexpected stack build.

Having played with stacks a bit, I found it easy to mis-manage these things.
123 Sep 4, 2024 @ 1:43pm 
I don't know what exactly they're updating, but after a while my scripts stop working if they use something more complex than turning on lights.

About the stack, above is correct, sp 0 helps. (strange but ok)

JeanDeaux, yes if you not set stack sp 0, you get stack overflow.
if you push a value and “restart” IC10 sp-pointer is not 0

Another "glitch", If place IC housing between two frames, the game tick works differently at the code level. In minecraft there was a similar bug between chunks when redstone didn't work. But this glitch is cured with yield if you don't reach the number of instructions to the limit per tick.

128 of is not enough to handle all the errors. I have to ignore some possible errors, and then half my base explodes after the update :D
JeanDeaux Sep 4, 2024 @ 2:40pm 
With the exception of an issue I made in this post...
https://steamcommunity.com/app/544550/discussions/2/4406292251590450431/

I am not seeing updating issues in any of my programs that you are describing; so this is not a shared experience. My programs have steadily worked through every upgrade without any issues at all. I would tend to favor an opinion that it's your coding methods that are not handling re-starts with currently running equipment that is more likely at issue.
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Sep 4, 2024 @ 2:33am
Posts: 7