• Civilization 7 has been announced. For more info please check the forum here .

C2C SVN Changelog

Just pushed to SVN (5260):
  • Fixed attacks that do not use movement points when they should
  • Fixed nasty bug with great commander AI that tied up a hunter and another unit to no effect in a city
  • Tweaked AI building order so that research is not queued up behind food indefinitely
  • Tweaked AI promotion evaluation to try to favor subdue boosters on hunters

The last two of these are part of a general work-in-progress to try to analyze and address why the AI is falling behind in early research. This process is not yet complete.

@AIAndy/DLL modders:

The last one here is a total kludge. The gist is that the AI had no code for evaluating outcome probability modifiers that apply to promotions. However, doing this properly would be incredibly difficult, because:
  • The modifiers are not properties of the promotion, they are properties of outcomes that apply to promotions, so a search over outcomes to see what maps to a given promotion is necessary (that part is easy though)
  • The outcomes do not contain information about what they do - another search of missions to find out what outcomes trigger them is necessary (so another level of association back to the promotion we're trying to ultimately evaluate)
  • Whether the outcome should be considered is not easy to evaluate - the triggering conditions cannot be (fully) evaluated since we're not in the context where they might actually trigger - we're in the context of a unit that might be able to trigger them at some future time wants to know if a promotion is worthwhile
  • Whether the outcome is desirable can itself be a contextual decision, and again (as for the previous point) the context we're evaluating in is potentially many turns prior to where the actual outcomes trigger will occur

The kludge I have put in simply evaluates the total outcome modifier percentage (for all outcomes) a promotion provides and assumes that is a proportionate measure of desirability specifically for units of AI type UNITAI_HUNTER. In general this isn't very good (outcomes could be bad, outcomes could be utterly unrelated to hunting, outcomes might only be triggerable in contexts that are not likely to occur [e.g. - requires a tech 2 eras in the future]), etc., but it works adequately for current usage (where the dominant use of outcomes is animal subduing).

What I'd like to brainstorm a bit is a better mechanism we could migrate to over time, that doesn't require a full evaluation (due to the difficulties listed above), but would be more accurate for a broader spectrum of outcome mechanic usage.

My own suggestions would be new tags on <OutcomeInfo> that provide a unitAI-specific AI relevance (not a weight in the traditional sense, since that requires correct scaling which is almost impossible for an XML modder to determine). Thus the subdual outcomes would have a relevance set to a high value (between 0 and 100 say, so near the 100 end) for UNITAI_HUNTER and a low value for most other AIs. This could generalize reasonably well (e.g. - high relevance to UNITAI_ATTACK for the outcome that leads to captives), but is easy to implement, while still being accessible to the XML modder to set up and scale.

Opinions and suggestion welcome...
 
On reading I'd begun to think categorizing the 'types' of outcomes for AI purposes might be necessary. Seems your idea is very similar though and would make the consideration more generic, which would probably be a good thing. The only reason I could see to categorize the outcome types would be if you wanted more control than mere generic relevancies.
 
Update:

-Removed almost all AIWeights from buildings and units.

NOTE: As I stated in the other thread some crucial ones will need to be restored, however I do not think that should be too many (probably < 20 items).
 
Updates

- Add two Andean special workers. If you build the Nazca Lines or Machu Picchu wonder you get access to Andean Workers. (2 per wonder) These can place geoglyphs on barren and desert tiles or "Machu Picchu" improvement on peaks, nothing else. They upgrade to Industrial Workers. I need to find better graphics for them.
- Update all schema files in the Andean folder and tidy up the other files.

Edit

- Fix Hunter due to tech change for Ranger. When you change the tech required for a national unit you need to make sure to update the ForceObsolete tag to the same tech for the national units that upgrade to the unit.

- More Italian and German text translations thanks to our translators Hale_9204 and Pin.
 
Just pushed to SVN (5266):
  • Turned off all consideration of building AIWeights (temporary measure hopefully)
  • Tweaked city build evaluations a bit
  • Tweaked hunter promotion evaluation a bit more

With these changes I get beaten (just) to Sedentary Lifestyle again (on immortal), but only just (literally one turn by only one AI in latest test game), so there's more to do. Tuning will be an ongoing process over the next week or two. Reports of AIs building or researching silly things would be appreciated.
 
With ls612 having removed the AIWeights in the XML files that should no more be needed I guess.

Yeh, I did it a number of hours ago and then played a test game to Sedentary. ls612 removed them from the XML meanwhile. I'll reinstate acting on them next time I push an update now we have an undistorted base in the XML.
 
Updates
- Put AI weight 100 for Culture (African), Culture (Asian), Culture (European), Culture (Middle Eastern), Culture (Oceanian), Culture (North American), Culture (South American) and Culture (Barbarian).

Why? They're only helpful on the first city, after that they are useless.
 
True... to an extent. Then it IS just worth the culture.

Perhaps a 'bGivesCulture' tag could be useful for creation of AI evaluation on those culture providing buildings in the dll.
 
Why? They're only helpful on the first city, after that they are useless.

I agree. See below.

True... to an extent. Then it IS just worth the culture.

Perhaps a 'bGivesCulture' tag could be useful for creation of AI evaluation on those culture providing buildings in the dll.

No need to now. See below.

Updates
- Removed AI weight from the Native Culture buildings and instead made them auto-build.
 
Updates
- Removed AI weight from the Native Culture buildings and instead made them auto-build.
I take it this means new cultures will now be available to be built the turn after taking a foreign city with a new native culture, rather than having to wait for its revolt?
 
I take it this means new cultures will now be available to be built the turn after taking a foreign city with a new native culture, rather than having to wait for its revolt?

I am not really sure what at rules on auto-built buildings in a captured city. If they are built before or after the revolt is done.
 
I agree. See below.



No need to now. See below.

Updates
- Removed AI weight from the Native Culture buildings and instead made them auto-build.

This is probably a good pragmatic solution. In principal it shouldn't be necessary. The AI can see that it produces a little culture cheaply [so a small reason to build anywhere], and also that it provides a bonus that is itself required for other buildings (a bigger reason to build at least once). However, there are no downsides to building this, and its so cheap that auto-build won't distort anything (and it probably models reality well to have it as auto build anyway). As such auto-build is likely a good solution (though in principal the AI should understand cultures, albeit maybe with some tweaking)
 
Update
New language text reading code.
Languages are now recognized in the XML by their tag name, not by their position and it is no more necessary to have a translation of everything.
If the chosen language does not have a translation for a specific text, the English one is used instead (or if that is not there either, the first entry after Tag).
There is a new global define named LANGUAGE. If you set it to something other than Default, that tag name is used to identify the translations you want. At Default it uses specific tag names depending on the language chosen in the main Civ4 option. Use that tag if you want to add a new language that is not there in the option dialog.
Note: The tag that defines the name of the texts you add now always has to be named Tag (there were some occurrences of TAG that I corrected).
 
Update
New language text reading code.
Languages are now recognized in the XML by their tag name, not by their position and it is no more necessary to have a translation of everything.
If the chosen language does not have a translation for a specific text, the English one is used instead (or if that is not there either, the first entry after Tag).
There is a new global define named LANGUAGE. If you set it to something other than Default, that tag name is used to identify the translations you want. At Default it uses specific tag names depending on the language chosen in the main Civ4 option. Use that tag if you want to add a new language that is not there in the option dialog.
Note: The tag that defines the name of the texts you add now always has to be named Tag (there were some occurrences of TAG that I corrected).

:eek: WOW, now why didnt someone else come up with something like this YEARs ago, this is absolutely needed :worship:
 
Update
The fallback to English will now also be used if there is a translation tag for a language but it is empty.
 
This is worth announcing and documenting with examples; AIAndy do you want to document it or should I. It needs to appear in the main post (or a link to it) and the FAQ and the Player Documentation.

It should be one of the main changes in our next release. Not because it is a game play change but because it enables the game to be opened to a lot more people.

BTW there was a suggestion that we change the
Code:
<?xml version="1.0" encoding="xxxxx"?>
to all be the same and of some type I can't remember but that supports the necessary character sets - should we?
 
Top Bottom