Call to Arms

Call to Arms

Call to Arms - Workshop
The place to find custom maps, missions and mods for Call to Arms! Do you want to contribute? Check out the installation folder of your game and browse the mods subfolder for tools and documentations.
davesmolik 30 Mar, 2020 @ 11:33am
Does anybody know how bot purchase priority works?
Anybody knows how these values work?
Was thinking it might be that 0.6 is 60 percent chance...but some have 2.0 which makes me think it doesn`t represent percentage.

Purchases["campaign_capture_the_flag"] = {
{
Repeat = 0, --infinite
Units = {
["usa"] = {--USA
{priority = 0.6, class = UnitClass.Infantry, unit = "squad1(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad2(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad3(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad4(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad5(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad6(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad8(usa)"},
{priority = 0.6, class = UnitClass.ATInfantry, unit = "squad9(usa)"},
{priority = 0.6, class = UnitClass.Infantry, unit = "squad10(usa)"},
< >
Showing 1-5 of 5 comments
MrThirtyOddSix 9 30 Mar, 2020 @ 3:05pm 
Check out lua scripts or one of my mods for Conquest.

0.6 is 60% chance. So in reality it means that each line with priority will have to compete to be picked up. Then there are also modifiers that can override priority, such as if enemy detects you're using vehicles they scan for ATInfantry unit and set higher priority. Again, check out my mod for conquest where I have multiple purchase tables.
davesmolik 1 Apr, 2020 @ 6:19am 
Will check it out, thanks!
Still not sure about the 0.6 is 60% chance, though.
Certain units have 1.0 or even bigger chance so doesn`t that mean that the AI would always pick those over those with 0.6?
I wish there was some kind of a manual for this because I`m getting lost :D
MrThirtyOddSix 9 1 Apr, 2020 @ 5:47pm 
Originally posted by davesmolik:
Will check it out, thanks!
Still not sure about the 0.6 is 60% chance, though.
Certain units have 1.0 or even bigger chance so doesn`t that mean that the AI would always pick those over those with 0.6?
I wish there was some kind of a manual for this because I`m getting lost :D

You have to understand that chance here is a way to say that some units would be picked more often than others. They are all considered to be picked. If you see 1.00 then yes, it is 100. However, it doesn't mean that they will be picked for sure. It just means that it will be picked over all other 0.6 items that you see.

Let's say you want to create a squad. You know that some units are more important than other ones, so you make them 1.00 . AT and possibly SMG infantry would be 0.3 When we are choosing, we first make a pick at highest value, if there is highest value then yes, we pick that unit. If we have two units with 1.00 ,then we pick them at random. Then we see a whole bunch of 0.6 units, so we pick from these repeatedly (meaning same unit has chance to be picked again) until we fill quota. So in essence priority means "priority class", where number is just a way to differentiate different groups of units.
davesmolik 2 Apr, 2020 @ 5:28am 
Originally posted by MrThirtyOddSix:
Originally posted by davesmolik:
Will check it out, thanks!
Still not sure about the 0.6 is 60% chance, though.
Certain units have 1.0 or even bigger chance so doesn`t that mean that the AI would always pick those over those with 0.6?
I wish there was some kind of a manual for this because I`m getting lost :D

You have to understand that chance here is a way to say that some units would be picked more often than others. They are all considered to be picked. If you see 1.00 then yes, it is 100. However, it doesn't mean that they will be picked for sure. It just means that it will be picked over all other 0.6 items that you see.

Let's say you want to create a squad. You know that some units are more important than other ones, so you make them 1.00 . AT and possibly SMG infantry would be 0.3 When we are choosing, we first make a pick at highest value, if there is highest value then yes, we pick that unit. If we have two units with 1.00 ,then we pick them at random. Then we see a whole bunch of 0.6 units, so we pick from these repeatedly (meaning same unit has chance to be picked again) until we fill quota. So in essence priority means "priority class", where number is just a way to differentiate different groups of units.

So does this mean that: 1) the AI has an amount of CP it can spend at a time and to do so it goes through the list of units available from the top priority?

2) the AI always picks only one unit from the pool of units with the same priority value and then it moves to the lower priority and again picks just one?

3 )it repeats this cycle until it runs out of CP?

4) if I change the value of a specific unit to a new value which isn`t shared with any other units (let`s say there are only two priorities in the pool: 0.50 for 10 different units and just one unit with 0.10) then on the battlefield the concentration of units with 0.10 will be higher than of any other units? Hope it makes sense.

Also I was wondering how the AI gets its CPs? It doesn`t seem to be drip-fed by 0.25 points or so like the player but it seems to get it in bigger lumps. Is there any obvious way how it can be changed?

Thanks again, really appreciate your help!

MrThirtyOddSix 9 3 Apr, 2020 @ 11:30am 
1. No. In Lua scripts it simply picks how many it needs to select at a time.
2. Yes.
3. Yes. No. There is global pool for MP (CP doesn't play any role actually). Once MP runs out, it slowly regenerates,which slows down spawning for AI.
4. MP is being used. If you change MP requirements, then AI will use these. CP is of no concern, hence AI can spawn as much as they want. There is setting that describes how often AI will spawn, it is all in Lua scripts.

MP is defined as pool per difficulty. Then there is also curve for MP dispencing. However, main thing is that there is a pool that AI will use up and then sit and wait for it to slowly fill.
< >
Showing 1-5 of 5 comments
Per page: 1530 50