[Mod] Nautilus [nautilus]

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

[Mod] Nautilus [nautilus]

by apercy » Post

Hello!

This is the "Nautilus", a grandchild mod from "Sailing Kit" (mod by TheTermos). It's water dynamics comes from Sailing Kit. So it depends on mobkit. And It dependes on the biofuel mod for fuel making. If it starts anchored, so press aux key (special key - maybe E in your keyboard) to remove anchor. With keyboard you can move the nautilus. When you press sneak, it dives, when you press jump, it emerges. And you can set anchor again by pressing E, but it only works when the Nautilus is near completely stopped (when the anchor is sucessfull, you receive a message on chat).

It can be painted using dye of any colour you want, you must punch the hatch with the dye.

It uses biofuel. With biofuel item selected, you punch the hatch (when you are attached to the submarine) so the fuel gauge will increase.

You can shoot light nodes when pressing W and S together, it use a bit of biofuel, at max range of 20 nodes

Controls overview:
(note: all click events must be done against the hatch, above your head)

- Right click: enter in/get off the submarine
- Left click (with biofuel): add fuel to submarine
- E: drops/get the anchor (but the submarine must be near stoped)
- Jump: go up/emerges
- Sneak: go down/dives
- Backward: go back
- Forward: go foward
- Left/right: Turn to left/right
- Forward and Backward together: shots light 20 blocks ahead (where the user is pointing)


https://github.com/APercy/nautilus

Biofuel mod can be found here: https://github.com/APercy/minetest_biofuel

Image

Licences:
It uses some code from Sailing Kit (by TheTermos)
License of source code: MIT (see file LICENSE)
License of media:
collision.ogg by APercy. See License file
submarine model by APercy. See License file

Credits:
TheTermos by the sailing kit code used.

Thank you Gundul for some ideas and the first tests ;)
Attachments
screenshot_20200628_184744.png
screenshot_20200628_184744.png (741.18 KiB) Viewed 2090 times
Last edited by apercy on Wed May 26, 2021 13:36, edited 2 times in total.

u18398

Re: [Mod] Nautilus [nautilus]

by u18398 » Post

This is fun to use once you figured out how to insert the fuel and how to enter and leave the vessel. The player even can interact with everything out of the submarine. Better do not use in shallow waters, submarines are made for the deep :)

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Nautilus [nautilus]

by runs » Post

this cool

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Now we have lights!!!! Press up and down simultaneously (W and S in keyboard) and a 10 seconds light will be shot. It uses a very small amount of fuel.

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Reduced now the amount of lights generated

u18398

Re: [Mod] Nautilus [nautilus]

by u18398 » Post

That works very good so far. The only thing is that the nodetimers seem not always to work. After some diving with
lights a few lightnodes remain in the sea and are not removed. Maybe you need to introduce a lbm to remove old
light nodes ? I do not know if using minetest.after works more reliently removing the once set nodes.

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Gundul wrote:
Sun Jul 05, 2020 07:46
That works very good so far. The only thing is that the nodetimers seem not always to work. After some diving with
lights a few lightnodes remain in the sea and are not removed. Maybe you need to introduce a lbm to remove old
light nodes ? I do not know if using minetest.after works more reliently removing the once set nodes.
time to research again =)

PS: I did a test with lbm. Did not work, cause I found that the area_light was affected, like some type of garbage. Time to research about voxel manip

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

to prevent I removed the random nodes generation, now it puts only one light. I believe the bug was caused by an overlap of nodes.

User avatar
captenfalkonion
Member
Posts: 41
Joined: Thu Jun 08, 2017 17:06
In-game: captefalkonion
Location: Germany

Re: [Mod] Nautilus [nautilus]

by captenfalkonion » Post

Cold someone say me for witch version this mod is made for 0.4.x or for 5.x

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

captenfalkonion wrote:
Sun Jul 05, 2020 12:15
Cold someone say me for witch version this mod is made for 0.4.x or for 5.x
5.2

User avatar
captenfalkonion
Member
Posts: 41
Joined: Thu Jun 08, 2017 17:06
In-game: captefalkonion
Location: Germany

Re: [Mod] Nautilus [nautilus]

by captenfalkonion » Post

thanks

u18398

Re: [Mod] Nautilus [nautilus]

by u18398 » Post

apercy wrote:
Sun Jul 05, 2020 11:17
Gundul wrote:
Sun Jul 05, 2020 07:46
That works very good so far. The only thing is that the nodetimers seem not always to work. After some diving with
lights a few lightnodes remain in the sea and are not removed. Maybe you need to introduce a lbm to remove old
light nodes ? I do not know if using minetest.after works more reliently removing the once set nodes.
time to research again =)

PS: I did a test with lbm. Did not work, cause I found that the area_light was affected, like some type of garbage. Time to research about voxel manip
I do not think that it is garbage. flare gun from fun_tools mod has the same problem, but even bigger there. The light nodes, no matter yours or fun_tool's, can be removed with WorldEdit and the problem is solved again.So a lbm should work as long as "run_always = true". But I did not test yet for myself.

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Gundul wrote:
Sun Jul 05, 2020 15:47
apercy wrote:
Sun Jul 05, 2020 11:17
Gundul wrote:
Sun Jul 05, 2020 07:46
That works very good so far. The only thing is that the nodetimers seem not always to work. After some diving with
lights a few lightnodes remain in the sea and are not removed. Maybe you need to introduce a lbm to remove old
light nodes ? I do not know if using minetest.after works more reliently removing the once set nodes.
time to research again =)

PS: I did a test with lbm. Did not work, cause I found that the area_light was affected, like some type of garbage. Time to research about voxel manip
I do not think that it is garbage. flare gun from fun_tools mod has the same problem, but even bigger there. The light nodes, no matter yours or fun_tool's, can be removed with WorldEdit and the problem is solved again.So a lbm should work as long as "run_always = true". But I did not test yet for myself.
ps: I left the lbm in the mod, changing the light node to air (The water will claim its realm), but i'm skeptical of the utility, but it's there for the relief of conscience =)

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

removed lbm after it crashed the ZT

u18398

Re: [Mod] Nautilus [nautilus]

by u18398 » Post

apercy wrote:
Sun Jul 05, 2020 19:55
removed lbm after it crashed the ZT
sry but your lbm definition was wrong :)

try this and it works, it is online on ZT (ZombieTest) now.

Code: Select all

minetest.register_lbm({                            -- this is to remove old bright water nodes after server crash etc
	name = "nautilus:delete_lights",
	run_at_every_load = true,
		nodenames = {"nautilus:water_light"},
		action = function(pos, node)
				minetest.set_node(pos, {name = "default:water_source"})
		end,
	})


User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Gundul wrote:
Mon Jul 06, 2020 16:33
apercy wrote:
Sun Jul 05, 2020 19:55
removed lbm after it crashed the ZT
sry but your lbm definition was wrong :)

try this and it works, it is online on ZT (ZombieTest) now.

Code: Select all

minetest.register_lbm({                            -- this is to remove old bright water nodes after server crash etc
	name = "nautilus:delete_lights",
	run_at_every_load = true,
		nodenames = {"nautilus:water_light"},
		action = function(pos, node)
				minetest.set_node(pos, {name = "default:water_source"})
		end,
	})

commited!!!! Thank you very much!

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Improved: now it supports Lokrates biofuel mod

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

fixed bad reference to function in refueling

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

Forward max speed increased today

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

SFENCE improvements merged to master branch

revevil
Member
Posts: 49
Joined: Tue May 14, 2019 03:11

Re: [Mod] Nautilus [nautilus]

by revevil » Post

REALLY cool mod! I'm using it now, but I wanted to ask if there is any way to pick it up and move it? Also, is there any command to locate it if you lose it?

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

revevil wrote:
Wed May 18, 2022 07:54
REALLY cool mod! I'm using it now, but I wanted to ask if there is any way to pick it up and move it? Also, is there any command to locate it if you lose it?
just destroy it, and it will drop an item. But: you lose the color and fuel.
It don't have any locate command at the moment :)

revevil
Member
Posts: 49
Joined: Tue May 14, 2019 03:11

Re: [Mod] Nautilus [nautilus]

by revevil » Post

apercy wrote:
Wed May 18, 2022 12:12
revevil wrote:
Wed May 18, 2022 07:54
REALLY cool mod! I'm using it now, but I wanted to ask if there is any way to pick it up and move it? Also, is there any command to locate it if you lose it?
just destroy it, and it will drop an item. But: you lose the color and fuel.
It don't have any locate command at the moment :)
Ok thank you! That worked perfectly! And I don't mind losing the paint and the fuel. I just started growing garlic now and I've got so much fuel I don't even know what to do with it! I think I'm also going to try the super duck next.

update: I did it and WOW. I have 2 bases, a land base and an underwater base which are located approximately 2000 meters from each other. So I built the super duck and figured I would fly from one to the other. Fun ride but scary! Almost crashed into the cloudlands! I was looking for somewhere to land up there but did not find a flat enough place. Love how that thing lands on water!

revevil
Member
Posts: 49
Joined: Tue May 14, 2019 03:11

Re: [Mod] Nautilus [nautilus]

by revevil » Post

I just have one more question. For about three days, I've been trying to see if there is a way to make the nautilus resistant to the /clearobjects command. I am only running a single player server, but I use this command to get rid of the excess mobs. Unfortunately, it also deletes the nautilus as well. It would be MUCH easier if the command had a "mobs" argument for mobs only.

The only reason I'm clearing mobs manually is because mobkit, which I'm using, does not have a "clear far away mobs" function. I was thinking maybe something with permissions would work or somehow locking the object. I'm just not sure yet. I was just going to ask if you knew a workaround to let me know. But if I figure it out first, I'll let you know.

User avatar
apercy
Member
Posts: 639
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: [Mod] Nautilus [nautilus]

by apercy » Post

revevil wrote:
Mon May 30, 2022 23:10
I just have one more question. For about three days, I've been trying to see if there is a way to make the nautilus resistant to the /clearobjects command. I am only running a single player server, but I use this command to get rid of the excess mobs. Unfortunately, it also deletes the nautilus as well. It would be MUCH easier if the command had a "mobs" argument for mobs only.

The only reason I'm clearing mobs manually is because mobkit, which I'm using, does not have a "clear far away mobs" function. I was thinking maybe something with permissions would work or somehow locking the object. I'm just not sure yet. I was just going to ask if you knew a workaround to let me know. But if I figure it out first, I'll let you know.
try to make a mod to specifically remove the mobs, like I did with the old version of the animalia.

Code: Select all

local old_entities = {"animalia:cow", "animalia:horse", "animalia:sheep", "animalia:pig", "animalia:chicken", "animalia:turkey", "animalia:cat", "animalia:wolf"}

for _,entity_name in ipairs(old_entities) do
    minetest.register_entity(":"..entity_name, {
        on_activate = function(self, staticdata)
            self.object:remove()
        end,
    })
end

Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 2 guests