Request / Project - Schematica.

Post Reply
User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Request / Project - Schematica.

by Captcha » Post

I've been thinking of minecraft mods that could be taken to minetest. One of them is Schematica.

What is Schematica?

Schematica is a minecraft mod that allows importing build schemes in 3d to your MC world.

How does it work?

Schematica should spawn "hologram" nodes representating the building. This nodes are no more than a guide for you to build. It makes it a lot more easier to build.


Are you going to work on it?

Yes! I want to learn lua and that's why i am going to try to remake this project.

Isn't this project way too hard for a newbie?

Yes, i am a try-harder.


----

I'll need help as i don't know much lua. Any contribution is appreciated.

Image
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Request / Project - Schematica.

by CalebJ » Post

There are already several schematic mods. I suggest you look at them for inspiration, perhaps they are all you need :)
viewtopic.php?t=13116
viewtopic.php?t=18515
viewtopic.php?f=9&t=22794

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: Request / Project - Schematica.

by rubenwardy » Post

Those mods won't place ghost nodes though

This is certainly possible. It's easier to do if you handle saving the schematics yourself. If you want to reuse existing schematics, you'll need to edit the existing schematic to replace normal nodes with ghost nodes - I'm not entirely sure how to do this.

A big limitation of this is what nodes you support. You'll need to create a copy of each node you support to act as a ghost. Minetest supports a maximum of 32768 registered nodes
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Re: Request / Project - Schematica.

by Captcha » Post

CalebJ wrote:
Sun May 03, 2020 13:14
There are already several schematic mods. I suggest you look at them for inspiration, perhaps they are all you need :)
viewtopic.php?t=13116
viewtopic.php?t=18515
viewtopic.php?f=9&t=22794
I've seen them, they are awesome, thanks!
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Re: Request / Project - Schematica.

by Captcha » Post

rubenwardy wrote:
Sun May 03, 2020 13:18
Those mods won't place ghost nodes though

This is certainly possible. It's easier to do if you handle saving the schematics yourself. If you want to reuse existing schematics, you'll need to edit the existing schematic to replace normal nodes with ghost nodes - I'm not entirely sure how to do this.

A big limitation of this is what nodes you support. You'll need to create a copy of each node you support to act as a ghost. Minetest supports a maximum of 32768 registered nodes
The limitation may break bigger schematics, that's for sure, that's why i was thinking of making the ghost node appear once the limit is passed.

Aka: You make a ghost node disappear by placing the right node, and a new ghost node appears.

Obviously it would make the building 3d view a little bit weird (Still 32k nodes is a lot)
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Request / Project - Schematica.

by CalebJ » Post

Captcha wrote:
Sun May 03, 2020 13:25
Obviously it would make the building 3d view a little bit weird (Still 32k nodes is a lot)
You could use groups = {not_in_creative_inventory=1} to make them not appear in the builders inventory :)

User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Re: Request / Project - Schematica.

by Captcha » Post

CalebJ wrote:
Sun May 03, 2020 13:47
Captcha wrote:
Sun May 03, 2020 13:25
Obviously it would make the building 3d view a little bit weird (Still 32k nodes is a lot)
You could use groups = {not_in_creative_inventory=1} to make them not appear in the builders inventory :)
I am not sure what do you mean, can you explain further?
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Request / Project - Schematica.

by CalebJ » Post

duplicate
Last edited by CalebJ on Sun May 03, 2020 15:07, edited 1 time in total.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Request / Project - Schematica.

by CalebJ » Post

Captcha wrote:
Sun May 03, 2020 14:40
CalebJ wrote:
Sun May 03, 2020 13:47

You could use groups = {not_in_creative_inventory=1} to make them not appear in the builders inventory :)
I am not sure what do you mean, can you explain further?
Of course. In a node's definition you can use groups to do special things. not_in_creative_inventory=1 will mean you can only obtain it using commands or schematics in this example. I suggest you check out https://dev.minetest.net/minetest.register_node for how node registration and https://dev.minetest.net/Groups for how groups work :)

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: Request / Project - Schematica.

by rubenwardy » Post

Captcha wrote:
Sun May 03, 2020 13:25
The limitation may break bigger schematics, that's for sure, that's why i was thinking of making the ghost node appear once the limit is passed.

Aka: You make a ghost node disappear by placing the right node, and a new ghost node appears.

Obviously it would make the building 3d view a little bit weird (Still 32k nodes is a lot)
The limit is per node type, not per node instance. For example, wood is one type, stone is another.

An alternative to get around this limitation is to use entity magic, that tends to involve a fair amount of head scratching and you won't be able to use Minetest's APIs for placing schematics
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: Request / Project - Schematica.

by CalebJ » Post

rubenwardy wrote:
Sun May 03, 2020 15:12
Captcha wrote:
Sun May 03, 2020 13:25
The limitation may break bigger schematics, that's for sure, that's why i was thinking of making the ghost node appear once the limit is passed.

Aka: You make a ghost node disappear by placing the right node, and a new ghost node appears.

Obviously it would make the building 3d view a little bit weird (Still 32k nodes is a lot)
The limit is per node type, not per node instance. For example, wood is one type, stone is another.

An alternative to get around this limitation is to use entity magic, that tends to involve a fair amount of head scratching and you won't be able to use Minetest's APIs for placing schematics
Oooooh. entities as 'dummy nodes' without raising the node count. Cunning idea, I see use for this in many circumstances! If only we could track collisions between entities (issue #9787) - then entity-like nodes could do really interesting things. For this circumstance an node-like entity would work very well.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: Request / Project - Schematica.

by GreenXenith » Post

If you use entities and a lot of visual tricks, you can support any node. Seems more reasonable in my book. Worth the head-scratching if you can get it to work.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: Request / Project - Schematica.

by Sokomine » Post

My handle_schematics mod does that in some form already. There are no particular ghost nodes for individual blocks though. There are just two nodes: The "dig here" indicator (a red pick) and the scaffolding node.

You can get a schematic beeing built out of these nodes if you place a handle_schematics:build node, revoke your creative priv and select one of the schematics. It looks like this:
Image

When you right-click a "dig here" indicator, the node below will be digged and added to your inventory until enough room has been made for the schematic. The scaffolding node works likewise: Right-click it repeatedly. As long as you have the nodes required at that position in your inventory, they'll be drawn from your inventory and added to the building. The scaffolding node also shows you which node is needed at that position when you point your mouse at it. If you right-click a scaffolding node that has further scaffolding nodes below it, it will automaticly serve the scaffolding nodes lower down first, building from bottom up.

I'd love to have NPC running around and building these structures together with the player. Each party just has to right-click (or call a function) in order to help building. The NPC would need some additional behaviour: Go there, stare a bit, wield the right node (or digging tool), show digging animation, actually call the function, stop wielding the node.

The scaffolding structure just looks more natural to me than any ghost nodes. And with a ghost node you'd also run into the problem that there's a node already sitting there when your player comes and wants to place one.
Attachments
scaffolding_example.jpg
scaffolding_example.jpg (154.48 KiB) Viewed 1557 times
A list of my mods can be found here.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Request / Project - Schematica.

by texmex » Post

About time for a truly player-friendly schematic mod like this is being made. =)

If opting for entity based ghost nodes I’d strongly suggest looking into how meshnode does a very similar thing.

User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Re: Request / Project - Schematica.

by Captcha » Post

GreenXenith wrote:
Sun May 03, 2020 17:22
If you use entities and a lot of visual tricks, you can support any node. Seems more reasonable in my book. Worth the head-scratching if you can get it to work.
I'll take a look.
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Re: Request / Project - Schematica.

by Captcha » Post

texmex wrote:
Sun May 03, 2020 20:36
About time for a truly player-friendly schematic mod like this is being made. =)

If opting for entity based ghost nodes I’d strongly suggest looking into how meshnode does a very similar thing.
I've seen meshnodes before, but i dont really know how it applies as a ghost node... Maybe because of it's properties?
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

User avatar
Captcha
New member
Posts: 9
Joined: Mon Apr 06, 2020 14:00
IRC: Captcha
In-game: Captcha

Re: Request / Project - Schematica.

by Captcha » Post

Sokomine wrote:
Sun May 03, 2020 18:30
My handle_schematics mod does that in some form already. There are no particular ghost nodes for individual blocks though. There are just two nodes: The "dig here" indicator (a red pick) and the scaffolding node.

You can get a schematic beeing built out of these nodes if you place a handle_schematics:build node, revoke your creative priv and select one of the schematics. It looks like this:
Image

When you right-click a "dig here" indicator, the node below will be digged and added to your inventory until enough room has been made for the schematic. The scaffolding node works likewise: Right-click it repeatedly. As long as you have the nodes required at that position in your inventory, they'll be drawn from your inventory and added to the building. The scaffolding node also shows you which node is needed at that position when you point your mouse at it. If you right-click a scaffolding node that has further scaffolding nodes below it, it will automaticly serve the scaffolding nodes lower down first, building from bottom up.

I'd love to have NPC running around and building these structures together with the player. Each party just has to right-click (or call a function) in order to help building. The NPC would need some additional behaviour: Go there, stare a bit, wield the right node (or digging tool), show digging animation, actually call the function, stop wielding the node.

The scaffolding structure just looks more natural to me than any ghost nodes. And with a ghost node you'd also run into the problem that there's a node already sitting there when your player comes and wants to place one.
It's an amazing idea, i was thinking about other thing tough, about an autobuilder that will place the nodes for the player. (For clientside modding) and maybe for the Serverside the NPC which could be used in servers such as Pandorabox to hire him and build for you.
Not the best lua coder

Professional name sniper


Working on an in-game CAPTCHA for minetest and trying to make his own "game" (sub game of minetest) to learn some more lua.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest