Goals System and Character Sheet Update (Patreon)
Content
I'm happy to say the code behind the goal system is some of the most expandable and elegant I've written for Lab Rats 2 so far. I wanted to provide support for as wide a range of goals as possible, so the system makes as few assumptions about what a goal is. A new event listener system sends active goals updates when an event is fired. Each goal has a function that determines what it does when a goal is fired. As an example, the "Brave New World" goal, which requires the player to personally generate research points, adds the amount of research generated to an internal count when the research event is fired. Other goals keep track of people you have talked to and finish when you've interacted with enough unique people. Goals can also have unique functions attached that determine how their progress bars and progress text are displayed.
Each category of goal has an internal difficulty score that is increased as goals are finished. The same style of goal will have higher requirements as the difficulty rises, which should keep experience gain in line with productivity gain over the course of the game. Goals can also be set to only be presented to the player if certain requirements are met; for example difficulty over or under a threshold, a special role assigned to someone, or a certain amount of money in the business.
The goal writing process is quick and flexible - I added 9 of the 12 current events over an hour tonight - so I will be adding more going forward. I hope to use the goals as a tutorial system with early goals guiding players through the basic steps of running their business.
Let me know what you think of the new look and if you have any suggestions!
Files
Previews only