Platy's Peculiar Pleasant Posh Python

Not sure what you meant by permanent...
Anything adjusted by the WB is one time adjustment, just like adding units, give gold, activate golden age.

Of course, if you adjust the attitude from furious to pleased, it does not stay pleased permanently, as it is just a one time adjustment, which will then be subject to in game changes again.
 
Platypedia 2.0 Sneak Preview

A Pedia that fits every size

Pedia20A_zps8c7576b9.jpg


Pedia20B_zps476b74ac.jpg


A Pedia that shows more info

Pedia20C_zps8e6a611c.jpg


Pedia20D_zps62b8a42c.jpg
 
well done platy, looks great.

say - this code from pesky:

## Select avaialble plots ##
lLuckyPlot = []
for x in xrange(pCity.getX() - self.iRadius, pCity.getX() + self.iRadius + 1):
for y in xrange(pCity.getY() - self.iRadius, pCity.getY() + self.iRadius + 1):
pLoopPlot = CyMap().plot(x, y)
if pLoopPlot.isNone(): continue
if pLoopPlot.isImpassable(): continue
if pLoopPlot.isCity(): continue
if pLoopPlot.isWater(): continue
if pLoopPlot.getTeam() != iTeam: continue
lLuckyPlot.append(pLoopPlot)

the "continue" means skip? not to spawn on this plot?
if i wat the spawn to occur on certain terrain- only desert per say?


ANOTHER from pesky -

## Based on Era, Ancient >>> Future ##
self.lUnits1 = ["UNITCLASS_BURROW0","UNITCLASS_BURROW1", "UNITCLASS_BURROW1", "UNITCLASS_BURROW3", "UNITCLASS_BURROW3", "UNITCLASS_BURROW4", "UNITCLASS_BURROW4"]
self.lUnits2 = ["NONE","NONE", "NONE", "NONE", "NONE", "NONE", "NONE"]
self.lUnits3 = ["NONE","NONE", "NONE", "NONE", "NONE", "NONE", "NONE"]
self.lUnits4 = ["NONE","NONE", "NONE", "NONE", "NONE", "NONE", "NONE"]

i did this - those units are only buildble by barbarian civ - al other civs have >none< on this unit class,

but - the units pesky bards are spawning are none of the one i listed -i picks one of the late game units and spawns it.

what have i done wrong? (i have 7 eras in game - like regular)
 
One final idea (this is more of a request than a meaningless idea this time)
Would it be possible to make a civics screen that only displays civics that can currently be adopted, or just a much-much-larger civics screen? I am trying to make a mod with unique civics, without using SDK, and this would be insanely helpful.
 
@Merkava
Ultrapack already comes with a civic screen
Big enough to display 2 billion Civics.
Should be enough for you.

@Keldath
Yeah, continue means hack care.
Add another if condition before the append statement.
If Terrain is Desert: Append the plot.

Because it reads UNIT not UNITCLASS
 
@Merkava
Ultrapack already comes with a civic screen
Big enough to display 2 billion Civics.
Should be enough for you.

Oh yes! Thank you very much. 2 billion should be enough. :crazyeye:
 
Updated Ultrapack with Pedia 2.0 Beta
The Pedia is already in optimal conditions, but there are some other things I want to implement later.
 
@Keldath
Yeah, continue means hack care.
Add another if condition before the append statement.
If Terrain is Desert: Append the plot.


if pLoopPlot.isNone(): continue - what does isnone mean?
if pLoopPlot.isImpassable(): continue
if pLoopPlot.isCity(): continue
if pLoopPlot.isWater(): continue - if i delete this - it will create pesky barbs on water plots?if pLoopPlot.getTeam() != iTeam: continue

can you show an example for not spawn in a certain terrain type?
ifploopplot.isdesert(): continiue
i guess theres another part needs to be written somewhere to define the terrain? self.desert of something? (i have no idea how to write) :)


Because it reads UNIT not UNITCLASS

wow im such an idiot, must have worked too late yesterday.
thanks my friend.

anyway, many thanks for all the help.
 
None checks if plot is valid, although there is a shorter way.
Those units do not swim, so exclude water plots.

if pLoopPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_XYZ"):
 
ah nice,

ah nice, ill add this to the list.

so basically - if i duplicate yhe entire python files of pesky - and i call it - pesky2,
and i define water units - i can get 2 pesky barbs? 1 that will spawn units on water and one that will spawn land ones (your current code) ?
 
I can of course, alter the codes to accomodate Naval Units and allow them to spawn on Water Plots while all others spawn on Land Plots.

The reason why I ignore them is to make life simple so that all units can spawn on same plot, so that they will be stronger rather than spread all over the place and die like flies.
 
You talking about spawn, i want something similar like from FFH age of ice (official BTS mod comes with BTS installation), Feature spawn units! In FFH2 that done in SDK i think.

IMAGE:

QVR8ZCh.jpg


this is FEATURE_HUT from picture (from FFH age of ice), i am found it in all (python files): CvGameUtils.py and CvModEvents.py and in xml (default).. How i can merge this (python), advice please? Or can you make some py. component like this which will spawn units from improvements or features, which we can modify how we want?

Platy --> :egypt:
 
Implementation is easy, making it efficient is not.
What it does is simply loop through every plot every turn, check for the hut and spawn units
 
I can of course, alter the codes to accomodate Naval Units and allow them to spawn on Water Plots while all others spawn on Land Plots.

The reason why I ignore them is to make life simple so that all units can spawn on same plot, so that they will be stronger rather than spread all over the place and die like flies.
__________________

well that would be very nice, pesky barbs land and pesky barbs water :) maybe throw in a terrain spawn tag :)
 
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>

Hi, Platy. I use this code you wrote for me. Could you do it attributed to obsolete code, please?
 
Back
Top Bottom