Compact circuits


Miniaturize a whole logic network into a single entity to save place (similar to factorissimo but for signals).

Content
6 days ago
1.1
6.60K
Circuit network
Owner:
Telkine2018
Source:
https://github.com/Telkine2018/compaktcircuit
Homepage:
N/A
License:
MIT
Created:
1 year, 8 months ago
Latest Version:
1.1.6 (6 days ago)
Factorio version:
1.1
Downloaded by:
6.60K users

Objectives

This mod allows to miniaturize a set of combinators into a single combinator.

As in factorissimo, it adds a dedicated surface to edit the combinators but can run without it.

Main features

  • up to 16 input/output point between the internal combinators and the outer objects
  • possibility to pack the internal combinators into hidden ones and to free the editor surface
  • display of the internal lamps in the external combinator with differents size of lamp depending on the count of lamps
  • mini version 1x1 of the processor with 4 input/output points
  • infinite nesting of processor
  • external display of the color of the internally connected wire to input/output pole
  • can set the direction of input/output point for external display
  • fully support of blueprint , copy/paste
  • copy/paste betwen external input/output points to easily configure the interface (exchange the internal io point and also the connected wires)

To use it:

  • search the "Compact circuits" technology, it add a new item: the miniaturization the compact "Processor"
  • craft a processor and put it the map
  • look at the input/output point around the processor, they are numbered from 1 to 16
  • click in the center of the processor and enter the editor mode
  • add internal input/output pole (click on the left button and then put it on the map). It is connected to the external input/output points.
  • maybe, select the internal input/output point to change the index
  • you can also addd a name to a point in order to easily find the matching external point outside the editor
  • build your circuit network in the editor: you can add constant combinator, arithmetic combinator, decider combinator, power pole, input/output pole, and lamp,
    text plates (https://mods.factorio.com/mod/textplates) and industrial display plates (https://mods.factorio.com/mod/IndustrialDisplayPlates)
  • exit from the editor
  • connect the external input/output point to the rest of of the base
  • you can see the values of the network in the editor
  • once the circuits works as expected, checked the button "Enter the packed mode".
    When you exit the editor, the associated surface is destroyed to save space.
    And you cannot see the real time values in the editor anymore but the network is working with small hidden combinators in the main surface.
    In this mode, if you add lamps in the editor, you will see them outside the editor on the processor entity.
    You can switch back to the non packed mode at any time.
    The lamps are not displayed in non-packed mode

Display combinators

It is now possible to add special display combinators inside a processor. The display can be inside or outside the processor (in packed mode)
It includes:

  • a combinator to display the value of a signal
  • a combinator to display the sprite of the signal with the maximum value
  • a combinator to display a text
  • a meta-combinator that can change the input or the output of another combinator (the signal from the red wire is applied to the combinator connected to the green wire)
  • a combinator to display a set of signals in a table

For the first three combinators, the display can be modified by virtual specific signals X (position in pixel), Y (position in pixel), S (for scale) and the colors.

Input combinators

Special constant combinators can be put inside a procssor. Each are related to an input component:

  • text field to input an integer value
  • a slider
  • one or more toggle, each toggle can set or reset a bit of an integer value
  • a drop down list
  • a component to choose a set of signals
  • a component to input a set of signals with their value

When you <CONTROL> <CLICK> on a processor, all input component are gathered in a form and can be used to modify the internal state of the processor.

A processor to display a single signal:

0eNqlldmOm1gQhl8l4tbdY3ZDS7mwMcYsxgYMGE+iFsuxOez7FvW7D+6MJtEoUUaZK3TqVH1VUOj/vyBe0oKiglmDvHxBoJ9nNfLy5xekhvfMTR6xZiwA8oLABqTIE5K56ePk52nhxo0PK7+FzXNR5T6o67x6xQYMeXtCYBaAAXnB3p5+gOpg1bRz5B/a14xnmN3y74rxt89PCMga2EDwdaj3w/iatakHqpn+s3FgXuSPN3pCiryey/Ps0X1GPlPYHyuWZlbUEzLOHQjsD+rtMeO/yPhvkTGWxbFfsonfYn+DMii6YjD8h2zyf7JxlPgJmfpvq/8Fn5q327kVdL9mzAts3Hv9SP3uN0RQoFaqrbbHdFpry6tt7cd2HKxh1Cw7OXUuFbGmfATr2Kp3wpD2XnWLiOiOxvhlLdVqgl8oxRnaA0WRQyZV492zFO28lVvzxHE2p5NRLt+UMcwAShonFxwF09w4eZmOvOwX+4KXdsd9wuW2Ysi6F8aZEYemnUdDeqI2a4Nu0ukKhUpwxpTcnrskFv3cMsnB3hfZ5gD0XVuaxjmEo0PvDpSysfw9Sqe7mtxFFZcsibwf4iGejNIqfHtdDzKEZx+9q9S1WntNo+EaBpXoivnTgnam3cW5d5dDwRV3qtV11j/DlHEjwbJ4dNE5TUinwnUvjNqGvRs4NHfx0AOoS3lGXqzsGLWbe2/ZZDyKqqAFW1md7+QgCc5y52yqrL7RmqqQcczwYiqmTrQu00ld58FKYLqEWqyb0/G46441R2gt13f7NI0D+yrBaWE2OzYzlPaSnMSVnLeZId728+cE2fba3+iERntx5CR7LaYa5KcyaER93HeEYkx3I9z7lsaGbe5J2hCMTWbT3nbJbc2Vs/R4Mwyu1VBxtmPiencTSiP1KVm/8wmHl2Eo9AUtpguaifc5q0orT5UVUDKLQKdqOpyqPuoBnZVAkXaR3VGeXfoLbBtNdJCCK8jtnD7m7cUp9/tOY7DxFF0qOzijOpPl5WnbrgnC2kzYnOtqDuo3jNCJ8cB1Id3ZBTxMGeRvxlq54mzP10GXWCLvBd3JA7J0kdbHbXESTas7ipKqk+4VpwvZqRW5lOb+ssNa2JpVNJ9QnR1GVEf7Mt2mK7+MCFp0iexIeYeU5vvclRdNdSlLj/MEFMMNNGYMH06oFxSC1ibAXxRNKANdszqdvyZ70OVoP0iiOaaG4BL6MZMuROhU7KWZqkBRCGKhHnhGHKLFQEo6HxLAWO3lIEoTVU8MJ1IZjma81qPADpyKjXa+bHzjasZcz67yNNg4XHmQyHYjmdL+lgbtcAgj0TP8ZYNfdHzqiVjnNUxW+zVzLjftSW3hstG9uoOEyypn0l/YQlXH5wCS24VYFYDVgK5ypWKHHlGmbn40+UBGh2xxOGiMfNr1UQtkXWXRk2Y3Psh6VV7o97wmrOVaTLxswJMk8lbWYMH6AlYuIfvtUiqs3tU+fkQePlK0zWvnztIyawzy5RPyin+ajeTTu5kta/DcwWYWtcTN7uAZDE3l+s0n5PPbXJu4Hpg9CxGS3HOTD3WT+/EcrmeNagD2zcSev3rX8m8L8xL3Pa+B8+MFw1GcRNkV81C9eYpXGMxBZvX2cLZ3Q335Tvi+NTXeYR8CWBeJO84XHajqd8XEGYxcsfhqNjGWRJm3t78AuLubmA==

Settings

  • Allow to change the color of the displayed elements
  • Allow to change the refresh rate if display combinator

Models : allow to update a set of processor in one click

  • create a new model name
  • set the name to a set of processor
  • modify one processor
  • click "apply" to apply the modifications to all processor of the same model

Integration of other combinators

The mod contains an interface to integrate other combinators:

  • define a "packed" version of the combinator (and any other entities used) with no display and with the properties:

    packed_entity.flags = { 'placeable-off-grid' , "hidden", "hide-alt-info", "not-on-map", "not-upgradable", "not-deconstructable", "not-blueprintable" }
    packed_entity.collision_mask = {}
    packed_entity.collision_box = nil
    packed_entity.minable = nil
    packed_entity.selectable_in_game = false

  • define a remote interface in the external mod with methods:

    get_info(entity) : get private information on an entity in a structure (properties name, index, position, direction are reserved)
    create_packed_entity(info, surface, position, force) : create a packed entity with info (return from previous call), surface, position, force
    create_entity(info, surface, force) : create a normal combinator with info, surface, force, info.position, info.direction

  • call the Compakt Circuit remote interface:

    remote.call("compaktcircuit", "add_combinator", {

    name = <name of the combinator>,
    packed_names = { <list of used packed combinators> },
    interface_name = <interface name of the external mod interface>
    

    })

  • An example of a very simple combinator