Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
I believe that Gedemon and others use a trick where they init the game with extra civilizations and city states, then remove their units at game start. This allows these civs and CSs to be added back into the game at some later time. I believe that these missing civs/CSs return false from player:IsAlive() and that they don't trigger GameEvents.PlayerDoTurn (but I'm not sure about either of those points).
Can these missing civs and city states be contacted? Obviously, they are missing from the UI so this isn't possible without some more modding. But it's easy enough to modify UI to put them there, and the UI can then attempt to trigger the civ trade screen (or the CS popup) via Lua just as any "real" civ. Does anyone know what happens if you do this? I could easily imagine either of two outcomes: works fine (because the game engine assumes that you have checked living status before the call so it doesn't need to) or crash (some code gets a bad value).
The reason I'm asking is that I need to implement an "invisible" civilization (The Fey) that can only be contacted with a certain policy. I also want to add a dozen or so "gods" that are really city states (giving quests and so forth) but not on the map and not contactable for most players (only when I allow it via Lua).
One way for me to do this is to place all of these civs (the Fey and the gods) at the south pole and build a truly impassible wall of mountains around them. I'll do it that way if necessary, but I hope I don't have to. Please share if you have any relevant info.
Can these missing civs and city states be contacted? Obviously, they are missing from the UI so this isn't possible without some more modding. But it's easy enough to modify UI to put them there, and the UI can then attempt to trigger the civ trade screen (or the CS popup) via Lua just as any "real" civ. Does anyone know what happens if you do this? I could easily imagine either of two outcomes: works fine (because the game engine assumes that you have checked living status before the call so it doesn't need to) or crash (some code gets a bad value).
The reason I'm asking is that I need to implement an "invisible" civilization (The Fey) that can only be contacted with a certain policy. I also want to add a dozen or so "gods" that are really city states (giving quests and so forth) but not on the map and not contactable for most players (only when I allow it via Lua).
One way for me to do this is to place all of these civs (the Fey and the gods) at the south pole and build a truly impassible wall of mountains around them. I'll do it that way if necessary, but I hope I don't have to. Please share if you have any relevant info.