Colored wires [WIP] [Alpha]

Discussion in 'Released Mods' started by Yoraiz0r, Jan 19, 2012.

Thread Status:
Not open for further replies.
  1. Yoraiz0r

    Yoraiz0r The Wizard

    Hello everyone , this Yoraiz0r once again.
    Original thread text
    Show Spoiler

    Before I begin rewriting 'Skilled' mod , I would like to mention that I have been thinking of making colored wires.
    As I see it now , it should be possible within my abilities to create colored wires with ease , HOWEVER , I am not sure about wire OVER wire , which I consider creating as well.

    So , Assuming I manage to make colored wires , how many colors should I provide?
    The current assumption is that I'll want around 4 wire colors.
    The colored wires will not interact with other colors but those of their own , when interacting with each other.
    Considering I make wire 'channels' how should that be implemented? with 'layers' in which you select the layer number and see what goes on there , or with colored wires , in which colors go over one another (albeit it sounding kinda messy)

    Mod-noticed changes by users
    Show Spoiler

    Increased load and saving time for world , obvious due to new data that has to be stored for every wire's existence

    Mod-noticed changes by me
    Show Spoiler

    I just noticed that a save file for a small world is freaking 14 times the size of a regular small world......"meep".

    This mod provides colored wires in up to 9 different colors , all wires are managed in different layers for ease of use , aside a white wire which can allow all the wires connected to it to interact with each other , allowing you to make up to 8 contraptions run from a single line.
    The colored wires can be placed by colored wrenches and cut by colored wire cutters , these can be made in the following fashion:
    Red - achieved by the item + ruby.
    Orange - achieved by the item + ruby + topaz.
    Yellow- achieved by the item + topaz.
    Green- achieved by the item + emerald.
    Blue- achieved by the item + sapphire.
    Purple - achieved by the item amethyst.
    Pink - achieved by the item + amethyst + diamond.
    Black - achieved by the item + obsidian.
    White - purchased from the mechanic.
    version supported : 1.1.2

    alpha version is released , go grab it here!

    Included inside is a readme and the necessary files to run the mod.
    This version will ONLY run on Steam.

    How to use this:
    Show Spoiler

    install :
    DELETE your CONTENT folder in Terraria's directory , located Under Steam\Steamapps\common.
    Extract the content folder , terraria.exe and terrariaserver.exe into Terraria's folder

    Launch the game , you should not load any characters you made in the past , for safety purposes.
    Do not attempt to load any of your existing worlds , make a new one instead , trying to load WILL fail.

    Uninstall :
    at Steam , select terraria and right click it , select properties , select 'local files' , select 'verify integrity of game cache' and wait for steam to finish , the mod has now been uninstalled.


    Remember this is an alpha version , bugs are imminent.
    Your character starts with some nice amounts of loot specialized by this mod, just trash it if you dun like it.
    Remember to post your suggestions and / or discovered bugs! =D

    Fun fact : this mod was made in 11 hours , and 57 minutes.

    Some Pictures will be appreciated , since I imagine getting pictures of only a single layer at a time's a bit rough , I'd appreciate it a lot!
  2. Yoraiz0r

    Yoraiz0r The Wizard

    Well , its been 2 hours or so , I have made quite a lot of progress!
    For those who do not understand what's in this picture , these are genuine colored items , wires wrenches and clippers , which do not interact with each other.
    For those who do understand what's in this picture , do not be confused by the draw , I have yet to avoid the interaction logic.

    EDIT : Triple posting is not smart , so ill just post here: DONE WITH LOGIC , MOD BASICALLY DONE AND WILL BE RELEASED AFTER I MAKE WIRE IMAGES WORK!
  3. Yoraiz0r

    Yoraiz0r The Wizard

    Ah -- it , another update , this time I can gladly say 'hey , ITS DONE!'

    I have to go now , and will be back in 4 to 5 hours with the release , and yes , it works server side as well <--- awesomeness is imminent.

    Wires can support up to an infinite number of colors , and they can be of any color , just state which colors you want me to make and I will.
  4. Mr.Person

    Mr.Person Moth

    This be cuul. Just try to avoid double/triple posting.
  5. Yoraiz0r

    Yoraiz0r The Wizard

    it is , indeed , cool.
    I will avoid double / triple posting in the future , however it has been more then an hour per - post , and the progress is sort of amazing.
    If possible , I would've removed these posts by now and set them to the first post's content.
    as the mod runs now , it can load up to infinite colors.
    there are 4 colored wire colors for now , and 1 base white wire , which can connect to all the other wires.
    wires are changed in color via the wrench used to create them , this means that a blue wrench is used to make blue wires , where's a white wrench is used to make white wires.
    each wrench has its fitting wire cutter , and wire cutters can cut wires only of their own color , with the exclusion of the white one , which is able to cut through all the wires - for ease of use...
    Mr.Person likes this.
  6. Mr. Cool

    Mr. Cool Green Slime

    its cool but swearing is not
    Mr.Person likes this.
  7. smokesjackson

    smokesjackson Snow Flinx

    how about you make some wire that will electrocute enemies,yeah yaaa
    FreyModder, warmaster949 and Jibby98 like this.
  8. loris45

    loris45 Cursed Man

    Great idea :D
    FreyModder and smokesjackson like this.
  9. RukoFamicom

    RukoFamicom Piranha

    I don't know if this might be too hard to do, but as it is wires are on their own plane/layer among the other elements in terraria (wires in front layer, then blocks, then back walls for instance). Would it be possible to add entirely new layers for each wire color in the scheme so that one could implement crossing and even overlapping wires without a crash?

    And if so, is it possible to make each wrench/cutter show only the matching wire color?
    Darkchyldeone and smokesjackson like this.
  10. BaggityMan

    BaggityMan Green Slime

    Glad you made a mod like this! Organization is important to me :p
    I have a question. If they don't interact with eachother(Well, I suppose except through white), then what happens if I get a stone and connect two different wires? For example, if I have red and blue connected to a statue which are connected to a switch, could I use either switch to activate the statue? If I set both to activate at once, what would happen? And if there was a 1-second timer that I activated on one, then half a second between activated another, could I get a half-second timer working? Haha

    I may just be over-thinking it, and none of that is possible o.o I just figured since, in the original, two wires next to the statue connected(That way you could never actually have what I did above). Now, I guess it seems possible that you could activate with two separate connections? Dunno :p Apologies if I am misunderstanding what the mod is capable of.
    smokesjackson likes this.
  11. Hambro

    Hambro Green Slime

    Oh holy crap I saw the creator's last post and I was like "Where is the download link, he said it was going up?" and then I realized it went up today xD! This is absolutely amazing, this will bring worlds of opportunity for Terraria electricians like me lol, great job and I can't wait for the release! :)
  12. Yoraiz0r

    Yoraiz0r The Wizard

    The mod is already done client-side , despite a little render issue when having 3 different colors interact , and 1 of them is white , and white is not the middle (the actual functionality is not damaged , though!)
    The mod is capable of creating your half-second timer , with some excessive wiring I guess you can also manage up to a 1/numofwirecolors timer =P
    if you have a switch with two wire colors on it , they'll both be activated by the switch , but neither will be dependent on each other (this means 1 can run a pump and 1 can run a light , without actually being connected , and each can be affected by different things in your contraption)

    It is very possible to make wrenchs/cutters only show the matching wire color, and will actually make my work easier to do , but that will also allow the existence of a new problem , that is the existence of wire interactions.

    I am thinking of turning this into a wrench specific layering mod , which would basically have me rewrite half of what I did here , but I don't mind! :p
    So , would you prefer overlapping none-interactive , none-multiwatched wires?
    ....I'll explain it better this way:
    Scenario 1 - you have a wrench , all wires of all types appear , only 1 wire color per tile area , wires of different colors don't touch each other.
    Scenario 2 - you have a wrench , all wires of the wrench's color appear , you can have all the colors in the same tile area , wires of different color don't touch each other.

    Advantages of Scenario one : ease of memory - you can see all the wires all the time , so no brain damage is done when trying to make giant things
    Advantages of Scenario two : easy of use - tiles don't communicate , and thus no need for a white wire , all the same sources can affect the different things , such as a timer affecting red , green and blue tile at the same time , using the same block. <--- saves space on construction!

    I'll wait 1 hour for reply , if none is gotten , I'll make the decision myself.
  13. Hambro

    Hambro Green Slime

    Okay, I am just going to tell you now I am a very derpish person xD. I think I understood the options, and they both sound great to what I understand. I am simply going to tell you what I think would be nice, you make any decisions you need from there lol. Okay, so what I have been looking for is different colored wires, which you have made. I would want wires of 1 color to not connect or send signals to wires of other colors. I would also like it if the wires could overlap each other somehow, like you could put a green wire going vertically over a yellow wire going horizontally, both leading to different destinations, but they don't send signals to each other. This would really help me with the power plant I want to build, so I could wire up houses with 1 color of wire, then connect all houses to a different color that leads to the power plant, so that I can turn the house's lights off via a switch located in the house, and I can turn off all of the lights in the city via a lever in the power plant. Now that you know what I like, I have 1 more question to ask you; can you make orange wire for me please :D?
  14. Mechagofio

    Mechagofio Slimed Zombie

    this is like asking:
    do you want fun?
    or do you want AWESOME!

    if it would not be too much work, PLEASE use number 2!

    oh, and hambro:
    i think you want a switch with wite wire, that goes everywhere,
    and one switch for every color that goes to a region?
    because then you should pick number 2.
  15. RukoFamicom

    RukoFamicom Piranha

    I much prefer Scenario 2 because of the lack of capability to cross wires the other way around. That's been my biggest headache with wires as they were in regular play - making multiple colors on the same plane only lets me space them closer together but doesn't open up quite as many possibilities.
    Also, because of the fact a timer can only take up one block, you won't be able to run multiple colored wires through the same timer with all of them on the same plane.

    As an alternative to having 4 different colors of wrenches, different wires could be made instead... but one would still need different colored clippers, especially if multiple planes are introduced for wires. This would also require still more recoding from what you had originally made.

    And... if you get votes for both, you could always create both for each side of the spectrum to enjoy (assuming you have the time, patience and will to do so)


    Should you go for scenario 2, I'd second the thought for a white [or insert color here] wire that can encompass all of the planes and cross-connect wires in varying planes. But that'd be still -more- work to come up with.

    I look forward to whatever turns out in the end, but I need to sleep and then work before I'll be back :)
    BaggityMan likes this.
  16. Hambro

    Hambro Green Slime

    Yes, I believe that is what I want. If you are saying that 1 switch controls electricity flow to a certain region(In this case a single house), and 1 switch that controls all electricity flow everywhere. So, according to RukoFamicom, if you can't cross different colored wires on option #1, then yes, I would like option #2 :)
    Mechagofio likes this.
  17. Yoraiz0r

    Yoraiz0r The Wizard

    Mechagofio likes this.
  18. I have a suggestion with this mod (it has something to do with wires)why dont u make like different active blocks, not only active stone blocks but more eg: active wood block, active dirt block etc...... if it's possible(idea for mod name if this idea is put in the mod(the mechanics mod;D). I apologize if u dont take any suggestion and just wasting ur time......
    BaggityMan likes this.
  19. BaggityMan

    BaggityMan Green Slime

    The ability to cross wires is much more welcome. It feels neater and more organized for me, relieves the complication of spacing, and kind of allows just more free-flow overall for me in design.

    Yoraiz0r, thanks for the response. It's very useful for me, not only for half-second or some proportion 1/(number of wires attached), but I can make it sort of irregular(Granted my ability to time it correctly is spot-on, Haha). I just like the idea of making lights that have odd patterns for my house. Just make it easier to me, the colored wires.
  20. Yoraiz0r

    Yoraiz0r The Wizard

    'right' , anyways , I'm currently re-writing , My current colors included are :
    red , blue , yellow , green , orange , purple , pink , black , as regular -none interactive wires and White wires as multifunctional between all the layers.....
    I feel a need to come up with some weird stuff right now , AND/OR mechanisms perhaps X.x
    I'll be honest
    Despite the code seeming to work perfectly , I am not much a man of wires , I never used them for more then a light switch and an occassional bunny a blood moon ,so I despite my reading of the code , I might miss one or two or three or a cazzilion things.
    If anything's not functioning perfectly (and it wont) , please report it as soon as I get it out , I'll attempt to finish everything within the close two hours.

    In the meanwhile , for the bored people , here's a nice chore list
    Come up with recipes for the different colored wrenches and wire-cutters , and a mechanism that will make a 1 minute timer using only 6 tile areas! =P <--- not sure if possible.
Thread Status:
Not open for further replies.

Share This Page