Platy's Peculiar Pleasant Posh Python

@Zlako
It is no longer done that way.

@isenchine
The script data will break the maininterface
 
Platy, is it possible to code an object which would work as city, but can also move?
 
As in build stuff, heal units, grant culture etc? Nope
 
heya platy,

about uuuu:
1. the category "upgrade tree" in the pedia - shows the tech tree
2. there is no unit upgrade tree.



3. in previous versions of uuuu, you had in the pedia - "limited units" that was very good actually, good you bring that back? maybe a limited wonders/buildings while your at it?
 
1) There is a dropdown menu...

3) Use the sort function.
 
yup, thats what happens when i dont update it as often as i used too :)

thanks man.

once more thing,
can you adjust the manufacture resources to the current platypedia - i am unsuccessful in merging the pedia files from that mod comp to the current uuuu, its a key mod comp in my barsoom,
can you help?


and a question -
in the financial victory -
how do i change the amount of buildings (bank) required for the win? right now its 1.
 
Didn't bother to check.
Already stated, Banks in all cities. If you only have one city, naturally you only need one bank.
 
As in build stuff, heal units, grant culture etc? Nope

Let's relax requirements. I hope you are familiar with Mongol Camp unit from Warlord's Fraxis scenario. It "spawns" units based on terrain and turns of rest. Suppose we just want it generate culture only. Is that doable?
 
Generates Culture, yes.
But it will not retain ownership of the plots.
 
Ultrapack

Religions Advisor
No longer display founded info if no respective founding tech.


P.S.
Out of boredom, I tried implementing the Great General Bar back, then realize it is a bad idea. For it to be "up to date", it has to be refreshed every now and then (250ms), but it becomes a "give away" sign that the battle is won before the animations are concluded, which is why XP text in Unit Panel displays "?" instead.

So the only way it is not a "give away" sign, is either
1) By not updating it frequently
2) Looping through all units and checking if any is in the midst of a fight.
 
Could it be updated at the end of the turn instead of by ms? I don't know if that is even possible to code in there.

Dear platy, do you think you could turn your illustrious python brain to perhaps writing a religion screen founding code that would work with this founidng code?

It works with onbuildingbuilt.
You can probably see how it works just by looking at it. It basically looks to see if it is the religion founding building that has been built, then founds the builder civs corresponding religion.

Spoiler :
Code:
	#Religion
		iCapitol =gc.getInfoTypeForString("BUILDING_CAPITOL")
		if iBuildingType != iCapitol: return
		iPlay = pCity.getOwner()
		pPlay = gc.getPlayer(iPlay)
      # Perform string operation to get corresponding religion name, eg
      # "TXT_KEY_CIV_HOPEVLLE_DESC" => "RELIGION_HOPEVILLE"
      # For v11, fix bug found by Dresden, v10 feedback thread, post 5
      # Was: sCivdesc = pPlay.getCivilizationDescriptionKey()
		pCiv = gc.getCivilizationInfo(pPlay.getCivilizationType())
		sCivdesc = pCiv.getTextKey()
		sReldesc = sCivdesc.replace("TXT_KEY_CIV_", "RELIGION_")
		sReldesc = str(sReldesc.replace("_DESC", ""))
		iRel = gc.getInfoTypeForString(sReldesc)
		if iRel != -1:
			CyGame().setHolyCity(iRel, pCity, 1)
			pPlay.convert(iRel)
			Logger.writeLog(gc.getReligionInfo(iRel).getText() + " founded\n")
		else:
			Logger.writeLog("Unable to convert " + sCivdesc + " to religion\n")
 
If it is at end of turn or whatever, then it is definitely not up to date, since obviously i can fight 10 battles before end of turn.

So either it is up to date but waste of performance for constant looping, or it is up to date but leaks info.
 
Hey :D
Just turned python exceptions on and...

Donno if its my setup but if I add CvMapGeneratorUtil.py to python folder (original or modded version) it come up with error on all mapscripts that : "Import Error: cannot import name BonusBalancer".

So I tried to put original CvMapGeneratorUtil.py (from civ4 folder not the Warlords one as it seems older) into your latest PlatyUI and error still come up. Any clues what might be wrong?

Strange thing is, that without python exceptions on, game runs fine, but as soon as turning them on, game wont start???

Cheers
Vincentz :D
 
I would take the file from Warlords, even if the date seems older. It contains the class BonusBalancer, the vanilla one doesn't.
 
Yup, that works. Thanks :D

Sometimes you just gotta love the easy solutions ;)

Strange thing is, I've been using the Marsh CvMapGeneratorUtil.py since beginning of times, and havent seen any python errors before.

Well, stuff is working, case is closed :D
 
Hey platy, I am having trouble getting the city screen filters to work properly, some don't seem to work at all, like the prereq filter and the food filter, others seem to do strange things like the culture filter removes things that produce no culture..

I am just wondering how these work, and where the code for them is located, I have found one section but I am not sure if this is all the code, or if there is more somewhere else.

I have seem them work in the base mod, so I am not sure why they don't work properly for me, just trying to work out how they look for things and make deicisions, incase something is missing or relabelled or what!?!
 
Based on advisor types. If XML is screwed, naturally it filters wrong stuff.
Prereq will work unless dll is messed, sorts by canTrain function.
 
Right yeah, so I have to go through and set the right advisor types in the building xmls, that is something I haven't done in the past, but fine that one makes sense and is an easy fix :)

Can you elaborate a bit more on the prereq one. I have a custom .dll so that is obviously playing some part, what do you mean by messed?

Also does the cantrain function work with buildings or just units?

Basically I have a lot of buildings that have prereq buildings, using the standard xml tag in the buildinginfo. Would this work with a cantrain filter?

Also, I have found how to move up the specialists section in the city screen to give me some room underneath it, but I cannot find where to move up the great specialist icons and the GP Bar in that section. Where is that placement specified?
 
Top Bottom