[Mod] Angled walls [git][angled_walls]

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

[Mod] Angled walls [git][angled_walls]

by VanessaE » Mon Sep 08, 2014 20:37

Simple Angled Walls


Out of a fit of boredom, I used the code from the cobwebs in Homedecor, rewrote it, and created a set of angled walls for Minetest. This is accomplished by exploiting the "ceiling" and "floor" modes of the torchlike draw type.

This same method has been used in the past by Jordach to create flat panes before we had nodeboxes, but not in an automatic-find-the-right-wall-angle method.

Supports a dozen of the standard in-game blocks. Adding more wall types is as simple as adding a line to the nodes_list table in the code, and adding a texture to match.

Give yourself the wall you need or craft it and just place it. The code will make an attempt to figure out the right wall angle and place/rotate it accordingly - either to fill a corner between two adjacent blocks, or to extend a previously-placed angled wall of the same kind. Node names are of the form "angled_walls:xxxxxx_corner" where xxxxx is brick, stone, etc.

In order to get the images to align properly at the visual_scale setting used with them, I copied the original textures to new filenames, up-scaled them to 128px without filtering (so they still look like they're 16px), and then added empty space above and below the images.

Crafting: first craft some standard slabs of the material you need, e.g. wood or stone. Then place three of those slabs back in your crafting grid in a diagonal line. You can use Moreblocks' slabs also (the regular-sized ones), as long as all three are the same. Yields 12 wall panels:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
- - X
- X -
X - -

Dependencies: default from minetest_game

Download: https://github.com/VanessaE/angled_wall ... master.zip
...or browse the code: https://github.com/VanessaE/angled_walls

License: WTFPL for the code, CC-by-SA 3.0 for the textures, which were derived from the ones in minetest_game.

Screenshot:
Image
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Angled walls [git][angled_walls]

by ExeterDad » Mon Sep 08, 2014 22:30

This is interesting. So many possible uses are popping into my head.
Just curious, if a person were to place many blocks in a diagonal row, would the faces span all the blocks to create a long smooth diagonal wall?

Edited due to lack of brain cells.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Mon Sep 08, 2014 22:37

If there are blocks in place similar to what's seen above that will trick the code into doing so, yes (after which, you could remove those blocks). I didn't really think about "extending" the wall like that, but to do so in the code should be easy.

EDIT: the code was easy. :-)

Added the ability to extend a wall by just placing more of the same wall diagonally next to it. Only extends the same kind of wall. If you need to transition from one kind of diagonal wall to another (e.g. from stone to wood), place a few random blocks behind where the diagonal walls need to go, so that the code has something to read, then place your diagonal wall materials as needed.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Tue Sep 09, 2014 00:20

Update: fixed the incorrect flip-X of some wall angles that happened at placement time. After updating, you'll have to dig and re-place whichever walls are still errant (else they'll just remain flipped).

Note that diagonal walls that look like they're one node thick will still confuse the flip-X check (since from the map's standpoint, there would be multiple adjacent diagonal walls). I'll fix that later.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Tue Sep 09, 2014 01:57

Minor bugfix just went in. Just fixed some brain-o's: drops and groups weren't set right, some rotation glitches in that extensions code under certain circumstances. All fixed, as far as I can see.
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Angled walls [git][angled_walls]

by ExeterDad » Tue Sep 09, 2014 03:20

It works awesome! Thanks for considering a longer diagonal wall!
Here's a screenie of nothing in particular showing it's possible.
Image

I did have a chuckle... after making these two "structures" I decided to walk between them. The gap between them is a illusion as the full node is taken. LOL
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Angled walls [git][angled_walls]

by ExeterDad » Tue Sep 09, 2014 03:28

Is it possible, and would it be worth considering texture the top as well? So a low wall would look tidy from the top view? Not a deal breaker. Just would give the mod more polish.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Tue Sep 09, 2014 03:44

Yes, it is possible to fix both things you mentioned. For that narrow aisle, it's because of the collision boxes for the new walls - I left them as full nodes. For the tops, that's pretty simple to do.

I'll get to these sooner or later, but don't be surprised if you end up having to dig and re-place a few hundred nodes to make the narrow aisles work right. ;-) It IS an experimental mod after all.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Angled walls [git][angled_walls]

by Inocudom » Tue Sep 09, 2014 04:20

I didn't see this mod on you creative server as of yet.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Tue Sep 09, 2014 04:22

It has not yet been added as I don't consider it stable enough.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Tue Sep 09, 2014 05:06

Update: pushed the fix for the collision boxes, so now those narrow aisles will work. As expected, you'll have to dig some of the walls and re-place them to reset the selection/collision boxes to fit. I could have automated this but it would have resulted in rather hacky code and I doubt there are enough people using this mod yet for me to need to worry about that. :-)

This update does not add the aforementioned wall top caps, I'll do those later.
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Angled walls [git][angled_walls]

by ExeterDad » Tue Sep 09, 2014 10:01

Holy Smokes! I was getting some shut eye, and you were chugging away at this. Now I feel bad as the collision boxes really weren't a issue. I was just surprised when my player couldn't fit.
Please don't feel I was putting this mod down or criticizing. You do great work, no one can deny that :)
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Angled walls [git][angled_walls]

by Minetestforfun » Tue Sep 09, 2014 10:20

wow ! very good idea ! Thank you VanessaE !
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Tue Sep 09, 2014 22:02

I've just added this mod to Dreambuilder.

In turn, it'll appear on my Creative and Survival servers, and also I'll add it to my FreeForAll server as well. Those changes will take effect tomorrow morning.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Angled walls [git][angled_walls]

by Sokomine » Wed Sep 10, 2014 01:44

Nice mod. The angled walls give house builders a new option to design their houses - without having to resort to nodebox-heavy nodes from the CNC machine.
A list of my mods can be found here.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Angled walls [git][angled_walls]

by Inocudom » Wed Sep 10, 2014 01:48

Sokomine wrote:Nice mod. The angled walls give house builders a new option to design their houses - without having to resort to nodebox-heavy nodes from the CNC machine.

You know, I just had an idea. If nodebox models could have hollow interiors, they would not reduce framerate as much.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Angled walls [git][angled_walls]

by Sokomine » Wed Sep 10, 2014 01:58

Inocudom wrote:You know, I just had an idea. If nodebox models could have hollow interiors, they would not reduce framerate as much.

Not really. It all boils down to triangles. A drawtype which would allow to create nodes out of triangles directly would sometimes be more helpful than the current method. But then, we'd end up wishing for diffrent angles for slopes.
A list of my mods can be found here.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

Re: [Mod] Angled walls [git][angled_walls]

by VanessaE » Wed Sep 10, 2014 02:25

Update: Added crafting recipes, see first post. Also the copy of this mod that's in Dreambuilder is tweaked slightly to use the older, dark junglewood texture.

Interesting you two should mention nodeboxes... Sokomine, if you check the code you'll notice that when I fixed the collisionbox, I did so by putting your idea into use. :-) Nodeboxes create the collision box, while the torchlike draw type provides the visual part.

Anyway, enjoy.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [Mod] Angled walls [git][angled_walls]

by Krock » Wed Sep 10, 2014 17:35

I saw the mod's screenshots in IRC and I liked it already back then.
Finally there's a release :)

+1
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 8 guests

cron