[quote=“utunnels, post:104, topic:197”]Yeah, that needs lots of labors and time.
A quicker approach, however, is making the game more modding friendly.
For example, add some function pointers, execute them when special events happen.
void (OnGameStart)(game game); //initialize modding data
void (OnMapDraw)(game game); //when the map is being rendered
void (OnKeyPress)(game game); //optional
void (OnGameExit)(game game); //unload resources, etc[/quote]
We have a facility for this in “gamemode”. You can toggle a particular mode and it inserts various hooks.
Currently it has the following:
init()
per_turn()
pre_action()
post_action()
game_over()
These can be expanded as needed.