crafts and instruments are objectively worthless, that is all (I think). Everything else always has some utility. The issue is making it dynamic according to its changing utility, instead of a fixed constant. Which is done according to supply and demand.
Essentially we both agree we need to make the item become progressively more worthless the more of the item that the entity in question has, provided that the entity cannot sell it on to a third party for something that is valuable. The real question is how to do this so that it is naturally emergant rather than an imposed script.
Supply is based off of something like how many resources and how much labor a fort has to produce stuff with relation to the possible price (AI) or your own sales history (for you after the first trades).
Demand is based off of ultimately the current usefulness of things (to the buyer but also to anybody else, if they have reason to believe you're selling the stuff too cheaply and they can flip it), or when trading with you, your purchasing history after the first trades.
Right, so what? We need to delve into the specifics of how to code this stuff. I was just earlier responding that the quota system mentioned didn't seem like a great choice, that's all.
The good thing here is that the basic groundworks for the economic system already exist. We already have a division of the population into various occupations, trade routes built into the game; centred around key sites (fortress for dwarves, dark fortress for goblins, town for humans and forest retreat+ for elves).
The first thing we have to do is restrict the available occupations according to biome (fishermen say cannot exist without river or ocean) and according to entity (a list of occupations is in there but does not do anything). Then we have each person demand a certain amount of stuff each, depending upon size and occupation essentially. Bigger creatures need to eat more and occupations demand the neccesary resources and tools needed to carry out production.
If someone cannot get enough production materials or tools the individual becomes a drunk (game code for unemployed) and the site will try to employ them in an occupation as if they were a new person. An individual that does not get the food they need will turn into a herbalist, hunter or fisherman if they can and if still cannot get enough to eat will die.
Each person that successfully gets the needed resources will produce a set amount of products over a given time period. Normally the total amount a settlement produces will exceed their demand for the items they are producing. This produces the goods that appear on the adventure map as free items (they are unowned).
All sites compare their available amount of surplus items according to the trade routes that are already in the game. Each site firstly tries to get the largest amount of in-demand items as possible overall. Then the site tries to get the highest quality items possible, quality represents a combination of the inherant advantages in utility both from item quality and material; plus decoration and subjective a modifier based upon proceedurely generated cultural factors.
This produces 'owned items'. A key element here is that items that are imported for site consumption are not imported exactly according to demand, the site tries to stockpile a certain amount of items above their customary demand. Items that were imported for internal consumption function as site-owned items do at present (except obviously they cannot be sold anymore to the site itself), you can freely use them but not carry them off. Items that are in short supply will not appear in the settlement except as private property of individuals.
Items that are stockpiled for export to other settlements however are restricted items (a new concept). Using these items is considered a crime and will annoy people and there should be a UI warning to inform people that try to do this. I now turn to how the system works in Fortress Mode and Adventure mode.
Fortress ModeIn Fortress mode you are slotted into the game as a Fortress for trade purposes but one without any subordinate settlements (hillocks or mountain halls say) assigned. Those who are trading with you initially look at the resources within your settlement area and the projected production that you would have if you were an AI settlement. The caravans come from particular settlements, not from the civilization as a whole.
When the caravan arrives it remembers what items it did not sell and removes these from it's projection of your demands. You can also specifically order a specific quantity of a given item, the settlement will then try to acquire those items. The key thing here is that there is a quota on what the settlement itself is willing to buy, it will only buy up to it's demand+stockpile number, that is it's total demand+it's trading partners demands+a certain % on top of that.
You can only trade directly with low-level settlements (and goblins) once you have build a caraven and given it the correct amount of supplies/personnel. Once you have your own caravan you can load with a certain amount of goods and you inform it precisely what quantity of goods to trade for and the AI will handle the rest.
Adventure ModeIn Adventure Mode as already described the player can help himself to items that are surplus and not for export. In order to leave with items that were imported for internal use the player must ask to use them. This requires the player speak to a person in authority or anyone with the administrator or clerk profession and ask to use supplies.
They will agree to this unless they are on bad terms with your adventurer but the amount they will allow you to use is limited to the amount that an individual biologically of the adventurers race but belonging to the site's entity would consume in a given period. The amount that you have claimed from each site is logged, you cannot claim something as supplies, go over and sell them in another settlement and come back for more. But obviously it resets over time and the settlements do not know what you have claimed from other settlements.
Restricted items on the other hand must be bought. You the player are an economic entity that competes with the settlements trade partner(s) and has to outbid them. If they are selling 10 plump helmets in return for 1 bar of iron, then in order to get 10 plump helmets you must offer them a better ratio but since all else being equal the AI seeks to maximise quality/value you can also outbid using items of a higher quality as well.
Finally there are exchanges directly between individuals. Individuals possess the items that they were assigned by their settlement during the demand/supply calculations as private property along with some water as well. But they also have their personal likes and dislikes; you should be able to ask them what these are. Since individuals are not given surplus items by their sites, it is not normally possible except in desperate straits to acquire an item from an NPC except by providing them an equivilant item that they consider to be of greater quality than the one given to them.