TavernSim has, by now, a lot of different systems which are mostly still WIP. As the project is still
relatively early in development a great deal is still bound to change, however, here is a brief overview of notable creations:
- - Building System: The building system is the lastest addition to the game. I want the player to be able to build their very own, unique tavern with as much customization as possible. The system consists of ~10 functions to freely place items and have them snap to each other where applicable. The system uses a LineTrace to check for obstructions and snapping points. When placed the objects are added to the GameState for reference as well as any object it has been snapped to and the save game. The objects also need materials, which are automatically taken from the players inventory and the BuildingUI is refreshed with the new amount of objects that can still be placed. Lastly, after the tavern is built, a room scan, consisting of a number of functions, scans all the room using LineTraces and lets the player assign rooms to different purposes like tap room or guest room. The NavMesh automatically rebuilds itself afterwards.
- - Patron System: The Patron System is the collection of systems revolving around getting patrons into the tavern and serving them. The system calculates how many patrons are spawned ony any given day using the taverns reputation, decoration level and size. The Patron AI is linked to the building system and is looking for the nearest tavern entrance, as there can be more than one. It is then looking for either a free unoccupied table, when it is a loner, or a free occupied table, if it is a socializer. In both cases whatever chair is free is taken if their condition cannot be met. Patrons drink whatever is on tap but have a preference that, if met, leads to a higher happiness and in turn a higher reputation gain. During the early game the player themself will need to serve the patrons by tapping beverages and delivering them. This works through adding and removing the beverages from the players inventory through the tap and the patrons. The Patron AI will switch states between waitingForBeverages, drinkingBeverages, idleing and leavingTavern and randomization is used throughout to make them feel natural. In the later stages of the game a barkeeper can be hired to server the patrons. The patrons use a Parent/Child system to aid in interfacing between the player and the patrons.
- - Brewing System: The brewing system lets players brew their own beverages. It is a 2D UI interface in which different ingredients can be placed into the brewery inventory and can be modulators changed to brew unique beverages. The current version lets players discover recipes by either finding them as items in the world or by discovering them through brewing with random ingredients and settings. If a recipe was discovered players can either click on the recipe in the BrewUI to auto populate the brewery inventory or have them view the recipe to add the needed ingredients manually. On discovery recipes are saved into the GameState for reference and into the SaveGame.
- - Player systems: The player is using a radial menu to switch between tools which are working together with the object and item system to do different actions. Every use action shoots a LineTrace which inspects the hit actor and then decides if the tool can be used. The same system drives interaction between the player and the environment and uses switches driven by actor tags to filter these actions.
- - Item system: All items are children of the same item parent to make interfacing easier and are divided into different sub-parent items. The items are of type UObject and only created in the world if they are, for example, dropped out of the inventory.
- - Dialogue system: The dialogue system uses a modified version of the dialogue plugin from the Unreal Marketplace. This plugin provides conditions and events to be used inbetween each line of dialogue which I make heavy use of to drive gameplay and the quest system. The dialogue UI is one of the few UI pieces that I created some early art for.
- - Quest system: The quest system is a collection of data structures, data tables and functions. Quests have quest owners, quest states, quest names and much more. The quest system is what is driving the early gameplay seen in the video above and is heavily intertwined with the dialogue plugin.
- - Weather system: The weather system is a Blueprint Script from the Unreal Marketplace but was slightly modified to accomodate my needs. Its internal time system was changed to be driven by my own clock and date system. I also built upon the wind system to extract the wind direction and recalculate the wind intensity to drive my foliage wind system.




















