Thunderbrd
C2C War Dog
It's been a while since I last committed anything to the SVN. I got a bit caught up on developing numerous projects in parallel and when a few of them proved to have some bugs upon completion, I had to take more time than I'd hoped dividing those projects up and testing them individually to figure out where the problems lie. Those issues have been sorted out so I'm now committing quite a few adjustments to the dll.
I'd also have committed each as they were completed except that I had some problems working with the new repository. meh... won't go into details there. Suffice it to say its all sorted out now.
Since the scope of this update is fairly large I figured I'd put a post together for it here.
Ok, that's what I have time for at the moment. I'll return to offer more information and answers to questions.
I'd also have committed each as they were completed except that I had some problems working with the new repository. meh... won't go into details there. Suffice it to say its all sorted out now.

Since the scope of this update is fairly large I figured I'd put a post together for it here.
- Bugfixes: There's a few various bugs I fixed along the way. I may not be recalling them all but they include a display error on Trait GP modifiers, a happiness display issue and other such small things.
- Reported Subcombats assigned to base unit info for DH to use to finish the SubCombat displays on the unit page of the pedia as per AIAndy's suggested implementation. @DH: let both of us know if you need further assistance in working with the vector on that.
- Team Project 1: If you're looking through the code I've marked most changes under a comment line //Team Project (x). I'll explain these each here. I'm going to assume y'all know how to refer to the schema to determine the correct syntax to implement the tags with but if anyone needs help with that, just let me know.
Team Project (1) is for DH and CivPlayer8 (Vokarya had requested some of these too I think.) These new tags add Happiness/Unhappiness and Health/Unhealth by specialist and tech as well as giving buildings the ability to modify specialists yields in just the city where the building is built. The tags are as follows:
- For Specialists:
- TechHappinessTypes: Adds Happiness (+) or Unhappiness (+) to all cities from the specialist type with this tag when the designated tech type is known.
- TechHealthTypes: Adds Health (+) or Unhealth (-) to all cities from the specialist type with this tag when the designated tech type is known.
- TechHappinessTypes: Adds Happiness (+) or Unhappiness (+) to all cities from the specialist type with this tag when the designated tech type is known.
- For Buildings:
- TechHappinessTypes: Indicates techs that cause this building to add the specified volume of Happiness (+) or Unhappiness (-) when known. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
- TechHealthTypes: Indicates techs that cause this building to add the specified volume of Health (+) or Unhealth (-) when known. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
- TechSpecialistHappiness: Indicates techs that, when this building is present, will, when known, cause ALL specialists to add the specified volume of Happiness (+) or Unhappiness (-). This is a local modifier which means that the building's effect only takes place in the city in which it is built.
- TechSpecialistHealth: Indicates techs that, when this building is present, will, when known, cause ALL specialists to add the specified volume of Health (+) or Unhealth (-). This is a local modifier which means that the building's effect only takes place in the city in which it is built.
- TechSpecialistHappinessType: Indicates techs that, when this building is present, will, when known, cause the SPECIFIED specialist type to add one Happiness. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
I warn that this is established as a boolean rather than a variable integer amount due to finding no appropriate examples of how to properly load such an integer. I realized it was really never a good idea to have just one building have a greater impact on all specialist of even a particular type than an adjustment of 1 anyhow so this was a sufficient solution. I just hope it doesn't cause undue confusion. Since no integer is entered (iModifier does not exist here), it has a fixed result to indicate the tech and the specialist - a +1 Happiness on that specialist from this building and knowledge of the tech. And thus you cannot use this tag to indicate UNhappiness for those specialists.
- TechSpecialistHealthType: Indicates techs that, when this building is present, will, when known, cause the SPECIFIED specialist type to add one Health. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
This works as the previous tag, as a boolean rather than a variable integer amount. Since no integer is entered (iModifier does not exist here), it has a fixed result to indicate the tech and the specialist - a +1 Health on that specialist from this building and knowledge of the tech. And thus you cannot use this tag to indicate UNhealth for those specialists.
- TechSpecialistUnhappinessType: Indicates techs that, when this building is present, will, when known, cause the SPECIFIED specialist type to add one Unhappiness. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
This works as the two above, as a boolean rather than a variable integer amount. Since no integer is entered (iModifier does not exist here), it has a fixed result to indicate the tech and the specialist - a +1 Unhappiness on that specialist from this building and knowledge of the tech. And thus you cannot use this tag to indicate Happiness for those specialists.
- TechSpecialistUnhealthType: Indicates techs that, when this building is present, will, when known, cause the SPECIFIED specialist type to add one Unhealth. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
This works as the three above, as a boolean rather than a variable integer amount. Since no integer is entered (iModifier does not exist here), it has a fixed result to indicate the tech and the specialist - a +1 Unhealth on that specialist from this building and knowledge of the tech. And thus you cannot use this tag to indicate Health for those specialists.
- LocalSpecialistYieldChanges: By indicating a specialist type, and a yield volume, you make all local specialists of the defined yield adjust their yields based on the presence of this building.
We've had this on a national level since I have no idea when but the difference here is LOCAL - so it only affects the city in which the building is built. I'd have preferred to rename the tag we already have so that it states National but that could have a lot of unforeseen consequences now that its put in use in a number of places already so I broke some naming convention and simply indicated 'Local' for this tag, which should be the default anyhow.
Let me know if this covers all the bases y'all were looking for. I may have added more than necessary but all the tech/specialist/happiness&health stuff compiles together and I figured if we ever wanted any listed here that weren't requested that it'd be easier to implement them now so that if they ever WERE requested it wouldn't take a huge effort to work through that complexity to weave in more. - TechHappinessTypes: Indicates techs that cause this building to add the specified volume of Happiness (+) or Unhappiness (-) when known. This is a local modifier which means that the building's effect only takes place in the city in which it is built.
- For Specialists:
- Team Project 2: A while back, SO asked me for some tags to get merged in from theLadiesOgre's mod project and I had figured there were some among them that would not be necessary in C2C. I stand corrected.
So these are completed now. I'll still gladly list the ones I just merged in to complete this project here:
For Promotions:- iSurvivorChance: Gives a chance for the unit to survive a battle where it would otherwise have died.
- iVictoryAdjacentHeal: Gives units with this ability a chance for units adjacent to them to gain the benefit of a round of healing after they win a battle.
- iVictoryStackHeal: Gives units with this ability a chance for units in the stack to gain the benefit of a round of healing after they win a battle.
- isOneUp: Gives an extra 'life' that can be lost by the unit.
I'm going to ask anyone who wishes to know more about these to refer to theLadiesOgre's documentation on them as I did not spend much time greatly evaluating what his coding would accomplish exactly... just enough to look for things about the coding that would need to be converted for C2C use.
- iSurvivorChance: Gives a chance for the unit to survive a battle where it would otherwise have died.
- Team Project 3: Capture Mechanics tags
I suggested to do these for DH so he could weave the tag applications into the python that controls the mechanism. I did not convert the capturing code into the dll so these tags, reported by the dll to python from CyUnit:
int captureProbabilityTotal(); which gets the total probability of the unit's capture ability as compiled from all sources onto the specific unit.
and
int captureResistanceTotal(); which gets the total resistance capability of the unit.
Once plugged into the python, this will put XML in full control of determining the odds of capture.
There's a number of tags that can be used to tally into those above reported numbers on units:- On Promotions:
- CaptureProbabilityModifierChange: gives the promotion the ability to enhance or reduce the unit's ability to capture other units.
- CaptureResistanceModifierChange: gives the promotion the ability to enhance or reduce the unit's ability to resist being captured when defeated.
- CaptureProbabilityModifierChange: gives the promotion the ability to enhance or reduce the unit's ability to capture other units.
- On Units:
- CaptureProbabilityModifier: gives the unit a base enhancement or reduction to the unit's ability to capture other units.
- CaptureResistanceModifier: gives the unit a base enhancement or reduction to the unit's ability to resist being captured when defeated.
- CaptureProbabilityModifier: gives the unit a base enhancement or reduction to the unit's ability to capture other units.
- On Civics:
- NationalCaptureProbabilityModifier: gives all units an enhancement or reduction to their ability to capture other units.
- NationalCaptureResistanceModifier: gives all units an enhancement or reduction to their ability to resist being captured when defeated.
- NationalCaptureProbabilityModifier: gives all units an enhancement or reduction to their ability to capture other units.
- On Buildings:
- NationalCaptureProbabilityModifier: if building has been built anywhere, this tag gives all units an enhancement or reduction to their ability to capture other units. This effect does stack so be careful with this.
- NationalCaptureResistanceModifier: if building has been built anywhere, this tag gives all units an enhancement or reduction to their ability to resist being captured when defeated. This effect does stack so be careful with this.
- LocalCaptureProbabilityModifier: if built, this building will enhance or reduce the ability to capture other units for units that are IN this city.
- LocalCaptureProbabilityModifier: if built, this building will enhance or reduce the ability to resist being captured when defeated for units that are IN this city.
- NationalCaptureProbabilityModifier: if building has been built anywhere, this tag gives all units an enhancement or reduction to their ability to capture other units. This effect does stack so be careful with this.
- On Traits:
- NationalCaptureProbabilityModifier: Units operating under the control of a leader with this trait have an enhanced or reduced ability to capture other units.
- NationalCaptureResistanceModifier: Units operating under the control of a leader with this trait have an enhanced or reduced ability to resist capture when defeated.
- NationalCaptureProbabilityModifier: Units operating under the control of a leader with this trait have an enhanced or reduced ability to capture other units.
I realize there's probably some noteworthy oversights here as I'm not sure how these tag effects should work into the capture of civilians. @DH: Let me know if you need anything else tallied and reported (perhaps a total capture resistance for the city itself for its citizens?).
- On Promotions:
- Team Project 4: Also dubbed the WorkRateMod. This is pretty much just an audit and ensuing edit of some of ls612's work on worker tags so that the unit types can have these special workrate adjustments without having to give them free promos to do it. @ls612: Search //Team Project (4) or //WorkRateMod - either one will work so you can thoroughly review the adjustments made there... keep in mind that I've gone out of the way to make it compatible with the tags you made and those should eventually be migrated to the new tags and then extracted from use in both xml and code so that we only have the one implementation eating up memory. The two extra tags I did here provide clear examples of how they would have best been implemented originally.
For the team's sake and the sake of anyone trying to update a changelog, the tags introduced here are:- For Promotions
- TerrainWorkRateModifierChangeTypes - adapted from TerrainWorkPercent
- FeatureWorkRateModifierChangeTypes - adapted from FeatureWorkPercent
- BuildWorkRateModifierChangeTypes
- iHillsWorkModifierChange - adapted from iHillsWorkPercent
- iPeaksWorkModifierChange
- For Units
- TerrainWorkRateModifierTypes
- FeatureWorkRateModifierTypes
- BuildWorkRateModifierTypes
- iHillsWorkModifier
- iPeaksWorkModifier
- For Promotions
- Team Project 5: Religious Disabling of buildings.
Some players after this update are going to be gasping in terror at their gold amounts, sudden unhappiness and unhealth, and reduced research. This is not a bug but rather a project in development that's going to take immediate response from the Traits and Civics guys to give these poor players some access to respite.
What's happening here is that buildings that are designated as being of a religion (by either a specified religion as a prereq or with the use of the Religion tag on that building) that is NOT your state religion, basically stop working.
This is setup so that most tags on buildings go unfunctional but others remain in effect. I've got a compiled list (which COULD have infrequent inconsistencies with display and may be somewhat incomplete but should be pretty much on target.) But to display that here is probably going to push the character count on this post too far so I'll post it later.
This effect selectively disables TAG implementations on these Religiously Disabled buildings rather than considering the building completely disabled. This sets us up so that we can clone some tags and create either alternative effects while under religious disabling, and/or clone tags that DO work when under religious disabling as well as when not, tags that look identical in every way (except in xml) to the ones they clone but while the usual tag gets disabled, the clone does not.
Thus, if under religious disabling you want almost all religious buildings to lose any health offering benefits but for a select group of special buildings among them you want those health benefits to merely reduce under religious disabling, that can be done with a cloned tag that creates an alternative effect. And if you want those health benefits to stay entirely on these buildings while health benefits are disabled on others during religious disabling, we would utilize the second cloning method.
@DH, You'll have to do 3 things for me here:
1) Look through the list of tags that are disabled and those that are not as I've set it up for now and let me know if you want any to sweepingly remain enabled or to be disabled that are currently in what you feel would be the wrong group.
2) Determine what tags you'd want to have an adjusted effect under a religious disabling.
3) Determine what tags you'd want to have cloned so that some religious buildings can use them when religiously disabled while others, as a rule, do not.
@Civics and Traits designer(s)
Religious Disabling is a status in the nation where the worship of religions that are alternatives to the State Religion is shunned, frowned upon and deterred but not outright illegal. The buildings are there and are allowed to stand but very few worshipers are staffing them and willing to take the heat for having religious views contrary to the state.
That's the middle ground. Then we have the Enabled view of a Free Religious outlook that while may be declaring a religion politically, welcomes the worship of all religions. And on the other side of the pendulum is outright Banning. In the Enabled status, all religious buildings, regardless of state religion, are completely functional. In the Banned status, all religious buildings not of the state building (or all religious buildings period if not on State Religion) are completely disabled outright just as any other building can be in civ.
We allow the player to toggle this decision through traits and civics and the tags to do so, as booleans, give the player ONE reason to be towards one direction or another. The middle ground is Religious Disabling and that is also the default. The following boolean tags can be used to state that with this trait or civic active a reason for weighting towards one end or the other exists:
On both Civics and Traits:- bAllReligionsActive: Weights towards all religious buildings being activated (VERY powerful for civs that have collected a lot of religions, particularly a lot of holy cities and their shrines!)
- bBansNonStateReligions: Weights towards all non-state religious buildings being disabled outright. If DH and I can strike a good balance on how functional religious buildings are when Religiously Disabled, this can have a pretty powerful effect. At the moment, the majority of religious buildings are so crippled by religious disabling alone that this isn't MUCH of a step towards it (though disabled buildings cannot be built.) But it still counts as a cause that can counter a source of AllReligionsActive.
Yes, I expect a lot of questions to be asked here. Fire away.
- bAllReligionsActive: Weights towards all religious buildings being activated (VERY powerful for civs that have collected a lot of religions, particularly a lot of holy cities and their shrines!)
- Team Projects 6-8: I'm out of time for further discussion on these subjects and probably nearly out of space in this initial post so I'll return in a bit to explain these but I'll just say for now that they are all additional tags for Traits. I may just go ahead and describe all those tags in the traits thread.
Ok, that's what I have time for at the moment. I'll return to offer more information and answers to questions.