Platy's Peculiar Pleasant Posh Python

If you look into the WonderMovieScreen file, you will find
Code:
## Natural Wonders - Start 
		elif self.iMovieType == 3:
			sType = gc.getFeatureInfo(iMovieItem).getType()
			szArtDef = CyArtFileMgr().getMovieArtInfo("ART_DEF_MOVIE_" + sType[sType.find("_PLATY_") +7:])
			if szArtDef:
				self.szMovieFile = szArtDef.getPath()
## Natural Wonders - End

Because there is no ArtDefineMovie tag for Features, so the codes here will look for a corresponding hard coded ArtDefineMovie tag based on the Feature Type tag.

So if you renamed the Wonder Type tag to something else, without changing this code, it is not going to find its corresponding Movie file.

Of course there is no issue with buildings because those are done via the XML tag which comes with the BuildingInfo.xml file.
 
Hey . I have to ask for help. I use Goody Island by Kathy . There is a problem with your barbariancamp . Could you please edit barbariancamp code so that the fort appeared only on land squares , please . Now I sometimes get fort on the water. :) Thanks for the answer
Hroch
 
Ultrapack TechTree

Revamped the way Tech Tree is coded.

BTS Tech Tree:
For every single tech, loop through all buildings, units, civics, improvements etc to see what is unlocked by this tech.

For a mod with 1000 techs, 2000 buildings, 3000 units, 4000 promotions, what happens is you need to loop through a total of:
1000 x (2000 + 3000 + 4000 + etc)
which means millions.

Platy UI Tech Tree:
Loop through all buildings, units, civics etc once to determine which tech unlocks it.
Then loop through all techs and display the unlocked benefits.

For a same mod:
1000 + 2000 + 3000 + 4000 + etc
which means 10,000 + etc

Pedia Tech Tree
Updated to similar fashion
 
Tried it with VIP.
From 13 sec to 3 sec on my 4 year old laptop.
 
Ultrapack TechTree

1) Vertical Spacing between Panels now scale with Resolution.
This means for high resolution, the panels will be spaced further apart vertically such that they fill up the whole screen, rather than squeezed at the top portion only.

A minimum of 10 is set for the vertical spacing, such that it is not too tight for low Resolutions.

2) Reworked the arrow placement codes, for the above, and to ensure that certain arrows are no longer placed directly at tip of the panel boxes.
Eg, Priesthood to Writing

Applied to Pedia as well
 
hey there platy,

how are you friend?


suggestion for a mod:

limit units per tile -
a python code that wil limit units per tile - with the ability for a modder/player
to define how much units can be placed - 1-10 - 100....
maybe even set a limit for each unit class.

how does that sound?

my thoughts are on a limit of 5-10 units.
the ai can handle 5-10 units per tile i guess. can be fun.
 
Adding such a limit is easy as pie.
But no AI has ever been taught how to handle XUPT.
Nope, never, forever.

Even Civ V is forever screwed with dumb AI.
 
There is a minor problem with the Movement Limit mod - when you pop a unit from a goody hut and it is to far from your borders it can't move.
 
Movement Limit

1) Fix a bug where it is checking plots (x, x) instead of (x, y)

2) Added PythonCallbackDefines file which was somehow missing....

3) Units spawned from Goodies will teleport to nearest city if they are not movable.
 
The problem is that the ai never really knows about it, if the ai neveer gets to 10-15 units, then there isn't much point having a limit that high, but if it does there can be problems. One of the big ones is cities, if you have 10 units in a city and you build one more, what happens?

Karadoc made good compromise with his 'disorganised' demotion, that is applied to every unit in a large stack giving it -10% strength. Making giant sacks less effective, but not in a way that causes big problems.
 
Fix some issues with advisor pop ups for feats for units
 
Hi Platy,

I am wondering if you could do me a favour and show me how to modify this bit of code:

Spoiler :
Code:
iBtnWidth = 16
				iX = xResolution 
				iY = yResolution - iBtnWidth * 7
				lAdvisorIcons = ["[ICON_STRENGTH]", "[ICON_RELIGION]", "[ICON_GOLD]", "[ICON_RESEARCH]", "[ICON_CULTURE]", "[ICON_FOOD]"]
				for i in xrange(6):
					sText = CyTranslator().getText(lAdvisorIcons[i], ())
					if self.lAdvisors[i]:
						sText = CyTranslator().getText("[COLOR_RED]", ()) + " X" + "</color>"
					screen.setText("AdvisorFilter" + str(i), "Background", "<font=2>" + sText + "</font>", CvUtil.FONT_LEFT_JUSTIFY, iX - 350, iY, -0.1, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_PYTHON, 7001, i) ##advisor filter position ##
					iY += iBtnWidth

				[COLOR="Red"]sText = " P"[/COLOR]
				if self.bPrereq:
					sText = CyTranslator().getText("[COLOR_RED]", ()) + " X" + "</color>"
				screen.setText("PrereqFilter", "Background", "<font=2>" + sText + "</font>", CvUtil.FONT_LEFT_JUSTIFY, iX, iY, -0.1, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_PYTHON, 7001, -1)
				
				iX = iMultiListXL
				iMaxButtons = iWidth / iBtnWidth
				if (self.iCombatLayer + 1) * iMaxButtons < (gc.getNumUnitCombatInfos() + 1):
					screen.setButtonGFC("CombatLayerPlus", "", "", xResolution - iMultiListXR, iY, iBtnWidth, iBtnWidth, WidgetTypes.WIDGET_GENERAL, 1, -1, ButtonStyles.BUTTON_STYLE_ARROW_RIGHT)
				if self.iCombatLayer > 0:
					screen.setButtonGFC("CombatLayerMinus", "", "", iX - iBtnWidth, iY, iBtnWidth, iBtnWidth, WidgetTypes.WIDGET_GENERAL, 1, -1, ButtonStyles.BUTTON_STYLE_ARROW_LEFT)
				iStart = self.iCombatLayer * iMaxButtons

To use a button image instead of a P

Basically for some reason it does not appear in my mod, and I have no idea why..

All of the other filter icons appear just fine, but the P is missing...

So I am wondering, if I change it to something similiar to the advisor and combat filter icons, if that will somehow fix the issue.. (As in perhaps it is some issue with fonts or whatever)

I tried to wrap my head around this sections and see if I could replicate it, but I just do not have a firm enough grasp of how it is all fitting together..

If you could provide me with a code snippet, that would be great, or any thoughts you may have on why you think this one icon could maybe disappear, it would be much appreciated.

It is jsut a pain cause this was the filter option that my mod REALLY Needed!! and it is the only one that doesn't work! :D (I have such good luck...)

EDIT: In more recent versions have you changed the prereq filter to a different Icon? A star?
 
It takes you less time to download the latest version compared to waiting for my reply.
P has been replaced with a star.
 
Top Bottom