I'm writing code to allow a shopkeeper to reimburse or create player items. Here are some questions the shopkeeper has to ask: what is it called is it a weapon, armor, … what word or list of words can be used to get or look at it describe on one line what is seen when coming across it what does it look like up close what word must be used to see this description describe something special about it what word must be used to see this description describe something else special about it what word must be used to see this description is special damage, armor, etc. applied to it what value is other special damage, armor, etc. applied to it what value can it be taken, held, worn or wielded
At some point the parameters required by a game might surprise characters to discuss. Is there a better way to satisfy parameters and only ask what a real blacksmith would?
Some of that is unavoidable because you have to tell the NPC what you want to create, However other things, I think, should be inferred from fundamentals. For example, if we want to make a sword, then it should fit in one of the known types (either of the real world or the game world), because a third party can't exactly invent brand new things to create without a much larger set of parameters. As a result it will have a variety of descriptive elements that can be used. Something made of metal could be shiny, while things made of wood might have descriptors like hard or smooth. You need the player to be able to condense down their visualization into what components they would use that would have such properties, such as the metal to be used or the type of wood, etc. Some help files on available materials and how to figure out the rough cost of a certain amount of it would help.
You could attempt to have the player say something to the NPC in a simplistic way and have your code attempt to make some basic determinations from that. Like this:
say 'I want a curved sword that will freeze enemies.'
In that sentence, you have been told three things: sword (what to make), curved (the shape and possibly enough to infer a known type) and a property (freezing/ice/cold damage). To that you could add a type of wood for a grip (mahogany, oak, ash, etc) and a metal to use for the blade and maybe some other part. Like this.
say 'I would like a straight sword with a bronze blade and a mahogany hilt that will burn my enemies.'
So, from your list, these are the most critical parts: - is it a weapon, armor, … - is special damage, armor, etc. applied to it (what value?) - is other special damage, armor, etc. applied to it (what value?) - can it be taken, held, worn or wielded
The words/commands that are used to examine/inspect/etc the weapon should be generalized. For a sword that would be stuff like: blade, hilt, guard?, grip, pommel, etc. Those should be predefined for existing types of weapons. They could perhaps also be treated as components concepts for creating a new thing. If you didn't have a glaive then you could build one from the applicable, respective components of a spear and a sword (i.e. pole, grip, hilt, blade). If your items/objects have a built-in entity component system that may help simplify building a system like this, but will entail significant work in code,
This a fairly deep topic. If you ever wanted to make something yourself in RL, it's the same kind of issue.
what is it called
is it a weapon, armor, …
what word or list of words can be used to get or look at it
describe on one line what is seen when coming across it
what does it look like up close
what word must be used to see this description
describe something special about it
what word must be used to see this description
describe something else special about it
what word must be used to see this description
is special damage, armor, etc. applied to it
what value
is other special damage, armor, etc. applied to it
what value
can it be taken, held, worn or wielded
At some point the parameters required by a game might surprise characters to discuss. Is there a better way to satisfy parameters and only ask what a real blacksmith would?