[Mod] Meshnodes [0.3.0] [meshnode]

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Casimir » Tue Sep 02, 2014 18:33

Open init.lua and comment out both lines 152 and 176. So it looks like the following.
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
   on_receive_fields = function(pos, formname, fields, sender)
--      if fields.connect and not fields.quit then
         local minp = minetest.string_to_pos(fields.minp)
         local maxp = minetest.string_to_pos(fields.maxp)
         if is_valid_pos(minp) and is_valid_pos(maxp) then
            local node = minetest.get_node(pos)
            minetest.remove_node(pos)
            local positions = {}
            local parent = minetest.add_entity(pos, "meshnode:ctrl")
            if parent then
               for x = minp.x, maxp.x, get_step(minp.x, maxp.x) do
                  for y = minp.y, maxp.y, get_step(minp.y, maxp.y) do
                     for z = minp.z, maxp.z, get_step(minp.z, maxp.z) do
                        local node_pos = vector.add(pos, {x=x, y=y, z=z})
                        meshnode:create(node_pos, parent)
                        table.insert(positions, node_pos)
                     end
                  end
               end
               for _, pos in pairs(positions) do
                  minetest.remove_node(pos)
               end
            end
         else
            local name = sender:get_player_name()
            minetest.chat_send_player(name, "Invalid Position!")
         end
--      end
   end,

Image
 

User avatar
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Esteban » Tue Sep 02, 2014 19:11

Casimir wrote:Open init.lua and comment out both lines 152 and 176. So it looks like the following.
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
   on_receive_fields = function(pos, formname, fields, sender)
--      if fields.connect and not fields.quit then
         local minp = minetest.string_to_pos(fields.minp)
         local maxp = minetest.string_to_pos(fields.maxp)
         if is_valid_pos(minp) and is_valid_pos(maxp) then
            local node = minetest.get_node(pos)
            minetest.remove_node(pos)
            local positions = {}
            local parent = minetest.add_entity(pos, "meshnode:ctrl")
            if parent then
               for x = minp.x, maxp.x, get_step(minp.x, maxp.x) do
                  for y = minp.y, maxp.y, get_step(minp.y, maxp.y) do
                     for z = minp.z, maxp.z, get_step(minp.z, maxp.z) do
                        local node_pos = vector.add(pos, {x=x, y=y, z=z})
                        meshnode:create(node_pos, parent)
                        table.insert(positions, node_pos)
                     end
                  end
               end
               for _, pos in pairs(positions) do
                  minetest.remove_node(pos)
               end
            end
         else
            local name = sender:get_player_name()
            minetest.chat_send_player(name, "Invalid Position!")
         end
--      end
   end,



Thanks for the help!
AMMOnym wrote:
Esteban wrote:Is this mod compatible with 4.10? I tried to use it, but nothing happens. I set the minp and maxp and then I click the generate entity, but nothing happens.

Same for me. I made a modpack like Space Engineers and my first ship couldnt fly.


Dude, we think the same! I was playing with the moon realm mod and I was going to use this mod to make ships! xD
 

User avatar
AMMOnym
Member
 
Posts: 682
Joined: Tue Sep 10, 2013 14:18
IRC: AMMOnym
In-game: AMMOnym

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by AMMOnym » Wed Sep 03, 2014 14:18

XD. I was playing with asteroids, skybox, moreblocks, moreores, travelnet, Mgv7(Like moon, where i was flying for mining ores), and a lot of other mods.
 

RebelD
Member
 
Posts: 30
Joined: Mon Jul 07, 2014 21:34
In-game: Dielan

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by RebelD » Sun Sep 21, 2014 22:28

I got a problem, when I relog the ship has disappeared. Any reason to why it disappears or how I can avoid that?
 

User avatar
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Esteban » Sun Sep 21, 2014 23:02

RebelD wrote:I got a problem, when I relog the ship has disappeared. Any reason to why it disappears or how I can avoid that?


stu wrote:Limitations

Models will disappear or become detached from the controller if they are
unloaded. This can cause the server to warn against excessive objects and
destroy them accordingly.

I have tried a number of ways the get the models to persist after a server
restart but so far all of my efforts have been thwarted by minetest's buggy
object management system. I also wanted to be able to attach 'passengers'
to the entities, however, this has not been possible for the same reason.
 

RebelD
Member
 
Posts: 30
Joined: Mon Jul 07, 2014 21:34
In-game: Dielan

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by RebelD » Mon Sep 22, 2014 00:19

Esteban wrote:
RebelD wrote:I got a problem, when I relog the ship has disappeared. Any reason to why it disappears or how I can avoid that?


stu wrote:Limitations

Models will disappear or become detached from the controller if they are
unloaded. This can cause the server to warn against excessive objects and
destroy them accordingly.

I have tried a number of ways the get the models to persist after a server
restart but so far all of my efforts have been thwarted by minetest's buggy
object management system. I also wanted to be able to attach 'passengers'
to the entities, however, this has not been possible for the same reason.

Ah sorry :/
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by ABJ » Mon May 25, 2015 13:30

Awesome mod, but the *** is such a shame. I would have so liked to keep my ships.
 

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by lightonflux » Mon Jun 01, 2015 19:21

Would it be possible to add the code from https://bitbucket.org/neko259/flyingships which looks at connected nodes and then automatically configures it? That way you don't have to use the relative coordinates.

Edit: Also a limit of size would be nice. I dead locked a MT session with -20,-20,-20/20,20,20.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by ABJ » Tue Jun 02, 2015 02:47

From what I seem to understand from your post, a size limit is necessary for THAT idea, or you could have the WHOLE WORLD flying XD.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Hybrid Dog » Fri Jun 05, 2015 18:03

nice mod
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by ABJ » Fri Jun 05, 2015 18:22

Nice mod but not very smooth movement.
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Fri Jun 05, 2015 18:26

Hybrid Dog wrote:nice mod

Thanks, but I think the name may now be a bit confusing with the mesh node drawtype :/

Regarding persistence after unload, I do have some ideas but I need to do some tests. Saving the entities is easy enough, it's re-attaching them that is the problem, especially if the model is only partially unloaded.
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Fri Jun 05, 2015 18:29

ABJ wrote:Nice mod but not very smooth movement.

I've not tried it with the current version of minetest but it used to pretty smooth irrc, though it was made deliberately quite slow.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Hybrid Dog » Fri Jun 05, 2015 18:50

l did a few changes that nodes which aren't visible don't become added to the objects chunk to reduce lag:
Image
Image
Of course only the normal nodes are affected.
l think l'll make more invisible.
Attachments
screenshot_20150605_204443.png
screenshot_20150605_204443.png (1.17 MiB) Viewed 3265 times
screenshot_20150605_204439.png
screenshot_20150605_204439.png (431.01 KiB) Viewed 3265 times
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Fri Jun 05, 2015 19:17

Hybrid Dog wrote:l did a few changes that nodes which aren't visible don't become added to the objects chunk to reduce lag:


That would be a very nice feature, although in future I may add the possibility to transform the entities back into nodes (metadata intact) once I have achieved reliable persistence, that is.

Hybrid Dog wrote:Of course only the normal nodes are affected.
l think l'll make more invisible.


I see you have this added to your fork, I will check it out, please submit a pull request when you are happy it is working.

PS. Nice screenshot btw.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Hybrid Dog » Fri Jun 05, 2015 19:38

ok, somehow textures[1] is not always the top texture with cube visual, so l think l can't hide the textures facing each other that you can only see them when you stuck in one of the two objects.
lf you want to save the entity chunk, you would need to use staticdata l think. And there's still the forcing deleting objects if there are too much problem.
What do you think about making less and bigger entities instead of many small ones if they have the same textures? l did it for my nodebox_creator mod, else the items would become deleted the whole time because 16*16*16 are many entities. viewtopic.php?f=9&t=10274
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Fri Jun 12, 2015 21:02

I have been tinkering with a new idea to keep your structures alive following an unload, restart or even a /clearobjects
It is a wee bit overkill (imo) though necessary to overcome the inadequacies of minetest's entity system.

Image

If you are interested in testsing then please checkout the 'persistent' branch of the repo.

https://github.com/stujones11/meshnode/tree/persistent

Not recommended for servers at this stage, expect to find bugs but do please report them.

Cheers
 

User avatar
Samson1
Member
 
Posts: 92
Joined: Wed Apr 01, 2015 19:41
IRC: Samson1
In-game: Samson1

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Samson1 » Thu Jul 16, 2015 14:47

When I die my ship gets deleted:(
MT name: Samson1

MC name: MoJo4000
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by orwell » Sat Jan 02, 2016 12:26

stu wrote:Limitations

Models will disappear or become detached from the controller if they are
unloaded. This can cause the server to warn against excessive objects and
destroy them accordingly.

I have tried a number of ways the get the models to persist after a server
restart but so far all of my efforts have been thwarted by minetest's buggy
object management system. I also wanted to be able to attach 'passengers'
to the entities, however, this has not been possible for the same reason.


Ehm, yes.
Have you tried to refuse using minetest's "buggy object management" and use tables and a globalstep instead? (and make the entities just "puppets")

Another thing that would be nice: Offer a way to mount airships back into the node grid. This way, you could save chest invs along with the entities and make them accessable again by remounting the ship into the node grid, so it is a normal chest again. This also would fix the limitations above.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Sat Jan 02, 2016 15:12

orwell wrote:Ehm, yes.
Have you tried to refuse using minetest's "buggy object management" and use tables and a globalstep instead? (and make the entities just "puppets")

Indeed, that is pretty much what the 'persistent' branch does (see above)

orwell wrote:Another thing that would be nice: Offer a way to mount airships back into the node grid. This way, you could save chest invs along with the entities and make them accessable again by remounting the ship into the node grid, so it is a normal chest again. This also would fix the limitations above.

That is something I had planned to do eventually, however, I don't really want to spend too much time on this as it is never going to be perfect, while true 'voxel area entities' are on the core development roadmap.
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by orwell » Sat Jan 02, 2016 16:07

stu wrote:
orwell wrote:Ehm, yes.
Have you tried to refuse using minetest's "buggy object management" and use tables and a globalstep instead? (and make the entities just "puppets")

Indeed, that is pretty much what the 'persistent' branch does (see above)

I didn't check it out.

stu wrote:...while true 'voxel area entities' are on the core development roadmap.

Remember, Soon(TM) is a registered trademark in minetest.
But that would be really nice...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
euroclydon
New member
 
Posts: 5
Joined: Fri Jun 10, 2016 18:28

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by euroclydon » Fri Jun 10, 2016 18:53

Hello stu.

I just want to tell you that your "persistent" branch works very well.

I edited the meshnode.lua file so that:

MESHNODE_MAX_SPEED = 4
MESHNODE_MAX_LIFT = 2

Click image for larger.

Raiding a Pyramid...

Image

Returning to "Spaceport"...

Image
 

jakab
Member
 
Posts: 41
Joined: Mon Aug 15, 2016 17:19
In-game: jakab

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by jakab » Tue Sep 06, 2016 15:55

whad do i have to write to the 2 blank space ?
i tried the coordinates... but wrong, or not coordinates need to use :P if i set it with -1,-1,-1 and 1,0,1 the block i set, disappears :(
help me pls
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Wed Sep 07, 2016 17:35

euroclydon wrote:Hello stu.

I just want to tell you that your "persistent" branch works very well.

I edited the meshnode.lua file so that:

MESHNODE_MAX_SPEED = 4
MESHNODE_MAX_LIFT = 2

Sorry, I must have missed this post or I would have responded before now.

Thank you for the feedback on the development branch and sharing those excellent screen shots, if you're still around :)

jakab wrote:whad do i have to write to the 2 blank space ?
i tried the coordinates... but wrong, or not coordinates need to use :P if i set it with -1,-1,-1 and 1,0,1 the block i set, disappears :(
help me pls

That seems very strange. Could you possibly post a screenshot of the build before entering those coordinates?

PS. Try starting with something simple like placing the controller on some flat ground and see what happens when you enter those same coords.
 

jakab
Member
 
Posts: 41
Joined: Mon Aug 15, 2016 17:19
In-game: jakab

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by jakab » Thu Sep 08, 2016 16:44

it works a bit, but ...
Attachments
screenshot_20160908_183601.png
another working try :P
screenshot_20160908_183601.png (898.51 KiB) Viewed 3267 times
screenshot_20160908_183515.png
before set
screenshot_20160908_183515.png (908.89 KiB) Viewed 3267 times
screenshot_20160908_183454.png
after set
screenshot_20160908_183454.png (978.66 KiB) Viewed 3267 times
 

User avatar
euroclydon
New member
 
Posts: 5
Joined: Fri Jun 10, 2016 18:28

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by euroclydon » Thu Sep 08, 2016 18:03

stu wrote:Thank you for the feedback on the development branch and sharing those excellent screen shots, if you're still around :)


Not a problem.

I generally don't drink beer at 10:30 in the morning, but when I do it's to come down off the vodka.

I wanted to make some videos, but I don't have a decent video card. I have the software. I'm on Linux so it's free. But let me see what I can do.

I have three of these ships now. I want to make two more larger classes. There's one thing about large ships that they never tell you. When you're exploring, it's hard to find a good parking space. I invariably run into a tree or a cliff. But I also get around using the Travelnet mod.

The vodka doesn't help, but sometimes I think that it does.

This is the "Catatorium". Originally its purpose was to serve as a shelter for endangered cats, e.g. in or around the water, or cliffs. Eventually it got out of hand and I found myself picking up cats wherever I went.

Image

Image

Image

Image
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by krokoschlange » Sat Sep 17, 2016 12:55

The persistant branch works well but:
since fences are drawn with nodebox drawtype and glass as glasslike_framed_optional
you cant use glass (which is bad because i need windows) and fences...
 

Nyarg
Member
 
Posts: 144
Joined: Sun May 15, 2016 04:32

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by Nyarg » Sun Dec 04, 2016 00:30

Why do airShip disappear after game reloading ?

Ohh, I found answer, sorry (
+ Spoiler

But here still stay but displacement lost anyway.
+ Spoiler

So may be something like meta may fix it )
I am a noob. still yet. Not so noob ) [vml] WIP
"My english isn't well" I know. I'm sorry )
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.2.0] [meshnode]

by stu » Sun Dec 04, 2016 21:16

krokoschlange wrote:The persistant branch works well but:
since fences are drawn with nodebox drawtype and glass as glasslike_framed_optional
you cant use glass (which is bad because i need windows) and fences...

I understand that a lot has changed since the release of this mod so I am currently working on a re-write which will hopefully resolve many of these issues. I am hoping to have a new version ready for the upcoming version 0.4.15 engine so watch out for updates, I will add a new branch to the repo as soon as it is ready for testing
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [Mod] Meshnodes [0.3.0] [meshnode]

by stu » Sat Dec 31, 2016 18:02

Mod Update: Version 0.3.0

As promised, I have more or less re-written this mod in an attempt to fix some it’s shortcomings and while it still has many limitations, I think it should at least be a bit more fun to play with and may even be potentially useful as a building tool.

New features

  • Made objects persistent, models should now automatically regenerate. (experimental)
  • Objects can now be restored to nodes with full rotation and metadata preserved.
  • Added a special ‘glue’ tool for more intuitive model connection.
  • Updated fences and added support for default xpanes and walls.
  • Improved configuration, moved global configs to meshnode namespace.
  • Added basic operator animations sit/stand.
  • Improved models, use .obj and .b3d instead of directx.
  • Added support for internationalisation. [intllib]

Since this is a re-write that tackles some pretty tricky stuff, there is a good chance you will find bugs. If you do then please report them here or via the github issue tracker.

Hint, it would be really cool if someone were to do a demo video for this, I may eventually get round to doing so myself but I suck at making videos and do not have a youtube account.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 22 guests

cron