Platyping's Python

I checked a website for top 10 famous aliens :D
Terminator and Transformer were in there, but both sound too robotic as aliens...
Superman was there as well... :D
 
Yeah, I saw that pack :D
The green alien settler definitely looks interesting, if it was brown, I could use it as the classical ET alien :D
Currently leaving it as it is, since not many mods can use Saibotlieh's beautiful fantasy units, so might as well make use of this project.

Monday is always a tiring work day, so nothing much to update.

Did some minor changes to some wonders though.
As most world wonders (Statue of Liberty, Stonehenge, Notre Dame) affect many/all cities, I changed some of mine as well which are affecting just that city.

Flavian Amphitheatre
Changed to affect all, reduced rate from 20% to 10%

Pressburg Castle
Changed to affect all, reduced rate from 10% to 5%
Gigapack was still using the new name, Bratislava Castle, so I changed that as well.

Templo Mayor
Changed to affect all, remove happiness bonus from sacrifices

Notes:
Famen Temple
All along I know there is a bug with it, which I am lazy to fix.
Famen Temple has 2 effects:
1) 100% success rate of spreading religion
2) Missionaries spawn with Morale Promotion

Bug:
1) Only missionaries "built" get the promotion, the ones that came free when religion founded will not get the promotion.
I tried doing some codes on religion founded, but could not find a way to get those missionaries.
Thus, the only way out is to use onUnitCreated rather than onUnitBuilt to get those.
However, I guess it is better to live with this minor bug rather than activate callback for that.

2) Currently, all codes related to missionaries are using "Religion Requirement" to assume that any unit requiring religion = missionaries.
Thus, all wonders that are supposed to affect missionaries will affect all new units that require religion to build in some mods.
Doesn't seem to have a better solution to detect which are missionaries, unless I check them by the unit name.

Sneak Preview of the last project...
 
Sarcofagos de Karajia (Remake)
Old:
Spoiler :
Civ4ScreenShot0008-6.jpg


New:
Refer to screenshot

Reasons:
Killed off for turn checks and boring effects

Just a few more Remakes to go.
Golden Pavilion due to UN Resolution bug
Encyclopedia since very similar to internet
Those using onUnitCreated callback

Burj Al Arab (Revise)
Old:
Spoiler :
BurjArab.jpg


New:
Refer to Screenshot

The old one requires a turn check, with a loop to select the unlucky fellow for immigration.
The new one is done in onCityGrowth.
Chance to occur is if CyGame().getSorenRandNum(150, "immigrate") < pCity.getPopulation():
In other words, close to impossible in small cities.
In a city of size 15, it will be 10% then.

Buckingham Palace (Revise)
Old:
Spoiler :
Civ4ScreenShot0001-11.jpg


New:
Refer to Screenshot

The old one requires onUnitCreated callback, and... will create some problems with other works.
Can't find a good way to rewrite it, so remake it.
Still a theme about drafting.
The 1 population limit means regardless of whatever unit you are drafting, it will only cost 1 population.
By default, the later ones like Infantry and Mech infantry requires more than 1 population to draft, so now drafting those cost 1 pop only.
 
Alone, it works fine.
But when merged with some other works, there will be a problem.

Reason is, onUnitCreated is triggered under many situations, such as when units are built, drafted, the missionaries when religion founded, the initial units when you start a game, or even when you use the initUnit python codes, which is used widely in too many works.
Even the survival promotion of yours relies on it I believe :D

The original code adds half the XP gained by normal training to unitCreated, and then subtract the same amount onUnitBuilt.

Thus, normal units built will get XP added and subtracted, back to square one.
Drafted units will get XP added, but not subtracted, resulting in same as normal units.
The problem is the initUnit codes triggering it, which adds XP as well when I do not want them to, such as on revival due to your survival promotion :D
 
Yeah, some can be overcome by checking:
1) In city
2) City drafted
3) Unit type == conscript type
4) XP == conscript XP

With these 4 checks, they will more or less eliminate most problems, although there may still be coincidences :D

When faced with a problem
A) Fix it
B) Ignore it
C) Avoid it :D

Thus, I chose the easier way out :D
 
Out of Boredom

Promotion Pack Version 1
Havent added codes for AI to learn them yet.

Leech:
When a Modern Armor(10/40 Strength) defeats a Axeman(5 Strength)
Modern Armor becomes (11/40 Strength), assuming no damage dealt.

Fear:
Inflict 3 immobile turns to next enemy unit in same tile

Rally:
Drafts on the spot, no XP for new unit
 
3 more new ones

Giant Slayer
Spoiler :
GiantSlayer-1.jpg


Last Wish
Spoiler :
LastWish-1.jpg


Heal
Spoiler :
Heal-1.jpg
 
Maybe you should change it to 10% * unit level
 
PromoPack Version 2 Done :D

1) Bigger, Clearer Buttons.
2) Added AI Support for totally python promotions.
Now there is a 20% Chance AI will select those promotions instead of normal promotions.
3) Rename some Promotions.

Rally:
Added Message when success

Enlightenment:
Old:Heals All Units 100% upon Promotion
New: Heals All Units 3% per Level upon Promotion. Since a Unit with Leader can easily be Level 10, this means heal all units 30% upon Promotion.
Renamed as Heal

Fear:
Old: 10% Chance to affect each enemy unit in same tile upon victory
New: 100% Chance to affect ONE enemy unit... (Added a break, so better performance)

3 New ones to make it 16 just nice.

Raider
Spoiler :
Raider.jpg


Scavenger
Spoiler :
Scavenger.jpg

Generates Food if improvement adds food
Generates Hammers if improvement adds hammer
Generates Culture if improvement adds Commerce
Multiplied by unit Level


Frenzy
Spoiler :
Frenzy.jpg
 
You overestimate me :D
Looted from Heroes of Might and Magic VI
 
Divine Shield
Spoiler :
DivineShield.jpg


Gifted
Spoiler :
Gifted.jpg


Cleave
Spoiler :
Cleave.jpg


Instant Heal
Spoiler :
InstantHeal.jpg


The first 2 are modified from existing wonders.
The last one is simply Civ V disgusting effect.
Cleave does not affect naval units

Edits:
1) Damage from Cleave, Frenzy and Retribution are no longer Fatal (max 99% Damage) (So that Last Wish can be triggered)
2) Last Wish codes shifted to onUnitKilled
 
@Platyping:

In the promos section you say that you've added AI support for them. What does that mean? How are they evaluated by the AI? I ask because if the AI can use them well I'd like to add them to C2C. Great work though!:goodjob:
 
Only simple AI support.

When AI is capable of promoting, there is a 20% chance it will select one of the available totally python promotion instead of the one it wanted.
In other words, there is a chance it may end up with a promotion that it does not want intead :D
P.S.
Available means it met the requirements

On the good side
A)The only promotion that the AI may not understand is Mentor, which the unit has to stay in city for the benefits

B) Most of the benefits, the AI do not need to understand how they work, so long as they have it, it is beneficial as they will automatically proc upon combat result.

For instance, Rally summons units on the spot when the unit wins a combat.
The AI does not need to know this, it will just be surprised, "Hey free unit"

Or Divine Strength which adds 2 Base Combat Strength.
AI will just see its strength goes up without knowing why, but who cares :D
Once chosen, the AI benefits from it, regardless of situation.
2 extra strength will be nice for all units.

Of course, you won't expect AI to be smart enough to mass produce dumb useless units with Retribution promotion just to bomb at you.

C) Those with XML benefits, such as SiegeBreaker, Raider and Scavenger, there is no AI support added.
SiegeBreaker reduces city defense when the unit kills a victim in a defended city.
Thus, with the added city attack XML effect, chances are AI will select it on a unit that is supposed to attack cities anyway.
It is just that AI may view it as less useful than a normal city raider I promotion, since the XML isn't that high.
Of course, you can simply add it into the AI promotion list.

D) Instant heal has unique AI support.
AI will choose/force to choose it when it is dying.
Overwrites all others.
Again, don't expect AI to cheat like humans, storing 10 promotions to use them in battles.

E) Damage inflicted by python are no longer fatal.
So a unit with Frenzy will not kill itself when it kills another unit.
Or a dying modern armor will not kill itself when killing a warrior with Retribution.
In a sense, it is for merging codes, so that other promos like Last Wish will not be bypassed as units are killed unknowingly.
In another sense, it is also for the AI, as it seems perfectly alright for a dying modern armor to whack a warrior, but it does not know it will die as well in the process.
 
Back
Top Bottom