Platyping's Python

Ah I see lol, usually I just copy and paste name to search :D
So you want the national wonder to affect all naval units (existing and newly built ones in all cities) similar to Magellan?

If you only want it to affect newly built naval units in that city, then I guess the only way is adding a new promotion granted by that wonder only.

Because python commands, I only know
1) changeDomainMoves affects all existing and newly built ones
2) changeMoves affects selected unit(s) but it seems to change the current move points rather than base move points
 
However, if you only want new units built in the Rose City to get the movement bonus, I doubt it can be done, because only method I know of is changing domain movement for all units. So it is either affect all (including existing ones) or none

Maybe I'm missing something here but the Wonder being a Building could grant a free Navigation1 Promotion to all newly built ships (via the XML tag), just like the BUILDINGCLASS_VIKING_TRADING_POST does it, no?
 
If you only want it to affect newly built naval units in that city, then I guess the only way is adding a new promotion granted by that wonder only.

Posts crossed! So you already figured out half of the solution!:lol:
 
I won't suggest using an existing promotion though, because what he wants is an additional movement point.

1) He may have wanted the additional point together with all navigation promotions, which effectively give +3 movements. Using an existing promotion will still restrict it to +2 movement
2) As you mentioned, certain buildings already give the Navigation1 promotion, as such having this wonder does nothing for Vikings

This is why I suggested a totally new Navigation3 promotion, which cannot be gained from other methods, so that Vikings can still benefit and if you have Navigation 1, 2, 3, you get a total of +3 movements :D
 
Hummm... I see... but Navigation1 and Navigation2 have the same effect, they give one additional movement (and one is counted after the other).

So perhaps the wonder could grant Navigation2 (it might feel a bit odd though) so that the Vikings could still benefit from it.

With Navigation3, it starts to be too much for my taste...
 
Thats why in my idea it can only benefict one coastal city.

To make it harder to get it can be a world wonder that works only for the city where it was built (if this customization is possible), all civs competing for this wonder picking the right strategic coastal city.

Thanks :)

Edited: Or it could only be built on a point similar to sagres point, that city´s would have alot of water surrounding connected by a single point to a continent, not beneficting of many land resources, but I dont know if that possible in the game customization.

Edited 2: I just saw padrao requires 60% water tiles so what I said above seems sort of possible.

Edited 3: Adding up to my suggestion the compass rose only works with wind sail boats (is that possible?). (invented with compass also)
 
1) The problem does not lie in whether it is a world wonder or national wonder. The problem lies in that there are only 2 python codes as I mentioned related to movement points.
Code:
A) changeDomainMoves affects all existing and newly built units
B) changeMoves affects selected unit(s) but it changes the current move points rather than base move points. So it is not useful here
It is either all units everywhere, or nothing.

Certain wonders like springfield and venetian affect only the newly built units in the wonder city only, because there are python codes related to the respective benefits for just the selected units. Change of BASE movement however, is not available for just selected units.

2) Padrao 60% water tiles refer to whole map, not just city radius, although that can be done as well.

3) As mentioned, change in base movement points is only for ALL units of a certain domain, sea in this case. Thus, not possible to restrict it to just destroyers but not iron-clads for instance.

Solution:
To get exactly what you want would have to be done with dummy promotion. Can be restricted to just certain ships with python. Can also restrict it to be buildable only in cities with x water tiles as well.
 
Spoiler :
Code:
def cannotConstruct(self,argsList):
		pCity = argsList[0]
		eBuilding = argsList[1]
		bContinue = argsList[2]
		bTestVisible = argsList[3]
		bIgnoreCost = argsList[4]

## SOQ Start ##
		if eBuilding == gc.getInfoTypeForString("BUILDING_SOQ"):
			if CyGame().getProjectCreatedCount(gc.getInfoTypeForString("PROJECT_MANHATTAN_PROJECT")) == 0:
				return True
## SOQ End ##
		return False

Set cannotConstruct python callback to 1
 
Never tried before, but doubt so.

Fixed Major Logic Bug with Padrao where Padrao will NOT be granted under certain circumstances.
Spoiler :
Code:
	def onFirstContact(self, argsList):
		'Contact'
		iTeamX,iHasMetTeamY = argsList

## Padrao Start ##
		if CyGame().getBuildingClassCreatedCount(gc.getInfoTypeForString("BUILDINGCLASS_PADRAO")) == 0:
			if CyMap().getLandPlots() /CyMap().numPlots() * 100 < 40 and CyMap().getNumLandAreas() > 1:
				pTeam = gc.getTeam(iTeamX)
				pTeam2 = gc.getTeam(iHasMetTeamY)
				if pTeam.isBarbarian() == false and pTeam2.isBarbarian() == false and iTeamX != iHasMetTeamY:
					pPlayer = gc.getPlayer(pTeam.getLeaderID())
					pPlayer2 = gc.getPlayer(pTeam2.getLeaderID())
					t_Optics = gc.getInfoTypeForString("TECH_OPTICS")
					b_Padro = gc.getInfoTypeForString("BUILDING_PADRAO")

					for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
						pPlayerX = gc.getPlayer(iPlayerX)
						if pPlayerX.isTurnActive():
							iActiveTeam = pPlayerX.getTeam()

					if iActiveTeam == iHasMetTeamY:
						if pTeam2.getHasMetCivCount(true) == CyGame().countCivTeamsAlive() - 2:
							if pTeam2.isHasTech(t_Optics):
								capital = pPlayer2.getCapitalCity()
								capital.setNumRealBuilding(b_Padro, 1)
				
						elif pTeam.getHasMetCivCount(true) == CyGame().countCivTeamsAlive() - 1:
							if pTeam.isHasTech(t_Optics):
								capital = pPlayer.getCapitalCity()
								capital.setNumRealBuilding(b_Padro, 1)

						if CyGame().getBuildingClassCreatedCount(gc.getInfoTypeForString("BUILDINGCLASS_PADRAO")) == 1:
							if (not gc.getGame().isNetworkMultiPlayer()) and capital.getOwner() == CyGame().getActivePlayer():
								popupInfo = CyPopupInfo()
								popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
								popupInfo.setData1(b_Padro)
								popupInfo.setData2(capital.getID())
								popupInfo.setData3(0)
								popupInfo.setText(u"showWonderMovie")
								popupInfo.addPopup(capital.getOwner())
## Padrao End ##

		if (not self.__LOG_CONTACT):
			return
		CvUtil.pyPrint('Team %d has met Team %d' %(iTeamX, iHasMetTeamY))

Database Updated
 
Thanks alot, time to think of something to do with it :D

Done :D
Fresh from the Oven

Changi Airport
Spoiler :

Civ4ScreenShot0012-4.jpg


National Wonder
2 Extra Airlifts per turn
2 Promotions not available for Air Units

This means an air unit can:
1) Rebase and attack/ Attack and rebase or... rebase and rebase :lol:
2) Airstrike twice :goodjob:
3) Bombarb uses 1 move point, but an air unit can only bombarb once per turn
4) Recon uses all move points, but you can do something else first before you recon.
5) Didn't test whether it can intercept multiple times.

Simple and Efficient

Artwork by Hrochland
 
how do the new features actually appear in the civlopedia? Because we did powers that wouldn't show in the civlopedia
 
You mean the special wordings like "Free Mobility Promotion for Air Units Built in this City"?
Add a Help Tag in the BuildingInfos.XML and respective TEXT msg in any XML file in the TEXT folder

Example:
Code:
<Strategy>TXT_KEY_BUILDING_BRANDENBURG_GATE_STRATEGY</Strategy>
<Help>TXT_KEY_BUILDING_BRANDENBURG_GATE_HELP</Help>
<Advisor>ADVISOR_MILITARY</Advisor>
 
I don't think we are on the same level...

You know on your wonder where there is 3 unhappy when not in state religion.... How does that show up as being a building effect?

because if I was to add a +1 air cap to a building it would show up in the pedia without me having to write a help entry...
 
Not too sure what you mean then.

Anything that is just a XML change in BuildingInfos.XML, yup you don't have to add a Help Tag.

Anything else that is specially done by python, you have to write a help tag.
"Free Mobility Promotion for Air Units Built in this City" is a special effect, because the default effects cannot restrict which units get the promotion, and which don't.
Similarly, "+3 Happiness when not in state religion" is another python effect, thus you need a help tag
 
oh really? does this work with civilisations as well?
 
Help Tag is available for some XMLs and not available for some.

You can take a look at the XXXSchema.XML and just search for
<ElementType name="Help" content="textOnly"/>
Didn't try exploring every kind of XML file, but it seems that it is available in CivilzationsSchema as well.
 
Back
Top Bottom