Platyping's Promotions and Traits

The next one is pretty interesting.
It turns the unit invisible :evil:
Currently set for melee only, doing some testing with archer and gun classes
 
in that case it is necessary to do even the possibility that such a unit could anyone see. Maybe with another promotion. That sounds pretty damn good :)
 
Currently it works like this.

On Promotion, turns invisible.
On Kill, breaks invisible.
On Promotion again, turns invisble.
Repeat.

Thus, no need to allows units to see it, once it makes a kill, everyone can see it.

There is just one issue I cannot fix. When you turn invisible, you lose innate abilities.
For instance, axeman loses the extra +50% melee, or chu ko nu loses the collateral damage.
When you break invisibility, you get everything back though.
 
Ambassador
Spoiler :


Killing an ambassador during war is serious offense :D
Others hate you for that.
Chance depends both on attitude towards the ambassador owner as well as killer, higher weight given on killer though.

Actual Formula:
Random Number (0 to 4) > 3 * Attitude towards killer - Attitude towards Ambassador
Attitude 0 stands for furious, 4 stands for friendly.

As such, if player is furious with killer, most likely he will declare war, since 0 - anything = negative, unless he is also furious with you, then it will still be 80% chance to declare war.

On the other hand, if player is pleased or friendly with killer, he will never declare war, since 3 * 3 = 9 (for pleased), 3 * 4 = 12 (for friendly)
9 - 4 or 12 - 4 will always be > 0 to 4, so pleased and friendly will never declare war.
 
Currently it works like this.

On Promotion, turns invisible.
On Kill, breaks invisible.
On Promotion again, turns invisble.
Repeat.

Thus, no need to allows units to see it, once it makes a kill, everyone can see it.

There is just one issue I cannot fix. When you turn invisible, you lose innate abilities.
For instance, axeman loses the extra +50% melee, or chu ko nu loses the collateral damage.
When you break invisibility, you get everything back though.

What about promotion, what to see and attack unseen ? as civilization 2 :) I miss the chance to discover and capture the spy , or otherwise exploit.
 
If I can solve that innate ability, then can look into others :D

Hunter
Spoiler :


Food = 3 * Unit Str
 
Hello. I added in the test artifacts and has not appeared. Where can I increase % for test that I added python right?
 
If you are using the older version of codes, where chance is fixed at 1%, reduce the 100 to a lower number.

If you are using the newer version of codes, where chance increases with level, simply go to worldbuilder and set the unit level to 150 and you are done.

Note that new version no longer spawns artifacts from combats with barbarians.
Fight a real war with civilizations.
 
New Updates for the New Year

Updates:
1) Necromancy and Purify added to Promotion Pack
2) Purify now grants 1 XP for each Skeleton killed
3) Despair and Retribution packed into same file.
4) New message system for messages with Button Display.
The old system always display the button at the Winner spot.
The new system displays button on Loser spot when it is the last defender, as the winner moves into the loser plot, so button correctly displays at winner current location.
5) Artifacts added into Promotion Pack.
Extra codes added such that when unit "escapes death" with Sacrifice, Rebirth Flames or Spider Sense, Artifact is not granted to Victor.
6) Python Promotions II rearranged in Alphabetic Order

New Promotion for the year
Sorrow
Spoiler :


New Artifact for the year
Cornucopia
Spoiler :

2.5% Chance to find a random resource which is not obsolete, and player has trading tech.
Resource added directly to capital.
 
If you are using the older version of codes, where chance is fixed at 1%, reduce the 100 to a lower number.

If you are using the newer version of codes, where chance increases with level, simply go to worldbuilder and set the unit level to 150 and you are done.

Note that new version no longer spawns artifacts from combats with barbarians.
Fight a real war with civilizations.

I have new version but after two testing games I have interes for oldest version with 1-100% and chance for artifact with barbar combat too. Can you, please, write here for me old code version?

one thing bothers me , this line in PROMOTION_LEGEND
pPlayer.changeAnarchyTurns(unit.getLevel())
level is number of turns wih anarchy. Can you, please, write line so that the number of turns anarchy was always 4?

thanks you very much
Hroch
 
oldest version with 1-100%
What do you mean by this?

chance for artifact with barbar combat
Code:
# Artifacts Start ##
		if pLoser.getUnitCombatType() > -1 and pLoser.getDomainType() == pWinner.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND"):
			iPlayer = pWinner.getOwner()
			pPlayer = gc.getPlayer(iPlayer)
			pTeam = gc.getTeam(pPlayer.getTeam())
			[B]if not pLoser.isBarbarian():[/B]
				Artifacts = ["PROMOTION_CORNUCOPIA", "PROMOTION_EXCALIBUR", "PROMOTION_GAN_JIANG", "PROMOTION_GUNGNIR", "PROMOTION_KUSANAGI", "PROMOTION_JINGU_BANG", \
					"PROMOTION_SKOFNUNG", "PROMOTION_HEAVEN_WILL", "PROMOTION_CUP_OF_JAMSHID", "PROMOTION_CHAKRA", "PROMOTION_MJOLLNIR", \
					"PROMOTION_BOOK_OF_THOTH", "PROMOTION_TALARIA", "PROMOTION_CAP_OF_INVISIBILITY", "PROMOTION_ELIXIR", "PROMOTION_AEGIS"]
				pMessage = pPlot
				if pPlot2.getNumVisibleEnemyDefenders(pWinner) == 1:
					pMessage = pPlot2
				for iArtifact in Artifacts:
					ArtifactPromotion = gc.getInfoTypeForString(iArtifact)
Remove the bold line. That is the barb check.
All lines below should shift left by one tab. I only cut half the codes here.

pPlayer.changeAnarchyTurns(4)
 
thanks :)

"oldest version with 1-100% "
I mean how you wrote: If you are using the older version of codes, where chance is fixed at 1%, reduce the 100 to a lower number.

I played three test games in every I've seen one or two artifacts. I understand that to be rare, but I think there could be more. That is why I am interested in the version with % and chance from combat with barbarians. Unit has artifact and The player will protect her. It will increase the risk and tension in the game :D :lol:

thanks
Hroch
 
That is why in the new version, the chance is no longer fixed at 1%.
Chance is now based on the unit level.

A level 15 unit will have 10%
A level 30 unit will have 20%
Of course, a level 1 or 2 unit will have miserable chance.

As I mentioned before, this keeps the chance of artifacts low and still rare for low levels, but as the game progress, and people start building all those barracks, and use Great Generals, unit levels increase, and this increases the chance of artifact spawning.

It also ensures that artifacts have a better chance of granted to better units.
As for now, there isn't a way to transfer artifacts around, thus if your lousy unit got an artifact, the only way to transfer it is suicide it so that the artifact goes to the enemy, then kill the enemy with the unit you want.
Thus, with the new code, there is better chance you get the artifacts directly on the units you want.

P.S.
If your test games, all your units are low levels (below level 5), I am not surprised at that low rate.
 
Haste
Spoiler :


Derived from Instant Heal idea.
Gets an instant speed boost for that turn to reach your targets faster, or blitz till the sun sets.
A 30 moves destroyer? :D


Fortification
Spoiler :


Self-explainatory.


The troublesome part about these instant effects is that AI has no idea when to use.
Thus, individual AI codes have been written for each of them.

Haste:
AI may use when
1) It is a recon unit
2) AI is at war

Fortification:
AI will use when
1) Plot has no existing Fort
2) Plot can have Fort
3) AI is at war
4) A City is adjacent to it
5) Plot belongs to Enemy

Thus, for Fortification, if you try to be funny and use this on plots where it should not be used (city or water), you get nothing.
Since AI will never use under such circumstances, it is penalty for acting smart.
 
So far I have not happened yet. But what about the danger that a very experienced unit will catch one promotion after another ?
 
Even a lvl 15 unit only has 10% chance.
And if you are the only player with high level units running around, you are most likely winning the game anyway.
 
What do you people think of new Trait: Caring (I dont find a better name)

4 health
4 happy
Double Production of Hospital and recycle Center

I want to use it because I have a new leader to my mod that wanted to help the country in health and education, Maria II. For intance, she made a
public health act aimed at curbing the spread of cholera throughout the country. She also pursued policies aimed at raising the levels of education throughout the country.

I was thinking Scientific/Caring

Thanks.
 
How about 'doctor'?

+2 :health:
Double production of Hospitals and Recycling Centers
+15% Healing rate for all units (stacks with Medic)
 
Considering all the existing traits are adjectives like expansive, aggressive.
Considerate or thoughtful sound better than caring or doctor...

Anyway, "double production" of whatever is simple to do, with XML in trait info.
X% healing rate hmm:
1) Make a new promotion with the healing you want.
2) Grant it to the unit class you want.
Pure XML can achieve it simpler.

No python work required.
 
Sword of Justice
Spoiler :


Penalty for being a bully.
No penalty when you are defending your nation.

Exact formula:
Chance:
5% per level difference, max 25%
Duration:
1 turn for every 3 levels, round up (1, 2, 3 = 1 turn, 4, 5, 6 = 2 turns)


Buzy + lazy recently, so make something simple for entertainment
 
Top Bottom