C2C SVN Changelog

- Minor order change in civics to match the order I research techs in. (As requested by Hydro - two sets still to go.)

It should be in the order they appear on the tech tree. Left to right / top to bottom.

That way its not based on any person's personal order of tech choices.

EDIT: And in alphabetical order if the civic are enabled at the same tech in the same civic category.
 
It should be in the order they appear on the tech tree. Left to right / top to bottom.

That way its not based on any person's personal order of tech choices.

EDIT: And in alphabetical order if the civic are enabled at the same tech in the same civic category.

Not going to happen. I only notice that they are out of order when playing and will move them into a better order. Or I will stop and leave them as they are.

Update

- Added mangrove art and a compressed file of the mangrove feature so Hydro can have a look at it in game.
 
Update

- New mangrove feature. Map work yet to be done.
- Tales of sea creatures now have zero combat and ten movement. They also have the correct unit combat class and pedia and strategy text.

Edit

- Step 2 in captives/slaves update. You can now capture military and civilian "slaves" now called "Captive - Military" from military units and "Captive - Civilian" from population. Much more still to do.
- Update settled slaves and citizens unhappiness and unhealthiness.
- Fix settled citizen icon/button
 
Months of changes and modifications being pushed now.
The Combat Mod is here!

You might want to save before updating - there are a few areas I'm not sure about how they will work with existing games, nothing toooo critical but possibly annoying.

Over the course of the next week I'll primarily be working on posting some modder and player documentation for using these adjustments and notes on their intentions.

I still have some work to do for explaining things in the civopedia as well.

For now, few changes should be noted... as XML goes in over the next few weeks/months, you'll start seeing some neat stuff.

@Calvitix: there's a lot of nasty hardcoded stuff in the text manager and a lot to translate in the Thunderbrd text file. Sorry for throwing you so much work. Where I've hardcoded its due to having such a limited know-how that I often need to go off of local examples to make things work right when they error out after multiple attempts to format correctly. If you can show me even one example of how to reformat where I apparently had this problem, I'd be happy to spend the time to convert the rest.

@Koshling & AIAndy:
I'm sure you'll want to review and will probably find 101 ways to streamline what I've done here. I'm extremely open to some added guidance. Additionally, please review the odds sections to make sure nothing is fowling you up, and you might want to check my math as its been a while since Algebra for me and it was a struggle just to get it working as well as it seems to now.

@LS & Hydro:
I'd like to have a bit of time to bugfix and post information on the mod but I'll quickly get to working with you guys to plan out how to adjust things. In the meantime, according to your understanding, your thoughts/questions/ideas are always welcome, though do give me a bit to explain from the beginning before barraging me with too much inquiry if you would. Work is going to take up a lot of time this week I think.

@DH: I have a LOT of modifications for animals in store. I'll work closely with you to explain what I have to suggest and how these new systems will now allow them.

@SO: Thanks for letting me be a part of this team and I apologize in advance if my coding causes any temporary issues here. Should be fully savegame compatible at least.
 
There is a mistake in Modules/The_J/Babar_Hunter the tag NotOnGameOptions is not in the schema in that folder. I could not find an example elsewhere so I could fix it.
 
There is a mistake in Modules/The_J/Babar_Hunter the tag NotOnGameOptions is not in the schema in that folder. I could not find an example elsewhere so I could fix it.
You can use the updated schema (updated by thunderbrd in svn3591) in the Assets\XML\Units\ folder (copy-pste-rename)

EDIT:
It does not work for me with "DH_CIV4UnitSchema" but renaming the schema to "barbar_hunter_CIV4UnitSchema" and edit the barbar_hunter_CIV4PromotionInfos.xml accordingly solved it. (At least no error on start up.)
 
Months of changes and modifications being pushed now.
The Combat Mod is here!

You might want to save before updating - there are a few areas I'm not sure about how they will work with existing games, nothing toooo critical but possibly annoying.

Over the course of the next week I'll primarily be working on posting some modder and player documentation for using these adjustments and notes on their intentions.

I still have some work to do for explaining things in the civopedia as well.

For now, few changes should be noted... as XML goes in over the next few weeks/months, you'll start seeing some neat stuff.

@Calvitix: there's a lot of nasty hardcoded stuff in the text manager and a lot to translate in the Thunderbrd text file. Sorry for throwing you so much work. Where I've hardcoded its due to having such a limited know-how that I often need to go off of local examples to make things work right when they error out after multiple attempts to format correctly. If you can show me even one example of how to reformat where I apparently had this problem, I'd be happy to spend the time to convert the rest.

@Koshling & AIAndy:
I'm sure you'll want to review and will probably find 101 ways to streamline what I've done here. I'm extremely open to some added guidance. Additionally, please review the odds sections to make sure nothing is fowling you up, and you might want to check my math as its been a while since Algebra for me and it was a struggle just to get it working as well as it seems to now.

@LS & Hydro:
I'd like to have a bit of time to bugfix and post information on the mod but I'll quickly get to working with you guys to plan out how to adjust things. In the meantime, according to your understanding, your thoughts/questions/ideas are always welcome, though do give me a bit to explain from the beginning before barraging me with too much inquiry if you would. Work is going to take up a lot of time this week I think.

@DH: I have a LOT of modifications for animals in store. I'll work closely with you to explain what I have to suggest and how these new systems will now allow them.

@SO: Thanks for letting me be a part of this team and I apologize in advance if my coding causes any temporary issues here. Should be fully savegame compatible at least.

@TB - one area of concern is the odds calculation changes. The C2C AI was changed several months ago so that odds used in most places are no longer the odds of victory, but rather the odds of a desirable outcome. As an example consider an attack by a stack of two swordsmen against a stack of two somewhat better units (but not hugely better). The outcome will be that you lose the first swordsman, but win with the second, resulting in a loss of a swordsman for an enemy loss of a better-tan-swordsman. The C2C AI will give this desirability odds of over 50% (because the expected outcome is desirable), whereas the old-style BBAI one will give it less than 50% (because the first attack is expected to fail).

This is implemented by an extra layer CvSelectionGroup::AI_attackOdds(). The original CvUnitAI::attackOdds() just sees the top unit (first combat), but if you instead use group()->AI_AttackOdds() you get a result weighted according to the entire stack combat outcome. Most of the AI now uses the group version.

You've changed the unit version fairly extensively, and since the group version calls the unit version to evaluate each combat in the stack, this is probably ok, but if there are any extra uses of CvUnitAI::AI_attackOdds() you may need to change those to use the group version instead.

I'm also slightly (but I'm not sure it's wrong - just concerns me) concerned about the withdrawal odds calculation changes in CvUnitAI::AI_attackOdds(). The line you overwrote there (necessarily to get the new code in) was itself a change from the BBAI original (as per the comment above it about avoiding stupid suicides), and I'm not sure the new code respects the intent of that change (in which case you might find units with very low odds but some withdrawal capability suiciding a lot again)

Edit - in general its hard for me to evaluate the (code) changes, as I don't have a good understanding of the overall intent, so I'll wait until after you post an overall description for players and modders as you have indicated will be happening soon before I attempt such a review.
 
There is a mistake in Modules/The_J/Babar_Hunter the tag NotOnGameOptions is not in the schema in that folder. I could not find an example elsewhere so I could fix it.
Ack... must've been the one file I missed merging in. But Desolator's comment below has it... just copy over the core schema and rename it to the title it has there.
That should be a pushed change to the SVN right away but I'm off to work in minutes here.

I imagine the second problem Desolator mentioned was a matter of simply deleting the cache and reloading rather than renaming the schema being requested.

You can use the updated schema (updated by thunderbrd in svn3591) in the Assets\XML\Units\ folder (copy-pste-rename)

EDIT:
It does not work for me with "DH_CIV4UnitSchema" but renaming the schema to "barbar_hunter_CIV4UnitSchema" and edit the barbar_hunter_CIV4PromotionInfos.xml accordingly solved it. (At least no error on start up.)
That last bit would make things a bit funny for the other files in that module... make sure they all call to the new schema, or better yet, see my comment above.

@TB - one area of concern is the odds calculation changes. The C2C AI was changed several months ago so that odds used in most places are no longer the odds of victory, but rather the odds of a desirable outcome. As an example consider an attack by a stack of two swordsmen against a stack of two somewhat better units (but not hugely better). The outcome will be that you lose the first swordsman, but win with the second, resulting in a loss of a swordsman for an enemy loss of a better-tan-swordsman. The C2C AI will give this desirability odds of over 50% (because the expected outcome is desirable), whereas the old-style BBAI one will give it less than 50% (because the first attack is expected to fail).

This is implemented by an extra layer CvSelectionGroup::AI_attackOdds(). The original CvUnitAI::attackOdds() just sees the top unit (first combat), but if you instead use group()->AI_AttackOdds() you get a result weighted according to the entire stack combat outcome. Most of the AI now uses the group version.

You've changed the unit version fairly extensively, and since the group version calls the unit version to evaluate each combat in the stack, this is probably ok, but if there are any extra uses of CvUnitAI::AI_attackOdds() you may need to change those to use the group version instead.

I'm also slightly (but I'm not sure it's wrong - just concerns me) concerned about the withdrawal odds calculation changes in CvUnitAI::AI_attackOdds(). The line you overwrote there (necessarily to get the new code in) was itself a change from the BBAI original (as per the comment above it about avoiding stupid suicides), and I'm not sure the new code respects the intent of that change (in which case you might find units with very low odds but some withdrawal capability suiciding a lot again)

Edit - in general its hard for me to evaluate the (code) changes, as I don't have a good understanding of the overall intent, so I'll wait until after you post an overall description for players and modders as you have indicated will be happening soon before I attempt such a review.

There are a LOT of places in the code that inherit the values of the combat odds to make determinations. That's quite normal. My concern is that I could not possibly include some elements of the mod into odds evaluation as my math is just not that good (in short - anything that changes odds mid-battle could not be considered in the odds introducing some 'judgable' variables - as long as the human player is generally as bad at judging those variables as the ai is, we'll be fine with how minimal they are.)

But I do understand the concern. To some extent we'll have to observe what the ai behaviors are on this. Some unexpected responses can be expected.

I'll take a look at that withdrawal code... but I can imagine it was probably just taking defender pursuit into consideration... Yes, some explanations will come soon.
 
A few references to undefined civics still exist in the current SVN:

CIVIC_PARLIAMENTS is referenced from BUILDING_TOMB

@DH - this is one of yours so leaving this for you - I guess it needs to be adjusted to some other civic with the new civics...?

CIVIC_PARLIAMENTS is referenced from BUILDING_HOUSE_OF_PARLIMENT

@Hydro - this one's in the core, so I guess it falls to you (?). Again probably needs switching to a different civic now

CIVIC_ARISTOCRACY is referenced from BUILDING_MANOR

@Hydo - one of yours

CIVIC_ARISTOCRACY is referenced from BUILDING_KINGSCOUNCIL (which also references CIVIC_STANDING_ARMY)
CIVIC_ARISTOCRACY is referenced from BUILDING_FIELD_GOLD

@Volkarya - these are yours

CIVIC_MUTUALLY_ASSURED_DESTRUCTION references CIVIC_STANDING_ARMY as an attitude adjuster
CIVIC_PEOPLES_REPUBLIC references CIVIC_TOTALITARIANISM as an attitude adjuster

@CivPlayer8 - for you I guess (?), or does ls612 handle this?

BUILDING_BANDITS_HIDEOUT references CIVIC_BANDITS
BUILDING_VILLA references CIVIC_PATRICIAN

@Hydro - for you
 
Getting the following errors on the latest build (3592) on loading directly to mod.

Failed loading XML file modules/The_J\barbar_hunter\barbar_hunter_CIV4PromotionInfos.xml.[.\FXl.cpp:133] Error Parsing XML File-

File:
modules\THe_J\barbar_hunter\barbar_hunter_CIV4PromotionInfos.xml

Reason: The elment 'NotOnGameOptions' is used but not declared in the DTD/Scheme.

Line 18,22
Source <NotOnGameOptions>

LoadXML call failed for modules\The_J\barbar_hunter\barbar_hunter_CIV4PromotionInfos.xml

And game seems to crash invariably after second turn (with first turn taking much longer than normal).


Edit: see not first to report this, don't understand exactly how to do proposed solution, so just reverting back to v26 release.
 
@Koshling & AIAndy:
I'm sure you'll want to review and will probably find 101 ways to streamline what I've done here. I'm extremely open to some added guidance. Additionally, please review the odds sections to make sure nothing is fowling you up, and you might want to check my math as its been a while since Algebra for me and it was a struggle just to get it working as well as it seems to now.
I did not have a lot of time now so I only looked at the files I know well.
The disease property should be flagged in the property info XML instead of hard coding the behavior changes and I am sure we can generalize some part of it to be usable for future properties.

In both doOutbreakCheck and doOvercomeCheck there is this line:
if (eCityDisease = eAffliction)
which should probably be
if (eCityDisease == eAffliction)
 
I did not have a lot of time now so I only looked at the files I know well.
The disease property should be flagged in the property info XML instead of hard coding the behavior changes and I am sure we can generalize some part of it to be usable for future properties.

In both doOutbreakCheck and doOvercomeCheck there is this line:
if (eCityDisease = eAffliction)
which should probably be
if (eCityDisease == eAffliction)

I've found a whole bunch of these (though hadn't spotted this one). I'll fix this one along with the others. It might be a little later though because I'm also trying to address the fact that the promotion stuff is causing turn ends to run approximately 500% slower than before.
 
I've found a whole bunch of these (though hadn't spotted this one). I'll fix this one along with the others. It might be a little later though because I'm also trying to address the fact that the promotion stuff is causing turn ends to run approximately 500% slower than before.

Woah, I am definitely not updating my SVN with that. :eek:
 
Update

- Fix schema in barbar_hunter mod by The_J.

I think you only half fixed it. You renamed the schema (necessary for sure), but also commented out the (deliberate) changes TB had made to use the new schema. I have the other half of the fix (i.e. - TB's changes which work fine with the schema also renamed). I'll include them in my next SVN push.
 
I think you only half fixed it. You renamed the schema (necessary for sure), but also commented out the (deliberate) changes TB had made to use the new schema. I have the other half of the fix (i.e. - TB's changes which work fine with the schema also renamed). I'll include them in my next SVN push.

Yea well that is what happens when I do things last thing at night and then before my coffee in the morning:crazyeye:. However I have managed to get these forums working so I can attach stuff to posts.
 
Yea well that is what happens when I do things last thing at night and then before my coffee in the morning:crazyeye:. However I have managed to get these forums working so I can attach stuff to posts.

Well :hatsoff: then as long as your with it, make it 2 cups of :coffee: then ;)
 
Back
Top Bottom