Python Modding

I was missing a colon at the end of the line. Here is what it should be:

Code:
					if pTarget.isCity():
 
updated with a little extra time taken sorry
 
In my file, I have:

Code:
		pPlot = argsList[0]

If you don't copy this over line 500. If you do, I'm not sure of the error.
 
I've updated the ingame errors
 
Same error when loading when I put your code in
 
For the main interface file (CvMainInterface), overwrite lines 1516 to 1568:

Spoiler :
Code:
					###### Unit Buttons ######
					pUnit = g_pSelectedUnit
					iUnitType = pUnit.getUnitType()
					pUnitOwner = gc.getPlayer( pUnit.getOwner( ))
					if pUnitOwner.isTurnActive( ):
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_2')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_2')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 660, 660, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_1')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_1')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 661, 661, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if (pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_1')) or pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_1'))):
							screen.appendMultiListButton( "BottomButtonContainer",ArtFileMgr.getInterfaceArtInfo("INTERFACE_FORCE_1").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 662, 662, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_3')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_MIND_TRICK')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 663, 663, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if (pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_4')) or pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_4'))):
							screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_FORCE_4").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 664, 664, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if (pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_2')) or pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_2'))):
							screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_FORCE_2").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 665, 665, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_4')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_4')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 666, 666, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_1')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_1')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 667, 667, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_4')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_4')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 668, 668, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if (pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_3')) or pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_3'))):
							screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_FORCE_3").getPath(), 0, WidgetTypes.WIDGET_GENERAL, 669, 669, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if (pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_3')) and not pUnit.getScriptData() == "Has cast Mind Control"):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_3')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 670, 670, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1
						if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_LIGHT_SIDE_2')):
							screen.appendMultiListButton( "BottomButtonContainer", gc.getPromotionInfo(gc.getInfoTypeForString('PROMOTION_LGIHT_SIDE_2')).getButton(), 0, WidgetTypes.WIDGET_GENERAL, 671, 671, False )
							screen.show( "BottomButtonContainer" )
							iCount = iCount + 1

This is what's confusing me, though. There should be an equals sign between pPlot and argsList[0] (line 500, CvEventManager). But in the error message, there is no equal sign...
 
There was an equals sign I had just forgotten it
 
Do you need python or just XML to change the dating system cause we need to change it to star wars tim aka bby and aby
 
Do you need python or just XML to change the dating system cause we need to change it to star wars tim aka bby and aby

There's this in GlobalDefines.xml to control the starting year:

Code:
	<Define>
		<DefineName>START_YEAR</DefineName>
		<iDefineIntVal>-4000</iDefineIntVal>
	</Define>

But all you'd have to do is add this to your game text files:

Code:
	<TEXT>
		<Tag>TXT_KEY_TIME_BC_SAVE</Tag>
		<English>ABY-%s1_Date</English>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_TIME_BC</Tag>
		<English>%d1_Date ABY</English>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_TIME_AD_SAVE</Tag>
		<English>ABY-%s1_Date</English>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_TIME_AD</Tag>
		<English>%d1_Date ABY</English>
	</TEXT>
 
Thank You have you found out how to fix the other problems in the python
 
I'm not sure. My line 1521 in CvMainInterface.py has nothing to do with buttons, it reads:

Code:
if pUnit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_SIDE_2')):

I've reuploaded the python folder and mapscript with all the existing bugfixes. Download them again and see if you still get the error (and the error in the Event Manager).
 
Do I need to do anything to make it start in 4,000bby and end in 1500 aby
 
Do I need to do anything to make it start in 4,000bby and end in 1500 aby

I'm not entirely sure how to do this. You should probably ask in the C&C forum...
 
The ones when you try to load a game have been updated
I'll ask there a little later
 
The ones when you try to load a game have been updated
I'll ask there a little later

This is because you have no such thing as "PROMOTION_DARK_SIDE_1" or any of the force promotions.

Try adding them into CIV4PromotionInfos.xml first (DARK_SIDE_1-4 and LIGHT_SIDE_1-4)
 
I'll add those in soon
Which promotion should I make it off
 
New Erors ingame
 
I'll add those in soon
Which promotion should I make it off

Combat 1 has the least extra stuff in it. But:

1. You might want to make it only available to UNITCOMBAT_FORCE (units who can use force powers), then define this in UnitCombatInfos.xml, and give all units like UNIT_JEDI and UNIT_SITH UNITCOMBAT_FORCE.

2. You should probably make each promotion give -5 combat (where Combat 1 gives +10), to weaken Jedi/Sith with force abilities in combat. (That way, you have to specialize your units- are they casters or fighters?)

3. Light 1 leads to Light 2, etc. Dark 1 leads to Dark 2, etc.
 
What are the names to the force power for the description and the buttons I need them
 
I've added the force powers in game they aren't giving error messages
Now there are just the ingame errors
The game worked through the errors but didn't create any land just fallout supernovas and tundra. do you know whats wrong? can you fix it?
 
Back
Top Bottom