A downloadable game for Windows

Overview

Apothecary of Hilnsdor is a hardcore potion crafting RPG. The focus of the game is on combining ingredients to create better and stronger potions with little hand-holding. These potions can then be used to complete quests, support AI allies in combat and solve puzzles in unique locations.

 Code Breakdown

The following sections will breakdown some of the code from this project. All the code from the project is available at this Git repo:

[Github Repo](https://github.com/TSGameDev/AOH-CodeSnippet)

AI State Machine

The AI is controlled by a controller that makes use of a state machine, AI Stats and an AI Brain.

Controller Script

The purpose of the controller script, other than holding variables and setting up the state machine, is to implement the interaction with the players potions. It implements the IEffectable interface which provides functions for deciding how this entity will handle different potion interactions.


The last use of the controller is to aid in implementing animation keyframe event call-backs. This is because there isn't a way for the state machine to perform functionality on animation events, so the controller hosts a delegate which can be set upon the entrance of a state which is then called by any animation. This is used to call the AI attack functionality in relevance to the animation.

The state and state machine base classes are standard, holding variables and functions that are commonly used throughout the states.

[State Machine Base Class](https://github.com/TSGameDev/AOH-CodeSnippet/blob/master/Assets/_GameData/Script...)

[State Base Class](https://github.com/TSGameDev/AOH-CodeSnippet/blob/master/Assets/_GameData/Script...)

Status Effects

The status effect system makes use of scriptable objects to form the base of the status affect functionality, allowing easy creation of similar types, a tick system and the IEffectable interface.

Status Effect Scriptable Object

The scriptable object is simple, it is a scriptable object that is created to represent a collection of status effects for example the Health status effect scriptable object can be used for all types of healing. The object implements a base scriptable object to allow for different types of status effects to be grouped together into a list when passed into an entity via potions.

The base class implements an interface which makes sure all status effects contain the data that is needed for the tick timer to correctly be created and that the scriptable object provides the functionality of its effects.


Tick System

The tick system I used was created primarily by code monkey. The video detailing its creation is available here: 


From this system I created a tick timer object that spawns on entities affected with per tick status effects to count down and apply the effect. Picture of class available in screenshots or code available here: [Tick Timer Class Repo](https://github.com/TSGameDev/AOH-CodeSnippet/blob/master/Assets/_GameData/Script...)

IEffectable

This interface provides functions that are called upon potions hitting this entity and receive the list of effects the potions carry.

 

Download

Download
ApothecaryOfHilnsdor.zip 668 MB

Install instructions

Once the game files have been downloaded, to play the game follow these instructions:

- Find where you downloaded the ZIP file

- Unzip the file "Apothecary of Hilnsdor"

- Double click/run the .exe file called "Apothecary of Hilnsdor". This is within the first file and easily located via the unity file icon.

Leave a comment

Log in with itch.io to leave a comment.