[HybridComp] Promotions & Perks

One final thought re unbalancing the game. The SEALs are intended to be an unbalancing unit, as are f-15s and Stealth bombers. Creating a unit simply to have the "kewl" name in use is silly. If you have any of these and your opponents do not, then warfare has tilted sharply in your favor. Your opponents can always create bomb-vest wearing mal-contents. That is what has happened through-out history. Combat un-balances (phalanx) and re-balances (legionairies with coordinated training allowing them to suck the phalanx in and then split into three units and hit the flanks). Anyone care to ask the (un-balancing) French Knights what they thought of the (re-balancing) English Yeomanry on St. Crispin's Day? You only build the units you can/need to swing battle your way.
Thus SEALs, B-2s, F-15s, F-22s.
 
Bug report

In one of my games I noticed that my heavily defence-promoted axemen standing on a floodplain does not take part in battles as a deffender. After several tests I found out that <TerrainDefenses> does not work, when a unit stands on a feature (forest, floodplain etc.). This is significant for Defence and Attack promotions. For example, an attacker becomes equally good in defence when standing on jungle, forest, floodplain or oasis. Probably this is the reason why AI makes almost all it's units attack-promoted!

I included feature defences in CIV4PromotionInfos.xml, so it should work fine now (see attachment).

Example for the Attack1 promotion:

<TerrainDefenses>
<TerrainDefense>
<TerrainType>TERRAIN_GRASS</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_SNOW</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_TUNDRA</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_DESERT</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_COAST</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_OCEAN</TerrainType>
<iTerrainDefense>-15</iTerrainDefense>
</TerrainDefense>
</TerrainDefenses>
<FeatureDefenses>
<FeatureDefense>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<iFeatureDefense>-15</iFeatureDefense>
</FeatureDefense>
<FeatureDefense>
<FeatureType>FEATURE_FOREST</FeatureType>
<iFeatureDefense>-15</iFeatureDefense>
</FeatureDefense>
<FeatureDefense>
<FeatureType>FEATURE_OASIS</FeatureType>
<iFeatureDefense>-15</iFeatureDefense>
</FeatureDefense>
<FeatureDefense>
<FeatureType>FEATURE_FLOOD_PLAINS</FeatureType>
<iFeatureDefense>-15</iFeatureDefense>
</FeatureDefense>
</FeatureDefenses>

Example for the Defence1 promotion:

<TerrainDefenses>
<TerrainDefense>
<TerrainType>TERRAIN_GRASS</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_SNOW</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_TUNDRA</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_DESERT</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_COAST</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
<TerrainDefense>
<TerrainType>TERRAIN_OCEAN</TerrainType>
<iTerrainDefense>15</iTerrainDefense>
</TerrainDefense>
</TerrainDefenses>
<FeatureDefenses>
<FeatureDefense>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<iFeatureDefense>15</iFeatureDefense>
</FeatureDefense>
<FeatureDefense>
<FeatureType>FEATURE_FOREST</FeatureType>
<iFeatureDefense>15</iFeatureDefense>
</FeatureDefense>
<FeatureDefense>
<FeatureType>FEATURE_OASIS</FeatureType>
<iFeatureDefense>15</iFeatureDefense>
</FeatureDefense>
<FeatureDefense>
<FeatureType>FEATURE_FLOOD_PLAINS</FeatureType>
<iFeatureDefense>15</iFeatureDefense>
</FeatureDefense>
</FeatureDefenses>
 

Attachments

Hi

version 0.5 seems very interesting to me, i like small modpacks with only subtle changes.

Just one question have you included to xp bug when units exceed 50xp and get re set to 10xp in version 0.5?

Additional promotions would be great if only i can keep my units original experience.

Thanks
 
Thanks for the bug report Fujisan.

Lloyd do you mean reset to 10 when upgrading? It's not a bug but yea I don't like it. I haven't included changes on those files yet, just recomanded them.
 
I like the mod, although I always seem to lose against the AI's monster-stacks :)

I found a bug, but I don't know if it is mod-specific: If both the attacker and defender have several first strike chances, the winning prediction may exceed 100%, but the attacker still loses from time to time.
 
Oki but I havent changed the prediction code. I guess it had a bug from the start.
 
That bug in the prediction code is becoming rather well known. There have been numerous mentions of it in the C4-General forum (and presumably elsewhere)
 
I'm just finishing up my first game with this mod and have a few comments. First of all I want to say that I really enjoy the extra promotions, perks and traits.

Wondering what kind of bonus (if any) a newly created unit will get adds some enjoyment, however rushing out a defender for your beseiged city only to discover that it received the "Light" trait could be devastating. I, and I assume most other players, have a specific purpose in mind when building a unit and the negative effects of traits can end up making units unsuitable to the task for which they were built, as in the example above. It seems to me that the traits would work better if they were build options. For example you would have the option of building "Light" Cavalry, normal Cavalry and "Heavy" Cavalry. I think someone else mentioned this earlier in the thread. Another option would be to make the traits optionally available, in addition to standard promotions, upon gaining a level or even immediately after being built.

I love the perks, but wonder if they might be better gained as a % chance
after successful combat rather than at the time the unit is created.

I also noted that, since upgrading a unit is viewed by the game as creating a new unit, that they get another chance to get additional promotionns/perks/traits. I don't necessarily find that such a bad thing, but there is, again, the possibility of receiving a trait that is counterproductive to the promotions you have given the unit.

Edited: grammar and wording.
 
I'm implementing Hero Units a little bit different way, than in your mod. In particular, "A ... Hero unit of ... was born" message will appear.

Would someone explain me how to get the unit name and owner? There should be something like heroUnit.GetName(), heroUnit.GetOwner(). See code below.

... onCombatResult(self, argsList):
heroUnit = argsList[0]
...
...
CyInterface().addMessage( ... "A %s Hero unit of %s was born" %(heroUnit.GetName(), heroUnit.GetOwner()), ...

Sorry, I'm not strong in Pyton
 
I have implemented the Berzerker and Stalwart Promotion in a different way as well.

In my opinion these two Promotions aren&#8217;t Perks you always like on certain units (think on a situation in witch you have to protect a city and you buy a defensive unit and it will get a Berserker Promotion&#8230;).
So I changed the way how you can get these Perks. Now you have to &#8220;specialise&#8221; your unit and only if the unit has the &#8220;Attack II&#8221; Promotion it is able to get a &#8220;Berzerker I&#8221; Perk after winning a fight (small chance). Now, the &#8220;upgrade-line&#8221; is like this:
Attack I -> Attack II -> Berzerker I (6%) -> Berzerker II (6%) -> Berzerker III (6%) -> Berzerker I + Berzerker III (6%) -> Berzerker II + Berzerker III (6%) -> Berzerker I + Berzerker II + Berzerker III (6%)
The same goes for the Stalwart Perk, but you need the &#8220;Defence II&#8221; Promotion to activate this upgrade-line.

(PS: The Berserker Perks don&#8217;t replace the Attack Promotions.)
 
There are a couple more things that I want to add. I think the concept of Stack-Aid is great, it makes a a lot of sense and the types of bonuses given really seem appropriate. However, I think that, in its current implementation Stack-Aid may be a bit overpowered in some circumstances. I was able to conduct an Ancient and early Classical era war in which I conquered 5 cities including a capitol (Rome) and lost only two attackers total without using catapults. One city that I captured was on a hill and had 40% cultural defense (Antium, Buddhist Holy City). Anyway the point is that it made capturing cities pretty easy. And I'm afraid that, if I had ever been attacked my cities would have fallen pretty easily.

I know some people say that city combat normally favors the defenders too strongly, but I disagree. IRL capturing an ancient walled city could very well require the attacker to outnumber the defender 10:1, unless they engaged in a prolonged siege (probaly the equivalent of pillaging improvements in a city's fat cross).

Also, since an attacker will typically bring a stack significantly larger than the number of defenders in a city, the attackers tend to gain a larger stack-aid benefit than the defenders. Possible solutions could be to reduce the quality of the bonuses, or increase the city defense bonuses from ranged-aid. Another possible solution, is to increase the strength required to receive each tier of Stack-Aid. Instead of tier one requiring 50-99%, it could be 101-200% for example. Although players may run into crowded penalties before they were able to get a full bonus.

Now a couple of caveats regarding my evaluations. I never engaged in any modern era attacks against cities, although I know from past experience that some AI cities will stack far more than 15 units in a city, especially if fighters and bombers count towards the crowded limit. Do they? Is the AI able to understand and avoid the crowded penalty? I never used much of a navy, but I don't recall seeing any naval stack-aid bonuses. Also I don't know if crowded penalties take place at sea or not, but I'm sure you can see that if land units in transports count towards the limit then almost any naval troop transport convoy is going to incur the crowded penalty.

BTW all play was on Emperor, Continents settings

@GIR- I like that idea for implementing the "stalwart" and "berzerker" traits. Did you make any changes to "Light" and "Heavy" traits?

I'm sure there was something else that I wanted to mention or suggest, but I can't recall what.

Edited: grammar, spelling and wording
 
Yes, I agree, I also think that the Stack-Aids are a little over powered. Therefore I made them less useful in my own mixes.
I do think that fighters and bombers count towards the crowded limit like the workers and settlers do :( <--that should be fixed (in cities) because it’s no fun.

@haldorin:
I made a similar change to the hero promotions. Now it also has an upgrade line like the berserker perk.
I was thinking of a better way to implement the "Light" and "Heavy" traits as well, but I don’t have any good ideas. Maybe the light and heavy traits should be activated if you have a forge and/or a barrack in your city and you build a unit witch already is fortified in this city. After you complete your unit you should get a small chance to get one unit with the light trait and the fortified one with the heavy trait. I don’t know… do you have an idea??
 

Attachments

I should make the crowded number larger for cities, at least big ones, as you can have more armies in vertical :p.

And no sorry to say the AI doesnt handle the crouded too well. Maybe I should have it even higher for AI (and yes workers and planes count in).
 
zyphyr, your promoXP-addition is not working. in cvcustomeventmanager.py, change the line

Code:
pe.PromoXp(argslist)

to

Code:
pe.[B]onUnitPromoted[/B](args[B]L[/B]ist)

(argsList) is case sensitive!


Edit: One more thing, and then it works:

in promoxp.py. change

Code:
		pWinner = argsList[0]
		pUnit = PyInfo.UnitInfo(pWinner.getUnitType())

to

Code:
pUnit = argsList[0]


EDIT2: yet another bug:

Code:
elif pUnit.isHasPromotion(promBerzerkert1):

to

Code:
elif pUnit.isHasPromotion(promBerzerker1):

did you never run your code with debug mode on?
 
Teg_Navanis said:
zyphyr, your promoXP-addition is not working.

did you never run your code with debug mode on?

Actually, It works on my machine just fine. Though I did somehow manage to upload a copy that had typos/errors in it from earlier in my development.

The file has been replaced with the correct version. Thank you for making me aware of my mistake.
 
Zuul, I found that there is a problem with the promotions in the CvPediaUnit.py file in the vanilla version. Basically instead of attaching the multi list control to the panel that holds the possible unit promotions they just add it to the screen with a hard coded location. This results in promotions being placed outside of the possible promotion box.

I propose that you include a version of this file changing line number 313 in CvPediaUnit.py file from:
Code:
screen.addMultiListControlGFC(rowListName, "", self.X_PROMO_PANE+5, self.Y_PROMO_PANE+35, self.W_PROMO_PANE-20, self.H_PROMO_PANE-46, 1, self.PROMOTION_ICON_SIZE, self.PROMOTION_ICON_SIZE, TableStyles.TABLE_STYLE_STANDARD)

to:
Code:
screen.addMultiListControlGFC(panelName, rowListName, "", 1, self.PROMOTION_ICON_SIZE, self.PROMOTION_ICON_SIZE, TableStyles.TABLE_STYLE_STANDARD)

to fix this problem. I just wanted to let you know.
 
Started working on updating the mod again. But it's hard to do until I get connection to my gaming comp in 1-3 weeks.

Here are what I probably will make in next version:

Code:
--------
History:
--------

0.9 (2006-0?-??) ***KB
  Fixed attack/defence on features in terrains.
  Attack/defence split up between land and naval.
  Lowered Accuracy I+II city bombard damage.
  Lowered chance to get start promotions.
  Added chance to start with extra experience.
  Added information about all promotions.
  Added option to not display promotions over unit when they get to many.
  Non military units now can't get aid bonuses.
  Raised crowded limit to 20 for AI.
  Spys/great people removed from crowded counting.
  Added promotion Navigation III.
  Added perks Archer/Armored/Gunpowder/Melee/Mounted/Siege Combat.

And also update the future list:

Code:
-------
Future:
-------
Optimice and bugfix Stack Aid, RealFort and ExtraXp code.
Move start chance from python to xml.
Add Fort I effect to heavy defended cities.
Add a way for units to get perks and traits after a while.
Expand crowded effects.
Balance bonuses.
Add more promotions/perks/traits.
Add graphics promotion button pack.
Try to add new xml features.
Chance to start with extra levels.
Add a new expericence system (with new buildings & great people).
Naval Stack Aid (better with more ships in same tile but also better with land units on the ship).
Add heavy/light loaded effects to naval.
Expand stack aid with surrounding units (better scouting and surrounding armies).
Better terrain promotion features (like better attack/heal on some terrains).
3 promotion versions (week (orginal), medium (late version of this mod),  and strong (Fall of Heaven)).
Options to include perks/traits/stack aid.
Options for start chances.


Any bugs I have missed? More new types of promotions I should add?
 
Back
Top Bottom