Walraven // Forums // Thread 2008

craft 20 swords doesn't work because swords isn't a valid recipe, but it isn't grammatically correct to say "craft 20 sword", sora, 2004-08-09 10:41:11
craft 20 swords doesn't work because swords isn't a valid recipe, but it isn't grammatically correct to say "craft 20 sword"
Two options, shadow, 2004-08-09 17:56:05
I can think of two ways to fix this:

- Allow plural words to be caught and re-written to their singular form. This may be too hard as some words are changed from plural to singular in different ways: swords->sword, babies->baby, boxes->box.
- Take the list of the recipes the craft() checks and add the plural forms to it

Hope this helps as would other ideas on fixing this that I may have missed.
Plural, athenon, 2004-12-05 23:19:18
I believe there's already a query_plural func.
problem, allaryin, 2005-01-14 02:43:48
The problem with this is that no plural name is set on the recipe data, only on the produced object. We can't clone one of every object in the system and query their plurals in order to determine this.

The alternatives (if we actually wanted to allow this feature) are to either guess what the plural version is - unreliable, or require all recipe entries to have plural versions also specified - inconvenient.

I propose that we do neither and that this thread be scrapped ;)
blueprint, malap, 2005-01-14 13:25:48
Nah, it's fine to just query the blueprint object. For example, as a wiz, you can @/items/weapon/knife->query_taste().
yeah, but point is, allaryin, 2005-01-14 16:54:24
That to make things fast, we'd have to keep an array of all the blueprint objects created by the recipes - which isn't always reliable, for instance the metal helm recipe will not return 'metal helms' if you asked for the plural from the blueprint, etc...

Recipe name is not a valid indication of what the resultant object's name is.
idea, gpfault, 2005-01-15 17:32:11
My hunch is that you'd have to craft them one at a time anyway due to chance of failure.

Maybe you could have a "loop" command or something to take care of repeating the craft "sword twenty" times.

It would be nice to be able to craft batches at a time. For instance, I'm using paper to leave notes and "recharging my paper points" would be much easier and less tedious if I could specify that "craft paper" be repeated twenty times.

Hopefully I'm making sense here.
oops, gpfault, 2005-01-15 17:33:15
I meant to put the first quotes around "craft sword"

gosh durn forums...where's the edit function when you need it?
chain, allaryin, 2005-01-25 17:46:10
There is no 'repeat' or 'loop' command in the game, but there is a chain command that allows you to enter aliases of up to 10 commands together.

There are both pro's and con's to allowing people to script bulk crafting. Primarily that it's boring to have to type the same command in 50 times but that certain recipes are ill-suited to automation because they require extra details in their crafting (keys for instance).
<< forum