[Mod] 3D Wires (for mesecons) [wires3d]

Post Reply
User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

[Mod] 3D Wires (for mesecons) [wires3d]

by 12Me21 » Post

This mod adds mesecon wires that connect in all 6 directions, as well as tools for adding/removing insulation and changing the shape of insulated wires.
It also includes all of the 1 and 2-input logic gates, which can be rotated using the screwdriver.
There are 256 different insulated wire colors.

Image

Wires connect automatically when placed
Right click with insulation to add insulation to a wire:
Image
Or swap colors:
Image
(Left click to remove insulation)
Use wire cutters to add/remove attachment points on insulated wires:
Image
Left click = remove, right click = add
Spoiler
Image
Insulation coloring machine:
Image
Spoiler
- Wire
- Insulated Wire
- Diode
- Not Gate
- Or Gate
- And Gate
- Xor Gate
- Nor Gate
- Nand Gate
- Nxor Gate
- Comparator (A > B)
- Inverted Comparator (A <= B)
- LCD Pixel
- Insulation Coloring Machine
Version 0.3 Change Log:
- Gates now show input state
- Renamed mod to "wires3d"
Version 0.2 Change Log:
- Fixed rotated comparators
Version 0.1 Change Log:
- Added machine to color insulation item
- Added crafting recipes for all(?) items
- Now has optional dependencies on default and mesecons_materials
- Updated various textures
- Improved support for creative mode
- Renamed various items

Mod dependencies:
- mesecons
- place_rotated (https://github.com/12Me21/place_rotated ... master.zip)

Download
Requires Minetest version 0.5!
https://github.com/12Me21/3d_wires/archive/master.zip (https://github.com/12Me21/3d_wires/)
Last edited by 12Me21 on Tue Sep 11, 2018 18:20, edited 4 times in total.

User avatar
Desour
Member
Posts: 1472
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by Desour » Post

You might want to add better textures. Therefor you should look to the design information here.
It would be nice to have a direct link to the git repo and not only the download btw.
Last edited by Desour on Fri Sep 07, 2018 12:27, edited 1 time in total.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by 12Me21 » Post

DS-minetest wrote:You might want to add better textures. Therefor you should look to the design information here.
It would be nice to have a direct link to the git repo and not only t the download btw.
Ok I added the link

The current textures are just temporary, and hopefully I'll make some better ones soon...

User avatar
TheGreatCoffeeKing99
Member
Posts: 28
Joined: Fri Sep 09, 2016 23:42
In-game: Coffee99

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by TheGreatCoffeeKing99 » Post

Cool!

IMHO 3D wires look much better than flat ones, and look less confusing. Definitely cool.

(P.S. may give the mod a go soon.)
Hi. I don't have any published mods yet.

User avatar
Desour
Member
Posts: 1472
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by Desour » Post

I've tested it now.
Btw. it would be convenient for installers if there were links on the forum page to the forum pages of the dependencies.

Great mod!

I like that you use param2 coloring.
You add 2⁸ (=256=2⁶*2*2 (6 sides to connect, insulated and not insulated, on and off)) nodes for the wires, this seems very ok, mesecons_wires makes more (2⁹ I think). The names have human unreadable numbers in them, in standard mesecons there are most times 0s and 1s added after the name, Idk what's better.

The design is nice, the output is always red, you can climb the wires and gates.
The placement of the wires works great.

The gates need more states to avoid this:
Image

Do the comperator gates work correctly yet on all sides?
Image
The left input is >= the right input.

All in all, I'd like to see this mod being used on servers in the future, players could have fun with it. It's a good, not too complex, stable mesecons addition.
Attachments
screenshot_20180909_173253.png
screenshot_20180909_173253.png (10.97 KiB) Viewed 876 times
screenshot_20180909_172516.png
screenshot_20180909_172516.png (1.61 KiB) Viewed 876 times
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by 12Me21 » Post

DS-minetest wrote:I've tested it now.
Btw. it would be convenient for installers if there were links on the forum page to the forum pages of the dependencies.
(added)
DS-minetest wrote: Great mod!
DS-minetest wrote: The design is nice, the output is always red, you can climb the wires and gates.
The placement of the wires works great.
DS-minetest wrote: All in all, I'd like to see this mod being used on servers in the future, players could have fun with it. It's a good, not too complex, stable mesecons addition.
Thanks!
DS-minetest wrote: I like that you use param2 coloring.
You add 2⁸ (=256=2⁶*2*2 (6 sides to connect, insulated and not insulated, on and off)) nodes for the wires, this seems very ok, mesecons_wires makes more (2⁹ I think). The names have human unreadable numbers in them, in standard mesecons there are most times 0s and 1s added after the name, Idk what's better.
Yeah standard mesecons has 2⁹ normal wires + 4*2 insulated + 3*2 vertical + 2 mese block = 528 conductor nodes.
As for the names, well, it depends. I keep track of wire connections using 6 bits stored in a number, while I think mesecons uses a boolean array.
Lua isn't really designed for doing bitwise operations (the version we use doesn't have any bit operators), while getting/setting a value in a boolean array is very easy.
However, it's much simpler to convert "3d_wires:wire_24_on" to 24 than it is to convert between "mesecons:wire_00101101_off" and {false, false, true, false, true, true, false, true}, for example.
Plus when registering the nodes, I can just use `for i = 0, 2^6-1 do ...`, which you can't do with a boolean array.
DS-minetest wrote: The gates need more states to avoid this:
Image
I've been thinking about that. I'll probably add it soon.
DS-minetest wrote: Do the comperator gates work correctly yet on all sides?
Image
The left input is >= the right input.
Ok, I checked my rule rotation function, and apparently I was doing rotation counter clockwise instead of clockwise (Which is only noticeable with gates that aren't symmetrical)
It should be fixed now.

User avatar
LegoLogger
Member
Posts: 39
Joined: Thu Sep 01, 2016 16:08
GitHub: BakerPrime
IRC: BakerPrime
In-game: BakerPrime
Location: Somewhere on mars.....
Contact:

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by LegoLogger » Post

These are cool. Sort of like Technic cables? I'll have to try this on my local world soon.

~~BakerPrime
For those who complain about radiation, I should remind you that every time you leave your house, you step into
the worlds largest radiation beam. (Why else do you think us programmers hide in basements? ;P )

if you need to speak to me, you can catch me on #VE-Minetest-Servers, #RRH-Servers, ##Minetestwithunk, or #Minetest

User avatar
Desour
Member
Posts: 1472
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by Desour » Post

LegoLogger wrote:Sort of like Technic cables?
technic cables connect to all 6 sides always. Afaik the not insulated ones here are comparable but for the insulated ones you can decide to what sides they connect.

Btw. if not insulated cables really connect to all sides, you don't need to register so many nodes for them but just one for off and one for on and make them connected nodeboxes. This would decrease mod loading time and increase placement performance but mesecons signals were less efficient. It would be like mese block.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by rubenwardy » Post

Mod names shouldn't begin with a number, please rename. (This causes issues with Lua variable naming rules)
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] 3D Wires (for mesecons) [3d_wires]

by 12Me21 » Post

DS-minetest wrote:
LegoLogger wrote:Sort of like Technic cables?
technic cables connect to all 6 sides always. Afaik the not insulated ones here are comparable but for the insulated ones you can decide to what sides they connect.

Btw. if not insulated cables really connect to all sides, you don't need to register so many nodes for them but just one for off and one for on and make them connected nodeboxes. This would decrease mod loading time and increase placement performance but mesecons signals were less efficient. It would be like mese block.
I originally did this, but the problem is that it requires all the nodes they connect to to have connect_sides set to the correct value, which I don't have control over (and even if I did, some of them might already use connect_sides for something else, like technic nodes using it for cable connection). Plus, connect_sides doesn't support 6d facedir.
rubenwardy wrote:Mod names shouldn't begin with a number, please rename. (This causes issues with Lua variable naming rules)
Yeah that was a terrible idea... I'll rename it to wires_3d or something for the next update. Maybe just wires3d, because having underscores in the mod name breaks the texture naming system (I can't name my textures "wires_3d_..." because technically some other mod might be called "wires" and end up using the same texture names. I'm not sure why the modname_texturename pattern was chosen in the first place, since _ is a common character in both mod names and texture names...)

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: [Mod] 3D Wires (for mesecons) [wires3d]

by 12Me21 » Post

Ok, I renamed the mod and fixed *part* of the problem with gates.

The input wires will change color to match the state of each input. However, I didn't do the same for the output, for a few reasons.
If I did this, then all the gates pointing IN to a circuit would have to update every time it changes state, just for a visual effect.
Also it would mean that there's no way to visually tell whether a gate is powered or not. (though this could be fixed by changing the textures to make the gate icon change color or something)

I'm not exactly sure what the best way to solve this would be.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] 3D Wires (for mesecons) [wires3d]

by Miniontoby » Post

Please put it on content.minetest.net
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Visitor247
Member
Posts: 21
Joined: Tue Dec 03, 2019 11:09

Re: [Mod] 3D Wires (for mesecons) [wires3d]

by Visitor247 » Post

I was pointed here after requesting something similar. This is absolutely great.
Finally we can, sort of, hide cables, have them look nice and build in new ways because of the insulation.

Could you please add the rest of the mesecon blocks that are not looking like blocks: especially the Delay (1 to 4 rings could indicate the state of the Delay)?

All the controllers could be on a block that is just as high as the upper side of the wire so it would look as if the wire is plucked into the controller.
The pressure plates and the solar panel are no problem, since they can be connected from below.

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: [Mod] 3D Wires (for mesecons) [wires3d]

by PolySaken » Post

This is honestly exactly what I need. I was just thinking of making something similar myself - the ability to choose what connects with the insulated wires is my favorite part.

Edit: Can I make you some better textures for the wire cutters, painting machine, and insulation? Yours... kinda suck :/
Edit 2: there's a typo in all of the crafting recipes for gates. You left out the _0_ in the names.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests