Lexad
14.08.2008, 22:13
Анализ кода - ori, инициатор вопроса - alexchamp, переводчик - искренне ваш.
ori:
<div class='quotetop'>Цитата</div>
anyway - this code is extremely convoluted... I'll do my best:
the AI will refuse to capitulate if
- their power is greater than the average of all players
- their power is greater than 2/3 of yours
- their success + 40 is greater than your success
note:
success is +1 for every unit killed and (if I understand the code correctly) +10 for every city captured
if another player is also at war with the AI you want to capitulate and its success is greater than yours the success for the AI you want to capitulate is increased by the difference between your and the third player's success
power is complicated, I'll just post the calculation:
yourPower= 2*your power rating (I believe its what the demographics graph shows)*your success / [yourSuccess+theirSuccess]
this is modified: if you are the AIs worst enemy (which is usually the case during war) its multiplied by 3/4, if you have no land connection to the AI its multiplied by 1/2
theirPower=their power rating * VassalPowerModifier for the leader (in Civ4LeaderheadInfos.xml)
note: VassalPowerModifier can be e.g. 10 this means that their power is multiplied by 1.1 - if it is -20, their power is multiplied by 0.8 etc...
[/b]
Код весьма запутан, но вроде так.
ИИ откажется капитулировать, если:
- его сила (немного не та сила, пояснение ниже) больше средней силы всех игроков
- его сила больше 2/3 нашей
- или его военный успех на 40 больше нашего (в войне нас и его, естественно).
За убитый юнит дается +1 успеха, за взятый город (если ori все правильно понял) +10.
Если другой ИИ (Х) тоже в войне с жертвой и его успех больше нашего, то успех жертвы в войне с нами увеличивается на разницу нашего успеха и успеха (Х).
НашаСила = 2*наш рейтинг силы (можно посмотреть в Демографии) * нашУспех / (нашУспех + жертвыУспех)
жертвыСила = их рейтинг силы * (1 + 0.01* Множитель силы для Вассализации VassalPowerModifier) (свой для каждого лидера, смотреть в Civ4LeaderheadInfos.xml)
От тако-то.
ori:
<div class='quotetop'>Цитата</div>
anyway - this code is extremely convoluted... I'll do my best:
the AI will refuse to capitulate if
- their power is greater than the average of all players
- their power is greater than 2/3 of yours
- their success + 40 is greater than your success
note:
success is +1 for every unit killed and (if I understand the code correctly) +10 for every city captured
if another player is also at war with the AI you want to capitulate and its success is greater than yours the success for the AI you want to capitulate is increased by the difference between your and the third player's success
power is complicated, I'll just post the calculation:
yourPower= 2*your power rating (I believe its what the demographics graph shows)*your success / [yourSuccess+theirSuccess]
this is modified: if you are the AIs worst enemy (which is usually the case during war) its multiplied by 3/4, if you have no land connection to the AI its multiplied by 1/2
theirPower=their power rating * VassalPowerModifier for the leader (in Civ4LeaderheadInfos.xml)
note: VassalPowerModifier can be e.g. 10 this means that their power is multiplied by 1.1 - if it is -20, their power is multiplied by 0.8 etc...
[/b]
Код весьма запутан, но вроде так.
ИИ откажется капитулировать, если:
- его сила (немного не та сила, пояснение ниже) больше средней силы всех игроков
- его сила больше 2/3 нашей
- или его военный успех на 40 больше нашего (в войне нас и его, естественно).
За убитый юнит дается +1 успеха, за взятый город (если ori все правильно понял) +10.
Если другой ИИ (Х) тоже в войне с жертвой и его успех больше нашего, то успех жертвы в войне с нами увеличивается на разницу нашего успеха и успеха (Х).
НашаСила = 2*наш рейтинг силы (можно посмотреть в Демографии) * нашУспех / (нашУспех + жертвыУспех)
жертвыСила = их рейтинг силы * (1 + 0.01* Множитель силы для Вассализации VassalPowerModifier) (свой для каждого лидера, смотреть в Civ4LeaderheadInfos.xml)
От тако-то.