Thursday, 20 May 2021

BFBP: Changing door perms can glitch CA transfer. How to fix and prevent:

Welcome to the first post of Bug Fixes & Best Practices. When running some experiments regarding if door permeability affects how well CA transfer from one room to another, I ran into a glitch which makes a room continue to emit CA through one of its doors even if the object responsible for the emission is no longer in the room, present at all or is emitting anything anymore.

CA transfer being frozen by a changing permeability

You may or may not be familiar with a few metarooms which change room permeability in order to create lockable doors based on the volcano door in Creatures 2. Let's try a more practical example to show how this can affect a metaroom:
In Terra, a peaking pie is creating a food smell emission. When the door agent is used, the door transfer is frozen.

You can try reproducing this glitch yourself using CAOS commands or the Magic Words room edits. Now you may be wondering how this can be prevented and fixed.
If your CA ever ends up with broken emissions like in the above examples, simply enter the Calc command into your CAOS command line and it will fix the problem. You can add calc to your door agents in order to prevent them from causing the glitch, just make sure they calc after the door command, not before it. Of course this has its own problem, the denser your world is with rooms, the more likely this command will cause a brief lagspike. With particularly small worlds there should be no noticable lag at all. Unfortunately there does not appear to be a way to perform the calc command on a single metaroom.




No comments:

Post a Comment