Merchants, items and inventory

Two major things and a whole bunch of polish this week. I wrote earlier about improving procedural dungeon generation, so I won’t rehash that; the other big feature this week was getting merchants and shops into the game.

I now have the ability to add buying and selling as actions when interacting with an NPC. Each NPC merchant will (currently) buy any item, and has a list of items that they will sell to players. Heavily inspired by old console RPGs like Final Fantasy and Pok√©mon , there’s also a shop location. I can alter this on a case-by-case basis, to customise the merchant themselves, the products they have on display, and the crafting workstation on the left.

I think I’ve got all the bugs, exploits and edge-cases worked out (like adding an item to your sell list, then consuming it in another window, then completing the sale of the now non-existent item, for example), but it’ll be interesting to see what players come up with. Buying and selling are kind of an important, potentially economy-breaking feature if there’s any horrific item and/or currency duplicating bugs left in there, so I’ll be keeping an eye on it for a while.

Because I’d spent so much time working with merchants and therefore items, I also made some improvements there. Can you believe BotLG contains 57 different items already (and I feel like I haven’t really even started on generating item content yet)? First, I consolidated the item types into a much smaller set — With that done, I added a dedicated inventory screen, which can be filtered by these new categories. Then, as a last bit of polish, I made it so that wherever an item is displayed, it shows an icon next to the text label. I’m really happy with how it looks, and now the console looks a bit more exciting while you’re gathering resources:

So this leaves me with just two major mechanics to implement: account-wide storage and account-wide progression through character retirement, which I’m hoping to get done next week. After that it’s just bug fixes, content and polish. I really want to completely revamp the starting area, so that players can get into a dungeon much quicker — and a more exciting one than the pretty trope-heavy Rat King’s Nest. This week (and last) have introduced a lot of new stuff, and the current maps don’t really show them off to the game’s best advantage; I actually think I’m going to hold back on making these things live until I have some shiny new locations in place.

This week’s changelog

Here are the edited highlights from this week’s changelog. You can view the whole list here.

  • As usual, BotLG is a little less idle and a little more roguelike. Every type of gathering node is now a limited resource. To compensate for limited resources, lowered global action duration to 3 seconds (from 8 seconds)
  • New skills: gathering, hedge magic, mining
  • New items: plum-nose mushroom, gorgeous plum-nose mushroom, myconic essence, myconic potions, part I, rough stone, copper ore, iron ore, silver ore, lump of coal
  • New recipes: distill (gorgeous) plum-nose mushroom into myconic essence; brew small healing potion from myconic essence
  • NPCs can now buy and sell items
  • Looking at a skill’s details (click the name of a skill from the skills panel) now shows which recipes you both know and have yet to learn. Learning a recipe now grants the corresponding skill at level 1 if you do not already have it.
  • The inventory panel now only lists the most recent items received, but contains a link to browse your entire inventory, which is filterable. Players can click an empty equipment slot to open their inventory filtered for items suitable to equip there
  • Each floor of a procedurally generated dungeon now requires a randomised quest to be completed before you can descend to the next floor. Closing the page or refreshing while in a dungeon will cause you to lose some of your inventory
  • Location name and difficulty is now displayed as the minimap window title
  • Consolidated item types down to: accessory, armour, bones, component, drink, food, ingredient, junk, potion, quest, recipe, weapon
  • Wherever an item name is displayed, its icon is also shown
  • Monsters now slow down when the player is chasing them, and will pause if they end up adjacent to a stationary player