[Mod] Pontoons for construction on liquid [0.5] [pontoons]

FaceDeer
Member
 
Posts: 152
Joined: Sat Aug 29, 2015 19:01

[Mod] Pontoons for construction on liquid [0.5] [pontoons]

by FaceDeer » Sun Feb 12, 2017 20:27

Image

This mod adds some simple building blocks that can be placed on top of liquid, making it easier to construct things on a body of water without needing to first build a piling from the ground underneath. There are both wood pontoons and steel pontoons (for building your floating lava-castle on).

It also allows existing wood and tree blocks to have this property added to them. Since a wood block is equivalent to a wood pontoon, wood pontoons are disabled by default. See the mod's settings under "advanced settings" for enabling wood pontoons.

Links

Last edited by FaceDeer on Sun Feb 12, 2017 20:53, edited 2 times in total.
 

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by octacian » Sun Feb 12, 2017 20:31

Nice idea! Screenshot?
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

FaceDeer
Member
 
Posts: 152
Joined: Sat Aug 29, 2015 19:01

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by FaceDeer » Sun Feb 12, 2017 20:43

octacian wrote:Nice idea! Screenshot?


Slipped my mind, got one up now.
 

User avatar
Chibi ghost
Member
 
Posts: 161
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by Chibi ghost » Sun Feb 12, 2017 21:03

interesting idea
 

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

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by texmex » Mon Feb 13, 2017 10:06

Hey FaceDeer, great to see this came into being!

I like how you didn't go with any leather dependancy and stuck to default blocks. Also great that you diversified it for lava use as well, didn't even think of that!

The mod should be considered for inclusion in mt_game when it's finished as it opens up richer gameplay at sea, in combination with the water bubble bug hopefully becoming solved.

Is the 1.0 milestone the same as the "enforce buoyancy" feature?

Kudos!
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

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

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by azekill_DIABLO » Mon Feb 13, 2017 18:39

it's a must for building a floting city
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 !!!
 

FaceDeer
Member
 
Posts: 152
Joined: Sat Aug 29, 2015 19:01

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by FaceDeer » Mon Feb 13, 2017 18:54

texmex wrote:Hey FaceDeer, great to see this came into being!


No problem. Initially I was kind of at a loss for how to make this work, but then I had a head-slap moment: buckets can be used on water blocks, I could just look at how those do it. Turns out it's really simple. :) The bulk of this mod's work is just overriding all the node definitions belonging to "wood" and "tree" groups to add "liquids_pointable = true" to them. The specialized pontoon blocks are almost superfluous after doing that (aside from the lava-proof one, of course)

Note that this mod should work for any other wood and tree group blocks as well, just add them to the dependencies.txt to ensure that they get loaded before this mod does (otherwise it won't have the opportunity to override them). I added [moretrees], but didn't go on an extensive search looking for other tree-related mods so if anyone knows of some they'd like this mod to support just let me know.

texmex wrote:Is the 1.0 milestone the same as the "enforce buoyancy" feature?


If you mean the thing we talked about in PM about pontoons rising to the surface and dragging the stuff built on them up with them, it's probably going to be a while before I get to it. Moving arrays of nodes around is hard work and for Minetest it'll be a bit of an edge case since water is normally pretty static (though I've done what I can to fix that :)). I mainly just called this version 0.5 because since it's the initial commit I'm sure there are plenty of unknown bugs and minor missing features that people are going to tell me about now that it's posted.
 

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

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by texmex » Tue Feb 14, 2017 09:55

FaceDeer wrote:No problem. Initially I was kind of at a loss for how to make this work, but then I had a head-slap moment: buckets can be used on water blocks, I could just look at how those do it. Turns out it's really simple. :) The bulk of this mod's work is just overriding all the node definitions belonging to "wood" and "tree" groups to add "liquids_pointable = true" to them. The specialized pontoon blocks are almost superfluous after doing that (aside from the lava-proof one, of course)

I feel bad for not pointing that out now, because I noticed the special treatment of buckets, boats and such in relation to liquids really early on. Sorry! :)

FaceDeer wrote:If you mean the thing we talked about in PM about pontoons rising to the surface and dragging the stuff built on them up with them, it's probably going to be a while before I get to it. Moving arrays of nodes around is hard work and for Minetest it'll be a bit of an edge case since water is normally pretty static (though I've done what I can to fix that :)). I mainly just called this version 0.5 because since it's the initial commit I'm sure there are plenty of unknown bugs and minor missing features that people are going to tell me about now that it's posted.

Actually I wouldn't dare to dream that big for Minetest. My aim was the first step really, that the buoyant block rises to the surface if placed underwater with nothing other than water above it.

If another solid block is placed above half way to the surface it and then removed the realistic thing for it to do would be to continue to rise, but I know for that to happen a whole other taxing piece of code needs to run so that part is not justified in my opinion.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

FaceDeer
Member
 
Posts: 152
Joined: Sat Aug 29, 2015 19:01

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by FaceDeer » Wed Feb 15, 2017 00:09

texmex wrote:Actually I wouldn't dare to dream that big for Minetest. My aim was the first step really, that the buoyant block rises to the surface if placed underwater with nothing other than water above it.

If another solid block is placed above half way to the surface it and then removed the realistic thing for it to do would be to continue to rise, but I know for that to happen a whole other taxing piece of code needs to run so that part is not justified in my opinion.


Oh, that. :) Yeah, that part isn't hard. I'll look into setting that up tonight. I'll probably want that behaviour to be pontoon-specific rather than applying to wood or trees, though, in case people want to build pilings or ocean-bottom wooden structures.
 

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

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by texmex » Wed Feb 15, 2017 00:40

FaceDeer wrote:Oh, that. :) Yeah, that part isn't hard. I'll look into setting that up tonight. I'll probably want that behaviour to be pontoon-specific rather than applying to wood or trees, though, in case people want to build pilings or ocean-bottom wooden structures.

Yes, only for poontoons, or people will have to build bottom-up :)

I've noticed that falling nodes falls smoothly and not in block-sized steps. It would be so cool if this could be reversed for floatables, but I'm going to guess that's a hardcoded engine feature specifically written for falling blocks. Anyway, a non-smooth movement is fine too of course.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

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

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by texmex » Wed Feb 15, 2017 00:43

Just had another of those ideas… Wouldn't it add to the experience to include hollow-sounding punch sounds in the mod? One for wood, another one for metal?
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

FaceDeer
Member
 
Posts: 152
Joined: Sat Aug 29, 2015 19:01

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by FaceDeer » Wed Feb 15, 2017 00:52

texmex wrote:I've noticed that falling nodes falls smoothly and not in block-sized steps. It would be so cool if this could be reversed for floatables, but I'm going to guess that's a hardcoded engine feature specifically written for falling blocks. Anyway, a non-smooth movement is fine too of course.


Actually, it's not hard-coded. Falling blocks turn themselves into entities, which move smoothly and then turn back into nodes again once they hit ground. I've never done the coding for that myself but I remember looking over some of it and it seemed simple enough, at least for nodes that don't have fancy metadata or inventories to worry about.

Before you ask, redoing Digtron to use entities like that would be rather a lot more complicated. :) There are a few mods I've seen out there that allow groups of nodes to move by fusing them together into one big entity, but the resulting object isn't capable of complex operations. It's just a big inert monolithic thing that looks like it's made out of a bunch of nodes.

I'll look into something like that for pontoons, though. If it works like I think it should the pontoon block would not actually be *built* when you tried placing it underwater, it would just spawn an entity that would move upward until it hit surface or obstruction and turned into the node at that spot.

As for sounds, I just grabbed the wood and metal defaults as an expeditious way to get the mod rolled out. If you know of a good freely-licensed hollow thud sound I could swap that in.
 

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

Re: [Mod] Pontoons for construction on liquid [0.5] [pontoon

by texmex » Wed Feb 15, 2017 01:07

FaceDeer wrote:Actually, it's not hard-coded. Falling blocks turn themselves into entities, which move smoothly and then turn back into nodes again once they hit ground. I've never done the coding for that myself but I remember looking over some of it and it seemed simple enough, at least for nodes that don't have fancy metadata or inventories to worry about.

That is good news then! Sweet…

FaceDeer wrote:Before you ask, redoing Digtron to use entities like that would be rather a lot more complicated. :) There are a few mods I've seen out there that allow groups of nodes to move by fusing them together into one big entity, but the resulting object isn't capable of complex operations. It's just a big inert monolithic thing that looks like it's made out of a bunch of nodes.

Wouldn't dream of it :D Mainly because the nature of that masterpiece of a beast is and should be jerky. I've also tried the meshnode mod, it seems… hacky.

FaceDeer wrote:I'll look into something like that for pontoons, though. If it works like I think it should the pontoon block would not actually be *built* when you tried placing it underwater, it would just spawn an entity that would move upward until it hit surface or obstruction and turned into the node at that spot.

That will be 100% fulfilling of that particular idea for me.

FaceDeer wrote:As for sounds, I just grabbed the wood and metal defaults as an expeditious way to get the mod rolled out. If you know of a good freely-licensed hollow thud sound I could swap that in.

I can look for it, or experiment with those sounds and audio filters. Would be cool to build upon the default ones.
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

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

Enforcing buoyancy

by texmex » Sun Mar 05, 2017 15:47

Hey FaceDeer! I've tried the falling_extras mod and it could contain valuable code for forcing pontoons to float to the surface on placement.

I managed to create negative gravity with the mod simply by modifying this line as Wuzzy suggested was possible.

Here's how it behaved when gravity was negated.
+ Spoiler
I spend all my days going down to the mines. Under the ground where the sun never shines. Breaking my back I put heat in your house. I’ve got the roar of a digtron, the breath of a mouse.
 

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

Re: Enforcing buoyancy

by TumeniNodes » Sun Mar 05, 2017 17:07

texmex wrote:Hey FaceDeer! I've tried the falling_extras mod and it could contain valuable code for forcing pontoons to float to the surface on placement.

I managed to create negative gravity with the mod simply by modifying this line as Wuzzy suggested was possible.

Here's how it behaved when gravity was negated.
+ Spoiler


heh..., purty cool! Falling In Reverse :P
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] Pontoons for construction on liquid [0.5] [pontoon

by azekill_DIABLO » Wed Mar 08, 2017 15:35

so cool!
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 !!!
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 50 guests

cron