Jump to content

immibis

Members
  • Posts

    19
  • Joined

  • Last visited

Reputation Activity

  1. Upvote
    immibis got a reaction from Unehydrodyday in SAM (unfinished)   
    Download



    This is a mod I made in 1.2.5, because "why not clone Buildcraft?". Then I stopped working on it in 1.2.5. Just now I updated it to 1.6.4, and decided I should finish it, but I can't think of anything to add for it to be finished! That's why I'm posting it here - to get ideas.

    Current features:

    Pipes! There are four tiers of pipe materials. Cobblestone < wood < iron < gold. Each tier has a different colour and speed that items move at.
    Pipes more than one tier apart do not connect (eg: cobblestone+wood connect, cobblestone+iron do not).
    Pipe modules. Right click a pipe with a module to add it. Module is indicated by a coloured line on the pipe.
    Vacuum modules - like BC obsidian pipes.
    Extractor pipes - like BC wooden pipes, but do not require any signals or engines. Extraction speed is determined by pipe tier. Right-click with a SAM wrench to set direction.
    Directional pipes - like BC iron pipes. Right-click with a SAM wrench to set direction.
    Item filter pipes - like BC diamond pipes. Right-click with a SAM wrench to set filters.
    FORTH pipes - run Forth programs (DEPRECATED; there will be another programmable block later)
    Tagging pipes - add or remove string tags, set colour tags. Tagging explained below.
    Tag filter pipes - filter by string tags.
    Colour filter pipes - filter by colour tag.
    Insertion pipes - like Additional Pipes or Additional Buildcraft Objects or Thermal Expansion insertion pipes. Right-click with a SAM wrench to set preferred direction. (DEPRECATED)
    Redstone control pipes - when powered, items will prefer to go a different way. (There is no automatic routing; the pipe directly before the redstone control pipe should be an intersection)
    Redstone detector pipes - emits a redstone pulse each time an item passes through.
    Acceleration pipes - gives items a speed boost.
    Deceleration pipes - remove speed boost from items.
    Automatic crafting tables, with 100% less nerfs!

    Unfinished things:
    Module icons are very, very plain, and some modules have the same colour as other modules.
    Unfinished texture for Automatic Crafting Tables.
    Automatic Crafting Tables should pull from adjacent chests.
    Many features that should be added but haven't been thought of yet.


    Tagging: Every item travelling through a pipe has a colour tag (or not), and zero or more string tags. Colour tags are like RP2. String tags are more versatile - instead of 16 predefined choices, you can use any string, and an item can have more than one string tag. Colour filter pipes filter by colour, and tag filter pipes filter by string tags.

    FORTH pipes. YOU DO NOT NEED TO KNOW THIS TO USE THE MOD even though it takes up over half of this post.
    If you knew RP-Forth, great! Otherwise ask someone (including me) if you're unsure of the syntax. Example program after the word list.
    List of basic FORTH words:

    WORDS - prints all words to the output area (not very useful)
    PAGE - clear output area
    . - print a number to the output area
    RETURN
    CR
    DUP, DROP, SWAP, OVER, ROT, -ROT, NIP, TUCK, ?DUP, 2DUP, 2DROP, 2SWAP, 2OVER - stack manipulation words as usu
    DO ... LOOP, DO ... +LOOP, UNLOOP, I, J
    BEGIN ... UNTIL
    BEGIN ... WHILE ... REPEAT
    BEGIN ... AGAIN -- infinite loop
    ... IF ... THEN
    ... IF ... ELSE ... THEN
    Comparison operators: 0= 0<> 0< 0> <> < > <= >= =
    Arithmetic: + - * / MOD 1+ 1- NEGATE
    MAX, MIN
    Bitwise: AND, OR, XOR, INVERT
    TRUE, FALSE
    2*, 2/
    line comments: ...
    inline comments: ( ... )
    VARIABLE name
    Memory access: @ !
    size ARRAY name

    List of pipe-specific FORTH words, with stack comments:

    side ( -- last-item-input-side )
    emit ( output-side -- )
    tag? word ( -- has-tag? ) (checks for a string tag)
    tag+ word ( -- ) (adds a string tag, if not already present)
    tag- word ( -- ) (removes a string tag, if present)
    coltag@ ( -- colour-tag ) (reads colour tag)
    coltag! ( colour-tag -- ) (sets colour tag)
    item? ( -- item? ) (returns TRUE if the pipe is currently processing an item)
    white orange magenta lightblue yellow lime pink grey gray lightgrey lightgray cyan purple blue brown green red black ( -- colour ) (constants for colour values)
    nocolour ( -- colour ) (constant colour value representing "no colour", use "nocolour coltag!" to remove colour tag)

    If you have defined a word "item", it will be called each time an item passes through the pipe.

    Example FORTH pipe program:


    : item blue coltag@ = IF red emit ELSE blue coltag! green emit THEN ;
    With this program, any item tagged blue will go out the red side, and any other item will be tagged blue and go out the green side.
×
×
  • Create New...