The Water Mod

Lord Zarnox

Founder of the IFTTES
Joined
May 31, 2017
Messages
1,865
Likes
2,413
Points
520
Age
20
Location
Australia
#61
The water doesn't care about the size of blocks or techs. It only cares about the weight. The 5 block sinks because it is heavier than an individual 1 block, even if you have 5 of them attached to each other.

You can make anything float if you add enough light blocks to it, like Venture Straight Brackets. WhitePaw hasn't added density to the mod yet, if he will. It's possible, but he says he's given up on it for now.
On the topic of density, @WhitePaw2002 would you be able to code it so that it calculates density based on the number of cubes a block takes up for in a tech (as in, the space where it prevents other blocks from being placed)?
 
Likes: harpo99999

streak1

Well-Known Member
Joined
Aug 30, 2015
Messages
2,291
Likes
2,136
Points
570
Age
23
Website
steamcommunity.com
#62
On the topic of density, @WhitePaw2002 would you be able to code it so that it calculates density based on the number of cubes a block takes up for in a tech (as in, the space where it prevents other blocks from being placed)?
That's how he was gonna do it. The dimensions of every block is conveniently part of every block's internal name, so it's just a matter of using that and the mass of the block. But he ran into other problems.
 

GamerParrish

Well-Known Member
Joined
Aug 14, 2016
Messages
1,114
Likes
1,085
Points
520
Location
In a Tank Tinkering
#64
I know this is a little complicated. But maybe have a set amount of water in campaign, because its so OP. I met an overpowered invader but all I did was keep lowering and rising doing fall physics damage until they died.

Maybe disable it in certain modes?
 
Likes: Lord Zarnox

WhitePaw2002

The Core of Mods
Joined
Jan 7, 2016
Messages
1,025
Likes
2,361
Points
525
Age
18
Location
North-east America
Website
github.com
#65
I know this is a little complicated. But maybe have a set amount of water in campaign, because its so OP. I met an overpowered invader but all I did was keep lowering and rising doing fall physics damage until they died.

Maybe disable it in certain modes?
The value that it is at originally should be a good value. It's your fault for using it to your advantage.
Disabling it won't be fun, though.
 

Lord Zarnox

Founder of the IFTTES
Joined
May 31, 2017
Messages
1,865
Likes
2,413
Points
520
Age
20
Location
Australia
#66
@WhitePaw2002 Could you add a toggle button to show/hide the slider, as it overlaps with the inventory on some resolutions. Also, could you make the slider more confined, as, while it shows the slider in line with the GSO tab of the inventory, the slider is still effected when the cursor is over the EXP tab. It is quite annoying to be selecting tabs/blocks from the inventory, while also accidentally changing the water level.
As a final request, could you make the water level text display editable, so we can just type in the height, for precision.
 

Sozin

Dog Emperor
Joined
Jul 9, 2016
Messages
641
Likes
1,247
Points
505
#72
How does it calculate bouyancy with the new update?

I'm trying to figure out how to build something that floats that isn't filled with nothing but venture blocks

Hawkeye especially now makes everything made from it sink. No exceptions. Unless for every one hawkeye block you use 3 venture blocks.
 
Last edited:

WhitePaw2002

The Core of Mods
Joined
Jan 7, 2016
Messages
1,025
Likes
2,361
Points
525
Age
18
Location
North-east America
Website
github.com
#73
It uses the number of cells found on the block, and multiplies buoyancy force by the grid-based volume, resulting in constant density. GeoCorp blocks are pretty much as dense as GSO, Venture is probably filled with styrofoam, and Hawkeye probably is hiding some lead in their blocks.
 

Sozin

Dog Emperor
Joined
Jul 9, 2016
Messages
641
Likes
1,247
Points
505
#74
It uses the number of cells found on the block, and multiplies buoyancy force by the grid-based volume, resulting in constant density. GeoCorp blocks are pretty much as dense as GSO, Venture is probably filled with styrofoam, and Hawkeye probably is hiding some lead in their blocks.
how are you calculating bouyancy force in the first place?

Asking because i'd rather not make everything out of venture blocks if i want something to float. Personally, I find venture block color scheme to be rather ugly

Also because density of blocks should not be considered in terms of bouyancy -> actual bouyancy depends only on density *of the liquid*, g, and the volume displaced, unless you want to do hyper complex physics simulations that would lag it out even more.

Unless i'm remembering physics wrong.
 

WhitePaw2002

The Core of Mods
Joined
Jan 7, 2016
Messages
1,025
Likes
2,361
Points
525
Age
18
Location
North-east America
Website
github.com
#75
how are you calculating bouyancy force in the first place?
In the script that is injected, I have created a value that is supposed to mimic water density. When a collider collides with the water collider, that collider is then translated to receiving the rigidbody of the block itself. From then, it determines how much of it is submerged, it's highest point, and it's lowest point. It hen applies forces upon the rigidbody in 2 to 4 different places of that rigidbody. The only way the forces are altered is how submerged it is, and how many units the block takes up. Otherwise the overall force is constant for all similar blocks.

I'm pretty sure that I shared a prototype of the code somewhere on the forum before. If you really want to, you could try to find that.
 
Likes: Sozin

WhitePaw2002

The Core of Mods
Joined
Jan 7, 2016
Messages
1,025
Likes
2,361
Points
525
Age
18
Location
North-east America
Website
github.com
#78
New update as a pre-update update for the upcoming unstable update:

Physics are now run at every cell and cell location instead of just using cell count (more realistic floating hopefully)
One cell blocks still have high-low point dampeners (multi-cell blocks do not.)
Tried adding 'foam' to ground by extending cast shadow startpoint.
Graphic tests to water caused it to render a different color.
Nerfed fan strength after making them too strong.

I will update for the update. Do not worry.

(Better density is possible, but for now, I am certain that buoyancy results are satisfactory enough.)
 

WhitePaw2002

The Core of Mods
Joined
Jan 7, 2016
Messages
1,025
Likes
2,361
Points
525
Age
18
Location
North-east America
Website
github.com
#79
New update as an update for the pre-update update for the already released unstable update (0.7.9.1 update):

When you slide the bar all the way down, the button says Off. I mean, it might not actually be off, but at that level nothing would be affected by it. Unless something goes that far down, in which case, please do let me know.
Changed the clicking area for the slider, meaning less accidental clicks.
Removed unnecessary logging, except what is needed to know that the session is modded.


Also, be cautious when using in MP and stuff. You only process your own stuff, and some people would become confused if they see you floating into space.
 

Sozin

Dog Emperor
Joined
Jul 9, 2016
Messages
641
Likes
1,247
Points
505
#80
Can we get better drift control?

If you’re already doing calculations per block below or at water, could add it relatively easily: buoyancy goes up, gravity goes down, and you could add a predefined drift force in the other four axes pointing inwards. (Proportional to current tech velocity)

Doing that on every block makes most of the “drift” forces cancel out (mostly) with each other, except for the blocks on the outer shell of whatever is floating, which will prevent drifting.

The proportionality to velocity also means the tech stops much sooner without propulsion, and that if a tech happens to be drifting, it will be penalized extremely heavily in the normal axis of the tech, which greatly assists in turning.
 
Likes: JimmyBlether