Attention those using glass nodes as liquid tanks

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Attention those using glass nodes as liquid tanks

by paramat » Post

Image

The 2 drawtypes 'glasslike_framed' and 'glasslike_framed_optional' have the ability to act as hollow tanks of liquid containing a liquid level with 64 levels defined by param2. This has until now been completely undocumented and was missing a 'paramtype2' for that use of param2.

I have now fixed this, but this means that nodes being used as liquid tanks now need to have this line added to their node definitions:

Code: Select all

paramtype2 = "glasslikeliquidlevel",
Attachments
screenshot_20170329_050909.png
screenshot_20170329_050909.png (321.7 KiB) Viewed 1883 times

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

Re: Attention those using glass nodes as liquid tanks

by Jordach » Post

Okay then; how do we use this?

Examples for how to set fill level in 1/16ths.

Examples for settings textures to liquid and glass node.

If you don't tell us how to use it, then it's a useless feature as there's no documentation in useful terms.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Attention those using glass nodes as liquid tanks

by paramat » Post

I added some documentation in my commit https://github.com/minetest/minetest/co ... 5a4b404409

Code: Select all

    paramtype2 == "glasslikeliquidlevel"
    ^ Only valid for "glasslike_framed" or "glasslike_framed_optional" drawtypes.
      param2 defines 64 levels of internal liquid.
      Liquid texture is defined using `special_tiles = {"modname_tilename.png"},`
Param2 values 0 to 63 define 64 levels, so for 1/16ths use values 0, 3, 7, 11 ...
Glass and frame textures are as standard glaslike_framed.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Attention those using glass nodes as liquid tanks

by azekill_DIABLO » Post

wow this is awesome! it looks odd though with solid blue color.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

Re: Attention those using glass nodes as liquid tanks

by Jordach » Post

paramat wrote:I added some documentation in my commit https://github.com/minetest/minetest/co ... 5a4b404409

Code: Select all

    paramtype2 == "glasslikeliquidlevel"
    ^ Only valid for "glasslike_framed" or "glasslike_framed_optional" drawtypes.
      param2 defines 64 levels of internal liquid.
      Liquid texture is defined using `special_tiles = {"modname_tilename.png"},`
Param2 values 0 to 63 define 64 levels, so for 1/16ths use values 0, 3, 7, 11 ...
Glass and frame textures are as standard glaslike_framed.
~~Is it using param2 = 0-63 or 0-127?~~

^ Ignore that.

Absolutely fabulous.

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: Attention those using glass nodes as liquid tanks

by ABJ » Post

Does this mean we can fill a window with water?

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Attention those using glass nodes as liquid tanks

by azekill_DIABLO » Post

Does this mean we can fill mutiple windows like if it was only one big window?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Attention those using glass nodes as liquid tanks

by GreenXenith » Post

azekill_DIABLO wrote:Does this mean we can fill mutiple windows like if it was only one big window?
That is an interesting idea. How does this interact with glass_like_framed?
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Attention those using glass nodes as liquid tanks

by paramat » Post

To be clear, a liquid tank only supports 64 levels, with 64 being 'full', and param2 values 0 to 63 control the level.
So 1/2 full is 31, 1/4 full is 15, 1/8 full is 7 etc.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Attention those using glass nodes as liquid tanks

by paramat » Post

Image

Connected tanks work horizontally only.
Attachments
screenshot_20170403_054707.png
screenshot_20170403_054707.png (566.09 KiB) Viewed 1883 times

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: Attention those using glass nodes as liquid tanks

by ABJ » Post

So how do I place water inside glass? Do I need to edit the mods?

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: Attention those using glass nodes as liquid tanks

by MineYoshi » Post

Good Work developers and you Paramat +10
Have a nice day! :D

wilkgr76
Member
Posts: 832
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Attention those using glass nodes as liquid tanks

by wilkgr76 » Post

Is it possible to change the colour?
N/A

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Attention those using glass nodes as liquid tanks

by maikerumine » Post

Wasn't this an April Fools prank!?
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

wilkgr76
Member
Posts: 832
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Attention those using glass nodes as liquid tanks

by wilkgr76 » Post

It was posted 30 March, so no
N/A

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Attention those using glass nodes as liquid tanks

by ExeterDad » Post

maikerumine wrote:Wasn't this an April Fools prank!?
https://github.com/minetest/minetest/pull/5478

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Attention those using glass nodes as liquid tanks

by paramat » Post

Erm, there are questions in this thread that are all answered in the 3rd post.
Not a prank, it was a feature added by RealBadAngel years ago and never properly documented.

wilkgr76
Member
Posts: 832
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Attention those using glass nodes as liquid tanks

by wilkgr76 » Post

My apologies :)
N/A

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Attention those using glass nodes as liquid tanks

by azekill_DIABLO » Post

this is really nice feature
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Attention those using glass nodes as liquid tanks

by texmex » Post

paramat, is it possible to make connected tanks work vertically too, eventually?

wilkgr76
Member
Posts: 832
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Attention those using glass nodes as liquid tanks

by wilkgr76 » Post

texmex, you can set the bottom ones to full and the top ones to empty, which would result in the same result, I'm guessing
N/A

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: Attention those using glass nodes as liquid tanks

by twoelk » Post

old videos documenting RealBadAngel's experiments with this
Glasslike Framed - Liquid Oxygen tanks
Tanks update

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

Re: Attention those using glass nodes as liquid tanks

by texmex » Post

Thank you both.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: Attention those using glass nodes as liquid tanks

by hajo » Post

paramat wrote: The 2 drawtypes 'glasslike_framed' and 'glasslike_framed_optional' have the ability
to act as hollow tanks of liquid containing a liquid level with 64 levels defined by param2.
Can it use negative numbers too, to reverse the placement,
i.e. put the 'liquid' on top, growing down ?

Then it could be used for a window-shade.

And if the liquid could be placed on the left edge, growing to the right,
we could have an ingame-progressbar.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Attention those using glass nodes as liquid tanks

by paramat » Post

> paramat, is it possible to make connected tanks work vertically too, eventually?

That would be quite complex as you need to search up and down and detect vertical dimensions. Horizontally naturally works with almost no effort.
You could do this with Lua code in a mod setting param2 according to position in the stacked nodes.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests