Grab yourself some code and pull up a beer. We needs answers!
For the curious, here's what the reinforcement logger now spits out on a save from one of GUDare's 9-through-10 games, I let it run two full cycles to get accurate data on how-many-checks-it-took, and the logs from the second full cycle are below.
Before that, some caveats:
- The actual reinforcement logic has been changed
significantly since 5.031 because as I was going through it and inspecting the output and whatnot I found some very, um, surprising things.
- As a result, the idea of "points" or "strength" actually now is a valid concept inside a given reinforcement; previously it was only very loosely "paying" for things. This was fine except for really low-cap stuff (Blade Spawners, anyone?), where it was getting out of hand.
- The logs are kinda verbose
A lot cleaner than they started, though. reinforcementsArrivalTime is probably no longer having any kind of impact on anything, fyi.
FYI, here are the changes I have pending as a result of this investigation; they're not in the 5.032 release notes because I haven't committed them yet and they aren't necessarily final, etc.
* Fixed a really, really longstanding bug where the AI got 1 bonus reinforcement at diff 8, 1 bonus reinforcement at diff 9, and 2 bonus reinforcements at diff 10, but no bonus reinforcements at any of the non-integer difficulties between those. Now it's 2 for 10 and 1 for >= 8
* Fixed a longstanding bug (since ship cap scales were added, roughly) where the ship-cap-scale multiplier was being applied twice to reinforcement calculations (so high got the normal amount, normal got half as much as it should have, low got 1/4 as much as it should have, etc).
** The effect isn't as severe as it probably sounds, because most of the calculations ended in "if less than 1, set to 1" and other bugs (see below) were letting the AI get a lot more mileage than was mathematically sanitary out of that 1.
* Corrected some longstanding issues where reinforcements were frequently getting stuff like Spire Blade Spawners for the same "cost" as Fighters; the ship cap multipliers were being used, but if the "budget" (speaking very loosely) of a particular guard post's spawn or particular individual spawn on a command station (there could be up to 11 or so in a single reinforcement-of-planet event, and 2 such events can happen per overall reinforcement per planet) went negative due to "buying" a really low-cap ship, that negative remainder was simply discarded.
** Now it does a bit of arithmetic "carrying" so that if one individual spawn really goes "over budget" like that (and it still can do that, otherwise stuff like blade spawners just won't happen in most reinforcements) then the negative balance carries into further spawns in that reinforcement event, which can make certain reinforcements a little lopsided but in general is at least a balanceable situation now.
* Now that the AI is no longer able to get a ton of low-cap ships where it should only be getting a few of them, the AI-specifc per-guard-post on those low-cap types have been removed (except some per-planet ones, like the one on engineers): those had just been bandaids to prevent massive swarming by those ship types because we didn't know what was going on there or how to fix it.
** This is particularly important because the bandaid was pretty brutal about making sure it was enforced, so the AI would wind up sending a reinforcement and part/most of it would be ditched without spawning because it would violate the caps, etc.
Anyway, the logs:
(main thread)
3/22/2012 9:30:28 PM (5.031) 6:02:27 ReinforcementCounter reached > 2400 for player 8 (since game was loaded, took 209 checks of (9+rand(2 or 3))
AIProgressionLevelEffective = 178
AITechLevel = 2
reinforcementsArrivalTime = ( ( 11 - this.AIDifficulty ) * 20 ).IntValue = 28
numberOfReinforcements = (number of planets not controlled by the AI / 2) = 3
numberOfReinforcements = max(1,numberOfReinforcements) = 3
numberOfReinforcements = min(15,numberOfReinforcements) = 3
since AIDifficulty >= 8, numberOfReinforcements += 1 = 4
AICommandType.SendReinforcements sent to AI thread
3/22/2012 9:30:35 PM (5.031) 6:02:34 ReinforcementCounter reached > 2400 for player 9 (since game was loaded, took 209 checks of (9+rand(2 or 3))
AIProgressionLevelEffective = 178
AITechLevel = 2
reinforcementsArrivalTime = ( ( 11 - this.AIDifficulty ) * 20 ).IntValue = 28
numberOfReinforcements = (number of planets not controlled by the AI / 2) = 3
numberOfReinforcements = max(1,numberOfReinforcements) = 3
numberOfReinforcements = min(15,numberOfReinforcements) = 3
since AIDifficulty >= 8, numberOfReinforcements += 1 = 4
AICommandType.SendReinforcements sent to AI thread
(AI Thread, shortly thereafter)
3/22/2012 9:30:28 PM (5.031) 6:02:26 calling SendReinforcements
PlayerNumber = 8
ReinforcementsArrivalTime = 21775
AIProgressionLevel = 178
AITechLevel = 2
NumberOfReinforcements = 4
valuating planet 7 (Confederation ) (alerted) reinforce priority = 0
valuating planet 8 (Eridani ) reinforce priority = 0
valuating planet 9 (HotStar) reinforce priority = 0
valuating planet 10 (Krupp ) reinforce priority = 0
valuating planet 11 (Tau ) reinforce priority = 0
valuating planet 12 (Three Kings) (core, +300) reinforce priority = 300
valuating planet 13 (Llama) reinforce priority = 0
valuating planet 14 (Blackstone ) reinforce priority = 0
valuating planet 15 (Batman) reinforce priority = 0
valuating planet 16 (Hacker) reinforce priority = 0
valuating planet 17 (Shawshank) (alerted) reinforce priority = 0
valuating planet 18 (Fraggle Rock) reinforce priority = 0
valuating planet 20 (Roulette) (alerted) reinforce priority = 0
valuating planet 21 (Blackjack) (alerted) reinforce priority = 0
valuating planet 22 (Ceasar (Fact IV)) reinforce priority = 0
valuating planet 23 (Solaris VII) reinforce priority = 0
valuating planet 24 (Arrakkis) reinforce priority = 0
valuating planet 25 (Pox Aurelia) reinforce priority = 0
valuating planet 26 (Kirk) (core, +300) reinforce priority = 300
valuating planet 27 (Earth) (homeworld, +500) reinforce priority = 500
valuating planet 28 (Liao ) reinforce priority = 0
valuating planet 29 (Riker) (homeworld, +500) reinforce priority = 500
valuating planet 30 (Desperado) reinforce priority = 0
valuating planet 31 (Pai Gow) reinforce priority = 0
valuating planet 32 (Argyle) reinforce priority = 0
valuating planet 33 (Davion ) reinforce priority = 0
valuating planet 34 (Canopus ) reinforce priority = 0
valuating planet 35 (Jumping Jax) reinforce priority = 0
valuating planet 36 (SolarMoon) reinforce priority = 0
valuating planet 37 (Green Lantern) reinforce priority = 0
valuating planet 39 (Camel (Fact IV)) reinforce priority = 0
valuating planet 42 (Twycross) (alerted) reinforce priority = 0
valuating planet 43 (Craps) (alerted) (outnumbered, +2000) reinforce priority = 2000
***calling SendReinforcementsToPlanet on planet 43 (Craps) reinforce priority : 2000, (overall) strengthBudget = 0
GetCanReinforce: pop = 13, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 5
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 7
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:26 ; Player.AIType: Mine_Enthusiast ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 25.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 42.49
reinforcementStrength *= (tech level multiplier) = 38.23
reinforcementStrength *= 0.07 = 2.67
reinforcementStrength = max(35,reinforcementStrength) = 2.67
reinforcementStrength *= centralAddCount = 18.69
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 18.69
numberShips = Floor(reinforcementStrength) = 18
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :18
StrengthBudget += 18 = 18
--- AIBuyShipsFromList StrengthBudget = 18
bought 2 BomberII for 4
bought 2 MissileShipII for 4
bought 4 SpacePlaneII for 4.57
bought 1 VorticularCutlassII for 1
bought 2 ZenithPolarizerII for 4
bought 1 FighterII for 2
total count bought: 12, total strength spent: 19.57
post-buy StrengthBudget = -1.57
******calling SendGuardPostReinforcements
GetCanReinforce: pop = 13, cap = (1 * 100) min|max:200,700 = 200, can reinforce
numberShipsToAdd = max(1,(AIP/270)) = 1
numberShipsToAdd *= (tech level multiplier) = 0.9
numberShipsToAdd = min(7,max(1,numberShipsToAdd)) = 1
after AdjustNumberShipsFromAIType, numberShipsToAdd = 1
StrengthBudget += 1 = -0.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.43
bought 1 VorticularCutlassII for 1
total count bought: 1, total strength spent: 1
StrengthBudget += 1 = 0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.43
bought 1 SpacePlaneII for 1.14
total count bought: 1, total strength spent: 1.14
StrengthBudget += 1 = 0.29
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.29
bought 1 SpacePlaneII for 1.14
total count bought: 1, total strength spent: 1.14
******calling SendGuardianReinforcements
GetCanReinforce: pop = 13, cap = (1 * 100) min|max:200,700 = 200, can reinforce
not buying guardian due to planet not owned by this player
SendReinforcementsToPlanet result: happened, remainingReinforcements = 3, strengthBudget = -0.86
***due to reinforce priority >= 2000, calling SendReinforcementsToPlanet on planet again 43 (Craps)
GetCanReinforce: pop = 13, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 5
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 7
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:26 ; Player.AIType: Mine_Enthusiast ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 24.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 41.49
reinforcementStrength *= (tech level multiplier) = 37.33
reinforcementStrength *= 0.07 = 2.61
reinforcementStrength = max(35,reinforcementStrength) = 2.61
reinforcementStrength *= centralAddCount = 18.25
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 18.25
numberShips = Floor(reinforcementStrength) = 18
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :18
StrengthBudget += 18 = 17.14
--- AIBuyShipsFromList StrengthBudget = 17.14
bought 2 BomberII for 4
bought 2 MissileShipII for 4
bought 2 VorticularCutlassII for 2
bought 2 FighterII for 4
bought 2 SpacePlaneII for 2.29
bought 1 ZenithPolarizerII for 2
total count bought: 11, total strength spent: 18.29
post-buy StrengthBudget = -1.14
******calling SendGuardPostReinforcements
GetCanReinforce: pop = 13, cap = (1 * 100) min|max:200,700 = 200, can reinforce
numberShipsToAdd = max(1,(AIP/270)) = 1
numberShipsToAdd *= (tech level multiplier) = 0.9
numberShipsToAdd = min(7,max(1,numberShipsToAdd)) = 1
after AdjustNumberShipsFromAIType, numberShipsToAdd = 1
StrengthBudget += 1 = -0.14
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.14
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.86
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.86
bought 1 BomberII for 2
total count bought: 1, total strength spent: 2
StrengthBudget += 1 = -0.14
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.14
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.86
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.86
bought 1 FighterII for 2
total count bought: 1, total strength spent: 2
SendReinforcementsToPlanet result: happened, remainingReinforcements = 2, strengthBudget = -1.14
***calling SendReinforcementsToPlanet on planet 7 (Confederation ) reinforce priority : 0, (overall) strengthBudget = -1.14
GetCanReinforce: pop = 12, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 7
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 5
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:26 ; Player.AIType: Mine_Enthusiast ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 21.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 38.49
reinforcementStrength *= (tech level multiplier) = 34.63
reinforcementStrength *= 0.07 = 2.42
reinforcementStrength = max(35,reinforcementStrength) = 2.42
reinforcementStrength *= centralAddCount = 12.09
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 12.09
numberShips = Floor(reinforcementStrength) = 12
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :12
StrengthBudget += 12 = 10.86
--- AIBuyShipsFromList StrengthBudget = 10.86
bought 1 FighterII for 2
bought 3 MissileShipII for 6
bought 2 SpacePlaneII for 2.29
bought 1 VorticularCutlassII for 1
total count bought: 7, total strength spent: 11.29
post-buy StrengthBudget = -0.43
******calling SendGuardPostReinforcements
GetCanReinforce: pop = 12, cap = (1 * 100) min|max:200,700 = 200, can reinforce
numberShipsToAdd = max(1,(AIP/270)) = 1
numberShipsToAdd *= (tech level multiplier) = 0.9
numberShipsToAdd = min(7,max(1,numberShipsToAdd)) = 1
after AdjustNumberShipsFromAIType, numberShipsToAdd = 1
StrengthBudget += 1 = 0.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.57
bought 1 MissileShipII for 2
total count bought: 1, total strength spent: 2
StrengthBudget += 1 = -0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.43
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.57
bought 1 SpacePlaneII for 1.14
total count bought: 1, total strength spent: 1.14
StrengthBudget += 1 = 0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.43
bought 1 ZenithPolarizerII for 2
total count bought: 1, total strength spent: 2
StrengthBudget += 1 = -0.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.43
bought 1 SpacePlaneII for 1.14
total count bought: 1, total strength spent: 1.14
******calling SendGuardianReinforcements
GetCanReinforce: pop = 12, cap = (1 * 100) min|max:200,700 = 200, can reinforce
not buying guardian due to planet not owned by this player
SendReinforcementsToPlanet result: happened, remainingReinforcements = 1, strengthBudget = -0.71
***calling SendReinforcementsToPlanet on planet 17 (Shawshank) reinforce priority : 0, (overall) strengthBudget = -0.71
GetCanReinforce: pop = 8, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 1
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 11
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:26 ; Player.AIType: Mine_Enthusiast ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 18.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 35.49
reinforcementStrength *= (tech level multiplier) = 31.93
reinforcementStrength *= 0.07 = 2.23
reinforcementStrength = max(35,reinforcementStrength) = 2.23
reinforcementStrength *= centralAddCount = 24.53
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 24.53
numberShips = Floor(reinforcementStrength) = 24
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :24
StrengthBudget += 24 = 23.29
--- AIBuyShipsFromList StrengthBudget = 23.29
bought 2 VorticularCutlassII for 2
bought 1 BomberII for 2
bought 2 FighterII for 4
bought 5 MissileShipII for 10
bought 3 SpacePlaneII for 3.43
bought 1 ZenithPolarizerII for 2
total count bought: 14, total strength spent: 23.43
post-buy StrengthBudget = -0.14
******calling SendGuardPostReinforcements
Dood! Neutered! *mutter*
******calling SendGuardianReinforcements
GetCanReinforce: pop = 8, cap = (1 * 100) min|max:200,700 = 200, can reinforce
not buying guardian due to planet not owned by this player
SendReinforcementsToPlanet result: happened, remainingReinforcements = 0, strengthBudget = -0.14
3/22/2012 9:30:35 PM (5.031) 6:02:33 calling SendReinforcements
PlayerNumber = 9
ReinforcementsArrivalTime = 21782
AIProgressionLevel = 178
AITechLevel = 2
NumberOfReinforcements = 4
valuating planet 7 (Confederation ) (alerted) reinforce priority = 0
valuating planet 8 (Eridani ) reinforce priority = 0
valuating planet 9 (HotStar) reinforce priority = 0
valuating planet 10 (Krupp ) reinforce priority = 0
valuating planet 11 (Tau ) reinforce priority = 0
valuating planet 12 (Three Kings) (core, +300) reinforce priority = 300
valuating planet 13 (Llama) reinforce priority = 0
valuating planet 14 (Blackstone ) reinforce priority = 0
valuating planet 15 (Batman) reinforce priority = 0
valuating planet 16 (Hacker) reinforce priority = 0
valuating planet 17 (Shawshank) (alerted) reinforce priority = 0
valuating planet 18 (Fraggle Rock) reinforce priority = 0
valuating planet 20 (Roulette) (alerted) reinforce priority = 0
valuating planet 21 (Blackjack) (alerted) reinforce priority = 0
valuating planet 22 (Ceasar (Fact IV)) reinforce priority = 0
valuating planet 23 (Solaris VII) reinforce priority = 0
valuating planet 24 (Arrakkis) reinforce priority = 0
valuating planet 25 (Pox Aurelia) reinforce priority = 0
valuating planet 26 (Kirk) (core, +300) reinforce priority = 300
valuating planet 27 (Earth) (homeworld, +500) reinforce priority = 500
valuating planet 28 (Liao ) reinforce priority = 0
valuating planet 29 (Riker) (homeworld, +500) reinforce priority = 500
valuating planet 30 (Desperado) reinforce priority = 0
valuating planet 31 (Pai Gow) reinforce priority = 0
valuating planet 32 (Argyle) reinforce priority = 0
valuating planet 33 (Davion ) reinforce priority = 0
valuating planet 34 (Canopus ) reinforce priority = 0
valuating planet 35 (Jumping Jax) reinforce priority = 0
valuating planet 36 (SolarMoon) reinforce priority = 0
valuating planet 37 (Green Lantern) reinforce priority = 0
valuating planet 39 (Camel (Fact IV)) reinforce priority = 0
valuating planet 42 (Twycross) (alerted) reinforce priority = 0
valuating planet 43 (Craps) (alerted) (outnumbered, +2000) reinforce priority = 2000
***calling SendReinforcementsToPlanet on planet 43 (Craps) reinforce priority : 2000, (overall) strengthBudget = 0
GetCanReinforce: pop = 15, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 5
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 7
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:33 ; Player.AIType: Vanilla ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 21.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 38.49
reinforcementStrength *= (tech level multiplier) = 34.63
reinforcementStrength *= 0.07 = 2.42
reinforcementStrength = max(35,reinforcementStrength) = 2.42
reinforcementStrength *= centralAddCount = 16.93
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 16.93
numberShips = Floor(reinforcementStrength) = 16
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :16
StrengthBudget += 16 = 16
--- AIBuyShipsFromList StrengthBudget = 16
bought 1 SpireBladeSpawnerII for 33.57
total count bought: 1, total strength spent: 33.57
post-buy StrengthBudget = -17.57
******calling SendGuardPostReinforcements
GetCanReinforce: pop = 15, cap = (1 * 100) min|max:200,700 = 200, can reinforce
numberShipsToAdd = max(1,(AIP/270)) = 1
numberShipsToAdd *= (tech level multiplier) = 0.9
numberShipsToAdd = min(7,max(1,numberShipsToAdd)) = 1
after AdjustNumberShipsFromAIType, numberShipsToAdd = 1
StrengthBudget += 1 = -16.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -16.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -15.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -15.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -14.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -14.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -13.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -13.57
total count bought: 0, total strength spent: 0
******calling SendGuardianReinforcements
GetCanReinforce: pop = 15, cap = (1 * 100) min|max:200,700 = 200, can reinforce
buying AIGuardianBeamII to guard WormholeCommandPost
SendReinforcementsToPlanet result: happened, remainingReinforcements = 3, strengthBudget = -13.57
***due to reinforce priority >= 2000, calling SendReinforcementsToPlanet on planet again 43 (Craps)
GetCanReinforce: pop = 15, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 5
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 7
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:33 ; Player.AIType: Vanilla ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 20.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 37.49
reinforcementStrength *= (tech level multiplier) = 33.73
reinforcementStrength *= 0.07 = 2.36
reinforcementStrength = max(35,reinforcementStrength) = 2.36
reinforcementStrength *= centralAddCount = 16.49
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 16.49
numberShips = Floor(reinforcementStrength) = 16
StrengthBudget += 16 = 2.43
--- AIBuyShipsFromList StrengthBudget = 2.43
bought 2 BomberII for 4
total count bought: 2, total strength spent: 4
post-buy StrengthBudget = -1.57
******calling SendGuardPostReinforcements
GetCanReinforce: pop = 15, cap = (1 * 100) min|max:200,700 = 200, can reinforce
numberShipsToAdd = max(1,(AIP/270)) = 1
numberShipsToAdd *= (tech level multiplier) = 0.9
numberShipsToAdd = min(7,max(1,numberShipsToAdd)) = 1
after AdjustNumberShipsFromAIType, numberShipsToAdd = 1
StrengthBudget += 1 = -0.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.43
bought 1 FighterII for 2
total count bought: 1, total strength spent: 2
StrengthBudget += 1 = -0.57
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -0.57
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = 0.43
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = 0.43
bought 1 BomberII for 2
total count bought: 1, total strength spent: 2
SendReinforcementsToPlanet result: happened, remainingReinforcements = 2, strengthBudget = -1.57
***calling SendReinforcementsToPlanet on planet 7 (Confederation ) reinforce priority : 0, (overall) strengthBudget = -1.57
GetCanReinforce: pop = 18, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 7
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 5
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:33 ; Player.AIType: Vanilla ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 19.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 36.49
reinforcementStrength *= (tech level multiplier) = 32.83
reinforcementStrength *= 0.07 = 2.29
reinforcementStrength = max(35,reinforcementStrength) = 2.29
reinforcementStrength *= centralAddCount = 11.46
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 11.46
numberShips = Floor(reinforcementStrength) = 11
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :11
StrengthBudget += 11 = 9.43
--- AIBuyShipsFromList StrengthBudget = 9.43
bought 1 VorticularCutlassII for 1
bought 1 SpireBladeSpawnerII for 33.57
total count bought: 2, total strength spent: 34.57
post-buy StrengthBudget = -25.15
******calling SendGuardPostReinforcements
GetCanReinforce: pop = 18, cap = (1 * 100) min|max:200,700 = 200, can reinforce
numberShipsToAdd = max(1,(AIP/270)) = 1
numberShipsToAdd *= (tech level multiplier) = 0.9
numberShipsToAdd = min(7,max(1,numberShipsToAdd)) = 1
after AdjustNumberShipsFromAIType, numberShipsToAdd = 1
StrengthBudget += 1 = -24.15
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -24.15
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -23.15
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -23.15
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -22.15
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -22.15
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -21.15
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -21.15
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -20.15
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -20.15
total count bought: 0, total strength spent: 0
StrengthBudget += 1 = -19.15
buying ships for WormholeCommandPost
--- AIBuyShipsFromList StrengthBudget = -19.15
total count bought: 0, total strength spent: 0
******calling SendGuardianReinforcements
GetCanReinforce: pop = 18, cap = (1 * 100) min|max:200,700 = 200, can reinforce
buying AIGuardianFlakII to guard WormholeCommandPost
SendReinforcementsToPlanet result: happened, remainingReinforcements = 1, strengthBudget = -19.15
***calling SendReinforcementsToPlanet on planet 17 (Shawshank) reinforce priority : 0, (overall) strengthBudget = -19.15
GetCanReinforce: pop = 9, cap = (1 * 100) min|max:200,700 = 200, can reinforce
minPosts = (AIProgressionLevel / 10) = 17
minPosts = max(3,minPosts) = 17
minPosts = min(11,minPosts) = 11
numberPosts = rollup.AlliedGuardPostsAll.Count + rollup.AlliedCommandStations.Count = 1
centralAddCount = 1 + (numberPosts < minPosts ? ( minPosts - numberPosts ) : 0) = 11
addCount = 1 (checking for reinforcement bonuses) = 1
******Starting CreateMixedWaveToPlanet at Game Time: 6:02:33 ; Player.AIType: Vanilla ; Player.AIDifficulty: 9.6 ; AIProgressionLevel: 178 ; AITechLevel: 2 ; WaveSize: 1
aiTypeBasedAIPIncrement : 0
reinforcementStrength = 1.5 * AIDiff * handicapMutltiplier = 14.4
reinforcementStrength += rand(4,AIDifficulty+3) = 23.4
reinforcementStrength += ((AIP/10) * (AIDiff/10)) = 40.49
reinforcementStrength *= (tech level multiplier) = 36.43
reinforcementStrength *= 0.07 = 2.54
reinforcementStrength = max(35,reinforcementStrength) = 2.54
reinforcementStrength *= centralAddCount = 27.98
Inside AdjustNumberShipsFromAIType, multiplier: 1
after AdjustNumberShipsFromAIType call, reinforcementStrength = 27.98
numberShips = Floor(reinforcementStrength) = 27
numberTech123 = numberShips - numberDefensive - numberExplosive - numberCore :27
StrengthBudget += 27 = 7.85
--- AIBuyShipsFromList StrengthBudget = 7.85
bought 1 MissileShipII for 2
bought 1 SpireBladeSpawnerII for 33.57
total count bought: 2, total strength spent: 35.57
post-buy StrengthBudget = -27.72
******calling SendGuardPostReinforcements
Dood! Neutered! *mutter*
******calling SendGuardianReinforcements
GetCanReinforce: pop = 9, cap = (1 * 100) min|max:200,700 = 200, can reinforce
not buying guardian due to adjacent to human homeworld
SendReinforcementsToPlanet result: happened, remainingReinforcements = 0, strengthBudget = -27.72