How to create a food potion

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

How to create a food potion

Post 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?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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. :)
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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).
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Can't figure this out...

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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).
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Ok

Post 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)
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Now fixed!
Post Reply