Platy's Peculiar Pleasant Posh Python

I refuse to spend 5 mins to code something which you can access in 5 seconds by pressing one button.
 
Dead civs were never there in the first place in BTS, so why bother to write a statement :D
 
ugh, it is so long since I have played standard civ I can't remember anything anymore!

My whole world right now is just a blur of options and non-options and differences and comparisons and headaches!!

I am trying to approach everything as step by step and itemised as possible to come to a conclusion of what it is actually want to achieve! :D Right now it is mostly just not having the python crash all over the shop :D But that doesn't have anything to do with either mod, just my complete stupidity :D

Right now I am getting syntax errors from 'left in' BUG code in the CvMainInterface file
 
Ultrapack

Added basic Civ4lerts, activated via Advisors Options
1) Growing next turn
2) Unhappy next turn
3) Unhealthy next turn
4) Expanding next turn
5) Starving next turn

6) Has Grown
7) Is now Unhealthy
8) Is now Unhappy

9) Can Hurry World Wonder/Unit with X Gold/Pop
 
Me again!

So on continues my quest of many headaches, but I am currnetly getting this error message from a bit of code that the J made for me once upon a time to display the 'ranged combat strength' of my units (as range combat is a big part of the mod).

Any idea why this wouldn't be happy in your code?

The file is CvMainInterface

name error

name 'pHeadSelectedUnit' is not defined

Spoiler :
Code:
###combat-aircombat - start
	szLeftBuffer = u""
	szRightBuffer = u""
	[COLOR="Red"]if (pHeadSelectedUnit.getDomainType() != DomainTypes.DOMAIN_AIR) and (pHeadSelectedUnit.airBaseCombatStr()>0):[/COLOR]
		if (pHeadSelectedUnit.canFight()):
			szLeftBuffer = localText.getText("INTERFACE_PANE_RANGED_STRENGTH", ())
			if (pHeadSelectedUnit.isFighting()):
				szRightBuffer = u"?/%d%c" %(pHeadSelectedUnit.airBaseCombatStr(), CyGame().getSymbolID(FontSymbols.STRENGTH_CHAR))
			elif (pHeadSelectedUnit.isHurt()):					
										szRightBuffer = u"%.1f/%d%c" %(((float(pHeadSelectedUnit.airBaseCombatStr() * pHeadSelectedUnit.currHitPoints())) / (float(pHeadSelectedUnit.maxHitPoints()))), pHeadSelectedUnit.airBaseCombatStr(), CyGame().getSymbolID(FontSymbols.STRENGTH_CHAR))                                                               
			else:
				szRightBuffer = u"%d%c" %(pHeadSelectedUnit.airBaseCombatStr(), CyGame().getSymbolID(FontSymbols.STRENGTH_CHAR))

	szBuffer = szLeftBuffer + szRightBuffer
	if ( szBuffer ) and (pHeadSelectedUnit.getDomainType() != DomainTypes.DOMAIN_AIR) and (pHeadSelectedUnit.airBaseCombatStr()>0):
		screen.appendTableRow( "SelectedUnitText" )
		screen.setTableText( "SelectedUnitText", 0, iRow, szLeftBuffer, "", WidgetTypes.WIDGET_HELP_SELECTED, -1, -1, CvUtil.FONT_LEFT_JUSTIFY )
		screen.setTableText( "SelectedUnitText", 1, iRow, szRightBuffer, "", WidgetTypes.WIDGET_HELP_SELECTED, -1, -1, CvUtil.FONT_RIGHT_JUSTIFY )
		screen.show( "SelectedUnitText" )
		screen.show( "SelectedUnitPanel" )		
		iRow += 1						
###combat-aircombat - end
 
How am I supposed to know where you paste the code... Obviously it is not defined in that chunk you posted :D
 
Updates:

Air Strength and Strength both display if relevant for unit panel.
If both are displayed, range info will not be displayed.

Advisors Unit Combat Feats rewrote to allow smooth in game python testing.
 
Back
Top Bottom