1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

FACTO-97: Print base debug now prints to console as well as ingame

This commit is contained in:
Aaron Veden 2022-04-09 18:07:15 -07:00
parent d671709e1f
commit 6402bb52bc
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 15 additions and 12 deletions

View File

@ -21,6 +21,7 @@ Version: 3.0.0
- Walls and transport belts no longer provide points to the AI when they are destroyed
- Reduced inferno fire damage by roughly ~75% and reduced inferno sticker damage by ~60%
- Siege groups should try to settle slightly further from player structures
- AI Debugging states are now printed to console and in-game
Bugfixes:
- Fixed Krastorio2 on_force_created playerforces being nil
- Fixed enemy map scan creating bases unnecessarily

View File

@ -336,18 +336,20 @@ local function temperamentPlanner(base, evolutionLevel)
base.temperament = ((base.temperamentScore + TEMPERAMENT_RANGE_MAX) * TEMPERAMENT_DIVIDER)
if universe.debugTemperament then
game.print("Rampant Stats:\naN:" .. base.activeNests .. ", aRN:" .. base.activeRaidNests .. ", dPB:" ..
base.destroyPlayerBuildings .. ", lEU:" .. base.lostEnemyUnits .. ", lEB:" ..
base.lostEnemyBuilding .. ", rL:" .. base.rocketLaunched .. ", bEB:" ..
base.builtEnemyBuilding .. ", iCB:" .. base.ionCannonBlasts .. ", aB:" ..
base.artilleryBlasts .. ", temp:" .. base.temperament .. ", tempScore:" .. base.temperamentScore ..
", points:" .. base.points .. ", unitPoints:" .. base.unitPoints .. ", state:" ..
constants.stateEnglish[base.stateAI] .. ", surface:" .. base.surface.index .. " [" ..
base.surface.name .. "]" .. ", aS:" .. universe.squadCount .. ", aB:" .. universe.builderCount ..
", atkSize:" .. universe.attackWaveSize .. ", stlSize:" .. universe.settlerWaveSize ..
", formGroup:" .. universe.formSquadThreshold .. ", sAgg:".. base.sentAggressiveGroups ..
", mAgg:" .. base.maxAggressiveGroups .. ", baseState:" .. base.stateGeneration ..
", baseId:".. base.id)
local strConsole = "Rampant Stats:\nbaseId:".. base.id .. ", aN:" .. base.activeNests ..
", aRN:" .. base.activeRaidNests .. ", dPB:" ..
base.destroyPlayerBuildings .. ", lEU:" .. base.lostEnemyUnits .. ", lEB:" ..
base.lostEnemyBuilding .. ", rL:" .. base.rocketLaunched .. ", bEB:" ..
base.builtEnemyBuilding .. ", iCB:" .. base.ionCannonBlasts .. ", aB:" ..
base.artilleryBlasts .. ", temp:" .. base.temperament .. ", tempScore:" .. base.temperamentScore ..
", points:" .. base.points .. ", unitPoints:" .. base.unitPoints .. ", state:" ..
constants.stateEnglish[base.stateAI] .. ", surface:" .. base.surface.index .. " [" ..
base.surface.name .. "]" .. ", aS:" .. universe.squadCount .. ", aB:" .. universe.builderCount ..
", atkSize:" .. universe.attackWaveSize .. ", stlSize:" .. universe.settlerWaveSize ..
", formGroup:" .. universe.formSquadThreshold .. ", sAgg:".. base.sentAggressiveGroups ..
", mAgg:" .. base.maxAggressiveGroups .. ", baseState:" .. base.stateGeneration
game.print(strConsole)
print(strConsole)
end
end