Right now it's just an in-game timer linked to a script. I'll give you the script of
thirst, and the
water gourds script.
in game script - called needWater:
function waterLoss()
for i = 1, 4 do
if party:getChampion(i):isAlive() then
findEntity("water"..i):decrement()
end
if findEntity("water"..i):getValue() == 100 then
hudPrint(party:getChampion(i):getName(i).." is thirsty")
elseif findEntity("water"..i):getValue() == 20 then
hudPrint(party:getChampion(i):getName(i).." is really thirsty")
elseif findEntity("water"..i):getValue() == 0 then
hudPrint(party:getChampion(i):getName(i).." is dying of thirst")
elseif findEntity("water"..i):getValue() < 0 then
healthLoss(i)
end
end
end
function waterAdd(n)
local x = findEntity("water"..n):getValue()
w = findEntity("water"..n)
race = party:getChampion(n):getRace()
if race == "Human" then
w:setValue(x+18)
if w:getValue() > 144 then
w:setValue(144)
end
elseif race == "Minotaur" then
w:setValue(x+12)
if w:getValue() > 200 then
w:setValue(200)
end
elseif race == "Lizardman" then
w:setValue(x+37)
if w:getValue() > 250 then
w:setValue(250)
end
elseif race == "Insectoid" then
w:setValue(x+250)
if w:getValue() > 500 then
w:setValue(500)
end
end
end
function healthLoss(i)
party:getChampion(i):modifyStat("health", -(math.random()*10+1))
if findEntity("water"..i):getValue() <-5 then
findEntity("water"..i):setValue(-5)
end
end
function fill(item)
if item == "flask" then
smallFlask = spawn ("water_small_flask")
setMouseItem(smallFlask)
elseif item == "empty_gourd" or
item == "water_gourd" then
smallGourd = spawn ("water_gourd")
setMouseItem(smallGourd)
elseif item == "big_empty_gourd" or
item == "big_water_gourd" then
bigGourd = spawn ("big_water_gourd")
setMouseItem(bigGourd)
end
return false
end
water gourds
cloneObject{
name = "water_small_flask",
baseObject = "water_flask",
uiName = "Small Water Flask",
onUseItem = function(self, champion)
needWater.waterAdd(champion:getOrdinal())
playSound("consume_potion")
return true
end
}
cloneObject{
name = "empty_gourd",
baseObject = "flask",
uiName = "Empty Gourd",
weight = 0.3,
}
cloneObject{
name = "big_empty_gourd",
baseObject = "flask",
uiName = "Empty Big Gourd",
weight = 0.6,
}
defineObject{
name = "big_water_gourd",
uiName = "Big Water Gourd",
class = "Item",
model = "assets/models/items/flask.fbx",
emptyItem = "big_empty_gourd",
gfxIndex = 144,
charges = 12,
weight = 3.6,
onUseItem = function(self, champion)
if self:getCharges() > 1 then
needWater.waterAdd(champion:getOrdinal())
self:setCharges(self:getCharges()-1)
playSound("consume_potion")
return false
else
needWater.waterAdd(champion:getOrdinal())
playSound("consume_potion")
return true
end
end,
}
defineObject{
name = "water_gourd",
uiName = "Water Gourd",
class = "Item",
model = "assets/models/items/flask.fbx",
gfxIndex = 144,
emptyItem = "empty_gourd",
charges = 4,
weight = 1.3,
onUseItem = function(self, champion)
if self:getCharges() > 1 then
needWater.waterAdd(champion:getOrdinal())
self:setCharges(self:getCharges()-1)
playSound("consume_potion")
return false
else
needWater.waterAdd(champion:getOrdinal())
playSound("consume_potion")
return true
end
end,
}
The fountain
defineObject{
name = "water_fountain",
class = "Alcove",
model = "assets/models/env/wall_fountain.fbx",
placement = "wall",
replaceWall = false,
editorIcon = 92,
anchorPos = vec(0, 1, 0),
targetPos = vec(0, 1, 0),
targetSize = vec(0.2, 0.2, 0.2),
baseObject = "dungeon_alcove",
onInsertItem = function (self, item)
local bottle = item.name
if bottle == "flask" or
bottle == "empty_gourd" or
bottle == "water_gourd" or
bottle == "big_empty_gourd" or
bottle == "big_water_gourd" and
self:getItemCount() == 0 then
item:destroy()
needWater.fill(bottle)
end
end,
}
Should have copied everything.
How it works:
Every amount of time, the script decrement by 1 the value of 4 counters (one for each champions).
When the counter reaches the 0, the champion will suffer for dehidration, and will receive damage. The counter will continue to decrement until -5
The
water will increase the value of the counter. The temperature stuff it's just a hidden pressure plate located in front of a stair, wich will modify the timer interval for every floor. If you are good in placing this plate you can also modify the 'temperature' just for certain rooms.
I've also made a racial aspect. Minotaurs will need a lot of
water to quench their
thirst, while a insectoid just need little
water and will be enough for very long.
The only thing I haven't implemented is that touching the fountain will replenish the counters. I'll work on it later thought.
Note: all the values I gave are completly RANDOM, and I'll try to find a good balance for them.
the only thing I know is just Humans can survive 1h in normal condition without drinking...
How to make this works:
Create a timer and rename it thirsty1 - I'm pretty sure you can call this as you wish without modify the scripts. Timer interval = 25. Of course, this timer must be set to running.
Create four counter, and give it the name water1, water2, water3 and water4 with a starting value of whatever you want - 50 for esample -
Connect the timer to the script and run the function waterLoss()
Now your party should suffer
water loss.
Place
water fountain for fill your gourds - you can fill flasks too.
Hope I was clear! Otherwise ask me. If you find any issue or suggestions please tell me!

Also I'm looking for more thirsty description:
Thirsty
Really thirsty
Diyng of
thirst
What else I can use?