CPU team strategies
====================
in 1.9.2, teams have a more or less random style and formation and stick to it throughout a match and for several weeks. since the very beginning of the development of the 1.9 branch, i was planning to make cpu teams react to events in live games; i just waited until the live game was more or less stable.
alefzero came up with the idea to create strategies in XML files. this is now implemented. in a nutshell, such a file tells a CPU team how to prepare before a match (taking into account things like the average skill diff between the team and its opponent) and which actions to take during a match. the system uses tokens and conditions, just like live game commentary files.
here's an excerpt from a strategy file:
Code: Select all
<prematch cond="_LAYERDIFF_ > 1 or _AVSKILLDIFF_ < -14">
<formation>532</formation>
<formation>442</formation>
<formation>352</formation>
<prematch_style>all-out-defend</prematch_style>
</prematch>
<match_action cond="_MI_ >= 40 and _MI_ < 65 and _GOALSTOWIN_ = 3">
<sub cond="_SUBSLEFT_ > 1">
<in prop="best">forward</in>
<out prop="weakest">midfielder defender</out>
</sub>
<style>all-out-attack</style>
</match_action>
betting
===============
well, not too much to say here. the user can bet on matches without user participation. a screenie is worth more than a thousand words:
the betting system probably needs refinement, too. in particular, i'm not sure it's not too easy to make a lot of money with betting.
gyözö