wrong tags??need few corrections

FK2006

Warlord
Joined
Mar 9, 2006
Messages
168
hello thanks for help
need corrections on that:

1 it works an alien appears on improvment polar base BUT also on ALL improvments (farms etc... an alien appears 20y BC...............)

def onImprovementBuilt(self, argsList):
'Improvement Built'
iImprovement, iX, iY = argsList
pPlot = CyMap().plot(iX,iY)
pPlayer = gc.getPlayer(pPlot.getOwner())
if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_POLAR_BASE')):
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'research has discover a Unknown entity!','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/Units/ALIEN2.dds',ColorTypes(7),iX,iY,True,True)
pPlayer.initUnit( gc.getInfoTypeForString( 'UNIT_ALIEN2' ), pPlot.getX(), pPlot.getY(), UnitAITypes.UNITAI_ATTACK )
pPlayer.initUnit( gc.getInfoTypeForString( 'UNIT_ALIEN2' ), pPlot.getX(), pPlot.getY(), UnitAITypes.UNITAI_ATTACK )




2 can't make it work : (failed to load eventmanager)
(if 50 mosquees, then unit appears in capital)

iPercentMosqueRequired = 50
player = gc.getPlayer(iPlayer)
pCity = playerY.getCapitalCity()
iNumMosques = player.countNumBuildings(gc.getInfoTypeForString( 'BUILDING_ISLAMIC_CATHEDRAL')
iNumCities = player.getNumCities()
if (float(iNumMosques) / float(iNumCities)) * 100 / iPercentMosqueRequired:
capitalCity = player.getCapitalCity()
player.initUnit(gc.getInfoTypeForString( 'UNIT_WARRIOR' ), pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI)



3 I used modern farm from superblue mod it works but i want to use a different skin for the crops (made a file "modern farm" in Structures/improv etc) did all the changes but when i started to edit the cvplotsystem.xml, these lines are like Japanese:
what is farm1 farm2 and Attribute Class="Scalar">szExtra:art?



</ArtRef>
<ArtRef Name="art:IMPROVEMENT_FARM1">
<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Farm/mod_eu_farm02.nif</Attribute>
<Attribute Class="Era">ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
<Attribute Class="Scalar">bExtraGoalOnly:1</Attribute>
<Attribute Class="Scalar">szForceContourGeometry:Shadow</Attribute>
<Scale>0.5</Scale>
</ArtRef>
<ArtRef Name="art:IMPROVEMENT_FARM2">
<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Farm/mod_eu_farm03.nif</Attribute>
<Attribute Class="Era">ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
<Attribute Class="Scalar">bExtraGoalOnly:1</Attribute>
<Attribute Class="Scalar">szForceContourGeometry:Shadow</Attribute>
<Scale>0.5</Scale>
</ArtRef>
<ArtRef Name="art:IMPROVEMENT_FARM2">
<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Farm/mod_eu_farm04.nif</Attribute>
<Attribute Class="Era">ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
<Attribute Class="Scalar">bExtraGoalOnly:1</Attribute>
<Attribute Class="Scalar">szForceContourGeometry:Shadow</Attribute>
<Scale>0.5</Scale>

</ArtRef>
<ArtRef Name="goal:IMPROVEMENT_FARM">
<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL</Attribute>
<Attribute Class="Bonus">BONUS_CORN</Attribute>
<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Farm/an_eu_farm01.nif</Attribute>
<Attribute Class="Scalar">KFM:Art/Structures/Improvements/Farm/an_eu_farm01.kfm</Attribute>
<Attribute Class="Scalar">szExtra:art:IMPROVEMENT_FARM1</Attribute>
<Attribute Class="Scalar">szExtra:art:IMPROVEMENT_FARM2</Attribute>
<Attribute Class="Scalar">iCropAreaMultiplier:10</Attribute>
<Attribute Class="Scalar">bCutTrees:1</Attribute>
<Attribute Class="Scalar">bZMode_Ground:1</Attribute>
<Attribute Class="Scalar">fTwist:-0.7853981633</Attribute>
<Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>

4 don't know how to use it :triceratops.nif (tank? bear doesn't work)
also minor things: alien skin : pink head
ashigaru pikeman pink pike
samourai pikeman pink body
empire longbowman pink arrow


THANKS 4 THAT long reading.......
 
1) I'm pretty surre you need UNITAI_NONE - doesn't seem to be your problem though.

2)
Code:
iNumMosques = player.countNumBuildings(gc.getInfoTypeForString( 'BUILDING_ISLAMIC_CATHEDRAL')
should be
Code:
iNumMosques = player.countNumBuildings(gc.getInfoTypeForString( 'BUILDING_ISLAMIC_CATHEDRAL')[b])[/b]

3) + 4) no idea

It would help if you posted the code with proper indentation... Also - you should have been able to work out the problem with 2) from the debug message.
 
Put code in [code ] tags. This will keep the tabbing and make it look much better.

pCity = playerY.getCapitalCity()
Where is playerY defined?

iNumMosques = player.countNumBuildings(gc.getInfoTypeForString( 'BUILDING_ISLAMIC_CATHEDRAL')
That's two ( and one ). Need one more ).

if (float(iNumMosques) / float(iNumCities)) * 100 / iPercentMosqueRequired:
That says: if (iNumMosques / iNumCities) * 100 / iPercentMosqueRequired HAS A VALUE (i.e isn't 0), do what follows. The only time it won't do what follows the if is if one of the variables is 0.
 
ok thanks for taking time to respond. i will try it when back home

UNITAI_NONE why will be changing to the fact that it appears on farms?
 
ps : here's the lines from pink units
</UnitArtInfo>
<UnitArtInfo>
<Type>ART_DEF_UNIT_ASHIGARU_PIKEMAN</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/ashigarupike/Pikeman.nif</NIF>
<KFM>Art/Units/Pikeman/Pikeman.kfm</KFM>
<SHADERNIF>Art/Units/ashigarupike/Pikeman_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>


</UnitArtInfo>
<UnitArtInfo>
<Type>ART_DEF_UNIT_SAMOURAI_PIKEMAN</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/samurai pikeman/pikeman.nif</NIF>
<KFM>Art/Units/Pikeman/Pikeman.kfm</KFM>
<SHADERNIF>Art/Units/samurai pikeman/pikeman_fx.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>



</UnitArtInfo>
<UnitArtInfo>
<Type>ART_DEF_UNIT_ALIEN2</Type>
<fScale>0.48</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/alien2/IncanQuechua.nif</NIF>
<KFM>Art/Units/Unique/Inca/Quechua/IncanQuechua.kfm</KFM>
<SHADERNIF>Art/Units/alien2/IncanQuechua_FX.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIQUE_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>



</UnitArtInfo>
<UnitArtInfo>
<Type>ART_DEF_UNIT_EMPIRE_LONGBOWMAN</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<NIF>Art/Units/empirelongbowman/Longbowman.nif</NIF>
<KFM>Art/Units/Longbowman/Longbowman.kfm</KFM>
<SHADERNIF>Art/Units/empirelongbowman/longbowman_fx.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
 
Lord Olleus said:
hmmm. What the hell are you on about?

EDIT: same response time woodelf;)

:)

We posted before he finished putting in his problems I guess...
 
Back
Top Bottom