[WIP] Water / Thirst Script and Fountain Model Request!

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

[WIP] Water / Thirst Script and Fountain Model Request!

Post by JohnWordsworth »

Hey guys, just felt like posting a 50% complete WIP on a water /thirst system for Grimrock. Currently, there is an additional HUD drawn in onDrawInventory and you can modify the water amount / consume water in a similar fashion to food (script_thirst:consumeWater(championOrdinal, amount), script_thirst:modifyWater(championOrdinal, amount)). Players can drink from water_flasks to replenish their water and I've setup a basic water fountain (code wise) which can be used to replenish water flasks from empty flasks. Different races consume water at different rates and it works on a 'dt' system - so even though the timer is on floor 1, it'll always consume dt*waterConsumedPerSecond every time the timer ticks (be it once a frame, or once a second).
SpoilerShow
Image
However... The Water Fountain model packaged with the game was clearly unfinished (as it was unused in the game), so I find myself asking politely if any of the fantastic modellers here would be able to spare a bit of time to work with me on this 'modders resource' and create a water fountain model or some other realistic source of water. While I could have a stab myself, it undoubtedly won't look as good!

Any help/suggestions greatly appreciated!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by Skuggasveinn »

I will take a step at creating a water fountain
I'm thinking 2 wall fountains for temple and dungeon tileset.
floor placement also for both tilesets

I was thinking of using the daemon head and a bowl, so the water is flowing from the mouth into the bowl, or something like that.
Don't know if that's going to work but if you don't shoot for the stars you will never reach the sky :D

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by Skuggasveinn »

Here as a quick one, I think this will work nicely. (do you like this approach ?)
Image
I like this method really much, to take existing assets and modify them. That why the model never sticks out, it just belongs.
This could be an alcove, that only takes empty bottles or something, and when you use it script it to return to the mouse pointer full water bottle or something like that.

I will UV map it later today and have a couple of versions ready this weekend.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by Neikun »

Welp that pretty much blows my idea out of the water. I was going to use the crown model on to of a slightly hollowed pregenerated blender cylinder.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by Komag »

that preview looks great! I really wouldn't want much HUD though, only something extremely non-intrusive, needs to be small or very translucent, something that pretty much seems invisible unless I want to look and check it real quick. That's my personal preference, I like minimalist HUDs for immersion's sake
Finished Dungeons - complete mods to play
User avatar
Brodie301
Posts: 286
Joined: Sun Apr 08, 2012 6:00 pm
Location: Mississippi, USA

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by Brodie301 »

Different races consume water at different rates and it works on a 'dt' system - so even though the timer is on floor 1, it'll always consume dt*waterConsumedPerSecond every time the timer ticks (be it once a frame, or once a second).
Keep in mind a timer on different floor works slower, I know Komag has a work around but I couldn't find it to link.
The FORCE is with me!!!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by Komag »

Well I used to use a script which always checked whether the party was still on the same floor, and if not then it would destroy the old timer, create a new one on the now-current-floor, and continue the ticking from there.

But I've abandoned that approach as not being accurate enough, in favor of having a full set of master timers, one on every floor, constantly ticking, and whatever script you need to tie into them just checks which floor you're on and only allows that floor's timer to affect the tick.
Finished Dungeons - complete mods to play
User avatar
thomson
Posts: 337
Joined: Thu Sep 13, 2012 9:55 pm
Location: R'lyeh
Contact:

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by thomson »

Looks cool. Are you planning to make the water flowing? If that could be done, it would be rather easy to create 3 types of that fountain: flowing, with standing water and dried up. This would offer many new opportunities. Flowing water is an endless supply. With standing water, you could drink/fill bottles only X times before it dries up.

Also, you may consider to creating a polluted water version. Relatively simple to do - just use colorized textures. This could be used as a plot element in some dungeons - land is cursed and there is almost not drinkable water left.
[MOD] Eye of the Beholder: Waterdeep sewers forum sources; Grimtools (LoG1 -> LoG2 converter) sources
User avatar
LordYig
Posts: 175
Joined: Wed Jul 04, 2012 5:45 pm

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by LordYig »

This is really cool !
Both the Gui part from John and the preview of the model by Skuggasveinn !

IMHO, the flowing water can be done purely with animation.
Particles system AFAIK can't properly simulate this kind of effect.
The only problem here is what kind of object can be used to display the animation continuously...
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Water / Thirst Script and Fountain Model Request!

Post by JohnWordsworth »

@Skuggasveinn: That looks awesome! Very fitting for the LoG setting and very good looking :).

@Komag: The water meter only appears while the inventory is showing, so should not get in the way or break immersion!

@Brodie301: In the timer tick function I use the getStat("play_time") function to get the number of seconds the game has been running and subtract the same statistic from the previous tick. This should mean whether it's 1 frame or 60 since the last tick it doesn't actually matter :).

Code: Select all

local lastTickTime = getStat("play_time");
local somethingsPerSecond = 10;

function onTick() 
  local tickTime = getStat("play_time");
  local dt = tickTime - lastTickTime;
  lastTickTime = tickTime;

  local numberOfSomethingsSinceLastTick = dt * somethingsPerSecond;
end
@Thomson / @lordyig: Re: Animated Water. Have been pondering this! The fountain is currently an alcove, but can really be anything the user can interact with. I think a particle system could be nice for a slow flow / foamy water fountain.

@thomson: Love the idea of empty, partial and unlimited fountain alternatives.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Post Reply