Update #73: Trade & World Simulation

This video shows lots of improvements to the internals of the game allow the revised merchant trading interface to work.  This is the culmination of a lot of previous work: item categories, pricing by stockpile, AI Tasks, inventory by category, weight and capacity, smart town placement, and the revised Menu system.

On another front we added something we've been working towards for months: NPC desire fulfillment.  When an NPC has nothing to do they will decide for themselves what to do.  Right now it is limited to visiting the Inn for entertainment, but the system is in place now for anything like shopping, hikes in the wilderness, and makin' babies.

About 8 months ago Nic and I decided to move simulator turns from days/weeks to hours.  This was to enable NPC's to move around and do things and for the player to be able to see it happen as time passes.  We had it working for the jobs in hexes around the town, but now it is working within the town!

There is one subtask left to do before I can say the economy simulation is done and that is updating the mayor AI to select and build buildings correctly.  Then it is on to the third and final big task for build 11: quest generation and fulfillment.

Specific list of changes:

  1. Desirability algorithm now scores hexes and selects the best place for a town finally guaranteeing a town won't be on water
  2. Missing person threshold custom to each person based on who they are
  3. Trading working: buy, sell
  4. Put in inventory auto going to available space/draft animals
  5. Inventory now cares about capacity
  6. Animals have a req handling skill level
  7. Can sell back draft animals
  8. Can't buy more than the merchant has in stock, this prevents the player from "manufacturing" goods in the tight economy
  9. Revised pricing algorithms
  10. Put common weapons/armor in marketplace
  11. Split town turns into two parts: hourly and weekly, improved performance
  12. Building menus now refresh with passage of time - ruined all performance gains
  13. NPC's don't go to buildings that are closed and wait for them to open, prior to this they were breaking & entering to fulfill their desires like a crack head
  14. Witnessed Emergent behavior: mayor woke up, feeling bummed, went for a drink before work. Drank for two hours and was late to work
  15. Work provides a touch of entertainment, therefore people without jobs will eat & drink more than those employed because they are bored
  16. AI Tasks now add as a single group so they stick together in the proper sequence

 

anniversary.JPG

Celebrating 19 crazy years!  One of the rare moments you'll catch me in a suit.