Page 1 of 1

define ingredients

Posted: Tue Nov 22, 2016 6:54 pm
by LordGarth
Is there a way to define ingredients.

Is there an exact code example.

Gary

Re: define ingredients

Posted: Tue Nov 22, 2016 7:19 pm
by Isaac
If you mean define original [new] ingredients, I've never had occasion to try ~yet; and will have to look into it.
*The UI only allows for six though, so I suspect one cannot define new ones; [probably hard-coded names].

**Update: One can define new herbs as items, but they don't automatically show up in the alchemy UI. So I think
that any functional herb expansion would likely require a full custom GUI script and a mortar replacement item.
(...or in the very least, intermediary items [created from default herbs] that check inventory for additional
ingredients when equipped; for a two part creation process.)


If you mean recipe creation with existing ingredients, then here is the way:
https://github.com/JKos/log2doc/wiki/As ... recipedesc
defineRecipe(desc)

Defines a new potion recipe or replases an existing recipe. desc is a table with the following fields:

name:the name of the potion recipe to define or replace.
level:Alchemy skill level needed to craft the potion.
ingredients:a number describing the ingredients.
Ingredients are encoded into numeric value. Each digit in the number corresponds to an herb.

The available herbs are:
1 = Blooddrop Cap,
2 = Etherweed,
3 = Mudwort,
4 = Falconskyre,
5 = Blackmoss,
6 = Crystal Flower.

For example, 115 would translate to a recipe with two Blooddrop Caps and one Blackmoss.

Code: Select all

defineRecipe{
	potion = "potion_speed",
	level = 3,
	ingredients = 244,
}

Re: define ingredients

Posted: Wed Nov 23, 2016 9:56 pm
by LordGarth
Thankyou for the good into.

LordGarth