Jump to content
Stray Fawn Community

[0.5.7] Battery/Fuel "Full" state not initialized at simulation tick 0


Entity

Recommended Posts

Immediately at the start of the simulation, any keys/tags bound to "FULL" state are not already set, so any logic that uses this state will think all batteries/tanks are NOT full.

Getting around this issue is possible but requires an unreasonable amount of extra logic parts.

 

mspaint_2018-10-07_18-37-09.png

  • Like 1
Link to comment
Share on other sites

Wow, thank you very much for debugging this bug and finding a workaround!

I think that there are other parts which have a incorrect default state at the start of the simulation/game. We have to check them systematically and fix this and other eventual related bugs. Thank you very much for sharing this and spending the time find a solution :) 

Link to comment
Share on other sites

On 10/7/2018 at 8:47 PM, Markus said:

Wow, thank you very much for debugging this bug and finding a workaround!

I think that there are other parts which have a incorrect default state at the start of the simulation/game. We have to check them systematically and fix this and other eventual related bugs. Thank you very much for sharing this and spending the time find a solution :) 

One of those faulty parts might be Distance sensor (I had an ejectable armor part on my ship which would explode when distance sensor didn't detect Own Drone anymore. The problem was that even though the sensor pointed at the main part of the ship from point blank range, the TNT linked to it via NOT operation exploded immediately). The logic chain was this simple: Sensor (Own ship, DETECT), NOT (DETECT, EXPLODE), TNT (EXPLODE). (This is from memory, but I think that was how it was built). The ejectable armor part (including the sensor) was created by a factory, in case it has anything to do with anything and the logic parts were within the ejectable armor part too.

  • Like 1
Link to comment
Share on other sites

4 hours ago, Baka Red said:

One of those faulty parts might be Distance sensor (I had an ejectable armor part on my ship which would explode when distance sensor didn't detect Own Drone anymore. The problem was that even though the sensor pointed at the main part of the ship from point blank range, the TNT linked to it via NOT operation exploded immediately). The logic chain was this simple: Sensor (Own ship, DETECT), NOT (DETECT, EXPLODE), TNT (EXPLODE). (This is from memory, but I think that was how it was built). The ejectable armor part (including the sensor) was created by a factory, in case it has anything to do with anything and the logic parts were within the ejectable armor part too.

That would be the NOT gate's initial output state always being active upon starting the simulation, it has not had the chance to evaluate the sensor yet, triggering the TNT.

Initial state is a very messy problem.

 

  • Like 1
Link to comment
Share on other sites

It's not just all the parts that produce an initial signal. There could also an arbitrary number of logic blocks attached to those sensors (e.g. a large number of batteries ANDed together).

Ideally the initial state would be the steady state if one exists or any state within a loop at least if the loop isn't enormous).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...