<UnitArtInfo>
<Type>ART_DEF_UNIT_LION</Type>
[COLOR="Red"]<Button>Art/Interface/Buttons/Units/deathclaw.dds</Button>[/COLOR]
<fScale>30.61</fScale>
<fInterfaceScale>1.3</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/deathclaw/devourer.nif</NIF>
<KFM>Art/Units/deathclaw/devourer.kfm</KFM>
<SHADERNIF>Art/Units/deathclaw/devourer_fx.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/LionShadow.nif</ShadowNIF>
<ShadowAttachNode>LionBip Spine1</ShadowAttachNode>
<fShadowScale>0.05</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.28</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>
Also I didn't think lower case letters worked for TYPE tags...
## War Machines ##
if pWinner.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND") and not gc.getUnitInfo(pWinner.getUnitType()).isNoCapture():
pPlot = pLoser.plot()
if pPlot.isCity():
pCity = pPlot.getPlotCity()
iPlayer = pWinner.getOwner()
iTeam = gc.getPlayer(iPlayer).getTeam()
if pPlot.getNumVisibleEnemyDefenders(pWinner) < 2:
for i in xrange(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if pUnit.isNone(): continue
if pUnit.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND"): continue
if pUnit.isInvisible(iTeam, False): continue
if not gc.getTeam(iTeam).isAtWar(pUnit.getTeam()): continue
iUnitType = pUnit.getUnitType()
iChance = 20 ## Capture Chance ##
if CyGame().getSorenRandNum(100, "Capture") < iChance:
self.lCaptured.append(iUnitType)
## War Machines ##
## War Machines ##
[B] if (GC.getGame().isOption(GAMEOPTION_SOME_MY_GAMEOPTION)):[/B] // for example [B]GAMEOPTION_WAR_MACHINE[/B]
if pWinner.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND") and not gc.getUnitInfo(pWinner.getUnitType()).isNoCapture():
pPlot = pLoser.plot()
if pPlot.isCity():
pCity = pPlot.getPlotCity()
iPlayer = pWinner.getOwner()
iTeam = gc.getPlayer(iPlayer).getTeam()
if pPlot.getNumVisibleEnemyDefenders(pWinner) < 2:
for i in xrange(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if pUnit.isNone(): continue
if pUnit.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND"): continue
if pUnit.isInvisible(iTeam, False): continue
if not gc.getTeam(iTeam).isAtWar(pUnit.getTeam()): continue
iUnitType = pUnit.getUnitType()
iChance = 20 ## Capture Chance ##
if CyGame().getSorenRandNum(100, "Capture") < iChance:
self.lCaptured.append(iUnitType)
## War Machines ##
You can, it's just generally not recommended because it increases the chances of tags being identical with proper words in the text, which could lead to unintended behavior.Also I didn't think lower case letters worked for TYPE tags...
What about the art of the building? I guess you added it to your mod.
That is wrong:Code:<Button>,Art/Structures/Buildings/Herbalist/Herbalist.dds</Button>
Delete the leading comma (it is not even in FfH-AoI). A leading comma is only for buttons in an Atlas file.
Like that, you have a sure crash.
PS: FfH - Age of Ice does not have a custom dll.
gc.getGame().isOption(GameOptionTypes.GAMEOPTION_...): # your comment
ok....so i took out the leading comma in the code above and it still crashes when i attempt to add it to the building queue.![]()
Art/Interface/Buttons/Buildings/Herbalist.dds
Art/Structures/Buildings/Herbalist/Herbalist.dds
@ Zlatko:
it should work if you typeCode:gc.getGame().isOption(GameOptionTypes.GAMEOPTION_...): # your comment
Python is not exactly C++ and caps/non-caps are important + comment doesn't start with //.
There might be a problem if you add too many options.
Just try it.