Platy's Peculiar Pleasant Posh Python

Special promotion for you since you provided pretty much half the artwork for my wonders :D

Code:
	def onCityDoTurn(self, argsList):
		'City Production'
		pCity = argsList[0]
		iPlayer = argsList[1]
##
		if pCity.getNumActiveBuilding(gc.getInfoTypeForString("BUILDING_STONEHENGE")):
			if not pCity.isDisorder():
				iUnit = -1
				iRandom = CyGame().getSorenRandNum(100, "zzz")
				if iRandom < 2:
					iUnit = gc.getInfoTypeForString("UNIT_ARCHER")
				elif iRandom < 4:
					iUnit = gc.getInfoTypeForString("UNIT_WARRIOR")
				if iUnit > -1:
					pNewUnit = gc.getPlayer(iPlayer).initUnit(iUnit, pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
					CyInterface().addMessage(iPlayer,True,15,CyTranslator().getText("TXT_HROCHLAND",(pNewUnit.getName(), pCity.getName(),)),'',0, pNewUnit.getButton(),ColorTypes(11), pCity.getX(), pCity.getY(), True,True)
					pCity.addProductionExperience(pNewUnit, False)
##

		CvAdvisorUtils.cityAdvise(pCity, iPlayer)

It assumes that the 2 units are specific ones like modern armors, which do not have UUs.
If you want it to spawn units which have UUs, then codes will be more complicated.
The last line adds XP to the new units as though they were built.
Remove if you want.

Code:
<Tag>TXT_HROCHLAND</Tag>
<English>[COLOR_HIGHLIGHT_TEXT]%s1 [COLOR_POSITIVE_TEXT]bleh bleh bleh [COLOR_HIGHLIGHT_TEXT]%s2[COLOR_POSITIVE_TEXT]![COLOR_REVERT]</English>
 

Attachments

  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    145.1 KB · Views: 83
I would like to ask where you have package your new victories (in one pack). I use religion and growth victory but growth is badly displayed in victory conditions. title only. I guess I have victories badly merged and I want to see what you have written you in original :)

EDIT: many many thanks for code. I´m going implement now :) :) Happy day if I today can mamage all errors in one day :) :)
 
As for the tracker...
What you want is just a tracker to display Net Happiness.
But I already explained to you 1000 times.
Net Happiness is already displayed in Domestic Advisor...

Until you can convince me otherwise, I don't see the point of coding it.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    32.8 KB · Views: 138
Religion Victory as I recall, is totally XML.
Hence, what is there to merge for Religion and Growth Victories together since only one has python? :D

Anyway, I didn't bother to make a pack for them.
 
Pretty obvious, none of the changes are effective since the buttons are not even there.
Place the python file in screens folder if you have one in the mod
 
Well done. Today, thanks to your help, I solved the long-standing problems and I can look around, what a new concept to improve my mod :) Thanks
 
Ultrapack Update

Added Era Specific Backgrounds as an option for those who are tired of seeing the same background for a whole game.

Naturally, you cannot have both Civ Specific and Era Specific active together.

Can't be bothered to find pics, so using the Era Movies directly, although you can change the pics yourself easily via XML.
 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    98.6 KB · Views: 172
  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    93.6 KB · Views: 104
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    96.3 KB · Views: 136
Have you done something to design new types of Commerce /Yield Classes?

For example Education or Tourism?

Same concept as Gold or Production in that a building can produce it and it also is a requirement for others to build.

Library +1 education +1gold
Requires 50 education (to build, like Production).

I believe it would require a new icommerce tag in Buildinginfos.

Buidingschema too

Basically a template, the only modification is the text name and icon. This is an icon :science:

Platypings CreativelyCommonCommerceClasses
 
Yield I believe, is SDK work, and there is already one somewhere that adds a 4th yield.

Commerce on the other hand, might be achieveable via XML since there is a CommerceInfo.xml.
Not necessarily for any adjustments in the BuildingInfo file.

The question is how to display how much of that commerce you have.
Gold can be done with getGold()
Culture, with getCulture()
 
Yield I believe, is SDK work, and there is already one somewhere that adds a 4th yield.

Commerce on the other hand, might be achieveable via XML since there is a CommerceInfo.xml.
Not necessarily for any adjustments in the BuildingInfo file.

The question is how to display how much of that commerce you have.
Gold can be done with getGold()
Culture, with getCulture()

Thanks I'll take a look at 4th yield, and CommerceInfo.xml
 
Pretty much anything can be merged together so long as there is no direct conflict.
Whether it is possible depends on your skills though.

Rev for instance was reported before that it changed the python code for adding new players via python which screwed up my worldbuilder, so additional codes have to be done.

Bug is another that makes default functions to no longer function unless it is done in their format
 
Out of retirement for 5 minutes.

1) Demographics graph in Info Screen now display correct real population rather than limited to 2 billion.

Refer to screenshot for real population for a 1000 pop city.

2) Something I wanted to do the other time.
Added Unit Combat Type display beside the name of the unit.

Edit:
Looking at screenshot 2, it looks dumb to display such a long number in such manner.
So some modifications are done and you end up with screenshot 3 for them to be in a much readable manner.
 

Attachments

  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    102.5 KB · Views: 308
  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    126.2 KB · Views: 349
  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    105.4 KB · Views: 207
Advanced Settler

Features:
There are many mods with Colonists which are advanced settlers that provide benefits to new cities, yet none of them realised the codes are simply malfunctioning.
Thus, this new mod comp simply provides the benefits so long as certain techs are researched.

Benefits:
1) Additional Population
2) Starting Culture
3) Buildings (Checked for Obsolete, Coastal etc automatically)

There are enough examples in AdvancedSettler file to show how to use them.

Civ4ScreenShot0003_zps946c92a8.jpg


Civ4ScreenShot0004_zps976b113e.jpg
 
I like the sound of this advanced settler stuff, I enjoyed it in ROM:AND.

I was wondering, is it hard coded for settlers, or could you give different settler units different levels of improvement?

Like Normal Settler gets improved culture with Monarchy, and Magic Settler gets Magic Building with Magical Power Tech.

This is not actually what I want to do, just an attempt to explain what I mean!
 
The traditional colonists code in those big mods are all trying to give different benefits for different types of settlers like what you meant.
Yet none of them realized the code is simply bugged without hope for repair and only works in the most general situation.

The settler promotions mod I have is the closest I can get to differentiated settlers but even that will fail under certain conditions.
 
Back
Top Bottom