Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
I have an "Animal" player in my mod that is just another major player added during game setup. I've already modded dll to make them work differently than normal players, using various new GameEvents and Civilizations table tags.
However, for various reasons I'm thinking it might be easier in the long run to add them as a hard-coded playerID in the dll, analogous to Barbarians, with isBarbarian() modded to return true. Can someone tell me if this is a reasonable idea? Or am I crazy?
If reasonable, some follow up questions:
Pasted from CvDLLUtilDefines.h for reference:
However, for various reasons I'm thinking it might be easier in the long run to add them as a hard-coded playerID in the dll, analogous to Barbarians, with isBarbarian() modded to return true. Can someone tell me if this is a reasonable idea? Or am I crazy?
If reasonable, some follow up questions:
- Can someone point me to the source for the 34 major civs dll mod? (I found the dll at Gedemon's GitHub site, but couldn't find source files.)
- Should I cut MAX_MINOR_CIVS and MAX_CIV_PLAYERS down by one each and add ANIMAL_PLAYER as player 62?
- Or better to increase MAX_PLAYERS by one and add ANIMAL_PLAYER as player 64?
- Any useful suggestions/comments from other dll modders before I go down this rabbit hole?
Pasted from CvDLLUtilDefines.h for reference:
Code:
// do not change this or have MAX_PLAYERS exceed it - this will require the engine to be rebuilt
#define REALLY_MAX_PLAYERS (80)
#define REALLY_MAX_TEAMS (80)
#define MAX_CIV_PLAYERS (63)
#define MAX_CIV_TEAMS (MAX_CIV_PLAYERS)
#define MAX_MAJOR_CIVS (22)
#define MAX_MINOR_CIVS (MAX_CIV_PLAYERS - MAX_MAJOR_CIVS)
#define MAX_PLAYERS (MAX_CIV_PLAYERS + 1)
#define MAX_TEAMS (MAX_PLAYERS)
#define BARBARIAN_PLAYER ((PlayerTypes)MAX_CIV_PLAYERS)
#define BARBARIAN_TEAM ((TeamTypes)MAX_CIV_TEAMS)
#define OBSERVER_TEAM ((TeamTypes)(MAX_MAJOR_CIVS-1)) //This only works because observer mode is multiplayer/debug only