Hi it is my first post on this community. So if i was rude or something please let me know :)
So I just started learning game development alone. It's been about 1 year since I begin to learn c and c++. Recently I started planning to make a game for my own entertainment and future career.
I'm trying to make the game as mod-friendly as possible. So I thought that I should make abstract classes that have most of the functions for working on run-time. Then when the game starts, the system reads mod files for filling out class information and stores that base object in some data storage made with a singleton(for easy access). And, then use a factory pattern(I hope I'm using it right) to copy the base object that I need, fill it with basic information and store it in the object storage.
The problem is, I can't figure out how I can make it so each object from each mod file acts with its own behavior.
For example: Core mod(main game) has an abstract class named 'living entity' 'Living entity' has some information like bone structure type, mesh name, entity size, etc... And a mod file from the core mod makes a 'human' class that has information for 'human bone type','basic human','human size' etc The human class does not need any special functions because it only uses basic functions that the game provides.
But modder A wants to make a Vampire entity. Vampire will have information like a human. So modder A fills up or copies the 'human' file and edits the class id value with which the system identifies objects and uses as a name. Vampire needs new skills, health effects and custom death(leaves an ash pile instead of a corpse) The game also has skills and health effects as a kind of component or class. So modder A fills up information but one of the skills has a unique projectile effect or one of the health effects has a unique behavior that the game does not provide So modder A wants to override projectile or health functions only for the vampire's unique skill or health
In this case how would I support them to override functions for their own needs? One of my idea was to read the dll and store function pointers in data storage and put the code on a base abstract object and then call it if the object has a custom function. But I am not sure this works and that it is how people do it. So if there is some kind of information or documentation for that please let me know I'm arguing with this problem about month D;