Combinator connected to the GUI

This is the place to request new mods or give ideas about what could be done.
Post Reply
Octaeon
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jan 29, 2019 10:55 pm
Contact:

Combinator connected to the GUI

Post by Octaeon »

While playing Factorio, I sometimes have some cool ideas about controlling my base. For example, wiring the belts to the input of a production line to only activate if a certain signal is present in a factory wide logistic network. This allows for centralised control over all the production. With it, I could make some really cool stuff - but ultimately, if I want to change anything, I need to run back to the central place where the circuits reside, to manually change the values in it.

Now, while playing with Space Exploration, it could be possible to somehow make a circuit network that allows for sending of commands, and then maybe plop down a transmitter and transmit the signals required to change the values, but let's be honest, who in god's name would do something like that?
With this mod, it could all be much simpler. I doubt manually adding buttons to the ones to the right of the toolbar is possible on the fly, but a single button to open a configurable GUI is definitely possible.

Within this GUI there could be several types of buttons and fields:
  • First off, an ON/OFF button, corresponding to a combinator similar to the pushbutton - when you place it, you specify what it should output when OFF, and what it should output when ON.
  • Secondly, a value combinator - when you place it, you specify the signal type, and you can control the value it outputs from the GUI itself. Maybe within the building GUI itself there should be a way to set the maximum and minimum value.
  • Third, a slider - very similar to the value combinator, but more intuitive. Also possible to modify the range of the output, though as a default, it should work similar to the vanila logistic request slider, though starting from zero.
  • Fourth, a single cell combinator - you can set it to output anything you want from the GUI, but limited to a single cell.
  • And lastly, a normal combinator, that you can control from the GUI, perhaps with the option of hiding the bottom two rows not to clutter the interface.
(I'm out of ideas right now, but I think I covered most of the useful ones with just these)

Now, addressing the big problem I can foresee - accidental changes and clicks. This could be mitigated by having each GUI field that controls a combinator be in one of two modes:
  • Real time - every change in the GUI is transmitted instantly.
  • Confirmation required - you can change anything you like, but nothing happens until you press a button that updates the combinators.
These modes could be implemented in several ways in terms of the GUI, but the two I can imagine right now would be implementation on a per-link basis and two category basis. They would be similar in terms of code, but displayed differently.
The per-link basis would have all the links displayed however the user wants, with only an icon or some kind of letter signifying the difference between a constantly updating link or a confirmation link.
The two category implementation would simply see the entire window split into two sections - one in which the constantly updating links reside, and the other with the confirmation based links. In this category, it would also be neat to create two button types that allow for changing the output of a combinator - one that would confirm all of the changes and send them to all the combinators, and a button next to each combinator, allowing for confirming the change to that single link.

Honestly, the continuous mode would be harder to program in, but it has its' bonuses: it should be familiar to the majority of players who worked with combinators, and if you somehow fuck up an input in some way, it will be immediately visible, and there will be no confusion what caused it. In comparison, if you change a lot of stuff, then confirm it and something fucks up, you don't know immediately what caused it.
The second mode would be easier to program, and would be lighter on the scripts, since a script would have to be run only once when a change was confirmed. On the other hand, a script to continuously check if a value of a GUI element was updated would have to run constantly - as far as I'm aware, anyway. Perhaps there is an event in the Factorio library that could be listened to, to check whether a specific GUI element was updated. Hell, now that I think about it, there most likely is such an element. Whatever,

All of the things I just described should be relatively easy to implement (as long as the scripts related to the game and the scripts related to the GUI are not split in some weird way for security/efficiency reasons), but there is one thing I would love in a hypothetical mod like this - customizability. For example, naming the individual links, creating your own categories inside the interface, rearranging the order of the links, being able to change the layout... Actually, that's all I can think of. But it's definitely a lot of work to implement :lol:

Overall, I would love to see a mod like this, even with barely a fraction of the features I described. After all, if I can manipulate a combinator with my GUI, that would solve basically all my problems. The rest are merely quality of life features. To end the post on a positive note, thanks for reading and have a lovely day! :)

Octaeon
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jan 29, 2019 10:55 pm
Contact:

Re: Combinator connected to the GUI

Post by Octaeon »

Addition:
I realise that basically free combiner connection once you research this tech might seem a little overpowered, especially in Space Exploration, which has signal transmitters and receivers that play a huge role in intergalactic logistics, but considering that such changes would have to be minimal, I really don't think it should be an issue. However, that is not the reason I'm making this post.

The real reason for this post is a single thing - the most obvious case of creating categories in the interface would be for the mod while it's in use with Space Exploration, by categorising every link (I didn't write this in the original post, but a link specifies a GUI element that controls the combinator it's 'linked' to) by what planet the combinator resides on is a logical use of such a feature, and a perfect place to create built-in compatibility.
Someone please make this
powercry_scaled_25.png
powercry_scaled_25.png (16.39 KiB) Viewed 808 times


Post Reply

Return to “Ideas and Requests For Mods”