• Civilization 7 has been announced. For more info please check the forum here .

Platy's Peculiar Pleasant Posh Python

Depends what you want on the bar.
1) If all you want is just name of city and (Turns) then there is more space indeed.
2) When you have more GPs, then there will still not be enough space, unless a limit (Eg 5) is set just to display top 5 types.

not what i am saying, i mean instead of the :culture: use the artist, , etc
 
Precisely.
If you noticed, the GP Bar in your screen only displays City Name (Turns)
Whereas mine displayed more info which is why takes more space.

2ndly,
Icons is a piece of cake because that whole chunk is just one string.
Buttons are more complicated...
 
Precisely.
If you noticed, the GP Bar in your screen only displays City Name (Turns)
Whereas mine displayed more info which is why takes more space.

2ndly,
Icons is a piece of cake because that whole chunk is just one string.
Buttons are more complicated...

I dont think i understand, sorry, all i am saying is (see the pic above ??) I am "wondering" if the :science::hammers::culture: can be replaced by (see attached AND also keep the % listed also??
 


1) See the image above...
If all you want is City Name(Turns)
Then there is space

2) Replacing icons with buttons is not as easy as you think
 
@Vincent
1) GP Bar Icon
That is because, the list of GP is hard coded in the python.
To do it the general way, means to loop through ALL units, which unfortunately is waste of time.

2) That is what I asked :D
Does it appear in other mods or vanilla BTS or just your mod?
Anyway, the whole upgrade file is imported directly from Sevopedia so I never bother to read through since it works...

3) Because there is no way to check that someone is a master without looping through all players and check if that player is a vassal of him. Again waste of time.

4) Look for this. All the default values are there.
Code:
def __init__ (self) :

1) Rgr. Tried to add Great Noble in the python, but mod crashed.
2) Yup, definately my mod. The unitupgradelines worked fine until I deleted a unit (the first unit which was an experimental Early barbaric Warrior). Now it shows python error too. Donno why it cannot calculate it right.
3) Roger. I guess the main thing is to see if they are vassals.
4) Found it. thanks :D
 
Ultrapack

1) New Culture Bar with button display. (Didn't change the one in standalone, since the text within the bar got changed, so you decide what you like)

2) New GP Bar (Displays % for top 3 GPs) (Again, didn't change for standalone)

3) Added Wonder Tracker (Still a U.I. enhancement, you don't get new info from it)
 

Attachments

  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    124 KB · Views: 97
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    136.2 KB · Views: 78
Resource Tracker

Features
Keeps track of resources in territory



Easy to tell which resource has been improved or not.
Useful lategame when missiles fly everywhere.
 
Cool :)

Can you add resource dropdown filter here please and alphabetical order please.
 
World Builder
1) Fixed bug with duplicate unit

Platypedia
1) Fixed bug when linked to graphical only items, such as Leader Promotion

Ultrapack
1) The above
2) Graphical Only buildings aka dummy buildings no longer show up in building list in cities.
3) Names of named units (usually Great General ones) now only show their names without the (Unit Type) (screenshot below)
4) Added 2 Trackers


Tracks status of Great General led units


Tracks joined Great Specialists

Notes:
Tables automatically come with sorting functions...

Edit:
Fixed few irritating bugs with vanilla BTS CvMainInterface
If you make a python change in game, your city screen changes from screenshot 1 to screenshot 2... unless you reload.
No longer in Ultrapack. Change all you like and the game continues smoothly.


As a player, this does not affect you.
As a modder, this is irritating.
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    97.8 KB · Views: 90
  • Civ4ScreenShot0001.JPG
    Civ4ScreenShot0001.JPG
    93.9 KB · Views: 61
Hmm the wonder trackers gices zero new info?
Then I probably missed it so far, but where could you check before how many turns does the AI need to complete a wonder?
 
hi platy,

first of all thank you, all of the uuuu+razing+golden age + pesky are filly combined and working perfectly.

i have a question about the pesky defines:

def getChance(self, pCity, pPlayer, iDifficulty):
iChance = 8 # used to be 10

this part controls the chance of spawning right? i lowered it to 8 so i hope its ok.

if pPlayer.isGoldenAge():
return 0

this means no spawns under g age

iTeam = pPlayer.getTeam()
if pCity.area().isBorderObstacle(iTeam):
return 0

this means - dont spawn in cultural borders? what value can i put here for getting over this? "1"? delete the entire line? write - iChance *= X

if pPlayer.isAnarchy():
iChance *= 3
return iChance * iDifficulty

during anarchy - chance of spawn is 3 right?


thank you for the help in advance.

p.s
the trackers are great a addition.
 
Half asleep, so based on memory.
Pesky default ichance should be 1 not 10?
8 is disgustingly high

Border obstacle checks for great wall effect

Anarchy triples the chance
If you set ichance as 8, this becomes 24

Which then got multiplied by difficulty again.
Now you know why ichance is only 1?

Ah, Vincent found out about the icons lol
Glad to have new ones

P.S.
If ichance is 10, it means I set it high for testing and conveniently forgot to change back before uploading
 
Updates

Pesky Barbs
1) iChance reduced back to 1

UltraPack
1) Added Headers to all Trackers, and make Exit font bigger
2) Added Bonus Class Filter for Resource Tracker
3) Added Combat Class Filter for Great General Tracker

4a) Allows Wonder Filter to track World Projects as well
4b) Added All/Wonder/Project Filter to Wonder Filter
4c) Renamed to World Tracker

5) Added new Wonder Tracker (To Track built National/Team/World Wonders in own cities, to plan where to build national wonders mainly)
Didn't bother to make button this time :D
Can't be bothered to update the 2 standalone trackers...
 

Attachments

  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    127.1 KB · Views: 133
  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    96.6 KB · Views: 69
  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    123.6 KB · Views: 68
  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    115.5 KB · Views: 69
  • Civ4ScreenShot0006.JPG
    Civ4ScreenShot0006.JPG
    119.8 KB · Views: 61
@Vincent

Pedia Upgrade Trees Problem

After reading through that 500+ lines of codes, I came to a conclusion.

KeyError: XX means dict[X] does not exist.
which refers to this line
nodeB = mGraph.graph[unitB]

The reason why it does not exist is because in an earlier loop
for iterlimit in range(10):
It only tries for 10 times to "beautify" the graph so that everything looks nice.
In other words, after 10 times, if the graph still looks complicated due to interlocking arrows blah blah blah, it gives up and goes to next item.

Thus, 1 solution is increase it to 100 times, which will slow down the processing, but gives it more chance to rearrange everything.

If it is still messy after 100 tries, the last resort is add to exception list.

I tried with Tech Tree to test the bug and I ended up adding so many techs to exception list so that it can draw out the upgrade tree.

Code:
self.exceptionList = ["TECH_LITERATURE", "TECH_CALENDAR", "TECH_CONSTRUCTION", "TECH_LIBERALISM", "TECH_SCIENTIFIC_METHOD", "TECH_MEDICINE", "TECH_REFRIGERATION", "TECH_ENGINEERING"]



Conclusion:
Your upgrade paths are too complicated for the graph to draw nice arrows.
Who are the culprits?
KeyError: X means Unit with Unit Type ID X is the culprit.
gc.getUnitInfo(X).getType() will tell you who the heck is ID X.

Adding to exception list does not really solve the problem.
It ignores the unit completely, which means literature, calendar etc do not show up in the upgrade tree, misleading others to think they are not upgrades/pre-requisties of others.
 
yeah, I think my mod is too complex for the lines. Strange part was that it worked for units, and then it didnt when I remove 1 unit :confused:
And thinking about it, its not THAT complex :D Maybe I try to simplify it a bit.

My promotion line is not that complex too, but it crosses alot (I have 5 "start-lines" : Offensive, Special and Defensive for land units, Airforce (which is mostly its own) and Naval which uses quite a few of the land units promos).

Btw. I cant for love of god find the standard advisor icons. I looked through all of the graphic files, but those buttons are just not there???? There are some defines in Artdefines_interface, but those are not the ones used in game???? (I just want one of them to make a duplicate).
Im gonna use a screenshot of them instead, but they might not be similar looking.
 
Platypedia and Ultrapack

PromoTree and UnitUpgrade
Reduced button size from 64 to 40

I guess you are talking about scoreboard?
When will you get an attitude face towards yourself?

You get a human icon instead.
 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    8.9 KB · Views: 70
Top Bottom