Vehem
Modmod Monkey
- Joined
- Nov 22, 2005
- Messages
- 3,219
The following can be added to the end of "OnBeginGameTurn" (in CvEventManager) to give a rough implementation of the "Hidden" trait. Each tile within a Hidden Trait Race's cultural border that is currently not in line of sight of a player has a 10% chance each turn to become unrevealed to that player.
I've also put together a small set of changes to make the Sidar into a playable race with a few changes to make their gameplay distinctive. Notably, their Recon-line have had their anti-Animal role replaced with anti-Undead promotions (Undead-slaying at low levels and the Destroy Undead spell at higher levels). The Marksman promotion has also been removed from the assassin and marksman and granted to all Recon-line units within their own borders in the same way as the "Homeland" promotion (they can use their "hidden" ability to get close to the targets they choose).
Treewise, I've moved a few pre-reqs for the Recon line around, requiring low level Adept/Priest line techs in order to build the pre-req buildings (replaced Hunting Lodge with Ossuary, requiring Mysticism, similar to the Balseraph switch of Freak Show to Carnivals). I've also revamped the "Marksmen" unit (as it lost the promotion) to be "Prescients" - archers capable of seeing a short way into the future (Drill I to III by default).
I plan to do a little more playing around with this before any release - but will post the full changes if there is any interest.
Edit: Fix as noted by Xanaqui
Code:
#VEHEM
for i in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(i)
iChance = -1
if player.isAlive():
eTeam = gc.getTeam(player.getTeam())
aTeam = player.getTeam()
iMapDecayPercentage = 10
for i in range (CyMap().numPlots()):
pPlot = CyMap().plotByIndex(i)
owner = gc.getPlayer(pPlot.getOwner())
if owner:
if owner.hasTrait(gc.getInfoTypeForString('TRAIT_HIDDEN')):
if (not pPlot.isVisible(aTeam, false)):
if (CyGame().getSorenRandNum(100, "MapDecay") < iMapDecayPercentage):
pPlot.setRevealed(aTeam, false, false, TeamTypes.NO_TEAM)
#/VEHEM
I've also put together a small set of changes to make the Sidar into a playable race with a few changes to make their gameplay distinctive. Notably, their Recon-line have had their anti-Animal role replaced with anti-Undead promotions (Undead-slaying at low levels and the Destroy Undead spell at higher levels). The Marksman promotion has also been removed from the assassin and marksman and granted to all Recon-line units within their own borders in the same way as the "Homeland" promotion (they can use their "hidden" ability to get close to the targets they choose).
Treewise, I've moved a few pre-reqs for the Recon line around, requiring low level Adept/Priest line techs in order to build the pre-req buildings (replaced Hunting Lodge with Ossuary, requiring Mysticism, similar to the Balseraph switch of Freak Show to Carnivals). I've also revamped the "Marksmen" unit (as it lost the promotion) to be "Prescients" - archers capable of seeing a short way into the future (Drill I to III by default).
I plan to do a little more playing around with this before any release - but will post the full changes if there is any interest.
Edit: Fix as noted by Xanaqui