Combine is a cowScript statement which combines 2 objects to make a third.
syntax:
combine {obj1 [(by|of) {owner1|material1}]} with {obj2 [(by|of) {owner2|material2}]} in {location} to make {new object};
{obj1} and {obj2} can be a simple object names eg 'cheese' or they can reference the owner object thus resulting in a more valuable object. If objects that match are found, they will still be combined, the resulting object just wont be worth as much.
You can use the words 'anything' or 'something' when the name of the object is not important eg: 'anything made of metal'
{obj1} and {obj2} can also reference a quantity eg 3 eggs, so the most complex an {obj} would be something like this: 5 fish by the fisherman.
Example:
If you have a butter churn which produces butter from milk and salt and you did not care where the milk or salt came from you would do this:
combine milk with salt in $actor to make butter;
This will find all objects called milk and all objects called salt and combine them into a single object called butter - all within the acting object (the butter churn).
Since no quantities were specified then each single milk and salt will be combined to make a single butter.
Some examples:
1 milk and 1 salt = 1 butter with none left over
2 mlik and 2 salt = 2 butter with none left over
5 milk and 2 salt = 2 butter with 3 milk left over
3 milk and 4 salt = 3 butter with 1 salt left over
All these values would change if we had specified quantities of milk and salt in our combine statement eg:
combine 3 milk with 1 salt in $actor to make butter;
In this case there must be 3 milk and at least 1 salt before 1 butter will be created.
The resulting object can be referenced by $new_id and if there are already objects of a similar name in the {location} then the quantity and worth of that object is increased accordingly.
eg if you already had 1 butter in your $actor and you combined to make a new one, you will have 2 butters in there.
'by' can also be written as 'made by'
'of' can also be written as 'made of'
future plans:
Allow combination of more then 2 objects at once eg:
combine 1 cheese and 2 bread and 1 tomato in $actor to make a sandwich;
This will require a re-write of the finding code so it will take a while before I get around to it.
Until then you can do 2 combinations to get that result.
combine 1 cheese and 2 bread in $actor to make a partialfood;
combine 1 partialfood and 1 tomato in $actor to make a sandwich;