Pseudo analog logic / PID

    What do you think?

    • usefull

      Votes: 2 50.0%
    • to complicated

      Votes: 2 50.0%
    • to simple

      Votes: 0 0.0%
    • NEEDS more blocks

      Votes: 0 0.0%
    • I don't need/want that!

      Votes: 1 25.0%

    • Total voters
      4
    Joined
    Jun 29, 2014
    Messages
    1
    Reaction score
    0
    • Legacy Citizen 4
    Background

    I wanted to make a complete, fully automated, factory with logic, but I noticed that I would need about 14 logic blocks per factory and then connect them basically all to all in a difficult way. Then I thought to use display logic to do so, but I discovered that I would reach a calculation limit with that where the displays would not work like intended anymore.

    My third idea was the following:


    Suggestion

    Introduce 2 new blocks.
    1 – Integral Block thingy: Input is added to the output value every tick. Block has a factor value which must be changeable (for example with interface).
    2 – Sum Block thingy: Output is the sum of the inputs.

    Inputs and outputs can be negative numbers.

    Numbers are only full numbers (‘natural numbers’). They should go up above 1 million, maybe up to 1 billion. When reaching the cap they should just stop increasing or decreasing.

    Negation must be possible.
    1 – via negative factor
    2 – via negative connection to other Block (second time ‘v’ on block don’t disconnects but sets to subtract, third time disconnects)

    Normal logic blocks would only be turned on when the Number is above 0 (positive). Normal logic blocks have the number 1.

    One of the new blocks should be able to be turned off with logic. (sum block?)

    With that it is possible to create proportional and differential behavior circuits.

    This system should be a small addition with a lot of possible implementations.

    It would be nice if the tick rate for that could be increased, for example with a PI or PID control for CPU load per ship or power demand for logic interaction.

    The new blocks could be produced in standard or advanced factories.


    Extended ideas

    Radio
    Antenna can transmit and receive a signal. There is only one signal for the entire universe, maybe with distance fading. Maybe add directional antennas. Maybe there is a background noise which can lead to interesting places in the universe.

    Factory control
    Factories, chests and so on output 2 channels, one accessible with connecting it to a sum block thingy, the other by connecting it to an integral block thingy. While one is outputting the numbers of blocks requested the other does it with the types of blocks requested (block ID). The outputs keep swapping through the different requests (block IDs). When nothing is requested the Block type is 0 (or negative).
    Inputs for factories also work with the channel system, one for the type, one for the amount, but only one thing can be produced at a time (no swapping like the outputs). Stacking of requests could lead to very high numbers, therefore the high number cap form the start.

    Warp gate
    Input sets destination.

    Wireless
    Make the wireless block able to send pseudo analog signals.

    Rotation
    controling, reading rotation of docks in degree.


    Feel free to add anything to this suggestion you would like.

    I wish to hear the opinion from all of you about my suggestion. (I think)
     
    Joined
    Jun 20, 2018
    Messages
    38
    Reaction score
    30
    I do not exactly understand what you are describing with this, but you may be interested in reviewing these items.

    Potentiometer - Wikipedia
    Accumulator (computing) - Wikipedia

    Reading your post also makes me think about the logic system in Factorio. For those unfamiliar, Factorio is a game about harvesting raw materials, storing those materials, processing them, and assembling them into other materials, ultimately building useful things like factory parts, weapons, and vehicles. In Factorio, you can store materials in chests if they are discrete objects or in tanks if they are liquids, and you can attach logic wires to these containers to detect the size of a given inventory. Each individual material in the game gets its own private signal whose value is the number of items, so you can make decisions based on the size of your inventory. Additionally, there are non-material signals that the user can define.

    StarMade does not seem to have any sort of non-binary signal.

    In general, I wouldn't mind seeing StarMade add consolidated logic blocks. It would be convenient to have a single block that I could edit to create some multi-gate internal logic and connect that logic to an Input and Output for that block. I think that if such a block existed, it might solve your problem, and it would generally reduce the space needs for logic.

    I haven't played at all with using Javascript inside Display Modules, but I know it can be done. Somebody made a text formatter that could change the font size and color. Is Javascript capable of performing logic inside a module?
     
    Joined
    Sep 14, 2017
    Messages
    666
    Reaction score
    928
    I do not exactly understand what you are describing with this, but you may be interested in reviewing these items.

    Potentiometer - Wikipedia
    Accumulator (computing) - Wikipedia

    Reading your post also makes me think about the logic system in Factorio. For those unfamiliar, Factorio is a game about harvesting raw materials, storing those materials, processing them, and assembling them into other materials, ultimately building useful things like factory parts, weapons, and vehicles. In Factorio, you can store materials in chests if they are discrete objects or in tanks if they are liquids, and you can attach logic wires to these containers to detect the size of a given inventory. Each individual material in the game gets its own private signal whose value is the number of items, so you can make decisions based on the size of your inventory. Additionally, there are non-material signals that the user can define.

    StarMade does not seem to have any sort of non-binary signal.

    In general, I wouldn't mind seeing StarMade add consolidated logic blocks. It would be convenient to have a single block that I could edit to create some multi-gate internal logic and connect that logic to an Input and Output for that block. I think that if such a block existed, it might solve your problem, and it would generally reduce the space needs for logic.

    I haven't played at all with using Javascript inside Display Modules, but I know it can be done. Somebody made a text formatter that could change the font size and color. Is Javascript capable of performing logic inside a module?
    Display block font size and color is just pseudo code that looks like CSS. To my knowledge, you can not actually script in them, and even if you could, character lengths are very limited.
    [doublepost=1532120683,1532120132][/doublepost]
    Background

    I wanted to make a complete, fully automated, factory with logic, but I noticed that I would need about 14 logic blocks per factory and then connect them basically all to all in a difficult way. Then I thought to use display logic to do so, but I discovered that I would reach a calculation limit with that where the displays would not work like intended anymore.

    My third idea was the following:


    Suggestion

    Introduce 2 new blocks.
    1 – Integral Block thingy: Input is added to the output value every tick. Block has a factor value which must be changeable (for example with interface).
    2 – Sum Block thingy: Output is the sum of the inputs.

    Inputs and outputs can be negative numbers.

    Numbers are only full numbers (‘natural numbers’). They should go up above 1 million, maybe up to 1 billion. When reaching the cap they should just stop increasing or decreasing.

    Negation must be possible.
    1 – via negative factor
    2 – via negative connection to other Block (second time ‘v’ on block don’t disconnects but sets to subtract, third time disconnects)

    Normal logic blocks would only be turned on when the Number is above 0 (positive). Normal logic blocks have the number 1.

    One of the new blocks should be able to be turned off with logic. (sum block?)

    With that it is possible to create proportional and differential behavior circuits.

    This system should be a small addition with a lot of possible implementations.

    It would be nice if the tick rate for that could be increased, for example with a PI or PID control for CPU load per ship or power demand for logic interaction.

    The new blocks could be produced in standard or advanced factories.


    Extended ideas

    Radio
    Antenna can transmit and receive a signal. There is only one signal for the entire universe, maybe with distance fading. Maybe add directional antennas. Maybe there is a background noise which can lead to interesting places in the universe.

    Factory control
    Factories, chests and so on output 2 channels, one accessible with connecting it to a sum block thingy, the other by connecting it to an integral block thingy. While one is outputting the numbers of blocks requested the other does it with the types of blocks requested (block ID). The outputs keep swapping through the different requests (block IDs). When nothing is requested the Block type is 0 (or negative).
    Inputs for factories also work with the channel system, one for the type, one for the amount, but only one thing can be produced at a time (no swapping like the outputs). Stacking of requests could lead to very high numbers, therefore the high number cap form the start.

    Warp gate
    Input sets destination.

    Wireless
    Make the wireless block able to send pseudo analog signals.

    Rotation
    controling, reading rotation of docks in degree.


    Feel free to add anything to this suggestion you would like.

    I wish to hear the opinion from all of you about my suggestion. (I think)
    This is a tricky subject because the UI says blocks are either connected or not connected, and there are already a lot of weird interactions scripted into the logic system to try to compensate for this like how putting an activation block next to a sensor block reads it but a C+V connection from the sensor block is used to listen for a signal, and then a C+V into it tells it when to listen for a signal. Then it does all sorts of specialized tasks with things like displays. Proposals that add more exceptions to this system are already sketchy at best in my head, and trying to sort out digital and analogue signals with the current system would not work well.

    While I generally like this idea, it would need to be far better refined to include a system for resolving these kind of casteing issues and it would need to follow a rule set that is simple enough to not need to YouTube every special case imaginable.
     

    DrTarDIS

    Eldrich Timelord
    Joined
    Jan 16, 2014
    Messages
    1,114
    Reaction score
    310
    I've done the automated megafactory before. I think I see where's you're coming from with analog, but digital works with some effort.

    I just used sensors patched into the factory's linked storage, and have all the sensors share a common group of 10 activators (5 blue 5 orange) that i link-to in whatever pattern for rough % values (5 blue 1 orange close enough to 90%, 4 b 1 o is 80%) to have each factory shut itself off when it's at 80-90% storage, and turn itself on when it's below that and the resources it needs are all above some minvalue in their hoppers (eg ~10% or NOT 0%)

    Basic resources process into a big bin, they get pulled from that bin into their own individual hoppers. each factory back-links to individual resource hoppers, and/or a lower tier factory.

    Finally ALL the factories are pulled-from by a single central storage, so you tell that storage what you want , it pulls from the factories, for you, and the factories will self-replenish.

    I've got an...Uglier half-finished version of it i'll see if I can dig up and attach here for you to work off of and/or dissect if you want. You'll have to update basic hull to pull from the fertikeen hopper cause of the recent update. Sorry, the mostly finished version of it is lost to a corrupted world and I've been preoccupied with other stuff so I havn't hopped back on that wagon. Heck, the resources may have changed , who knows? :)
     
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    I have made several designs of converters, for example, decimal to binary using display blocks (using alot of them to be exactly), but the worst thing that has the logic of starmade, is that everything ... EVERYTHING, has to be done "by hand", I mean, if I want to change in a display block a character, this character has to be "written by hand" in another using regex commands ... currently starmade does not have any kind of in-game "programming language" that can interpret even the simplest of programs.

    Starmade run using a Java, it use java for everything ... except fo in-game logic ... It's like having a Ferrari car, but not being able to use it ...

    If you build any logic stuff that have 5-20 logic blocks, all is fine (I suppose, depending on the bugs / issues present in the current version) but if build anything that need 100 or more, you are f***d by all the sides ..

    The display blocks for example are very restricted to its use, only 10 lines, only a few hundred characters and only one Regex command present .. why can not I use more lines? or can I use more characters? or can I use more than one Regex command? I do not understand what the limitations are.

    Just imagine for a second, have several Regex command inside of one display block using this way:

    RX[(.*)]
    RX[
    (a)]
    RX[
    (b*)]
    RX[
    (*c)]
    ...
    Where RX[ ... ] is the way to tell starmade that ALL inside [ ... ] is a indibidual/single Regex command, that can be executed one after another, first the very up line, then next line, then next ... this may seem stupid and without practical use, but it can provide a lot of game and content, both for factories, PVP, PVE roll-play ...
     

    DrTarDIS

    Eldrich Timelord
    Joined
    Jan 16, 2014
    Messages
    1,114
    Reaction score
    310
    Sounds like you would be happier coding the NPC astro to be a psudo-factory. Would need Lua tho...