

#FACTORIO OIL MOD#
My idea is some system where a mod can say "I want to add this GUI, and I want it to be shown relative to the character GUI on the left side" and then any time the character GUI is shown it would also show the mod GUI.
#FACTORIO OIL MODS#
Currently it's not possible - the base game GUI isn't readable by mods so they can't do anything with it. For example: a mod wants to add a pane which shows on the left of the character inventory GUI. Additionally I figured out a semi-friendly way for mods to put things directly on the screen in a way that the player can drag them around - instead of being limited to some fixed area (left, top, center, etc).Īnother system which I've been thinking about for quite some time is some way for mods to position GUI elements relative to base game GUIs. With this latest release I finally figured out a way to do tabbed panes since they're special in how they work compared to everything else. However, that leaves a divide: we need to implement each widget type through the "CustomGui" system in order for mods to be able to use them. None of the "last known state" is saved anywhere and it's all lost when saving, quitting, and loading. The base game GUIs are not implemented using this same system - they're just pure collections of widgets. Using the above example it's much easier to explain that: as a mod - you can't. That still leaves the last question: "How can I edit the base game GUIs?". Additionally it means that the game can use that "last known state" to restore what the player sees if they save, quit, and load the game. The basic data about what a given mod wanted to show on screen is recorded so mods can read and change it as they want and not need to be concerned with constantly updating it every time some changed event happens. Instead of leaving that entire mess to mod developers we decided long ago that we would manage that "last-known-state" for them.

Try to imagine that: every single mod implementing their own system for remembering last-known-state about GUIs they're using.
#FACTORIO OIL UPDATE#
If the mod didn't have access to read that state it would need to store the last-known state and update it every time it got the changed event. In that simple bit of logic if a mod can read the checked state of a checkbox then that checked state needs to be deterministic. In an environment where mods have to operate deterministically, if a mod is allowed to read some data that data must be deterministic. The part that mods have access to however is. The actual widgets are not part of the game state and are not deterministic.
