[Mod] lib_node_shapes [lib_node_shapes]

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

[Mod] lib_node_shapes [lib_node_shapes]

by ShadMOrdre » Thu Feb 23, 2017 22:58

Introducing lib_node_shapes.

This mod provides a multitude of nodebox shapes that can be applied to most "material" type nodes, (stone, metal, tree, wood, and glass). Among the shapes included are columns, walls, fences, gates, doors, furniture, trees, religious symbols, lights, and various other general shapes. Shapes are broken into individual mods within the modpack, so users can easily browse and experiment with limited shapes installed. This is useful if users play with many mods.

Doors, gates, lights and chairs work as expected, with the exception that doors and gates are currently not lockable.

There are currently shapes included that are commented out in the code, to also provide a limit to the number of nodes that are or can be generated. As such, a template is provided that allows an easy to use way to quickly adding additional node box shapes.

To use a given shape, simply place the shape node in the center of the craft grid, and place the "materials" node directly below, in the center of the bottom row. Shape nodes are the nodes in inventory with the red, green, and blue dots. A materials node is any stone, metal, tree, wood, or glass node. Note that not all materials from a given mod may be present.

RECIPES:
Shapes: (These are not yet implemented, but would simply use the blueprint craftitems in various combinations)
EXAMPLE below shows how one might craft a door blueprint. Again, this does not yet work.
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
'blueprint', 'blueprint, ''
'blueprint', 'blueprint, ''
'blueprint', 'blueprint, ''

Nodes:
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
'', '', ''
'', shape_node, ''
'', materials_node, ''


ISSUES:
Craft Recipes are not yet implemented for the various shapes. Top Priority.
Doors do not yet lock
Slabs do not yet work like default slabs.
WARNING **
Fully enabled, this modpack can generate over 10,000 nodes with default, darkage, ethereal, moreblocks, moreores mods enabled. As such, some shapes are commented out in code for the time being.

DEPENDENCIES:
None
OPTIONAL: (can be added/subtracted at will, nothing is hardcoded)
default
darkage
ethereal
moreblocks

License on code is LGPL2.1.
License on graphics is CC-BY-SA. (May be willing to negotiate this)

SCREENSHOTS:

Image
Image
Image


DOWNLOAD: (github link might need fixed)
https://github.com/ShadMOrdre/Minetest/tree/master/mods/modpack_lib_shapes
Attachments
screenshot_20170216_210024.png
screenshot_20170216_210024.png (268.73 KiB) Viewed 2548 times
screenshot_20170216_205957.png
screenshot_20170216_205957.png (598.12 KiB) Viewed 2548 times
screenshot_20170216_210115.png
screenshot_20170216_210115.png (567.78 KiB) Viewed 2548 times
Last edited by ShadMOrdre on Fri Feb 24, 2017 16:47, edited 1 time in total.
My other virtual world is an Opensimulator.
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] lib_node_shapes [lib_node_shapes]

by burli » Thu Feb 23, 2017 23:28

Interesting. Will try tomorrow
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: [Mod] lib_node_shapes [lib_node_shapes]

by TumeniNodes » Fri Feb 24, 2017 00:13

burli wrote:Interesting. Will try tomorrow

oh boy oh boy oh boy.... more cool nodes! :D
In my book, one can never have..... tumeni nodes :P
Gonna be tryin these out this weekend
Flick?... Flick who?
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] lib_node_shapes [lib_node_shapes]

by azekill_DIABLO » Fri Feb 24, 2017 12:14

jungle objects looks very nice, good job!
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] lib_node_shapes [lib_node_shapes]

by burli » Fri Feb 24, 2017 12:32

Maybe you should explain how it works because I don't know how to apply a texture to a node
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] lib_node_shapes [lib_node_shapes]

by burli » Fri Feb 24, 2017 12:41

And I have an issue with steps basic 01 (solid). In some positions on the first and third step I can't jump
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] lib_node_shapes [lib_node_shapes]

by ShadMOrdre » Fri Feb 24, 2017 17:18

burli wrote:Maybe you should explain how it works because I don't know how to apply a texture to a node


Thanks for pointing this out. How could I forget craft recipes? I edited the topic post to provide more info.

At the moment, the craft recipes for the shapes themselves are not implemented, but you can craft ALL of the shaped nodes simply by placing the shape in the center of the craft grid, and the material node below.


burli wrote:And I have an issue with steps basic 01 (solid). In some positions on the first and third step I can't jump


Are you sure you have 2 meters of clearance? Can you provide a screenshot?


TumeniNodes wrote:oh boy oh boy oh boy.... more cool nodes! :D
In my book, one can never have..... tumeni nodes :P


When I fully enabled all shapes, using default, castles, caverealms, columnia, darkage, ethereal, moreblocks, moreores, and mesecons, I quickly found the opposite (12,000 +). Culling from just the mods above gave me around 125 usable materials. So for each shape the mod generates 125 shaped nodes. With 74 shapes currently enabled, well....

While the server served them up, I found my clients would crash if the total node count exceeded 10,000. Leaving room for the mods I use, I had to trim this down to around 8500 nodes that are provided by this mod, and the 1200-1400 that are created by all my other mods.

The server is a single CPU Xeon quadcore with 8GB ram, while the clients are 2 Dell Inspiron core2duo laptops and an eMachine ??? (LOW end). The laptops have built in Intel945 graphics and 2GB ram, the eMachine has an AMD k125 with Geode graphics. Maybe this is my issue:)

I would LOVE to know if higher end machines hit this barrier, while using this mod.

azekill_DIABLO wrote:jungle objects looks very nice, good job!


I would like to be able to create these shapes for all the textures that a node provides. In the course of coding all this, I stumbled across various combinations that made me drool. Each tree provides 2 textures that can be used, giving more variability. In addition, I want to look into combining textures from different materials into frames, tiles, and such, adding yet 1000s more nodes.

Thanks for the compliments, critiques, and recommendations. Please keep them coming.
My other virtual world is an Opensimulator.
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] lib_node_shapes [lib_node_shapes]

by burli » Fri Feb 24, 2017 17:35

I think the jump issue is caused by the engine. It happens if the player is still in the air because of his collision box.

Tried it with normal dirt. Same issue.

Edit: but the shape + material recipe doesn't work. Don't get any output
Attachments
screenshot_20170224_183020.jpg
screenshot_20170224_183020.jpg (213.61 KiB) Viewed 2548 times
screenshot_20170224_182953.jpg
screenshot_20170224_182953.jpg (196.64 KiB) Viewed 2548 times
screenshot_20170224_182947.jpg
screenshot_20170224_182947.jpg (184.63 KiB) Viewed 2548 times
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] lib_node_shapes [lib_node_shapes]

by ShadMOrdre » Fri Feb 24, 2017 20:45

burli,

I confirmed your findings. There appear to be inconsistent spots. Or not so inconsistent. If you step from one collision box to another at a different height, but have not yet been subjected to the physics that should cause you to fall, you will also be unable to jump. This would appear to be physics issue, thus engine related. I'll see what the devs have to say.

I tested this with default stairs, and if you are standing on the edge of the step, you are also affected.

The red stairs are from this mod, the grey stairs are default.
Also, a couple of screenshots of inventory, and how to craft.

Image
Image
Image
Attachments
screenshot_20170224_122409.png
screenshot_20170224_122409.png (556.85 KiB) Viewed 2548 times
screenshot_20170224_122345.png
screenshot_20170224_122345.png (481.33 KiB) Viewed 2548 times
screenshot_20170224_122453.png
screenshot_20170224_122453.png (528.11 KiB) Viewed 2548 times
My other virtual world is an Opensimulator.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] lib_node_shapes [lib_node_shapes]

by bell07 » Sat Feb 25, 2017 10:33

Pls. add the next patch to the lib_node_shapes and update the smart_inventory to the latest git ;)
I will optimize the "material outcome" view in further. PS: The crafting trash is on place now ;)
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
diff --git a/mods/modpack_lib_shapes/lib_node_shapes/init.lua b/mods/modpack_lib_shapes/lib_node_shapes/init.lua
index 7dd4e2e..1b7eb8d 100644
--- a/mods/modpack_lib_shapes/lib_node_shapes/init.lua
+++ b/mods/modpack_lib_shapes/lib_node_shapes/init.lua
@@ -360,6 +360,8 @@ lib_node_shapes.register_shaped_nodes =  function(shape_name, shape_def)
                        walkable = true,
                        groups = new_node_groups,
                        sounds = node_def.sounds,
+                       base_material = def.name,
+                       shape_type = shape_name,
 
                        on_place = function(itemstack, placer, pointed_thing)
                                if pointed_thing.type ~= "node" then


Image
Image


EDIT: if I enable lib_node_shapes and moreblocks at the same time (in minetest_game, without smart_inventory or any other additional mods) I get filled my console by
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
2017-02-25 12:39:23: WARNING[Server]: active block modifiers took 273ms (longer than 200ms)
2017-02-25 12:39:27: WARNING[Server]: active block modifiers took 231ms (longer than 200ms)
2017-02-25 12:39:31: WARNING[Server]: active block modifiers took 284ms (longer than 200ms)

Please check which block modifiers does impact the performance. A "New nodes" mod should not have any abm's.
But I asume it's not yours but the moreblocks/stairsplus's conversion abm's. I see your mod overrides all nodes of stairsplus. So please check if you need more adjustments to avoid this abm's torment.
Attachments
screenshot_20170225_112725.png
screenshot_20170225_112725.png (664.56 KiB) Viewed 2548 times
screenshot_20170225_112714.png
screenshot_20170225_112714.png (774.29 KiB) Viewed 2548 times
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] lib_node_shapes [lib_node_shapes]

by ShadMOrdre » Sat Feb 25, 2017 17:57

bell07,

I've added the patch that you requested. And yes, I need to update my smart_inventory to the latest git :D

As for the ABMs, I use none. If I create a world with just moreblocks and lib_node_shapes, I do not see the ABM messages.

I use MT v0415 stable. I can't really say which version of moreblocks, but it was one of the first mods I dl'd and don't know if I've ever updated it. That's been about 2 years ago by now.

Maybe the debug level is different, and you get messages that I may have disabled...?
My other virtual world is an Opensimulator.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] lib_node_shapes [lib_node_shapes]

by bell07 » Sat Feb 25, 2017 20:50

I need to update
I dl'd and don't know if I've ever updated it.
okok, i uploaded it, maybe this is usefull for you :-) https://forum.minetest.net/viewtopic.php?f=14&t=16772

About the ABM messages, I use v0415 too. Maybe just my computer is slower, 231ms (longer than 200ms) is not a big difference. My guess was the moreblocks does something unexpected because of your redefinition, so as hint. For me it does not care since I do not use moreblocks anymore. But if you would support the moreblocks compatibility (asumption because of defined optional dependency) you need to find the reason for such site effects.
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] lib_node_shapes [lib_node_shapes]

by bell07 » Wed Mar 08, 2017 19:44

Oh, I see you used already shape_type in the mod before my proposal. With the same name oO. That can be used and generate beter classification. Please apply in addition the next patch to get the shape_type used ;-)
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
diff --git a/mods/modpack_lib_shapes/lib_node_shapes/init.lua b/mods/modpack_lib_shapes/lib_node_shapes/init.lua
index 8db4547..9ad9dcf 100644
--- a/mods/modpack_lib_shapes/lib_node_shapes/init.lua
+++ b/mods/modpack_lib_shapes/lib_node_shapes/init.lua
@@ -361,7 +361,7 @@ lib_node_shapes.register_shaped_nodes =  function(shape_name, shape_def)
                        groups = new_node_groups,
                        sounds = node_def.sounds,
                        base_material = def.name,
-                       shape_type = shape_name,
+                       shape_type = shape_def.shape_type or shape_name,
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: [Mod] lib_node_shapes [lib_node_shapes]

by D00Med » Wed Mar 08, 2017 20:39

Well this looks cool :D
I will try it out.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

bell07
Member
 
Posts: 140
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] lib_node_shapes [lib_node_shapes]

by bell07 » Wed Mar 08, 2017 20:47

Forgotten to say, I am unhappy to shape_type = "basic". Maybe you can change it to something more specific like"bed", "stair", "wall"?

nightly EDIT: can you please have a look to my copy (fork) on github and test the changes in branch "pr_modutils" if the changes are ok for you? https://github.com/bell07/minetest-Shad ... r_modutils So I will take a pull request.

I replaced the detection of valid template nodes by my implementation from carpets mod with some adjustments. So please test if the selection is ok now for your preferred mods.

The new implementation utilize the depends.txt files, that means you need just add an other mod to the depends.txt file and the nodes will be used. The file in lib_node_shapes is valid for all shapes. The depends.txt in the shapes mod folder is valid for this shape only. As example, if I define "plastic?" in /lib_shapes_walls/depends.txt I get plastic-walls, but no other plastic shapes. If I add it to lib_node_shapes/depends.txt I get all plastic shapes.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 49 guests

cron