[On Hold] [MISC] ICGenerator v2.3 - Create ICs not with bytecode, but with redstone [1060]

Discussion in 'Inactive/Unsupported Plugins' started by weeknie, Jul 19, 2011.

  1. Offline


    ICGenerator - Create IC's (Integrated Circuits) not with bytecode, but with redstone
    Version: v2.3

    Credits: PassivePicasso for his database API

    See also:
    Clock Sign

    This plugin will enable you to make redstone ICs ingame, instead of having to rely on preprogrammed IC's or having to write IC's in bytecode.

    Download: http://dl.dropbox.com/u/5202392/ICGenerator.jar
    I can give you the sources on request, GitHub doesn't like me much:(

    Usage (open)

    Building an IC:
    1. Put down the redstone circuit you want to turn into an IC. Add a lever to all the inputs.
    2. Place a main IC creation sign
    3. Place IC input signs next to each lever
    4. Place IC output signs next to all the redstone wire that represents an output.
    5. Hit the main IC creation sign
    6. Hit all inputs and outputs
    7. Hit the main IC creation sign again
    If you're building a stateless IC:
    • Keep hitting the main IC creation sign each time when the outputs are stable (not changing state anymore), until it sais "IC <name> successfully created"
    If you're building a stateful IC:
    • Set the levers to a state transition and hit the main sign. This will register the state transition. Make sure you hit the sign with the exact input that changed the state, else it won't be registered correctly
    • When you've covered all state transitions, type /icgenerator finalize to finish building the IC
    Using an IC:
    1. Place input and output signs
    2. Put levers next to the output signs and make redstone wire lead to directly next to the input signs
    3. Hit the input and output signs
    Note: you can use an input or output multiple times, the input/output will behave like a connected redstone wire. I.e., inputs will be implicitly or-ed (if one connected input is high, that input will be considered high, regardless of how many are low) and outputs will all be set to high if that output is high.

    Sign markup (open)

    Note: <something> is used to indicate user entered text, don't include <>!

    IC creation:
    Main IC creation sign:
    This sign is used to control the building process of an IC
    1. icgenerator
    2. <ic name>
    3. [stateful] (if this is a stateful IC like a flipflop/latch)
    IC input sign:
    This sign marks an IC input, needs a lever next to it to send a signal
    1. icinput
    2. <input name> (if blank, a name will be created and put on the sign when it's added to the IC)
    IC output sign:
    This sign marks an IC output, needs redstone wire next to it to pick up the signal
    1. icoutput
    2. <output name> (if blank, a name will be created and put on the sign when it's added to the IC)
    IC Usage:
    Input sign:
    This sign marks the usage of an IC input, needs redstone wire next to it to pick up the signal
    1. input
    2. <group name>
    3. <ic name>:<input name>
    Output sign:
    This sign marks the usage of an IC output, needs a lever next to it to send a signal
    1. output
    2. <group name>
    3. <ic name>:<input name>

    Features (open)

    • Create IC's on the fly from redstone circuitry (even flip flops and other stateful circuits!), no need to program them in java or bytecode
    • Connect the inputs and outputs of one group multiple times, will behave like the redstone wire was simply connected
    • Use /icgenerator autobuild <serverticksdelay> to auto build a (stateless!) IC every <serverticksdelay> server ticks. Make sure the outputs are stable between the inputs changing and the amount of server ticks.
    • Use /icgenerator autodetect to toggle automatic detection of new states when building stateful circuits. Do note that this will only work properly with single output stateful circuits
    • Use /icgenerator forcestate to force a new state when building a stateful IC, useful for when the circuit your building has an internal state, i.e. has state changes that aren't visible from the outside, but will affect the outputs later
    • Use /icgenerator list to list all registered IC's
    • Use /icgenerator listgroups <icname> to list all registered groups belonging to an IC
    • Use /icgenerator listnames <icname> to list all registered input/output names belonging to an IC
    • Use /icgenerator cancel to cancel building of an IC
    • Use /icgenerator delete <icname> to delete an IC and all it's registered groups
    • Use /icgenerator delgroup <groupname> to delete a group
    • Use /icgenerator reloaddb to reload the database (will delete any changes made since the last disable of the plugin!)
    • Use /icgenerator export to export all currently saved IC's to ics.xml (located in the data folder), use /icgenerator import to import IC's from ics.xml (NOTE: improperly formatted xml will currently throw a lot of random errors or generate not working IC's, please ensure the xml is properly formatted!)
    • Use /ic and /icgen as aliases for /icgenerator
    • BukkitPermissions nodes: icgenerator.delete, icgenerator.delgroup, icgenerator.buildic, icgenerator.buildgroup, icgenerator.reloaddb, icgenerator.export, icgenerator.import and icgenerator.* to grant all permissions at once

    Todo (open)

    • Add some features to import/export such as giving a filename and giving the names of IC's to be exported, also add some more error handling for improperly formatted xml files.
    • Add a DTD to the xml file to ensure properly formatted files
    • Make a file with some base IC's like the standard gates and range flip flops, as a standard IC package

    Known Bugs (open)

    Known bugs:
    • A NullPointerException when shutting down the server, causing IC's or groups not to be saved. I'm currently not sure what's causing this bug, but I'm going to look into it

    Changelog (open)

    • Added partial automatic detection of new states when building stateful circuits, it only works for single output IC's though
    • Added the /icgenerator forcestate command to force a new state. Use this when you have an "internal" state, i.e. a circuit which state might change, but where that change is not directly visible (for instance a selector based on a flip flop)
    • Fixed a bug where icgenerator.* wasn't granting the icgenerator.build and icgenerator.buildgroup permissions
    • Added the /icgenerator listgroups <icname> command to list all groups for a certain IC name
    • Added some extra output to /icgen list to indicate when there are no IC's registered yet
    • Removing input/output signs will now really delete them from the group, so they won't trigger any levers or inputs that belonged to that group. If a group is empty (i.e. no inputs/outputs connected to it anymore), the group will be deleted too (and thus not show up in /icgenerator listgroups <name> either)
    • Fixed a problem with the datafolders name including a space, the datafolder will now always be called IcGenerator
    • Added a "Registered state transition detected" message to indicate that the user wants to add an already registered state change
    • Added some extra output to /icgenerator cancel to indicate if there was nothing to cancel
    • /icgenerator cancel will now also cancel building when you're already building the lookup table/state machine
    • Stateful IC's will now say they're building the state machine instead of the lookup table
    • Added the /icgenerator listnames <icname> command to list all input/output names for a certain IC
    • Added the icgenerator.import and icgenerator.export permissions for import/export permission granting, and icgenerator.* to grant all icgenerator permissions at once
    • Added some output to /icgenerator import and /icgenerator export to tell you that you've actually imported/exported something
    • Added an import/export feature to/from xml. Any improperly formatted xml will throw random exceptions or import IC's which will throw exceptions. For now it will be up to you to determine what's wrong with the xml, if you're modifying it yourself. If the error popped up from an exported xml file though, please post in here.
    • Fixed consistency, your groups will be saved again
    • The plugin works multiworld now (IC's are still server wide)
    • Fixed a bug where /icgenerator reloaddb would give the usage message instead of completing normally
    • Added support for stateful circuits. You can now store flip flops and other stateful circuits
    • Rewrote large parts of the code. This also enables you to use inputs and outputs multiple times on groups. Inputs will be implicitly or-ed, so if 1 of the inputs is high, that input will be considered high.
    • Added /icgenerator reloaddb and the permission icgenerator.reloaddb, so that you can reload the database on the fly (will delete any changes made since the last disable of the plugin!)
    • Added BukkitPermissions. The following nodes are now available: icgenerator.delete, icgenerator.delgroup, icgenerator.buildic, icgenerator.buildgroup
    • Fixed the /icgenerator delete [name] command
    • Added /icgenerator delgroup [name]
    • Added /ic and /icgen as aliases for /icgenerator
    • Released the plugin
    ghowden and MasterMeNL like this.
  2. Offline


    I've had this one a few times, but it seems to randomly disappaer.
    Also it's inside my db engine which I know nothing about:p
    For me just trying again seems to work
  3. I've tried a few times remaking the t flip flop and get that everytime I turn press the button after making the IC and finalizing and linking signs :/ Maybe I'm clicking the main sign at the wrong times for a stateful circuit? :s

    EDIT:sorry not that error, thats when the plugin disable, the stack overflow error I'm on about
  4. Offline


    After you press a shutdown button or something?
    Let's continue this in a convo though, no need to clog up the thread;)
  5. Offline


    so...using an IC can increase redstone range to unlimited :D??
  6. Offline


    errr, no:p
    It's a looping problem, somehow the output is triggering the input again, but I don't see how >.>
  7. Offline


    Well, can't you catch it with

    try {
        //code goes here
    } catch (e NullPointerException) {
        //code for handling error, or empty to ignore
    Say you have a variable called a that may or may not be null.

    try {
        //something that tests a
    } catch (e NullPointerException) {
        a = ""
    and voila! No longer is a NULL, but is now a string that is empty.
  8. Offline


    Yes I could, but catching NullPointerExceptions is way too general, not to mention bad coding.

    Thanks for the suggestion but I won't be using it.
    Also, it seems like this bug is slowly disappearing, apparently it had something to do with the transition from 953 to 1000.
    Just ignore it, it shouldn't bother you much, it's not bothering me anymore
  9. I think he's asking about the range that activated redstone will travel. yeah it does, just make a circuit with no gates, just a line of redstone and use input and output signs for it, longest I've tried is like 10 blocks tho I've no idea if there is a range on it
  10. Offline


    It will work indefinitely, perhaps even across worlds, interesting thought on that one...
  11. Just tested this by setting up a circuit in my main world and having the input sign there and the output sign in the nether (pretty sure it's counted as a different world now) and yes it does work :D
  12. Offline


    I've added import and export now, see features for more details.

    The import/export function is very crude at the moment, I'll work on that when I have most of the other things on my todo list done, as this should suffice for the moment.

    To anyone who has used my plugin so far, thanks!
  13. Offline


    A huge update this time, changed include some new commands and some tweaks to old commands here and there.
    Also new, if you delete an input/output sign from a group, it will actually get deleted from that group. no need to use /icgenerator deletegroup for that anymore!
    Check the changelog for the full changes

    Please tell your friends about this plugin if you like it!
  14. Offline


    I won't be working on this for a couple of weeks/months, got some other things I want to do

Share This Page