Page 1 of 1

How to create a food potion

Posted: Thu May 18, 2006 8:33 pm
by Chaos Awakes
I would like to create a food potion in the editor, and for that potion to be created by the player with a spell. I've cloned one of the standard potions and put 1 in the food box of the "bonuses" tab. I've then created a new priest spell with "create new in flask" and told it to create the new food potion I just made.

The thing is, I don't know how it decides how strong to make the potion based on the power rune used to cast the spell. No matter whether the player casts a "power 1" food spell or a "power 6" food spell, I end up with a potion which seems to have virtually no difference to the food bar when consumed.

So...

What do the numbers in the "bonuses" tab of the potion represent? What does 1 mean? If I put in 100, what does that mean? How do these numbers get used in conjunction with the power rune used to create the potion with a spell to arrive at the power of the potion after it's created through casting?

Posted: Thu May 18, 2006 8:46 pm
by Sophia
As far as I can tell, the total power level of a potion is its bonus * its charge level.

The charge level for a potion is from 1 to 100. Set the default charge to -1 in the editor to have the charge level generated when the spell is cast. The bonus is typically 1, so it's just 1 * the charge level. However, even a food bonus of 100 is tiny-- look at some of the defaults.

You'll notice that a worm round is 3500, and a dragon steak is 14000. (I think these are the best and worst food items in DM)

This means that a value of 200 or so would probably work, as it would go from ~10*200 = 2000, worse than a worm round, at LO power, to ~90*200 = 18000, better than a dragon steak, at MON power. :)

Posted: Thu May 18, 2006 8:46 pm
by George Gilbert
For potions, the bonus value is the multiplier that should be applied to the power (which ranges from 1-100).

The food and water bars range from 0-30000, so if you want a food potion then I suggest giving a bonus value of about 300. That way a << potion will restore about 1/6th of your food, and a Mon one will restore all of it.

To get an idea of how strong "proper" food is, have a look at the food value for them (which is an absolute value, not a multiplier).

Can't figure this out...

Posted: Thu May 18, 2006 9:28 pm
by Chaos Awakes
I can't figure this out.
There can't be anything wrong with my potion - it has a food bonus of 300 and a default charge of -1.
I have a new spell which does "create new in flask" where object one is the potion and object two is blank. There are no other settings on this page I can put in.
When I play, it doesn't matter whether I cast a LO or a MON spell, I still get given a potion which gives me the LO amount of food.

Posted: Thu May 18, 2006 10:42 pm
by George Gilbert
Sounds right so there might be a bug here then!

Can you copy-and-paste the line with your new spell in it from the dungeon text file into here and we'll have a look for you.

Posted: Thu May 18, 2006 10:47 pm
by George Gilbert
Actually, no need - I've found the bug.

What you're attempting to do is correct, but the code is ignoring the multiplier for food and water values (but correctly applies it for everything else). Doh.

I'll fix this for V0.39 (which should be out shortly).

Ok

Posted: Thu May 18, 2006 10:50 pm
by Chaos Awakes
Sure, here you go. This doesn't tell you much though :)

ADD SPELL_ZO_KATH_ROS NAME=(SATE) RUNES=(ZO,KATH,ROS) TYPE=(PRIEST) ACTION=(ACTION_CREATE_NEW_IN_FLASK,FLASK_SATE_POTION,NULL) CAST_SOUNDS=(NULL,NULL,NULL,NULL,NULL,NULL) FAIL_SOUNDS=(NULL,NULL,NULL,NULL,NULL,NULL) TIME=(30,35,40,45,50,55)

Posted: Fri May 19, 2006 12:36 am
by George Gilbert
Now fixed!