Breaking Save Game Compatibility for v37

Confirmed SVN 9124 breaks all previous save games.

JosEPh

As it was stated to. There are more savegame breaking updates to come as well. We should be able to keep them all within a span of a month perhaps but it's top priority to get all savegame breaking updates in as quickly as possible so we can (hopefully) forever put these behind us.
 
RE:Spawns - Those spawn infos with the <SpawnGroup> tag in any use beyond one extra type defined will not be valid for Size Matters which will be relying on the GroupSizeUnitCombatTypes tag to define the emergence of variable group sizes.
 
@Toffer:
What if I were to include an additional nested tag for GroupSpawnUnitCombatTypes where we can specify a text key that gets added to the unit name when the unit spawns?

I'd say: Over the top!

Personally I'd skip the animals hunting other animals, too, since it doesn't really add anything to the game from a gaming POV. Only flavour. And not much flavor since most of the time you don't see that this is going on. So you mostly add more processing time for very little value. And it can be frustrating as well. Imagine you're happy AF that you finally found a Horse that you can try to subdue and then you see it eaten by a Lion one turn before you are there - and you can't do anything against it!

And if they spawn in different sizes (which I think is a VERY cool addition), how do we think about hunting? DH said that subduing a unit is capturing a baby basically. But how do we think about killing a single unit animal? You get the outcome + the Subdued animal, which is technically wrong. And do you get a higher outcome from a bigger size animal? Would make sense.

Aaaaand about agression: Higher aggression on higher difficulty seems logic; but actually this makes the game easier since you can kill more animals per turn with one hunter. Do you think about making animals slightly stronger? IMO the dangerous hunting modmod we had some time a go was pretty cool; how about a middle ground between the overpowered animals in the modmod and the "weak" animals we have now.
 
I'd say: Over the top!
Keep in mind this is only going to apply to size matters. It will help to create some further challenge variety. With this, such variety of challenge can help to make the wilderness both more exploitable and more dangerous at the same time. Hunter units cannot merge themselves so some animals out there may even be able to challenge them if they are of sufficient spawned group size.

This has been a requested feature for Size Matters and something I've had tabled for a while. That Toffer is willing to help with the xml for it and the fact that we've got a lot of current focus on animals is a good reason to implement it now.

If it somehow imbalances things or makes the game frustrating then we can certainly reconsider.


EDIT: You're talking about the renaming bit... It can be much nicer for the player to see the difference in the name of the unit wouldn't it? I also do like Toffer's point about making the number of graphically show meshes vary based on the group size. That's been something I've wanted to do for a while and it will help a lot. Will take some serious research though.


Personally I'd skip the animals hunting other animals, too, since it doesn't really add anything to the game from a gaming POV. Only flavour. And not much flavor since most of the time you don't see that this is going on. So you mostly add more processing time for very little value. And it can be frustrating as well. Imagine you're happy AF that you finally found a Horse that you can try to subdue and then you see it eaten by a Lion one turn before you are there - and you can't do anything against it!
Argument taken. I'd like to see how it plays out though. I have similar concerns but there's also some potential benefit in that it can keep the numbers down a bit. Besides, that point you made about the horse is actually what I'm thinking would be the fun part about it... it's the very kind of frustration that hunters can often encounter when competing for their prey. It can therefore guide strategy... kill competing predators. It also gives surviving animals the opportunity to gain exp and some promos so as to become some unique characters providing unique challenges out in the wilderness.

If all those potential benefits prove to be more frustrating than fun, then yeah, I can easily see reverting to only having one animal group.

And if they spawn in different sizes (which I think is a VERY cool addition)
Wait... isn't that what you just said would be over the top???

, how do we think about hunting? DH said that subduing a unit is capturing a baby basically. But how do we think about killing a single unit animal? You get the outcome + the Subdued animal, which is technically wrong. And do you get a higher outcome from a bigger size animal? Would make sense.
Would make sense, yes, but I'm not sure how such a modification based on group size could be implemented. I'll think on it and perhaps at some point a solution will become obvious.

Aaaaand about agression: Higher aggression on higher difficulty seems logic; but actually this makes the game easier since you can kill more animals per turn with one hunter. Do you think about making animals slightly stronger? IMO the dangerous hunting modmod we had some time a go was pretty cool; how about a middle ground between the overpowered animals in the modmod and the "weak" animals we have now.
Back to what I said above, if you have some very large herds or dangerous animal groups out there getting easily aggressive, it takes the choice of whether to clash or not away from the player. That's the main thing. Probably true that IN GENERAL it can make things easier with more aggressive animals roaming around except that it's generally the stronger animals being more aggressive and the weaker ones being much less so (and skittishly avoiding combat) so the ones that can really challenge units are the only ones tending to respond to the handicap. When your hunter just survived a Neanderthal but is at about 10% HP remaining, you'd wish that Elephant herd would just ignore him as he heals but that's not going to be as likely on a harder setting.

The group size variation is exactly what we can use to make animals both more and less challenging and creating a wider sense of variation such that we shouldn't really need to re-evaluate base stats so much.
 
Also if you have large to very large herds, predators don't wipe the whole herd out. It would also be unreasonable to expect hunters to fight the whole herd either.
 
Just to keep you posted. I have made a lot of changes to the spawn file (passive/aggressive types) along the lines discussed. Will post some questions tomorrow.
 
Also if you have large to very large herds, predators don't wipe the whole herd out. It would also be unreasonable to expect hunters to fight the whole herd either.

Which will probably lead to the need to install the requested modification to SM where units can have partial victories leading to the splitting of the losing unit and the defeat of one of the 3 units resulting from that split.

There's a number of questions in my mind though as to how to regulate such game rule behavior. Obviously, a hunter probably doesn't even WANT to take down a whole herd. And how would such a game rule come into play with military conflicts? A lion would take down maybe one individual from a large herd.

I wonder, therefore, if it shouldn't work a little like this:

When a unit attacks another unit, if the defending unit is of a larger group volume, the battle goes on until damage has been assigned to the defender.

At this point, the defender splits, each resulting unit set to having the same % of damage. Combat is immediately and automatically re-initialized so that the attacker re-engages one of the split units.

This process repeats until the defending unit engaged in battle is either dead or simply not of a larger group size as the attacker at which point the battle persists until complete.

This would often make it so that when a hunter makes a kill from a larger group, the group has split down to ejecting a single individual unit that actually gets killed. This leaves a number of units that are ready to re-merge as soon as another individual unit comes along.

Such a proposal would change a lot about the way combat resolves itself in Size Matters and would impact military behavior a lot and could potentially be exploitable (attack that big stack with an individual sized unit so that you can split it down a bit and thus make it a little easier to take out.) So I have some doubts this would be a good move.
 
Just to keep you posted. I have made a lot of changes to the spawn file (passive/aggressive types) along the lines discussed. Will post some questions tomorrow.

You're perfectly clear regarding the use of the integer to represent the index of the player rather than the player name right?
 
Just to keep you posted. I have made a lot of changes to the spawn file (passive/aggressive types) along the lines discussed. Will post some questions tomorrow.
Here's how far I've gotten:
Spoiler :
Code:
This shows my thinking when I adjusted Animals_CIV4UnitInfos.xml

bOnlyDefensive=1 & bAnimalIgnoresBorders=1 in UnitInfo - bNeutralOnly=0 in SpawnInfo:
	PASSIVE:
		Aardvark...............	AARDVARK
		African Grey Parrot....	AFRICANGREY
		African Penguin........	AFRICAN_PENGUIN
		Giant Anteater.........	ANTEATER
		Armadillo..............	ARMADILLO
		Babirusa...............	BABIRUSA
		Badger................. BADGER
		Ball Python............	BALLPYTHON
		Barbary macaque........	BARBARYAPE
		Barn Owl...............	BARNOWL
		Barred Owl.............	BARREDOWL
		Beaver.................	BEAVER
	AGGRASSIVE:
		Arctic Fox............. ARCTICFOX..............	Assassinate WATERFOWL & SEABIRD
		Beluga Whale...........	BELUGA.................	Assassinate CRUSTACEAN & FISH_BONEY


Can Attack - Only neutral Spawning:
	PASSIVE:
		African Elephant.......	AFRICANELEPHANT........	iAggression = 0	(Stealth Defense)
		Asian Bear............. ASIANBEAR..............	iAggression = 3	(Stealth Defense - Assassinate SOLO & PARTY)
		Bison.................. BISON..................	iAggression = 4 (Stealth Defense)
	AGGRASSIVE:
		Jaguar.................	ANIMAL_JAGUAR..........	iAggression = 9 (Stealth Defense - Assassinate SOLO, PARTY, CERVID, RODENT & TAPIR)
		Brown Bear............. BEAR...................	iAggression = 1	(Stealth Defense - Assassinate BOVINE, CERVID, GOAT & SWINE)
		Bengal Tiger...........	BENGALTIGER............	iAggression = 7 (Stealth Defense - Assassinate ANTELOPE, BOVINE, CERVID & SWINE)
This takes some time because I'm also refining impassable features/terrains and combatclasses for the animals. Much time passes on reading up on behaviors/habitat/ecology of each and every animals.
I rarely change strength and pursuit/withdrawal values though.

I'll maintain the list to the end so people can discuss various details about what I'm doing here.
 
You're perfectly clear regarding the use of the integer to represent the index of the player rather than the player name right?

If you mean 40, 41, 42. Yes. :)
 
@DH:
Aging Animals... the way this is programmed makes it difficult to adjust for me.
Code:
# AgingAnimals
#
# by ori
# 
#

from CvPythonExtensions import *
import CvUtil
import PyHelpers
from Popup import PyPopup

# globals
gc = CyGlobalContext()
PyPlayer = PyHelpers.PyPlayer
PyInfo = PyHelpers.PyInfo
game = CyGame()
localText = CyTranslator()
eBarbarian = gc.getBARBARIAN_PLAYER()
pyBarbarian = PyPlayer(eBarbarian)
I need pyBarbarian to mean either of the animal players really. But the way it's setup it's dedicated to only taking one player. I'll be leaving this on basically broken until I can at least get your help reprogramming it. There's a few too many steps to adjust this one for my level of python ability.

I don't think this is used much. It just gives exp to animals which have not been in combat. We can probably just drop it.

Pack of Lions can be removed. It is not really working well anyway.
 
Tbird, only herds would act that way, and not even all of them. A herd of deer sacrafice one of the weak/old/young. Rhinos, hippos, elephants and dolphins are more likely to fight off a predator, particularly one hunting solo. They are more likely to sacrafice against large pacts. But even then hyenas aren't likely to attack elephants, and even a pride of lions would look for easier targets.

Pact animals (canines in particular) would fight as a group against a bigger predator (say mountain lion). And of course military units always fight as a group... at least until morale breaks.

If you want to get that detailed with SM and animals you're going to need at least one more tag to define how the group acts defensively (and even that can very depending on the physical size/threat of the attacker and how many are attacking).
 
Here's how far I've gotten:
Spoiler :
Code:
This shows my thinking when I adjusted Animals_CIV4UnitInfos.xml

bOnlyDefensive=1 & bAnimalIgnoresBorders=1 in UnitInfo - bNeutralOnly=0 in SpawnInfo:
	PASSIVE:
		Aardvark...............	AARDVARK
		African Grey Parrot....	AFRICANGREY
		African Penguin........	AFRICAN_PENGUIN
		Giant Anteater.........	ANTEATER
		Armadillo..............	ARMADILLO
		Babirusa...............	BABIRUSA
		Badger................. BADGER
		Ball Python............	BALLPYTHON
		Barbary macaque........	BARBARYAPE
		Barn Owl...............	BARNOWL
		Barred Owl.............	BARREDOWL
		Beaver.................	BEAVER
	AGGRASSIVE:
		Arctic Fox............. ARCTICFOX..............	Assassinate WATERFOWL & SEABIRD
		Beluga Whale...........	BELUGA.................	Assassinate CRUSTACEAN & FISH_BONEY


Can Attack - Only neutral Spawning:
	PASSIVE:
		African Elephant.......	AFRICANELEPHANT........	iAggression = 0	(Stealth Defense)
		Asian Bear............. ASIANBEAR..............	iAggression = 3	(Stealth Defense - Assassinate SOLO & PARTY)
		Bison.................. BISON..................	iAggression = 4 (Stealth Defense)
	AGGRASSIVE:
		Jaguar.................	ANIMAL_JAGUAR..........	iAggression = 9 (Stealth Defense - Assassinate SOLO, PARTY, CERVID, RODENT & TAPIR)
		Brown Bear............. BEAR...................	iAggression = 1	(Stealth Defense - Assassinate BOVINE, CERVID, GOAT & SWINE)
		Bengal Tiger...........	BENGALTIGER............	iAggression = 7 (Stealth Defense - Assassinate ANTELOPE, BOVINE, CERVID & SWINE)
This takes some time because I'm also refining impassable features/terrains and combatclasses for the animals. Much time passes on reading up on behaviors/habitat/ecology of each and every animals.
I rarely change strength and pursuit/withdrawal values though.

I'll maintain the list to the end so people can discuss various details about what I'm doing here.
So far I'm lovin' it! Great work! I know it takes some serious time and consideration. That's what makes what you're doing so very appreciated!

If you mean 40, 41, 42. Yes. :)
Excellent! I figured but just wanted to be sure.

I don't think this is used much. It just gives exp to animals which have not been in combat. We can probably just drop it.

Pack of Lions can be removed. It is not really working well anyway.
Ok. I'm still a little unclear as to how to safely remove a python file but I can leave it for now as it just flat won't work unless restructured but shouldn't error out.

Fair 'nuff on the Pack. @Toffer: I'll leave removal of the unit to you since you're in that file.
 
Tbird, only herds would act that way, and not even all of them. A herd of deer sacrafice one of the weak/old/young. Rhinos, hippos, elephants and dolphins are more likely to fight off a predator, particularly one hunting solo. They are more likely to sacrafice against large pacts. But even then hyenas aren't likely to attack elephants, and even a pride of lions would look for easier targets.

Pact animals (canines in particular) would fight as a group against a bigger predator (say mountain lion). And of course military units always fight as a group... at least until morale breaks.

If you want to get that detailed with SM and animals you're going to need at least one more tag to define how the group acts defensively (and even that can very depending on the physical size/threat of the attacker and how many are attacking).
I completely agree. These are all issues I'm rattling around with in my head at the moment.

I've also considered a simpler rule that perhaps when a unit is COMPLETELY defeated in battle, IF the unit that defeated it is a smaller group size, the defeated unit is healed and splits. Then one of the split off units is given the same group size comparison check - either split again if the unit that won is still a smaller group size or if it is the same group volume, that unit that is killed, leaving the two other units from the 3 way split on the tile (BEFORE advancement can take place by the victorious unit.) This process continues until only the equivalent group size is what is actually killed. This would happen potentially on defense as well.

In short the rule would be that a unit can only kill up to an amount equal to its own group size in a given combat and a victory over a unit will only represent the taking down of that much of the opponent.

This might have more even application between all the envisioned scenarios above. It's also not so exploitable and may actually be a better way to model SM group sizes in combat in general. It would also help to represent pursuit in going after large herds. The herd may all get away or be hunted down but even hunting it down with appropriate pursuit ability will still only get as much as the hunting unit can really take off the herd. What do others think?

I'd probably implement this as an addendum option to Size Matters and let it get some serious implications testing before trying to make it 'the standard' way SM operates.


Why would all this dynamic be important? Beyond animals alone, it could end up playing a very powerful role in Nomadic Starts.
 
In short the rule would be that a unit can only kill up to an amount equal to its own group size in a given combat and a victory over a unit will only represent the taking down of that much of the opponent.
This sounds good, and pairing it with what's it called, onslaught, will enable lets say a party of tanks to take out more than a party of riflemen each turn due to the continued attack possibility.


EDIT: Does Stealth Defense trigger when a zero :strength: unit walks unsuspecting into the plot containing a unit capable of it?
 
This sounds good, and pairing it with what's it called, onslaught, will enable lets say a party of tanks to take out more than a party of riflemen each turn due to the continued attack possibility.

Right!

Now, I was also thinking that if a unit withdraws from battle successfully (or the battle ends in a non-lethal manner otherwise) then the Larger group unit would have its final damage adjusted - so a running tally would be needed in the fight and the unit would be credited back according to the percentage of the unit that we can envision would've been actually engaged.

Furthermore, if a unit WOULD have withdrawn but is instead pursued, that's also a moment that the unit would be split, with 2 uninjured thirds getting out of the battle successfully and the last third retaining all damage and then immediately re-engaged since this isn't technically the end of the fight.

This could work... hmm... Just takes some deep planning in the code to pull it off correctly.

EDIT:
EDIT: Does Stealth Defense trigger when a zero :strength: unit walks unsuspecting into the plot containing a unit capable of it?
I THINK it does. I'm not 100% sure without looking deeply into the code though.
 
I'm not sure such a rule would apply in all situations. There are plenty or cases where well dug in defenders have caused much larger casualties than there own 'size'.

Just throwing some common thoughts/logic your way. I don't play SM nor likely will with HS either, I prefer to leave things simpler and at a higher level of abstraction/interpretation.
 
There are plenty or cases where well dug in defenders have caused much larger casualties than there own 'size'.
True but then if you're defending you're susceptible to potentially a lot more attacks before the round is up. And perhaps the newly split off units shouldn't have their movement reduced and not be noted as having made an attack so they can persist in attacking if they so choose.

Just throwing some common thoughts/logic your way. I don't play SM nor likely will with HS either, I prefer to leave things simpler and at a higher level of abstraction/interpretation.
I feel a tremendous amount of respect that you would nevertheless be able to engage in the discussion so effectively. Impressive!
 
I've found a fairly major bug with the last update. I'm trying to fix it now but apparently what's happening is that after initializing the game, somewhere between saving and reloading the extra NPC slots are being 'killed off'. This is making it only possible to have animals in the game during the first session and actually also makes it so that games will crash when loaded the next time. I'm working on zeroing in on how this is happening.

EDIT: Apparently I'm back to arguing with the EXE. The EXE calls for each player to save its data and the assumption that it stops after the barbarian player (or after MAX_CIV_PLAYERS + 1 - I'm not sure yet) is hardcoded there. I'm going to have to get theoretical again to overcome this. Please be patient with me.
 
Latest list:
Spoiler :
Code:
This shows my thinking when I adjusted Animals_CIV4UnitInfos.xml

bOnlyDefensive=1 & bAnimalIgnoresBorders=1 in UnitInfo - bNeutralOnly=0 in SpawnInfo:
	PASSIVE:
		Aardvark...............	AARDVARK
		African Grey Parrot....	AFRICANGREY
		African Penguin........	AFRICAN_PENGUIN
		Giant Anteater.........	ANTEATER
		Armadillo..............	ARMADILLO
		Babirusa...............	BABIRUSA
		Badger................. BADGER
		Ball Python............	BALLPYTHON
		Barbary macaque........	BARBARYAPE
		Barn Owl...............	BARNOWL
		Barred Owl.............	BARREDOWL
		Beaver.................	BEAVER
		Wild Boar.............. BOAR
		Bongo..................	BONGO
		Booby.................. BOOBY
		Dromedary..............	CAMEL
		Capuchin Monkey........	CAPUCHIN
		Capybara...............	CAPYBARA
	AGGRASSIVE:
		Arctic Fox............. ARCTICFOX..............	Assassinate WATERFOWL & SEABIRD
		Beluga Whale...........	BELUGA.................	Assassinate CRUSTACEAN & FISH_BONEY


Can Attack - Only neutral Spawning:
	PASSIVE:
		African Elephant.......	AFRICANELEPHANT........	iAggression = 0 (Stealth Defense - Defensive Only)
		Asian Black Bear....... ASIANBEAR..............	iAggression = 3 (Stealth Defense - Assassinate SOLO & PARTY)
		Bison.................. BISON..................	iAggression = 3 (Stealth Defense)
		American Black Bear.... BLACKBEAR..............	iAggression = 0 (Stealth Defense - Defensive Only)
		Cape Buffalo...........	BUFFALO................ iAggression = 4 (Stealth Defense)
	AGGRASSIVE:
		Jaguar.................	ANIMAL_JAGUAR..........	iAggression = 9 (Stealth Defense - Assassinate SOLO, PARTY, CERVID, RODENT & TAPIR)
		Brown Bear............. BEAR...................	iAggression = 1 (Stealth Defense - Assassinate BOVINE, CERVID, GOAT & SWINE)
		Bengal Tiger...........	BENGALTIGER............	iAggression = 7 (Stealth Defense - Assassinate ANTELOPE, BOVINE, CERVID & SWINE)
		Black Caiman...........	CAIMAN.................	iAggression = 2	(Stealth Defense - Assassinate BIRD, CERVID, RODENT & TAPIR)

Defensive Only animals in the "Can Attack" group can be made able to attack by the "Savage Beast I" promotion. "Savage Beast III" will make them ignore cultural borders.
Good night.
 
Back
Top Bottom