Platy's Peculiar Pleasant Posh Python

Code:
	def doGrowth(self,argsList):
		pCity = argsList[0]
## Avoid Growth ##
		sScript = pCity.getScriptData()
		if len(sScript) == 2:
			sHappy = sScript[0]
			sHealth = sScript[1]
			if sHappy == "1":
				if pCity.happyLevel() < pCity.unhappyLevel(0):
					return True
				if pCity.happyLevel() == pCity.unhappyLevel(0):
					if pCity.getFoodTurnsLeft() < 2:
						return True
			if sHealth == "1":
				if pCity.goodHealth() < pCity.badHealth(False):
					return True
				if pCity.goodHealth() == pCity.badHealth(False):
					if pCity.getFoodTurnsLeft() < 2:
						return True
## Avoid Growth ##
		return False

Isn't that what the code is doing?

Sorry, don't worry about it.:cool: In RoM:AND Afforess added code that if you wanted the city to grow you needed to return False and if you wanted the city not to grow you need to return True reversing the meaning of the call back. Any mod using your mod wont be using Afforess dll mod so there is no problem.
 
Tech Diffusion

Features:
Lower Rank Teams get free Tech Progress from Higher Teams Met

1) Only if Team belong to Lowest 33% Rank Teams
2) Only if Team Met Transfering Team
3) Only if Team Lower Rank than Transfering Team
4) No Transfer from Furious Team Leader

Code:
self.iRankDivisor		= 3	## For teams ranked last 1/X portion
self.fBase			= 0.50	## Base Transfer Rate
self.fOpenBorderBoost		= 0.50	## + X if Open Borders
self.fEraBoost			= 1.00	## + X Per Era Advance of Transferee
self.fAttitudeMultiplier	= 0.50	## Furious: 0x, Annoyed: 1x, Cautious: 2x, Pleased: 3x, Friendly: 4x

Code:
fBase = self.fBase + (pPlayerX.getCurrentEra() + 1 - iEra) * self.fEraBoost
fBase += self.fOpenBorderBoost * pTeam.isOpenBorders(iTeamX)
fBase *= pPlayerX.AI_getAttitude(iPlayer) * self.fAttitudeMultiplier
fBasePercent += fBase * 100 / gc.getHandicapInfo(pPlayer.getHandicapType()).getResearchPercent()

Base Transfer Rate = 0.50 %
Increased by 0.50% if Open Borders
Increased by 1.00%/Era if Tranfering Team Leader at higher Era than the Tech
Multiplied by 0 to 2 based on Attitude
Adjusted based on Handicap
Max Progress capped based on Tech Era according to Era Info's Research Percent
 
Sorry, don't worry about it.:cool: In RoM:AND Afforess added code that if you wanted the city to grow you needed to return False and if you wanted the city not to grow you need to return True reversing the meaning of the call back. Any mod using your mod wont be using Afforess dll mod so there is no problem.

No difference...
Even in vanilla BTS, that is the same case.
Return False to grow, Return True not to grow.

Which is why, when there are no codes there, it will always return False to allow growing in normal conditions.
 
That one is too troublesome because that requires callback

Requirement Script: I don't understand as it looks like you're using Cannot Construct and Cannot Train Callbacks, no?
 
What keldath wants is for manufactured resources which atm don't need callbacks
 
Load it just like any other mod or any other mod components here.
It may ctd if there are conflicting stuff in custom assets like bug
 
Load it just like any other mod or any other mod components here.
It may ctd if there are conflicting stuff in custom assets like bug

Nope deleted the complete folders in there?? I am having a hard time getting any other mod to play, also, so i might have to uninstall Civ IV:eek: and do a complete re-install:whew:
 
Try loading something else like pedia or wb standalone.
If they also ctd without reason, your bts may have been modified.
 
Try loading something else like pedia or wb standalone.
If they also ctd without reason, your bts may have been modified.

Tried UI but it CTD also, dang i dont want to un/re-install BtS again :sad:

You just place the Platy UI in the mods folder correct?


EDIT: OK reinstalled BtS now it works, thx.
 
I mean try anything else other than the ultrapack, like pedia standalone, wb standalone, advanced tech screen standalone.
All of them are simply placed in mod folder and load just like other mods.
If none of them can work, chances are you modified your bts files while working on c2c.

Can you load any bts mods like final frontier or next war?
 
Tech Diffusion

Rearrange codes to be more efficient.

Difference is that Diffusion Rate from all transfering players is no longer added together before calculating the transfer amount.
Result is that techs which are too cheap may not be transfered when rate too low due to rounding down difference.

Example:
Ancient Tech of 100 Cost
Future Tech of 10000 Cost
Player A transfer rate 0.5%
Player B transfer rate 0.5%

Previous version:
Ancient: Total Transfer Rate: 1% of 100 => 1
Future: Total Transfer Rate: 1% of 10000 => 100

New version:
Ancient: Individual Transfer Rate: 0.5% of 100 => 0
Ancient: Total Transfer Rate: 0
Future: Individual Transfer Rate: 0.5% of 10000 => 50
Future: Total Transfer Rate: 100
 
Avoid Growth 2

Features:
Adds a new Graphic Option: Auto Avoid Growth
Don't ask me why graphic option...

When city is turning unhealthy/unhappy or is already so, Avoid Growth is turned on automatically.

When city is back to normal status, Avoid Growth is turned off automatically.

If option is turned off, Avoid Growth can be manually triggered.

Differences between version 2 and version 1:
No longer uses city script data, so easier to merge.
No buttons to press in city screen, since it makes use of the avoid growth directly.
 
Ultrapack

1) Changed Wonder and Era Movie Screens to be Full Screen rather than one small window stuck in the corner.

2) Changed Era Movie to be read from Art Define Movie File, such that it can actually display a real movie in bik, nif or dds format just like normal Wonder Movie.
Thus, whoever is bored can actually create real era movies rather than the dull picture.

3) Changed All Movies to be able to be in bik, nif or dds format regardless of whether it is wonder, project, corporation or religion.
Previously wonders and projects have to be in bik or dds while corporations and religions have to be in nif.

4) If Religion/Corporation Movie is in bik format, it will display Pedia Text at end of movie.

5) Corporations will now display Movies if there are any.
Corporations come with Movie Tag in the XML, just that it was never used...

6) Wonder screen no longer show up if there is no respective movie to display.
Such as new wonders with no movies.
 

Attachments

  • Civ4ScreenShot0008.JPG
    Civ4ScreenShot0008.JPG
    89 KB · Views: 155
Ultrapack

7) Incorporates Hero Movies.
World Units with respective Art Define Movie Path will play movies when built.
ART_DEFINE_MOVIE_UNIT_PLATYPING

8) Changed movie text to display with ANY key or mouse

9) Movie text will now display even for movies not in bik format, including religious ones done in nif format.
However, movie text has to be manually triggered with ANY key for movies not done in bik format.
Movie text for bik format will still be as usual, played at end of movie automatically or triggered manually with key/mouse.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    137.7 KB · Views: 156

Yup. I must have made a mistake while merging the Requirement Script with my own mod.:hammer2:
Anyway, I did it over, and it totally works now.:woohoo:
Thanks again for your awesome scripts, platyping!! :worship:
 
Top Bottom