[Question]Changing liquid properties

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

[Question]Changing liquid properties

by ABJ » Fri May 08, 2015 14:52

How do I change liquid properties such as viscosity, range etc? I've tried some settings on minetest.conf;it seems to flow more but not nearly as much as I expected. Please tell me the variables I need to modify?
 

User avatar
Mg
Member
 
Posts: 86
Joined: Sun Mar 02, 2014 20:49
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg

Re: [Question]Changing liquid properties

by Mg » Fri May 08, 2015 18:17

For these parameters, you need to modify the code contained in minetest_game/mods/default/nodes.lua
There used to be a global variable for water and lava viscosity, but now you have to edit the code of their registration :
https://github.com/minetest/minetest_ga ... s.lua#L911
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
liquid_viscosity = 1


You have to do it for both source and flowing, on every node you want to change.
The radius of flow is a builtin parameter and I don't think it should be increased nor dicreased (knowing that water's parameter for the flowing drawtype is limited).
 

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

Re: [Question]Changing liquid properties

by ABJ » Sat May 09, 2015 06:25

What do you mean by "builtin"? Is it not to be found?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [Question]Changing liquid properties

by Krock » Sat May 09, 2015 07:04

Mg wrote:The radius of flow is a builtin parameter and I don't think it should be increased nor dicreased (knowing that water's parameter for the flowing drawtype is limited).

You can add the key "liquid_range" with any value between 1 and 8.
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
liquid_range = 8,

https://github.com/minetest/minetest/bl ... .txt#L3012
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron