Tech Tree - Where do I start?

Hello forums.

I’m currently building a factory simulator. The player can create machines, manufacturer certain products, and sell these products to earn money and eventually upgrade the machines, and buy more.

I’ve come to the part of the game involving the machine upgrades. I have a somewhat clear vision of what should happen, but I’m not sure how to connect everything together. For instance, take the processing time within a single machine. It might take 10 in-game minutes, but you can upgrade the machines to lower the manufacturing time by 25%. Same goes for the sell price. The initial sell price might be $200, but the player can upgrade the quality of the products, increasing the sell price by 15%.

The actual calculation of the manufacturing time and the sell price of course is not the problem. The problem is where to store this functionality. First of all, it’s a C++ project, so I’d like to keep everything in C++ unless there’s a reason to use blueprints. Should this functionality be within the game state, the player state, the player controller, the game mode…?

Furthermore, I’d like to give the game designer the option to change upgrades from within the editor, so I’m not interested in hard coding any values. Again, where should I store these information?

I’m considering of making the upgrades as structs, and make certain upgrade groups like: “Machinery”, “Utility”, “Products”, etc. So basically have a


TArray<UUpgradeGroupStruct>

and the UUpgradeGroupStruct should have a property like


TArray<UUpgradeStruct>

Basically I’m just looking for some leads and guides as to where I should start, and how I should tackle this beast :slight_smile:

What’s the best way of setting up a tech tree like this?