Water Features

For builders to discuss and ask building questions.
Post Reply
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Water Features

Post by Harroghty » Sat Jul 18, 2015 8:48 pm

If you would like to add a water feature from which PCs can drink then you should feel free to use i403 to do so. This is an invisible, hidden object called "the water" (so PCs will see "You drink water from the water.").

I welcome any suggestions to improve these. Right now they are only employed along the Starwater River in Cormyr's King's Forest (wilds58.are).

Correction, if you cannot see the water then you see: You drink water from something. Should these be visible or would that be distracting?
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Xryon
Sword Master
Sword Master
Posts: 233
Joined: Thu Aug 25, 2005 5:24 am
Location: Waterdeep

Re: Water Features

Post by Xryon » Sun Jul 19, 2015 2:07 am

Might be worth it to just do an intercept prog with a custom echo and mpmadd the thirst value. Bypasses the worry over 'something's.
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Water Features

Post by Harroghty » Tue Jul 21, 2015 1:55 am

This addresses that aspect, but it becomes more hairy with vessels. You can check to see if the PC has a DRINKCON equipped, but to work filling a vessel from the supply end is a little hit or miss. Still tinkering.

Code: Select all

>intercept_prog drink
if stringprefix($1) == river
or stringprefix($1) == water
  mpmadd $n thirst 10
  mpechoat $n {70}You drink water from {60}the river{70}.
  mpechoaround $n {70}@N drinks water from {60}the river{70}.
else
  mpunintercept
endif
~
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Xryon
Sword Master
Sword Master
Posts: 233
Joined: Thu Aug 25, 2005 5:24 am
Location: Waterdeep

Re: Water Features

Post by Xryon » Tue Jul 21, 2015 11:13 pm

Do builders have access to sector modifications on our codebase? This is probably something best applied to all (fresh) water tiles... There's a lot of watery rooms scattered about.

I'm responding via phone, and can't easily access the lessons, but would something like this work? (Excuse formatting for same reason)

Code: Select all

~intercept_prog fill
if objtype($O) == [drink_con_value]
  mpintercept
  [echoes for filling]
  mpset objval[fill_value] $O on $n [full value]
else
  [echo that you can't fill that]
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Water Features

Post by Harroghty » Tue Jul 21, 2015 11:24 pm

You can identify that they have a suitable container, but you cannot then target that specific container. You can only mposet $o and be specific if the code is on the object, and then you have objects potentially filling from non-potable sources (not every water_no_swim room is potable).
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Post Reply