thomas.berubeg
Wandering the World
Is it possible for a building requirment to be that you have contact with a specific civ?
(if not, how would i go about doing this simply)
(if not, how would i go about doing this simply)
Is it possible for a building requirment to be that you have contact with a specific civ?
(if not, how would i go about doing this simply)
if (team.isHasMet(rivalPlayer.getTeam()):
if eBuilding == gc.getInfoTypeForString('BUILDING_BANNOR_EMBASSY'):
iTeam = pPlayer.getTeam();
iRivalTeam = -1
iContactCiv = gc.getInfoTypeForString('CIVILIZATION_BANNOR')
bMet = false
for iPlayer2 in range(gc.getMAX_PLAYERS()):
pPlayer2 = gc.getPlayer(iPlayer2)
if pPlayer2.getCivilizationType() == iContactCiv:
if (iTeam.isHasMet(pPlayer2.getTeam()):
bMet = true
if (!bMet):
return True
<Building>
<BuildingClassType>BUILDINGCLASS_BANNOR_EMBASSY</BuildingClassType>
<BuildingType>NONE</BuildingType>
</Building>
So how would i make the building only available to one civ? (and would i need to do this repeatedly for each building i want to make Dependant?)
If you're wanting to do a series of buildings for each civ that other civs can build after meeting them (Carnivals requiring meeting the Balseraphs, Forges requiring meeting the Dwarves etc) then you can do it by repeating, but a DLL approach would be better.
Python is good for a one shot effect, DLL is better for anything you could feasibly reuse for something else.
that's what i"m aiming for... but i would have no idea where to start with the DLL (not being able to do much more than xml...)
guess i"ll have to give that up, as i have no time...
unless xienwolf added that tag to his modcomp
<PrereqForeignRelations>
<PrereqForeignRelation>
<Civilization>CIVILIZATION_BALSERAPH</Civilization>
<MinRelation>3</MinRelation>
</PrereqForeignRelation>
<PrereqForeignRelation>
<Civilization>CIVILIZATION_BANNOR</Civilization>
<MinRelation>3</MinRelation>
</PrereqForeignRelation>
</PrereqForeignRelations>
Hmmm, this reminds me... is there a simple way to shut off messages pertaining to Civs you haven't met yet? For example, seeing "A player has cast Revelry" and "Lucian has been killed" early on in the game sort of ruins a lot of the suspense regarding what nasty AI civs are lurking on that other continent.