seekkruto.blogg.se

Hearts of iron 4 ai
Hearts of iron 4 ai









hearts of iron 4 ai

The number 40 is picked because it is a nice number to half or double multiple times with modifiers, while being an easy number to work with. Now that you have this baseline in your head, it is much easier to imagine what a factor of 20 or 80 means respectively. The Base 40 system is a system for ai_will_do, where it assumes the average factor of any choice is 40. It will not go through low priority focuses just to end up on a big priority one. The AI does not seem to recognize the ai_will_do factor of focuses it has not yet unlocked.It is recommended that when changing a file, you try to stick to similar amounts of factor values as used elsewhere in that file, to avoid erratic AI behavior.If you do, the base factor will be multiplied by all modifier factors where the conditions are met. Not only can you use multiple conditions within a single modifier value, but you can also use multiple modifiers within a single ai_will_do value.There seems to be a hidden modifier that already increases the likelihood for the AI to pick focuses deeper down the focus tree.If you use a factor of 0, then the AI will never pick it, even if it has no other options available.When not defined, the ai_will_do factor defaults to 1 (unconfirmed).In the example above the result would be a likelihood of 30 for the AI to still pick that focus. If the conditions are met then the factor value is multiplied with the base factor. The modifier value consists of a factor of its own and any amount of conditions.

hearts of iron 4 ai

The modifier keyword and value can be used to denote a conditional multiplier to the base factor. The number you set it to, is not a percentage nor a fraction itself: neither 1.0 nor 100 represents a 100% likelihood that the AI will pick it.

hearts of iron 4 ai

The way the ai_will_do works is a bit misleading.Īi_will_do contains the keyword "factor" which gives the chance the AI will perform this action. If there are two focuses with a factor of 40 and a focus with a factor of 80, then the AI is 50% likely to pick the focus of factor 80 because 80 is half of the total factor of 160. Then the AI is twice as likely to pick the focus with the factor of 20. So if there are only two focuses available, one has a factor of 10 and the other has a factor of 20. When the AI needs to pick a focus within its focus tree, it considers all possibilities and then picks a random number between 0 and all factors added together. it is used as part of defining national focuses and government positions. The ai_will_do value is used as a subobject that determines the likelihood the AI will pick something for the country.











Hearts of iron 4 ai