Molek-Syntez is a fun new game from Zachtronics, in the classic Zachtronics mold - program a simple machine to do something vaguely chemistry-related, in this case synthesizing drugs in your shitty Romanian apartment.
Optimizing these machines requires some careful knowledge of precisely how various commands are prioritized, so you can "stack up" commands in the same turn sometimes that would otherwise require separate turns. Unfortunately per usual for Zach's games, the priority information is never stated anywhere and has to be divined from gameplay. Molek-Syntez is particularly complicated in its simplicity, however, making it more difficult than usual to figure these things out. Some people have, tho, and I'm going to reproduce the information here, for my own future use and that of future searchers.
Command Priorities
- Delete & output. Note that while this fires first (and thus you can safely move things into the way of the command during the same turn), the action actually takes the entire turn, and so you can't move or fire thru the space the disappearing molecule is taking up.
- Hydrogen shunting & removal.
- Hydrogen addition.
- Movement and rotation.
- Bond creation.
- Input.
If multiple emitters are taking actions in the same step, they fire in numeric order; emitter 1 fires first, then emitter 2, etc.
Bonding Priorities
Whenever an atom has the opportunity to bond (it loses a hydrogen, or gets hit with a bond-creator action) or debond, it chooses which neighboring ion to de/bond with in a particular order as well.
- Bond multiplicity. It prefers to add bonds to the smallest channel possible, making a single bond over a double bond, etc. When removing bonds it's the opposite, breaking a double bond over a single bond, etc.
- Atom type: C > N > O > S > Cl. I assume this is based on actual electronegativities, but I choose not to look this information up right now. So if you have "C C N" and tell the middle atom to make a bond, it'll always do "C-C N", never "C C-N" (unless the left C is already full of hydrogen).
- Orientation: down-right (4 o'clock), then clockwise from there. (That is, 4 > 6 > 8 > 10 > 12 > 2.)
Hopefully this information will help you in your optimization!