[Mod] Meshnodes [0.3.0] [meshnode]

ch98
Member
Posts: 463
Joined: Wed Jan 02, 2013 06:14

by ch98 » Post

It will be good too if each spaceship/airplane will have hp depending on how much of what material is used. Also, is it possible to put chests or mesecon stuff on here that works?
I have stopped playing minetest, and may not come back to it again. I would like to thank everyone that made the amazing time I had playing it. This account is not in use anymore, and the email has been linked to a unused account. If any administrator reading this has time, feel free to delete my account. Thank you very much for the great experience.

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

Can you make vehicle classes ?

Air, land and sea ?

Vehicle movement would be constrained based on the classes, airplanes would fly without having contact with the ground, naval vehicles would be unable to fly or leave sea etc...

1704626
Member
Posts: 87
Joined: Thu Jan 02, 2014 22:52
Location: mushroom biome

by 1704626 » Post

TRANSFORMERS MORE THAN MEETS THE EYE
Just Call Me Numbers

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

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.

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

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

by AMMOnym » Post

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.

User avatar
Casimir
Member
Posts: 1207
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

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

by Casimir » Post

Open init.lua and comment out both lines 152 and 176. So it looks like the following.

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: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

Casimir wrote:Open init.lua and comment out both lines 152 and 176. So it looks like the following.

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
Location: Slovakia

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

by AMMOnym » Post

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 » Post

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: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

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.
Scan avatar or click here to read a Message of Hope (PDF)

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

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

by RebelD » Post

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: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

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
Location: Germany

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

by lightonflux » Post

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: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2835
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

nice mod

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

Nice mod but not very smooth movement.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2835
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

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 1023 times
screenshot_20150605_204439.png
screenshot_20150605_204439.png (431.01 KiB) Viewed 1023 times

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

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.

User avatar
Hybrid Dog
Member
Posts: 2835
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

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: 95
Joined: Wed Apr 01, 2015 19:41
GitHub: MoJo4000
IRC: Samson1
In-game: Samson1

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

by Samson1 » Post

When I die my ship gets deleted:(

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

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

by orwell » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests