Platyping's Python

Thanks :D
There's nothing wrong with those 2 Traits, just want to keep the pack itself simple, no callbacks to activate.
The new airborne is still the same, just a XML change in the dummy building :D
 
Hmm, found a bug which I have no idea why it is so :/

It seems that codes using setBuildingHealthChange and setBuildingHappyChange do not work correctly.
The building themselves are updated correctly, but the calculation in the city's total happy/health from buildings are screwed up.
Any idea why?
 
Havent dont further testings yet, still bz with other stuff at the moment.
For the time being, all wonders using these 2 codes setBuildingHappyChange() and setBuildingHealthChange() are currently "unstable".
Nazca Lines, Meteora and Chaurubji.

Codes using setBuildingYieldChange() and setBuildingCommerceChange() are performing well and don't have this bug though.

Doing some experiments recently to find a way to get the religious buildings of a religion directly without using traditional methods of 1) loop through all buildings or 2) Hardcoded list, but havent made new progress either :D

Will upload Gigapack and Megapack soon just to temporarily disable all wonders using those 2 codes, until I found a solution or give them new benefits.

Added a section of Compatibility issues between works for those with effects that will interfere with each other, for those using multiple works of mine.
 
Solved the mystery :D

pCity.setBuildingHappyChange(XXX, 1) works like this:
It makes Building XXX in pCity generate 1 extra Happiness.
So a Christian Temple will now display as 2 Happiness.
However, the weird part is that, even if the Christian Temple is NOT in the city, the extra happiness is still granted.
In other words, if pCity has Christian Temple, it will now has 2 Happiness from Buildings, but if pCity does not have Christian Temple, it will still have 1 Happiness from Buildings.

pCity.setBuildingHealthChange(XXX, 1) works like this:
It makes Building XXX in pCity generate 1 extra Health (in the building tooltip).
But what actually happens is that it generates the same thing as setBuildingHappyChange().
In other words, pCity.setBuildingHealthChange(aqueduct, 2)
will make Aqueducts appear to have 4 Health now, as correctly shown in Building Tooltips.
But the actual effect is that Aqueducts now give 2 Health and 2 Happiness, and similar to setBuildingHappyChange(), this extra 2 Happiness is granted regardless whether the building is present.
pCity with Aqueduct will now have 2 Health and 2 Happiness from Buildings.
pCity without Aqueduct will now have 2 Happiness from Buildings.

This is how you arrive at the 17 Happiness, 2 Health from the above screenshots.
Happiness:
1 from Palace, 7 from Temples, 1 from Collesium, 1 from Monument (Charismatic) regardless whether they are present
1 from Palace, 1 from Collesium present in City
3 from Hospital, 2 from Aqueduct

Health:
2 from Aqueduct present in City.

I conclude both codes are bugged due to SDK.
@The_J Nope, it is not just a display bug

Did some digging here and there, and found Unofficial Patch for BTS 3.19
Seems to have fixed the error with this patch :D

Good News is since I am lazy, I decided to leave the 3 wonders alone since the error is not due to python.
Bad News is I assume whoever wants to use them have the SDK bug fixed
 
urg must fix this in my mods dll just in case
 
17) CvPlayerAI::AI_conquerCity - Fixed bug where cityAcquiredAndKept event reported wrong player in some circumstances (thanks Maniac)


oh look. they fixed that bug that I encountered with the turkey power and historical cities all that time ago. does anyone remember that :lol:
 
Actually, after further testings, quite disappointed.
The codes are fixed to a certain extent only.
For setBuildingYieldChange and setBuildingCommerceChange, these changes affect the particular building in the city even if they are not present.
For instance, if I have a code that increases Research of Library by 1 in all cities, it will affect all existing and future Libraries.
However, for setBuildingHappyChange and setBuildingHealthChange, they seem to affect just the existing buildings.
In short, due to the patch, one part is fixed while another part gets screwed.

Thus, I decided to recode all works using those codes.

Nazca Lines (Edited)
Spoiler :
Civ4ScreenShot0003-23.jpg

Since this wonder started off with 9 random choices, still look ok after removing Happiness and Health, but then 7 looks odd, so I remove Commerce as well, leaving 6 choices.

1) Benefits adjusted to look better.
2) Python codes Change:
A) Shortens codes in all sections (only 1 if/else instead of 9 if/else statements)
B) "Nazca Lines Increased" message now only displayed to Nazca Owner
C) Added a section onCityAquired such that if new owner and old owner are in different eras, Nazca Benefits adjusted accordingly.

Previously, a Ancient Era player capturing Nazca belonging to a Medieval Era player will still enjoy the benefits as if he is also in Medieval Era, and worse when he advances to Classical Era, benefits added again.
Fixed this with "C"

The extra benefits are randomly removed from the existing benefits.
If Medieval Nazca has 10 Research and 5 Culture,
then the new Ancient Nazca will either have just 5 Research or 5 Culture, not totally randomised again.
However, if the Medieval player recaptures Nazca, then the extra 2 benefits will be randomised again.


Next to adjust will be Meteora.
Chauburji is more or less totally screwed.
 
Version 4.1

Gobekli Tepe
Bug:
Gobekli Tepe found random religion when built.
However, when player research the religion tech of that religion, the player can choose any religion to be founded.
In other words, when Gobekli Tepe is built and player founded Hinduism as a result, when Polytheism is researched, player can now choose any religion to be found, since Hinduism is already founded.
Solution:
Added an extra python code to fix this.

Khabas Cave
Set it as Coastal Wonder, simple XML change because it does not make sense to be inland for its benefits.

Boudhanath
Added a section onCityAcquired

Meteora
Rewrite codes due to bug in using setBuildingHappyChange() codes.
It now works perfectly provided player has Unofficial Patch 3.19 applied.

Chauburji
Rewrite codes due to bug in using setBuildingHappyChange() codes.
It now works perfectly provided player has Unofficial Patch 3.19 applied.

Tower of Babel
Gigapack now correctly requires 5 wonders instead of 3 wonders which was standalone requirements.
Modified code abit so it is easily compatible with other wonders, especially those free ones.

Imam Reza Shrine
Uses the "push order" method rather than setRealBuilding method now, to be compatible with Meteora and Chauburji

Extra Compatibility Codes:
Added a section on this on first page for players wanting to add several works of mine to check if their effects will interfere with each other.

Cleopatra's Needle
Added codes to be compatible with Tower of Babel and Chauburji.
By right should add for Louvre and Azadi as well, but chance of Cleo built after them is negligible.

Megapack and Gigapack updated

P.S.
Too much stuff to fix, no new work :D
 
Dynamic Trait
DynamicTrait.jpg

Someone looking for 1:hammers:/City Trait so I make one simple one.
But as some of you may have noticed by now, I don't stick to requests 100% :D
Anyway too weak compared to others of mine, so give an additional perk.
Serves as a competitor to Industrious Trait or a great complement to it, depending how you look at it.

Agricultural Trait
AgriculturalTrait.jpg

Since we have Traits for Production, Culture, Science, Gold, here is one for Food as a bonus.
Cities grow fast during Golden Age
 
Oh well, variables can be changed easily :D
Just lazy to take new screenshot, maybe reduce it to 5 :D
 
Hi platyping, I found a possible bug in the Lotus Temple.

In a recent multiplayer game in which I and the other human (Germany) were on the same team, I was Hindu and built the Lotus Temple while Germany was also Hindu. (Our chief AI adversaries were non-Hindu.) We and the other Hindu civs in the game got the +2 "OH YEAH" happiness signal as expected.

Later, Zara (Christian) reached the level of Furious with Germany through no provocation on the German's part except for not being Christian. To forestall a possible war declaration, Germany switched to Christian, and immediately got the -2 "AAARGH" unhappiness signal.

But that's not the bug--the bug is that after Germany switched to free religion, after *I* switched to free religion, and even after the UN forced EVERYbody into free religion, I still had the +2 "OH YEAH" and Germany still had the -2 "AAARGH." The Civilopedia text says "Civilizations with no religion are unaffected"-- is that supposed to mean civilizations with no STATE religion are unaffected by the wonder's existence/construction? Or was the wonder meant to have that influence indefinitely, solely on the historical basis of what state religion its builder had at the time it was built?

If this was intentional, and isn't a bug, that's OK, but I'd like to know so I can clarify it in my pedia. Thanks and keep up the awesome work :D
 
Hmm, fixed a logic error in Lotus codes (for normal change of religion codes)
However, tested the UN and it failed because UN resolution did not trigger onPlayerChangeStateReligion codes.

Would possibly require a turn check to account for that, so temporarily consider UN resolution as a bug for all wonders requiring onPlayerChangeStateReligion codes.
Thanks
 
Before I attempt to fix the UN resolution, I got a question since it has been too long since I played a long game :D

I know that after a civic resolution is passed, all civs will be forced to accept that civic, for this case free religion.
But I remembered after a while, when the next UN vote comes along, that civic resolution is still a choice although it is passed.
So what happens if the Secretary chooses it again, and this time it failed?
Will civs be able to choose the religion civics they like again and adopt state religion?

In other words, after a civic is forced by UN, is there a BTS natural way (not python or SDK) to overcome it, whether because many turns have passed or a new resoultion is passed?
 
I actually don't know about the civics, never tried. But I do remember trying to cancel the nuclear treaty once by redoing the resolution and voting no. it didn't do anything AFIIR
 
Well, since I am not sure how UN resolution functions, I cannot fix what I do not know. So I just leave it as it is.

Westerderk
Spoiler :
Civ4ScreenShot0004-23.jpg

Top 3 = Top 3 highest Population

Artwork by Hrochland


Countdown to 250: 6
 
Eh 1) I don't use the sevopedia so might not know :D
2) Not sure what you mean by changes in trade system though
 
Back
Top Bottom