Breaking Save Game Compatibility for v37

How about assigning negative traits to the player at higher difficulty levels. That keeps them from being 'AI killers' while still in use/challenges for the player?
 
How about assigning negative traits to the player at higher difficulty levels. That keeps them from being 'AI killers' while still in use/challenges for the player?

Selecting from a list to get your handicap sounds good to me.

Exactly what happens with Developing Leaders. You don't get a negative trait (unless you are starting with the default traits all on by not playing with Start with no Positive Traits) until you've earned the second trait. By then, what MIGHT be a fairly overwhelming amount of penalty for a young single pop single city civ is usually something that the civ can handle.
 
Nightmare is 2 levels ABOVE each level listed?? what are u talking about??

As far as I know indeed nightmare is 2 levels ABOVE each level listed. Or at least crime/pop and education/pop is higher at all difficulty levels with nightmare on.

But since I'm not a modder I'm willing to be corrected on this.

Having 2 sources of choosing difficulty, choices that overlap to a certain degree is confusing for new players and at least not streamlined, which in itself can lead to trouble.

Imho its better to have just 9 difficulty levels and nightmare removed and incorporated into the higher difficulty levels.

N.B. I haven't updated to SVN since V36 came out. So I'm not aware of any recent changes.
 
As far as I know indeed nightmare is 2 levels ABOVE each level listed. Or at least crime/pop and education/pop is higher at all difficulty levels with nightmare on.

But since I'm not a modder I'm willing to be corrected on this.

Having 2 sources of choosing difficulty, choices that overlap to a certain degree is confusing for new players and at least not streamlined, which in itself can lead to trouble.

Imho its better to have just 9 difficulty levels and nightmare removed and incorporated into the higher difficulty levels.

N.B. I haven't updated to SVN since V36 came out. So I'm not aware of any recent changes.
Most values are set 2 levels higher on NM mode but crime and disease and such follows somewhat differing progression rates than would be represented by such a simple 2 level shift. I won't weigh in on whether I think it's unnecessary for NM mode to exist or not. I can see argument for either side. I think the bigger question is "is the effort to introduce 2 more difficulty levels worth the investment or is it rehashing a solution that currently works?"
 
As far as I know indeed nightmare is 2 levels ABOVE each level listed. Or at least crime/pop and education/pop is higher at all difficulty levels with nightmare on.

But since I'm not a modder I'm willing to be corrected on this.

Having 2 sources of choosing difficulty, choices that overlap to a certain degree is confusing for new players and at least not streamlined, which in itself can lead to trouble.

Imho its better to have just 9 difficulty levels and nightmare removed and incorporated into the higher difficulty levels.

N.B. I haven't updated to SVN since V36 came out. So I'm not aware of any recent changes.

I changed almost all of it to be better suited with the core, as per alberts2.
 
I have a couple suggestions to make the Traits system better:

Different difficulty levels could award a different mix of positive and negative traits to the player & AI:
Code:
Difficulty:         Player                  AI
             1 2 3 4 5 6 7 8 9 10   1 2 3 4 5 6 7 8 9 10
Settler:     + + + * + + * + + *    * * + * * + * * + *
Chieftain:   + + * + + * + + * +    * + * * + * * + * *
Warlord:     + + * + + * + * + *    + * * + * * + * * +
Noble:       + + * + * + * + * +    + * + * * + * + * +
Prince:      + * + * + * + * + *    + * + * + * + * + *
Monarch:     + * + * * + * + * +    + + * + * + * + * +
Emperor:     + * * + * * + * * +    + + * + + * + * + *
Immortal:    * + * * + * * + * *    + + * + + * + + * +
Deity:       * * + * * + * * + *    + + + * + + * + + *

+ = Positive trait only
* = Positive & Negative trait

Advancing an Era could give you a free positive trait, so smaller empires with less culture output won't be left as far behind (especially with tech diffusion on).

Use up a GP to swap traits: brings up a dialogue to add a positive trait (but not remove a negative one), then another dialogue to remove a positive trait (but not add a negative one).

If the variety of traits increased some, you could lock certain positive / negative traits until you hit a certain era, so for example Agricultural couldn't be picked until you got to the Ancient era (which makes sense since the Agriculture tech is an Ancient era tech itself). Likewise Anti-Clerical doesn't make much sense before organized religions come about, etc. This way, you can also prevent the AI from making stupid choices in the early game like picking Philosophical as their 1st pick instead of Hunter-Gatherer or Expansive.

I don't know what the differences are between the competing sets of traits, but I think overall each trait should be more focused. One empire wide bonuses like +research% or +hammers%, a 100% build speed bonus for some units & buildings, and a third 'wild card' bonus like the +1 food on >6 food tiles or bonus empire stability. It might help to re-think the traits as a package of bonuses for a specific gameplay feature, rather than a quality of a civilization. That way you can have a trait that boosts hunting animals, one that makes slavery more profitable, one that boosts gold income, etc. I think some of the bonuses / penalties in the traits currently come from what some historic Civ's that had the trait were good / bad at, which may not be related to what the trait actually does.

So basically: more, smaller traits, slightly more often, limited by era advancement.
 
I think the bigger question is "is the effort to introduce 2 more difficulty levels worth the investment or is it rehashing a solution that currently works?"

No need to introduce two more difficulty levels ( 9 -> 11) if you can space out the current ones a bit more. 9 difficulty levels should be enough.
 
I have a couple suggestions to make the Traits system better:

Different difficulty levels could award a different mix of positive and negative traits to the player & AI:
Code:
Difficulty:         Player                  AI
             1 2 3 4 5 6 7 8 9 10   1 2 3 4 5 6 7 8 9 10
Settler:     + + + * + + * + + *    * * + * * + * * + *
Chieftain:   + + * + + * + + * +    * + * * + * * + * *
Warlord:     + + * + + * + * + *    + * * + * * + * * +
Noble:       + + * + * + * + * +    + * + * * + * + * +
Prince:      + * + * + * + * + *    + * + * + * + * + *
Monarch:     + * + * * + * + * +    + + * + * + * + * +
Emperor:     + * * + * * + * * +    + + * + + * + * + *
Immortal:    * + * * + * * + * *    + + * + + * + + * +
Deity:       * * + * * + * * + *    + + + * + + * + + *

+ = Positive trait only
* = Positive & Negative trait

Advancing an Era could give you a free positive trait, so smaller empires with less culture output won't be left as far behind (especially with tech diffusion on).

Use up a GP to swap traits: brings up a dialogue to add a positive trait (but not remove a negative one), then another dialogue to remove a positive trait (but not add a negative one).

If the variety of traits increased some, you could lock certain positive / negative traits until you hit a certain era, so for example Agricultural couldn't be picked until you got to the Ancient era (which makes sense since the Agriculture tech is an Ancient era tech itself). Likewise Anti-Clerical doesn't make much sense before organized religions come about, etc. This way, you can also prevent the AI from making stupid choices in the early game like picking Philosophical as their 1st pick instead of Hunter-Gatherer or Expansive.

I don't know what the differences are between the competing sets of traits, but I think overall each trait should be more focused. One empire wide bonuses like +research% or +hammers%, a 100% build speed bonus for some units & buildings, and a third 'wild card' bonus like the +1 food on >6 food tiles or bonus empire stability. It might help to re-think the traits as a package of bonuses for a specific gameplay feature, rather than a quality of a civilization. That way you can have a trait that boosts hunting animals, one that makes slavery more profitable, one that boosts gold income, etc. I think some of the bonuses / penalties in the traits currently come from what some historic Civ's that had the trait were good / bad at, which may not be related to what the trait actually does.

So basically: more, smaller traits, slightly more often, limited by era advancement.

You're not far from how developing leaders is intended to work once finalized. I think it would be madness to make traits harder on AI than players though. Culture has been established as the means by which leaders earn 'promotions' of traits and I don't intend to adjust this method. But the charting you show of progression is very close to the ultimate goal of the manner in which DL operates.
 
All spawns are barbarians. I have no idea what the bTreatAsBarbarian does but the one set wrong acts just like the others as far as I can see.
bTreatAsBarbarians, according to what I read in the code, pretty much makes the spawn double in frequency if Raging Barbarians is on. That's about it from what I've seen.

What I've done to address spawning under different AI player types is implemented a new tag on spawns: <PlayerType> in which one must identify the NPC player that this spawn info applies to. Once my dll comes in, these must be defined as an undefined Player type spawn info is legal for inclusion but won't work in the spawn engine in the dll. It MUST spawn for a specific player type.

Player types for NPC players (which are all that CAN spawn) are as follows:
  • BARBARIAN_PLAYER
  • AGGRESSIVE_ANIMAL_PLAYER
  • PASSIVE_ANIMAL_PLAYER
  • NPC1_PLAYER
  • NPC2_PLAYER
  • NPC3_PLAYER
  • NPC4_PLAYER
  • NPC5_PLAYER
  • NPC6_PLAYER
  • NPC7_PLAYER
  • NPC8_PLAYER
The numbered NPC slots are for future assignment for new NPC types such as aliens and rebelious AI etc... new programming will probably be necessary to ensure these are treated throughout the code in the unique ways they should be.

So for now, they are just reserved slots.

The term NPC, for those wondering, means Non-Player Character. Stems from RPG games.

In many places in the code, all NPC players work along the lines of barbarians and where that's the case, a new bool, isNPC() often replaces calls to isBarbarian(). There are multiple classes where this tag exists, in fact anywhere where isBarbarian() is defined has now also gained a new isNPC() function. Sometimes we want the effects in the code to specifically be valid FOR barbarians still so isBarbarian() is still valid.

What I'm thinking of doing here too is making isAnimal() equate to either the aggressive or passive animal player units rather than the tag on unit infos specifically and we can then remove bAnimal on Unit Infos entirely.

But Animals gain definition as wild animals by being SPAWNED under one of the animal players here so it should be sufficient.

Once I put the dll on the SVN, the python side of the code will need to be immediately scoured for all references to barbarians and the determination must be made in each case if we're really meaning barbarians or all NPCs. That's usually what I'm finding it boils down to.

But it's also going to need the spawn infos given the playertype settings for each spawn and for that I've just committed the unit schema and spawn infos with some notes at the top to explain this for whomever is going to be defining the player for each spawn.

That person I assume will be:

I understand just a little bit - but still trying.

There are 218 spawninfos, but only 217 'treat as barbarian' - do not know what the odd one is but can check if you want. Unless DH knows.



I am messing around with the Spawninfos file, trying to get it to work on my SEM+ map (different Lat./Long.)- so yes I would be willing to do that to the base file - (adding tags) should not be to difficult.

Also would need some help with which civilization settings. But you have to start some where.

So you'll take care of this for us then? Have I been completely clear as to what needs to be done with this or do you have any further questions? By the end of the weekend I should be able to have the dll fixed up pretty well on this subject so the need for the spawns to be given the right data is immediate. It currently won't have any affect IN game. But it also won't conflict to put the PlayerType tags on each entry now.


BTW, I noticed that Animals were still spawning as part of not ONLY the spawn system, but ALSO the normal barbarian spawning mechanism so that was probably throwing off a lot of the results we were aiming for with spawns and causing some confusion to the results we were getting. This may mean animal spawns will need further adjustment.

Also, animals will be able to fight each other AND will be able to fight barbarians and vice versa... UNLESS I activate the blend with barbs tag on the overall ANIMAL_WILD unitcombat. This will still allow animals to fight one another but barbs won't be able to hunt wild animals and wild animals won't be attacking barbs. For the sake of game processing speed, this is probably wise to establish.

Keeping Aggressive animals capable of attacking and preying on Passive animals could be neat to see out in the wild BUT this would also mean perhaps that Passive animals may need to spawn more commonly so we should be prepared for that adjustment.

Note that the violation of Number of Units cap by a player appears to be a matter of number of units CURRENTLY in play, not number of units ever possessed. This has been clarified for me during this project.
 
I assume this is what you are after:

<SpawnInfo>
<Type>SPAWN_ANIMAL_JAGUAR_NATIVE</Type>
<UnitType>UNIT_ANIMAL_JAGUAR</UnitType>
<PlayerType>AGGRESSIVE_ANIMAL_PLAYER</PlayerType>
<iTurns>900</iTurns>
<iMaxLocalDensity>5</iMaxLocalDensity>

With some animals having:

<PlayerType>PASSIVE_ANIMAL_PLAYER</PlayerType>


Also:

<UnitType>UNIT_NEANDERTHAL</UnitType>
<PlayerType>BARBARIAN_PLAYER</PlayerType>


A list of what are considered passive animals would be usefull. Some are obvious but not all.

Or I could make every animal aggressive and you could change the ones you want to be passive. Which ever is easier.
 
You're right on target with the syntax! Good job!

I was thinking that you could do what was obvious and as you go list here what you find that isn't so we can hammer it out.
 
I was thinking that you could do what was obvious and as you go list here what you find that isn't so we can hammer it out.


OK. I now have a spawnfile with all the animals set as aggressive.

I will start to go through it a bit later this evening (UK time) and change the passive animals.

I will start with fish/birds/various types of deer.


A definition of passive (in this context) would be useful. Are we only talking about animals that don't attack humans. So a barnowl which attacks and eats small rodents would be passive.
 
OK. I now have a spawnfile with all the animals set as aggressive.

I will start to go through it a bit later this evening (UK time) and change the passive animals.

I will start with fish/birds/various types of deer.


A definition of passive (in this context) would be useful. Are we only talking about animals that don't attack humans. So a barnowl which attacks and eats small rodents would be passive.
Good rule of thumb would be Carnivore/predator=agressive and Herbivore/Scavenger=Passive.

I would consider the barnowl a predator, hence agressive.
If it was then set to "defensive only" with "stealth defense" it would attack rodents neanderthal and humans only when it is stumbled upon in the wilderness while not attempting to attack a tiger or bear that enters it territory.

I would argue to do the same with Gorilla, with the difference that it is in the passive animal team. Thus it would not care for herbivores but would attack other predators and humans when they enter its territory.

Other not obvious ones would be the wolverine and hyena, following the thumb of rule I postulated would make them both passive.
The wolverine is a scavenger and rarely kills anything for its food though it often attack bears and wolfs to steal their prey.
The Hyena behaves in a similar manner but is far more a hunter predator than the wolverine.


What are others opinion on this?
 
Good rule of thumb would be Carnivore/predator=agressive and Herbivore/Scavenger=Passive.

I would consider the barnowl a predator, hence agressive.
If it was then set to "defensive only" with "stealth defense" it would attack rodents neanderthal and humans only when it is stumbled upon in the wilderness while not attempting to attack a tiger or bear that enters it territory.

I would argue to do the same with Gorilla, with the difference that it is in the passive animal team. Thus it would not care for herbivores but would attack other predators and humans when they enter its territory.

Other not obvious ones would be the wolverine and hyena, following the thumb of rule I postulated would make them both passive.
The wolverine is a scavenger and rarely kills anything for its food though it often attack bears and wolfs to steal their prey.
The Hyena behaves in a similar manner but is far more a hunter predator than the wolverine.


What are others opinion on this?

I like the way you'd arrange things.

Furthermore, I'd like to introduce a new tag for units, specifically for use with animals, to gauge their aggression on a scale of 0-10. We have a tag on Handicap Infos (iAnimalAttackProb) that is currently controlling whether animals will attack in a sweeping manner that affects all animals the same. I've LONG wanted to see animals act a bit more like their general 'personality' when it comes to making attacks.

So I'm thinking that a 0-12 roll would be in order. (This is edited... I initially said 0-20 but I think 1-12 works better with the formula.) If the result is less than the total of aggression for that animal, then the animal will try to make an attack that round. (It would be too much to try to denote certain prey I think but it'd be even cooler if we could do that as well.)

The calculated chance of animal aggression would be their (base aggression value (0-10 usually) + the Animal's Level -1) times iAnimalAttackProb divided by 100. Then times the current HP remaining of the animal and divided by 100. (Less likely to want to attack if injured.)

In implementing this tag, I have given it a base default of '5' so we can take a little time to give animals some variation here as this would be midrange aggression.

This can really be independent of which player we put the animal on. As you point out here, you could use defensive only and stealth defense to get a good settings mixture so as to narrow in on the animal's personality.

Do you feel animals should all be given "Blend with Barbarians" and "No Capture"? This could help with turn times a lot at least. And "No Capture" seems to me to be an absolute must for ALL wild animals since they should NEVER own cities.


I wonder about hawks and eagles. They generally don't go around attacking people but they COULD. So would we leave them capable of attacking, among the Aggressive Animals as they would never attempt to conflict with others in that group, but with a very low aggression level like 1?


@DH: I know some of your reservations with this kind of thinking has always been that animals can end up surrounding units that cannot attack, like scouts, and blocking them in... keep in mind that the rule has been implemented that units that cannot attack can now share tiles with those that also cannot attack even if owned by enemy players.
 
(It would be too much to try to denote certain prey I think but it'd be even cooler if we could do that as well.)
Too much indeed.

Do you feel animals should all be given "Blend with Barbarians" and "No Capture"? This could help with turn times a lot at least. And "No Capture" seems to me to be an absolute must for ALL wild animals since they should NEVER own cities.
Animals and barbarians clashing could on the other hand help keep the unit count down on continents where no players have cities.

No Capture, and a promo that gives OUTCOME_SUBDUE -1000%, is a must for all animals.

I wonder about hawks and eagles. They generally don't go around attacking people but they COULD. So would we leave them capable of attacking, among the Aggressive Animals as they would never attempt to conflict with others in that group, but with a very low aggression level like 1?
Agree.
 
No Capture, and a promo that gives OUTCOME_SUBDUE -1000%, is a must for all animals.
With the first, the second becomes moot. Plus you don't need a promo to enforce that. Put the modifier on the Wild unitcombat and its a done deal just to be sure.
 
With the first, the second becomes moot. Plus you don't need a promo to enforce that. Put the modifier on the Wild unitcombat and its a done deal just to be sure.

How does one affect animal subdue chances in unitcombats?

And I'm pretty sure I've subdued animals with units that has the bNoCapture=1, I may be wrong though.

We have three unit capture mechanism:
  • <KillOutcomes> with OUTCOME_SUBDUE. Adffected by promos in the outcomeinfo.xml
  • <Capture> For 0 strength combat victory unit capture. Affected by bNoCapture
  • iCaptureProbabilityModifierChange/iCaptureResistanceModifierChange that decide the chance of obtaining a captive from battle.

All of these should be barred from animals.
 
Back
Top Bottom