Starmade Logic Tutorials

    Joined
    Jun 21, 2013
    Messages
    350
    Reaction score
    61
    • Legacy Citizen 2
    o dear, it would completely vaporize the asteroid in all but 10 seconds.

    what is the largest dimensions that asteroids can get? I want to work on this now

    also I was thinking of maybe only doing 4 sides, and leaving one side as an observation deck and the other for the entrance. otherwise the lasers won't be paired completely on every axis that the salvagers are shooting from.
     
    • Like
    Reactions: FunnyBunny14
    Joined
    Sep 10, 2014
    Messages
    226
    Reaction score
    398
    • Supporter
    • Master Builder Bronze
    • Competition Winner - Small Fleets
    Maybe I made it. I´ve thought about it a moment and realized i don´t need to check if something is still in the salvage area because it got probably salvaged. Now i´ve got an area trigger which activates the beams about 5 seconds. That should do it to salvage anything in the trigger area and I only have to move the ship to get something new into it and restart the 5 seconds.

    Now I only have to get this system into a copy pasteable module.

    Edit:
    Well, apparently I run into another problem. My PC is too old to handle so much logic. Nothing I can do about it atm. :D
     
    Last edited:

    Bench

    Creative Director
    Joined
    Jun 24, 2013
    Messages
    1,046
    Reaction score
    1,745
    • Schine
    • Wired for Logic
    • Legacy Citizen 6
    I've had area triggers triggering logic and then beams in one form or another but at the moment there tends to be major fps drops when an entity interacting with an area trigger is then also interacted with with a beam e.g. salvage beam. Until that is fixed Area triggers won't be a practical means of detection, however they can be used to trigger circuits successfully.
     
    Joined
    Jun 21, 2013
    Messages
    350
    Reaction score
    61
    • Legacy Citizen 2
    I've had area triggers triggering logic and then beams in one form or another but at the moment there tends to be major fps drops when an entity interacting with an area trigger is then also interacted with with a beam e.g. salvage beam. Until that is fixed Area triggers won't be a practical means of detection, however they can be used to trigger circuits successfully.
    does this apply to indirectly starting beam systems? For example if the area trigger is linked to a circuit which eventually goes to a salvaging beam system?
     

    Bench

    Creative Director
    Joined
    Jun 24, 2013
    Messages
    1,046
    Reaction score
    1,745
    • Schine
    • Wired for Logic
    • Legacy Citizen 6
    does this apply to indirectly starting beam systems? For example if the area trigger is linked to a circuit which eventually goes to a salvaging beam system?
    I believe so yes
     
    Joined
    Jun 21, 2013
    Messages
    350
    Reaction score
    61
    • Legacy Citizen 2
    that's a shame then, hopefully it'll be fixed soon or I can just manually operate the whole rig anyway (since Im already going to be maneuvering the vessel around the asteroid).
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    Bench, I want to make a pulse pattern - like 0.5on, 0.5off, 0.5on, 1.5 off. So, PULSEPULSEwait PULSEPULSEwait PULSEPULSEwait. I'm thinking something like:
    activation module->and1->or1->delay#1->activation module2(light)->not->delay#2->activationmodule3(light)->not->delay#3->delay#4->delay#5->and1+or1

    Thoughts?
    I just figured this out for my own ships a little while back. You will need 15 blocks:
    4 Activation Modules, 2 Or Signals, 3 Not Signals, 6 Delay Signals

    Set them up as follows:

    Activation #1 -> Or #1 -> Not #1 -> Delay #1 -> Delay #2 -> Delay #3 -> Activation #2
    Activation #2 -> Or #1
    Activation #2 -> Delay #4
    Delay #4 -> Delay #5 -> Not #2 -> Activation #3 -> Or #2
    Or #2 -> Delay #6
    Or #2 -> Activation #4
    Delay #6 -> Not #3
    Not #3 -> Or #2
    Not #3 -> Activation #4
    Activation #4 to all lights that you want to "blink, blink, pause..."

    You use Activation #1 to turns the lights on or off, so place it wherever you want your light switch.
    If there is any way to make a 1/4 second delay, it would make the lights feel a little more strobe-like, but this still looks pretty good.
     

    Fellow Starmadian

    Oh cool so thats what this is
    Joined
    Jun 7, 2014
    Messages
    227
    Reaction score
    87
    • Community Content - Bronze 1
    • Wired for Logic
    • Legacy Citizen 2
    Hoo boy bench, do I have a challenge for you.. I'm making a logic code mechanism like you did, but i'm experiencing a strange error..
    I have 4 latches that switch one by one as the correct buttons are pressed for the combination, but for some reason the latches are getting turned off when I try to press the next button!
    To be able to explain this, i'm going to need to write a lot down, so I'm putting it in this spoiler:
    I have 3 major portions to my circuit:
    the adder latch array, the code selection latch array, and the input/unlock code array. (poorly described) Details about circuit inside spoiler
    -the adder latch array, connects in columns with the other latch arrays in columns (can select only one array at a time). long story short, this activates one column of the AND arrays at a time, making it able to be changed by one of the keypad numbers.

    -the keypads (one for creating code, one for unlocking) connect in rows to the AND arrays on both the latch arrays (code selection and unlock code array). long story short, this makes it so it only activates one AND gate in the column that the adder array has selected. in the code selection array, this is stored as one of the 4 numbers in the code. In the unlock array, it turns on a latch for unlocking the device and if the wrong button is pressed on the array, (its supposed to) reset everything.

    -the code selection array is pretty straight forward. It connects in columns to the adder array and in rows to the buttons. It also connects to each individual latch to the AND array on the unlock array which is 4 x 4.

    With some serious testing, I've discovered something weird; the circuit that resets the unlock latches when the wrong combination is pressed is not acting normally. It resets some of the latches in the unlock array whenever I try to input another key, whether it is the right key or not. I tried replacing and reconnecting the gates themselves, and studying the connections, to no avail.

    If anyone has a better place to post this, please do tell. I would also like some assistance from anyone willing to help. Anyone who likes troubleshooting circuits can contact me and Ill spawn it in on the server of their choice so I can describe it in more detail, hopefully better than I already have.
    It really seems like some kind of glitch or something, like when some empty spaces make circuits go funny when you place a gate there and try to use it.

    EDIT: Ive got most of the circuit working, and I think I got it working when I rebuilt that part of the circuit. It's only on the modular design, the one Im trying to make compact, that it doesnt seem to work. I also want to stress that it might as well be glitched, as I had to move the bottom row of the AND array in my unlock array due to gates not working correctly when placed there.
     

    Fellow Starmadian

    Oh cool so thats what this is
    Joined
    Jun 7, 2014
    Messages
    227
    Reaction score
    87
    • Community Content - Bronze 1
    • Wired for Logic
    • Legacy Citizen 2
    Still don't know what was wrong with the original, but I rebuilt the circuit and it works fine now :). As soon as I complete the compacted version, Ill post it to the logic section in the community content thread. It should be pretty small too, and fit inside a 10x10x10 box.
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    I realize it's a bit late in the thread, Bench, but could you perhaps add some more detail to your tutorial posts for a novice like myself. I don't have a clue about things like RS Latches, JK Flip Flops, and low or high pulses. I would really appreciate some context for how to use these things. Perhaps you could describe an example or two for where these would be used, and why you would want to use them there.

    Your video series has been really helpful, but I also find some aspects of them confusing. For instance, if you build a circuit and then repeatedly turn on/off the activation button to demonstrate how it's used. I already don't know what the circuit is supposed to do because you haven't told me what it's supposed to do, just how to lay it out (I'm THAT much of a novice.) So, all I see when you're flipping the switch is a bunch of orange and blue colors shifting between a bunch of nicely arranged block patterns.

    Your more recent tutorials have been much better about explaining things, mostly because you're getting into specific uses like opening the hangar doors. Thank you for all of it.
     
    Joined
    Aug 14, 2013
    Messages
    2,811
    Reaction score
    960
    • Councillor 3 Gold
    • Wired for Logic
    • Top Forum Contributor
    I realize it's a bit late in the thread, Bench, but could you perhaps add some more detail to your tutorial posts for a novice like myself. I don't have a clue about things like RS Latches, JK Flip Flops, and low or high pulses. I would really appreciate some context for how to use these things. Perhaps you could describe an example or two for where these would be used, and why you would want to use them there.

    Your video series has been really helpful, but I also find some aspects of them confusing. For instance, if you build a circuit and then repeatedly turn on/off the activation button to demonstrate how it's used. I already don't know what the circuit is supposed to do because you haven't told me what it's supposed to do, just how to lay it out (I'm THAT much of a novice.) So, all I see when you're flipping the switch is a bunch of orange and blue colors shifting between a bunch of nicely arranged block patterns.

    Your more recent tutorials have been much better about explaining things, mostly because you're getting into specific uses like opening the hangar doors. Thank you for all of it.
    I've done a few tutorials myself, in them I may have explained some of the concepts you want

    http://starmadedock.net/threads/svens-practical-logic-tutorials.4024/
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    I appreciate that Sven, as I do everyone who is helping others to understand and use the more complex parts of the game. I think it would be better to have these explanations in the same place as the tutorial links, if not in the tutorials themselves.[DOUBLEPOST=1417052589,1417050503][/DOUBLEPOST]My logic puzzle:
    I'm trying to automate a fighter bay and I'm struggling to get the docking module to work right. I have an activation module connected to a docking module. I have one of Bench's updated pulse circuits tied to the activation block. So, I can hit a button and it will undock the ship. The problem is, this overrides the lighting that is attached to the docking module's activation block. Now the actual state of the docking module is ignored because the logic block is saying it's always on. My hope is to make the lights stay on to indicate that the dock is available, and turn off when a ship is docked at the location. Thanks for any help.
     
    Last edited:

    Fellow Starmadian

    Oh cool so thats what this is
    Joined
    Jun 7, 2014
    Messages
    227
    Reaction score
    87
    • Community Content - Bronze 1
    • Wired for Logic
    • Legacy Citizen 2
    you might be able to connect the docking port to an activation module with C and V. if not, just put the activator right next to the port and try that. It will return a ACTIVE when there is a docked ship, and INACTIVE when there is nothing docked. After that's working, you know what to do.
    Hope this helps :)
     

    Fellow Starmadian

    Oh cool so thats what this is
    Joined
    Jun 7, 2014
    Messages
    227
    Reaction score
    87
    • Community Content - Bronze 1
    • Wired for Logic
    • Legacy Citizen 2
    Don't know how to fix your latches, but unless you are troubleshooting this for the nostalgia there is a much easier circuit now, that does the same thing. to make it, link:
    OR 1 ->NOT 1 ->OR 2 ->NOT 2 -> OR 1
    OR 1 and OR 2 are your input and reset, respectively. After the gates have been initialized, it should work just like any old latch should. I used these to build my own locking mechanism like bench did, and it's now being used for all my public docking ports.
     
    Joined
    Nov 14, 2014
    Messages
    3
    Reaction score
    0
    Thanks for the reply Fellow, I guess I should have tried updating instead of repairing outdated circuitry.
     
    Joined
    Dec 10, 2014
    Messages
    3
    Reaction score
    1
    I'm trying to make several series of lights light up in succession, in a loop. The final result is a image that appears to rotate at 90 degree angles, and does so over and over again. The circuit to power it has four delays and four not gates. My only problem is that when I leave the sector the sector stops being simulated. When I come back, the animation is frozen. Is there a four-phase clock circuit that can start itself?
     

    Waz

    Joined
    Dec 11, 2014
    Messages
    1
    Reaction score
    0
    While the system may be Turing-complete, it seems far too minimalistic. Maybe I'm a poor logician, but this is what I needed to build to make a simple area-that-briefly-activates-a-door, my first attempt to do anything vaguely useful:


    starmade-screenshot-0000.jpg

    Basically, it generates a long pulse on either rising or falling, since that's what the area controller produces. 11 logic blocks to open a door.

    Also, it's not possible to put the area controller where the door itself is, so there is no way to make it stay open while someone is in the doorway itself. A simple fix would be if the area controller used the bounding box of the connected area triggers.

    The complexity arises primarily from the Area Controller just toggling upon entity entry. There just isn't enough information to implement the logic - you don't know how many entities are in the area.

    Since the logic system is purely boolean, the area controller should just output "more than zero entities inside". If the system had levels (eg. like crappy old redstone), it would output "at least N entities inside".

    Really though, I'd prefer just to have a Lua block and code it from "onEnter" and "onExit" events from the area controller.

    (yes, I could use trigger-on-step blocks in this particular case, but it's ugly and will not work in other cases without gravity)
     
    Last edited:

    Auriga_Nexus

    Befriender of Worlds
    Joined
    Dec 23, 2014
    Messages
    110
    Reaction score
    39
    • Purchased!
    I've been experimenting on circuits for a bit, and I've noticed that people have already built functional timers/counters, as well as bit storage. I want to know how to build a bitwise incrementor/decrementor circuit that would work for an 8-bit stack.

    Essentially what I want to do is to be able to enter a number in binary by flipping switches on and off, but also have a pulse button that would add one from the value or subtract.

    I already know how to build a clock circuit that pulses repeatedly every half-second. My plan is to hook the decrementor up to a clock circuit so that I can set the timer in binary on the switch bank and then set the clock for a countdown. And of course, once the timer reaches zero and all of the bits are "off", it will trigger a separate, final switch for an effect. (I'm not saying what said effect is, but if I get it working come find me on a server in one of my subterranean planetary bases and I'd be happy to demonstrate. Just be prepared to run like hell or die.)

    I'm sure this has already been done but I'm not really interested in using a black box package from someone else, I want to know how the logic circuit works so I can replicate and edit it as needed.
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    Hey Bench, for your multi-floor gravity lift, how are you stopping the player on the appropriate floor without area triggers? Somehow you are setting the plexdoors to close for any floors beyond where they are going and reversing their gravity, I'm just not seeing how that is accomplished.