BotE.log: Unterschied zwischen den Versionen
(MyTrace-Vorschläge) |
(storage place is normally identical with place of bote.ini) |
||
(21 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 14: | Zeile 14: | ||
Das Modifizieren der BotE.log ist sinnlos, da sie bei jedem Spiel neu geschrieben wird und BotE aus ihr keine Informationen bezieht. | Das Modifizieren der BotE.log ist sinnlos, da sie bei jedem Spiel neu geschrieben wird und BotE aus ihr keine Informationen bezieht. | ||
+ | |||
+ | |||
+ | Thread: Bote.log http://forum.birth-of-the-empires.de/viewtopic.php?f=35&t=2226 (search entry t=2226) | ||
+ | |||
+ | = CommandLineParameters = | ||
+ | |||
+ | [[Kategorie:BotE-Entwicklung]] | ||
+ | <span style="color:#e50000">'''only interesting for developers, not for players'''</span> | ||
+ | |||
+ | |||
+ | only available after r76393, <span style="color:#e50000">'''not available in Version Alpha 6.1 (V0.81) and before'''</span> | ||
+ | |||
+ | Thread: CommandLineParameters http://birth-of-the-empires.de/phpBB3/viewtopic.php?f=69&t=2208 (search entry 2208) | ||
+ | |||
+ | internal Thread: http://forum.birth-of-the-empires.de/viewtopic.php?p=27789#p27789 | ||
+ | |||
+ | == autoturn == | ||
+ | |||
+ | additional command line parameter after r77378: '''--autoturn='''X -> you can use it to automatically terminated a round until '''the''' number of rounds is reached. So restart is also available, e.g. autoturn=100 -> first 100 turns, load savegame with autoturn=200 -> next 100 turns. | ||
+ | *For example '--autoturn=50' will automatically terminated and close all eventscreens during the first 50 rounds of the game. For Autoturn just start BotE normally, select race, start game...then it will be running | ||
+ | |||
+ | |||
+ | |||
+ | Thread: http://birth-of-the-empires.de/phpBB3/viewtopic.php?f=69&t=2207 (search entry t=2207) | ||
+ | |||
+ | == test shipmap,genshipname == | ||
+ | |||
+ | additional command line parameter after r77640: '''--test'''=shipmap,genshipname -> enables tests for shipmap and genshipname while shipmap and genshipname are the log domains used for each of these, enable or disable the test. If missing, and are automatically added to the normal log domains. | ||
+ | *--test without parameters enables all tests | ||
+ | If there is no messages that anything is wrong then the result is "all ok". But there is no explicit messages about the fact that all is ok. So don't wonder about. | ||
+ | |||
+ | '''If you use "--test" and you want to get a BotE.log, so you have to do also --log-domains e.g. "--log-domains=general,logging,ai,graphicload,shipai,diplomacy,intel,intelai" | ||
+ | ''' | ||
+ | |||
+ | == Log-Directory == | ||
+ | |||
+ | '''"--log-dir=c:\\BotE\\log\\"''' (for example) | ||
+ | |||
+ | storages BotE.log therein instead of into default userdata folder (normally identical with [[Bote.ini#Speicherort|place of bote.ini]]). | ||
+ | |||
+ | == Log-Level == | ||
+ | |||
+ | Please note: use lowercase ! | ||
+ | |||
+ | '''"--log-level=error"''' -> only MT::LEVEL::ERROR is logged | ||
+ | |||
+ | '''"--log-level=warning"''' -> MT::LEVEL::ERROR + WARNING is logged | ||
+ | |||
+ | no option, because it's default: '''info''' -> MT::LEVEL::ERROR + WARNING + INFO is logged | ||
+ | |||
+ | '''"--log-level=debug"''' -> MT::LEVEL::ERROR + WARNING + INFO + DEBUG is logged | ||
+ | |||
+ | == Log Domains == | ||
+ | |||
+ | '''"--log-domains=general,logging,ai,graphicload,shipai,diplomacy,intel,intelai"''' (for example all) | ||
+ | |||
+ | additional: '''"--passive-domains"''' (reverts the listed log-domains) | ||
+ | |||
+ | Example for Coding: MYTRACE_DOMAIN("graphicload")(MT::LEVEL_WARNING, "CGalaxyMenuView::GenerateGalaxy(): Could not load a star graphic"); | ||
+ | |||
+ | Domains are a group of log info. By default are defined (in Options.h, only available if --log-domains isn't used) | ||
+ | |||
+ | === "general" === | ||
+ | === "logging" === | ||
+ | * Time | ||
+ | === "ai" === | ||
+ | === "graphicload" === | ||
+ | === "shipai" === | ||
+ | === "diplomacy" === | ||
+ | === "intel" === | ||
+ | === "intelai" === | ||
+ | |||
+ | == see-all == | ||
+ | |||
+ | "--see-all" opens galaxy map | ||
= Info-Meldungen = | = Info-Meldungen = | ||
Zeile 423: | Zeile 498: | ||
= MyTrace-Vorschläge = | = MyTrace-Vorschläge = | ||
+ | |||
+ | Specifier-Tabelle (z.B. s = string, f = floating) http://www.cplusplus.com/reference/clibrary/cstdio/printf/ | ||
== existing examples == | == existing examples == | ||
− | + | MYTRACE(MT::LEVEL_ERROR, "savegame: error during compression\n"); | |
+ | |||
+ | *f=float e.g. 123,45 (http://www2.informatik.uni-halle.de/lehre/c/c623.html) | ||
− | *i= | + | MYTRACE(MT::LEVEL_INFO, "Stardate: %f", m_fStardate); |
+ | |||
+ | *i=integer e.g. 1,2,3 (http://www2.informatik.uni-halle.de/lehre/c/c622.html) | ||
MYTRACE(MT::LEVEL_INFO, "m_NumberOfTheShipInArray: %i", m_NumberOfTheShipInArray); | MYTRACE(MT::LEVEL_INFO, "m_NumberOfTheShipInArray: %i", m_NumberOfTheShipInArray); | ||
Zeile 435: | Zeile 516: | ||
MYTRACE(MT::LEVEL_INFO, "Intel-AI: Intel Prio of %s is %d\n", it->first, m_byIntelPrio[it->first]); = INFO Intel-AI: Intel Prio of MAJOR1 is 1 | MYTRACE(MT::LEVEL_INFO, "Intel-AI: Intel Prio of %s is %d\n", it->first, m_byIntelPrio[it->first]); = INFO Intel-AI: Intel Prio of MAJOR1 is 1 | ||
− | *d= | + | *d=decimal (old?, better use i) |
MYTRACE(MT::LEVEL_INFO, "Intel-AI: our SP: %d - enemies SP: %d\n", ourPoints, enemyPoints); | MYTRACE(MT::LEVEL_INFO, "Intel-AI: our SP: %d - enemies SP: %d\n", ourPoints, enemyPoints); | ||
− | == botf2Doc.cpp == | + | MYTRACE(MT::LEVEL_INFO, "\n############### START NEXT ROUND (round: %d)############### \n", GetCurrentRound()); |
+ | |||
+ | == Source\Framework\botf2Doc.cpp == | ||
'''//Kartengröße aus ini lesen''' | '''//Kartengröße aus ini lesen''' | ||
Zeile 463: | Zeile 546: | ||
'''Stardate''' | '''Stardate''' | ||
− | + | //f(x):=min(731,max(14,trunc(743-x^3))) | |
− | '''MYTRACE(MT::LEVEL_INFO, "Stardate: % | + | m_fStardate += (float)(min(731, max(14, 743-pow((float)m_Statistics.GetAverageTechLevel(),3.0f)))); |
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Stardate: %f", m_fStardate);''' | ||
− | |||
Zeile 476: | Zeile 560: | ||
'''MYTRACE(MT::LEVEL_INFO, "DIFFICULTY: %s", difficulty);''' | '''MYTRACE(MT::LEVEL_INFO, "DIFFICULTY: %s", difficulty);''' | ||
− | -> DIFFICULTY: | + | -> DIFFICULTY: BABY |
if (difficulty == "BABY") | if (difficulty == "BABY") | ||
Zeile 486: | Zeile 570: | ||
m_fDifficultyLevel = 0.5f; | m_fDifficultyLevel = 0.5f; | ||
− | '''MYTRACE(MT::LEVEL_INFO, "m_fDifficultyLevel: % | + | '''MYTRACE(MT::LEVEL_INFO, "m_fDifficultyLevel: %f", m_fDifficultyLevel);''' |
− | |||
CSoundManager* pSoundManager = CSoundManager::GetInstance(); | CSoundManager* pSoundManager = CSoundManager::GetInstance(); | ||
ASSERT(pSoundManager); | ASSERT(pSoundManager); | ||
− | '''MYTRACE(MT::LEVEL_INFO, "pSoundManager: %d", | + | '''MYTRACE(MT::LEVEL_INFO, "pSoundManager: %s", pSoundManager);''' |
+ | |||
+ | -> Output with %d: 7078520 | ||
+ | |||
+ | -> Output with %s: nichts vernünftiges | ||
+ | |||
+ | -> Output with %i: ? | ||
+ | |||
+ | |||
+ | '''Schiffsnummer beim Gruppieren''' | ||
+ | |||
+ | CSmallInfoView::SetShip(&m_ShipArray.GetAt(NumberOfTheShipInArray)); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "m_NumberOfTheShipInArray: %i", m_NumberOfTheShipInArray);''' | ||
+ | |||
+ | |||
+ | '''??''' | ||
+ | |||
+ | CSmallInfoView::SetShip(&m_ShipArray.GetAt(NumberOfFleetShip)); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "m_iNumberOfFleetShip: %i", m_iNumberOfFleetShip);''' | ||
+ | |||
+ | |||
+ | CMajor* pPlayersRace = GetPlayersRace(); | ||
+ | |||
+ | ASSERT(pPlayersRace); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "pPlayersRace: %s", pPlayersRace->GetRaceName());''' | ||
+ | |||
+ | |||
+ | CIniLoader::GetInstance()->ReadValue("Special", "STARDENSITY", nStarDensity); | ||
+ | |||
+ | CIniLoader::GetInstance()->ReadValue("Special", "MINORDENSITY", nMinorDensity); | ||
+ | |||
+ | CIniLoader::GetInstance()->ReadValue("Special", "ANOMALYDENSITY", nAnomalyDensity); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "STARDENSITY: %i", nStarDensity);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "MINORDENSITY: %i", nMinorDensity);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "ANOMALYDENSITY: %i", nAnomalyDensity);''' | ||
+ | |||
+ | -> %i ist ok, mit %s -> Absturz = kein Start *NICHT EINSETZEN !!!* | ||
+ | |||
+ | == Gamedata\AI\SystemAI == | ||
+ | |||
+ | CString sRace = m_pDoc->GetSystem(ko).GetOwnerOfSystem(); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Owner of System is: %s", sRace);''' | ||
+ | |||
+ | |||
+ | ASSERT(m_pMajor); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Major of System is: %s", m_pMajor);''' | ||
+ | |||
+ | == Gamedata\General\Statistics == | ||
+ | |||
+ | '''CStatistics::CalcDemoValues''' | ||
+ | |||
+ | nPlace = ++i; | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: %s nPlace = %i", sRaceID, nPlace);''' -> zeigt Platz aus Demografie (nur wenn der Screen aufgerufen wird, also nur PlayerRace) | ||
+ | |||
+ | |||
+ | Die weiteren Werte sind zu nehmen: | ||
+ | *bei BSP mal 5 | ||
+ | *Productivity 1 zu 1 | ||
+ | *Military geteilt 10 | ||
+ | *Forschung mal 2 | ||
+ | *Moral 1 zu 1 | ||
+ | |||
+ | |||
+ | fAverage /= vSortedVec.size(); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fAverage = %f", fAverage);''' -> zeigt Durchschnitt | ||
+ | |||
+ | |||
+ | // eigener Wert | ||
+ | |||
+ | fValue = it->second; | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fValue = %f", fValue);''' | ||
+ | |||
+ | |||
+ | // bester Wert | ||
+ | |||
+ | fFirst = vSortedVec.front(); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fFirst = %f", fFirst);''' | ||
+ | |||
+ | |||
+ | // schlechtester Wert | ||
+ | |||
+ | fLast = vSortedVec.back(); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fLast = %f", fLast);''' | ||
+ | |||
+ | == Gamedata\Races\Empire.cpp == | ||
+ | |||
+ | void CEmpire::Serialize(CArchive &ar) | ||
+ | |||
+ | // wenn gespeichert wird | ||
+ | |||
+ | for (int i = 0; i <= DERITIUM; i++) | ||
+ | |||
+ | #ifdef SEE_ALL_OF_MAP | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s m_lResourceStorages[i] = %i", m_sEmpireID, m_lResourceStorages[i]);''' | ||
+ | |||
+ | ar << m_lResourceStorages[i]; | ||
+ | |||
+ | #ifdef SEE_ALL_OF_MAP | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: only...if SEE_ALL_OF_MAP = true");''' | ||
+ | |||
+ | //MYTRACE(MT::LEVEL_INFO, "Empire.cpp: m_sEmpireID = %s", m_sEmpireID); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_byNumberOfSystems = %i", m_sEmpireID, m_byNumberOfSystems);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iCredits = %i", m_sEmpireID, m_iCredits);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iCreditsChange = %i", m_sEmpireID, m_iCreditsChange);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iShipCosts = %i", m_sEmpireID, m_iShipCosts);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iPopSupportCosts = %i", m_sEmpireID, m_iPopSupportCosts);''' | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_lFP Research points = %i", m_sEmpireID, m_lFP);''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | void CEmpire::AddFP(int add) | ||
+ | |||
+ | #ifdef SEE_ALL_OF_MAP | ||
+ | |||
+ | MYTRACE(MT::LEVEL_INFO, "Empire.cpp: only...if SEE_ALL_OF_MAP = true"); | ||
+ | |||
+ | //MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s m_lFP Research points add = %i", m_sEmpireID, add); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s m_lFP Research points = %i", m_sEmpireID, m_lFP);''' | ||
+ | |||
+ | == Gamedata\Races\Major.cpp == | ||
+ | |||
+ | void CMajor::Serialize(CArchive &ar) | ||
+ | |||
+ | // wenn gespeichert wird | ||
+ | |||
+ | ar << m_sEmpireName; // längerer Imperiumsname | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Major.cpp: Empire = %s", m_sEmpireName);''' | ||
+ | |||
+ | == Gamedata\Races\MoralObserver.cpp == | ||
+ | |||
+ | CString CMoralObserver::GenerateText | ||
+ | |||
+ | ... | ||
+ | |||
+ | text += s; | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "MoralObserver: %s", text);''' | ||
+ | |||
+ | |||
+ | short CMoralObserver::GetMoralValue(BYTE byMappedRaceNumber, unsigned short Event) | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "MoralObserver - MoralValue of ? = %i", m_iMoralMatrix[Event][byMappedRaceNumber - 1]);''' | ||
+ | |||
+ | == Gamedata\Races\VictoryObserver.cpp == | ||
+ | |||
+ | pIni->ReadValue("Victory_Conditions", "Elimination", m_bConditionStatus[VICTORYTYPE_ELIMINATION]); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Elimination: %s", m_bConditionStatus[VICTORYTYPE_ELIMINATION] ? "true" : "false");''' | ||
+ | |||
+ | pIni->ReadValue("Victory_Conditions", "Diplomacy", m_bConditionStatus[VICTORYTYPE_DIPLOMACY]); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Diplomacy: %s", m_bConditionStatus[VICTORYTYPE_DIPLOMACY] ? "true" : "false");''' | ||
+ | |||
+ | pIni->ReadValue("Victory_Conditions", "Conquest", m_bConditionStatus[VICTORYTYPE_CONQUEST]); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Conquest: %s", m_bConditionStatus[VICTORYTYPE_CONQUEST] ? "true" : "false");''' | ||
+ | |||
+ | pIni->ReadValue("Victory_Conditions", "Research", m_bConditionStatus[VICTORYTYPE_RESEARCH]); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Research: %s", m_bConditionStatus[VICTORYTYPE_RESEARCH] ? "true" : "false");''' | ||
+ | |||
+ | pIni->ReadValue("Victory_Conditions", "Combat", m_bConditionStatus[VICTORYTYPE_COMBATWINS]); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Combat: %s", m_bConditionStatus[VICTORYTYPE_COMBATWINS] ? "true" : "false");''' | ||
+ | |||
+ | pIni->ReadValue("Victory_Conditions", "Sabotage", m_bConditionStatus[VICTORYTYPE_SABOTAGE]); | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Sabotage: %s", m_bConditionStatus[VICTORYTYPE_SABOTAGE] ? "true" : "false");''' | ||
+ | |||
+ | |||
+ | |||
+ | case VICTORYTYPE_DIPLOMACY: | ||
+ | |||
+ | // über 50% der Rassen auf Mitgliedschaft bzw. Bündnis (mindestens 10) | ||
+ | |||
+ | nValue = pDoc->GetRaceCtrl()->GetRaces()->size(); | ||
+ | |||
+ | // eigene Rasse nicht mitzählen | ||
+ | |||
+ | nValue--; | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "VICTORYTYPE_DIPLOMACY - needed value: %i", nValue/2);''' | ||
+ | |||
+ | |||
+ | case VICTORYTYPE_CONQUEST: | ||
+ | |||
+ | // über 50% aller bewohnten Systeme sind erobert (mindestens 10) | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "VICTORYTYPE_CONQUEST - needed value: %i", nValue/2);''' | ||
+ | |||
+ | |||
+ | |||
+ | // Anzahl Majorraces noch im Spiel | ||
+ | |||
+ | int nMajorsAlive = 0; | ||
+ | |||
+ | map<CString, CMajor*>* pmMajors = pDoc->GetRaceCtrl()->GetMajors(); | ||
+ | |||
+ | for (map<CString, CMajor*>::const_iterator it = pmMajors->begin(); it != pmMajors->end(); ++it) | ||
+ | |||
+ | if (it->second->GetEmpire()->GetNumberOfSystems()) | ||
+ | |||
+ | nMajorsAlive++; | ||
+ | |||
+ | '''MYTRACE(MT::LEVEL_INFO, "nMajorsAlive: %i", nMajorsAlive);''' |
Aktuelle Version vom 16. November 2013, 13:18 Uhr
for English just click here
Einleitung
Die Datei BotE.log liegt ab Version 0.81 im Verzeichnis des Windows-Users \Eigene Dateien\Birth of the Empires. Bis Version 0.80 lag sie im Programmverzeichnis von Birth of the Empires.
Sie dient zur Nachvollziehung von technischen Problemen. In ihr werden Ereignisse sowie Fehler-Meldungen festgehalten, die während des Spiels auftreten.
Gerne kann die BotE.log hier noch näher beschrieben werden - nur zu !
Sie wird bei jedem BotE-Start angelegt, die vorherige bote.log wird dabei überschrieben. Wer z.B. für die 70 Runden, die er zuvor gespielt hat, behalten will, kann diese ja dorthin kopieren, wo die Savegame sind und die BotE.log ähnlich benennen.
Das Modifizieren der BotE.log ist sinnlos, da sie bei jedem Spiel neu geschrieben wird und BotE aus ihr keine Informationen bezieht.
Thread: Bote.log http://forum.birth-of-the-empires.de/viewtopic.php?f=35&t=2226 (search entry t=2226)
CommandLineParameters
only interesting for developers, not for players
only available after r76393, not available in Version Alpha 6.1 (V0.81) and before
Thread: CommandLineParameters http://birth-of-the-empires.de/phpBB3/viewtopic.php?f=69&t=2208 (search entry 2208)
internal Thread: http://forum.birth-of-the-empires.de/viewtopic.php?p=27789#p27789
autoturn
additional command line parameter after r77378: --autoturn=X -> you can use it to automatically terminated a round until the number of rounds is reached. So restart is also available, e.g. autoturn=100 -> first 100 turns, load savegame with autoturn=200 -> next 100 turns.
- For example '--autoturn=50' will automatically terminated and close all eventscreens during the first 50 rounds of the game. For Autoturn just start BotE normally, select race, start game...then it will be running
Thread: http://birth-of-the-empires.de/phpBB3/viewtopic.php?f=69&t=2207 (search entry t=2207)
test shipmap,genshipname
additional command line parameter after r77640: --test=shipmap,genshipname -> enables tests for shipmap and genshipname while shipmap and genshipname are the log domains used for each of these, enable or disable the test. If missing, and are automatically added to the normal log domains.
- --test without parameters enables all tests
If there is no messages that anything is wrong then the result is "all ok". But there is no explicit messages about the fact that all is ok. So don't wonder about.
If you use "--test" and you want to get a BotE.log, so you have to do also --log-domains e.g. "--log-domains=general,logging,ai,graphicload,shipai,diplomacy,intel,intelai"
Log-Directory
"--log-dir=c:\\BotE\\log\\" (for example)
storages BotE.log therein instead of into default userdata folder (normally identical with place of bote.ini).
Log-Level
Please note: use lowercase !
"--log-level=error" -> only MT::LEVEL::ERROR is logged
"--log-level=warning" -> MT::LEVEL::ERROR + WARNING is logged
no option, because it's default: info -> MT::LEVEL::ERROR + WARNING + INFO is logged
"--log-level=debug" -> MT::LEVEL::ERROR + WARNING + INFO + DEBUG is logged
Log Domains
"--log-domains=general,logging,ai,graphicload,shipai,diplomacy,intel,intelai" (for example all)
additional: "--passive-domains" (reverts the listed log-domains)
Example for Coding: MYTRACE_DOMAIN("graphicload")(MT::LEVEL_WARNING, "CGalaxyMenuView::GenerateGalaxy(): Could not load a star graphic");
Domains are a group of log info. By default are defined (in Options.h, only available if --log-domains isn't used)
"general"
"logging"
- Time
"ai"
"graphicload"
"shipai"
"diplomacy"
"intel"
"intelai"
see-all
"--see-all" opens galaxy map
Info-Meldungen
Used seed for randomgenerator
?? benutzter Einstiegswert für Zufallsgenerator - wofür (oder generell??)
Major AI
Ein Major = Imperium nach dem anderen wird durchgegangen - vom Menschen gespielte Majors bleiben außen vor.
Favorite Minorrace of Major is
(Quelle:MajorAI.cpp)
Favorite Minor wird einer von den dreien, zu denen
Zwischen den 3 besten Favoriten wird "Favorite Minor"
|
Favorite Minor will get one of the three which
Between the three best "Favorite Minor" will be
|
makes offer
Eintrag | Bemerkung | ||
---|---|---|---|
-1 | Major: MAJOR3 makes offer -1 to Major MAJOR2 | Kriegserklärung | Declares War |
Source: Options.h
- WARPACT = -5, // bei Annahme des Partners gemeinsame Kriegserklärung
- DEFENCEPACT = -2, // zusätzlich anbietbar, außer bei Bündnis oder Krieg
- WAR = -1, // Kriegserklärung
- NONE = 0,
- NAP = 1, (Non-aggression)
- TRADE = 2, // Handel mgl. & Rohstoffe als Zugabe möglich
- FRIENDSHIP = 3, // sehen dipl. Verträge mit anderen Rassen
- COOPERATION = 4, // gemeinsame Nutzung der Werften und Basen
- AFFILIATION = 5, // Zusammenarbeit auf dipl. Ebene
- MEMBERSHIP = 6,
- PRESENT = 10,
- CORRUPTION = 11,
- REQUEST = 12
MinorAI.cpp
Minor makes offer
Eintrag | Bemerkung | ||
---|---|---|---|
-1 | similar to "Minor: x makes offer -1 to Major MAJOR2" | Kriegserklärung | Declares War |
Source: Options.h
- WARPACT = -5, // bei Annahme des Partners gemeinsame Kriegserklärung
- DEFENCEPACT = -2, // zusätzlich anbietbar, außer bei Bündnis oder Krieg
- WAR = -1, // Kriegserklärung
- NONE = 0,
- NAP = 1, (Non-aggression)
- TRADE = 2, // Handel mgl. & Rohstoffe als Zugabe möglich
- FRIENDSHIP = 3, // sehen dipl. Verträge mit anderen Rassen
- COOPERATION = 4, // gemeinsame Nutzung der Werften und Basen
- AFFILIATION = 5, // Zusammenarbeit auf dipl. Ebene
- MEMBERSHIP = 6,
- PRESENT = 10,
- CORRUPTION = 11,
- REQUEST = 12
Sectors to terraform or colonize
(im Original "colinize", weil Tippfehler)
Neben der Race-ID werden hier Ziel-Sektoren angezeigt. Beispiel:
POP: 22 - KO: 24/9
KO 24/9 = 24 rüber (horizontal), 9 runter (vertikal) = Sektor j25
(programm-intern wird bei null begonnen, nicht bei 1 oder bei a, insofern hat Sektor a1 die Koordinaten (KO) 0/0, b2 hat 1/1. Hilfreich ist diese Sektorenkarte)
Darin findet sich ein Ziel mit Rest-Kolonisierungs-Bevölkerungs-Potenzial POP (Population) = 24
(es kann 1 Mrd. zuwenig anzeigen sein, Beispiel: 17.000 Mrd. => POP 16).
Rest-Kolonisierungs-Bevölkerungs-Potenzial bedeutet: Besitzt das System z.B. Planeten mit insgesamt 36 Mrd., ist einer mit 19.800 bereits kolonisiert und die anderen mit 16.200 noch nicht, wird 16 angezeigt. Hinweis: Begonnenes Terraforming mit anschließendem Kolonisieren führt die KI immer bis zum Ende durch, so dass die KI relevante Systeme auch vollständig erkennt und kolonisiert. (Fraglich: wenn die KI ein System erobert mit einem nicht-kolonisiertem Planeten unter 6 Mrd., kolonisiert es den dann?)
Die Sortierung ist absteigend nach POP, d.h. Ziele mit höchstem Bevölkerungszuwachs stehen ganz oben.
Es werden keine Ziele unter 6 Mrd. angezeigt bzw. angesteuert.
Raumschlacht
Raumschlachten werden (nur) folgendermassen festgehalten (eigentlich selbsterklärend):
Eintrag | Bemerkung | |
1 | Combat in Sector 18/11 | |
2 | Server is sending CombatData to client... | |
3 | Client is receiving CombatData from server... | |
4 | Getting Message to Show CombatView... | |
5 | Showing CombatView | |
6 | Client 0 sending CombatData to server... | |
7 | Server receiving CombatData from client 1... | |
8 | COMBAT ROUND | |
9 | Race MAJOR1 is involved in combat. Tactic: User | |
10 | Race MAJOR6 is involved in combat. Tactic: Auto |
KI: CalcShipPrio
Die folgenden Meldungen aus der AIPrios.cpp benützt die KI, um zu entscheiden, ob Kolonie-, Transport- oder Kriegsschiffe gebaut werden sollen.
Eintrag | Bemerkung |
CAIPrios::CalcShipPrios() begin... | |
CAIPrios::CalcShipPrios(): max Combatship Priority is: 14919 | |
Calc Shippowers: Race: MAJOR6 has a complete shippower of 8152 - all shippower is 8152 | |
Calc Priorities: Race: MAJOR6 - CombatShipPrio: 3 - ColoshipPrio: 4 - TransportPrio: 8 | |
Number of shiptypes: Race: MAJOR6 - Colonyships: 12 - Transporthips: 1 | |
CAIPrios::CalcShipPrios() ... ready |
SystemAI::ChooseShip()
Die folgenden Meldungen aus der SystemAI.cpp benützt die KI, um zu entscheiden, ob und welches Kriegsschiff gebaut werden soll.
Eintrag | Bemerkung |
CSystemAI::GetShipBuildPrios(): Race MAJOR1 - System: Belamar - CombatShipPrio: 1 (max 4) | für jeden AI-Major wird System für System durchgegangen |
CSystemAI::GetShipBuildPrios(): ... ready | das erfolgreiche Holen der ShipBuild-Prios ist ready |
CSystemAI::ChooseBuilding(): min priority after ships: 1 | |
CSystemAI::ChooseBuilding(): min priority after ships, updates and workers: 1 | |
CSystemAI::ChooseShip(): build combatship in system: Belamar | Entscheidung, in Belamar ein Kampfschiff zu bauen |
CSystemAI::ChooseShip(): buildable combatships Wolf - ID: 34 - Power: 9127 | baubare Kampfschiffe werden aufgelistet, nach Power absteigend |
CSystemAI::ChooseShip(): choosen combatship to build: Wolf | meist wird die Schiffsklasse mit der höchste Power (hier: Wolf) gewählt |
CSystemAI::GetShipBuildPrios(): ... ready | nochmal wird ShipBuildPrios eingelesen |
CSystemAI::ChooseBuilding(): min priority after ships: 0 | nochmal festgestellt (verändert zu oben) |
CSystemAI::ChooseBuilding(): min priority after ships, updates and workers: -13 | nochmal festgestellt (verändert zu oben) |
CSystemAI::ChooseBuilding(): choosen prio: 2 | |
jetzt wird das nächste System durchlaufen |
KI: Geheimdienst
Die KI verwendet nur Sabotage. Eine Geheimdienstaktion wird gestartet, wenn die Geheimdienstpunkte + Punkte aus Depot größer sind als die gegnerische Innere Sicherheit + deren Inneres Depot. (Quelle+Details: IntelAI.cpp)
Eintrag | Bemerkung |
Intel-AI: Intel Prio of MAJOR6 is 3 | Bei einer feindlichen Sabotage in den letzten 5 Runden erhöht sich die Prio zusätzlich um eins |
Intel-AI: assigned intel victim of MAJOR2 is MAJOR5 | |
Intel-AI: our SP: 76 - enemies SP: 189 | Der entscheidende Vergleich, ob eine Sabotage gestartet wird. |
weitere Info-Meldungen
Bereich | Befehl | Bemerkung | zugehöriger Befehl (Start/Ende der Aktion) |
INFO | storing savegame | Speichern eines Spiel mit Angabe des Pfades | |
INFO | Begin preparing game data... | Start eines Spieles (ab Runde 1) | Preparing game data ready... |
INFO | Preparing game data ready... | Begin preparing game data... | |
INFO | Server is sending NextRoundData to client... | Zu Rundenbeginn und -ende werden alle 6 Spieler abgefragt/informiert/Daten übertragen | ... serialization of NextRoundData succesfull |
INFO | ... serialization of NextRoundData succesfull | Zu Rundenbeginn und -ende werden alle 6 Spieler abgefragt/informiert/Daten übertragen | Server is sending NextRoundData to client... |
INFO | Client is receiving NextRoundData from server... | Der jeweilige Spieler erhält die jeweiligen Daten | ... serialization of NextRoundData succesfull |
INFO | ... serialization of NextRoundData succesfull | Der jeweilige Spieler erhält die jeweiligen Daten | Client is receiving NextRoundData from server... |
INFO | CNetworkHandler::OnNextRound ready | Alle sind bereit für die nächste Runde ?? | |
INFO | Init sound ready... | Soundausgabe ist bereit | |
INFO | Client x sending EndOfRoundData to server... | Client x sendet "Runde beenden" | ... serialization of RoundEndData succesfull |
INFO | ... serialization of RoundEndData succesfull | Client x sendet "Runde beenden" | Client x sending EndOfRoundData to server... |
INFO | START NEXT ROUND (round: x) | Beginn der nächsten Runde (Runden-Nummer in Klammern) | NEXT ROUND calculation successfull |
INFO | NEXT ROUND calculation successfull | Berechnung der nächsten Runde erfolgreich (nach "Rundenende") | START NEXT ROUND (round: x)
|
Fehlermeldungen
WARNING Could not load graphic
Beispiel: "WARNING Could not load graphic: ...\Graphics\Planets\Gaspar 1.bop"
Das Thema ist bekannt. BotE versucht immer zuerst spezielle Planetennamen zu finden. Wenn es diese nicht gibt, werden zufällige Planetengrafiken genutzt.
Eigentlich bräuchten diese Meldungen nicht im Log stehen (tun sie aber im aktuellen Stand des Projekts).
MyTrace-Vorschläge
Specifier-Tabelle (z.B. s = string, f = floating) http://www.cplusplus.com/reference/clibrary/cstdio/printf/
existing examples
MYTRACE(MT::LEVEL_ERROR, "savegame: error during compression\n");
- f=float e.g. 123,45 (http://www2.informatik.uni-halle.de/lehre/c/c623.html)
MYTRACE(MT::LEVEL_INFO, "Stardate: %f", m_fStardate);
- i=integer e.g. 1,2,3 (http://www2.informatik.uni-halle.de/lehre/c/c622.html)
MYTRACE(MT::LEVEL_INFO, "m_NumberOfTheShipInArray: %i", m_NumberOfTheShipInArray);
- s=string
MYTRACE(MT::LEVEL_INFO, "Intel-AI: Intel Prio of %s is %d\n", it->first, m_byIntelPrio[it->first]); = INFO Intel-AI: Intel Prio of MAJOR1 is 1
- d=decimal (old?, better use i)
MYTRACE(MT::LEVEL_INFO, "Intel-AI: our SP: %d - enemies SP: %d\n", ourPoints, enemyPoints);
MYTRACE(MT::LEVEL_INFO, "\n############### START NEXT ROUND (round: %d)############### \n", GetCurrentRound());
Source\Framework\botf2Doc.cpp
//Kartengröße aus ini lesen
int mapHeight=20;
pIni->ReadValue("Special", "MAPSIZEV", mapHeight);
STARMAP_SECTORS_VCOUNT=mapHeight;
MYTRACE(MT::LEVEL_INFO, "MAPSIZEV: %i", mapHeight);
int mapWidth=30;
pIni->ReadValue("Special", "MAPSIZEH", mapWidth);
STARMAP_SECTORS_HCOUNT=mapWidth;
MYTRACE(MT::LEVEL_INFO, "MAPSIZEH: %i", mapWidth);
Stardate
//f(x):=min(731,max(14,trunc(743-x^3)))
m_fStardate += (float)(min(731, max(14, 743-pow((float)m_Statistics.GetAverageTechLevel(),3.0f))));
MYTRACE(MT::LEVEL_INFO, "Stardate: %f", m_fStardate);
Difficulty
difficulty.MakeUpper();
MYTRACE(MT::LEVEL_INFO, "DIFFICULTY: %s", difficulty);
-> DIFFICULTY: BABY
if (difficulty == "BABY")
...
else
m_fDifficultyLevel = 0.5f;
MYTRACE(MT::LEVEL_INFO, "m_fDifficultyLevel: %f", m_fDifficultyLevel);
CSoundManager* pSoundManager = CSoundManager::GetInstance();
ASSERT(pSoundManager);
MYTRACE(MT::LEVEL_INFO, "pSoundManager: %s", pSoundManager);
-> Output with %d: 7078520
-> Output with %s: nichts vernünftiges
-> Output with %i: ?
Schiffsnummer beim Gruppieren
CSmallInfoView::SetShip(&m_ShipArray.GetAt(NumberOfTheShipInArray));
MYTRACE(MT::LEVEL_INFO, "m_NumberOfTheShipInArray: %i", m_NumberOfTheShipInArray);
??
CSmallInfoView::SetShip(&m_ShipArray.GetAt(NumberOfFleetShip));
MYTRACE(MT::LEVEL_INFO, "m_iNumberOfFleetShip: %i", m_iNumberOfFleetShip);
CMajor* pPlayersRace = GetPlayersRace();
ASSERT(pPlayersRace);
MYTRACE(MT::LEVEL_INFO, "pPlayersRace: %s", pPlayersRace->GetRaceName());
CIniLoader::GetInstance()->ReadValue("Special", "STARDENSITY", nStarDensity);
CIniLoader::GetInstance()->ReadValue("Special", "MINORDENSITY", nMinorDensity);
CIniLoader::GetInstance()->ReadValue("Special", "ANOMALYDENSITY", nAnomalyDensity);
MYTRACE(MT::LEVEL_INFO, "STARDENSITY: %i", nStarDensity);
MYTRACE(MT::LEVEL_INFO, "MINORDENSITY: %i", nMinorDensity);
MYTRACE(MT::LEVEL_INFO, "ANOMALYDENSITY: %i", nAnomalyDensity);
-> %i ist ok, mit %s -> Absturz = kein Start *NICHT EINSETZEN !!!*
Gamedata\AI\SystemAI
CString sRace = m_pDoc->GetSystem(ko).GetOwnerOfSystem();
MYTRACE(MT::LEVEL_INFO, "Owner of System is: %s", sRace);
ASSERT(m_pMajor);
MYTRACE(MT::LEVEL_INFO, "Major of System is: %s", m_pMajor);
Gamedata\General\Statistics
CStatistics::CalcDemoValues
nPlace = ++i;
MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: %s nPlace = %i", sRaceID, nPlace); -> zeigt Platz aus Demografie (nur wenn der Screen aufgerufen wird, also nur PlayerRace)
Die weiteren Werte sind zu nehmen:
- bei BSP mal 5
- Productivity 1 zu 1
- Military geteilt 10
- Forschung mal 2
- Moral 1 zu 1
fAverage /= vSortedVec.size();
MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fAverage = %f", fAverage); -> zeigt Durchschnitt
// eigener Wert
fValue = it->second;
MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fValue = %f", fValue);
// bester Wert
fFirst = vSortedVec.front();
MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fFirst = %f", fFirst);
// schlechtester Wert
fLast = vSortedVec.back();
MYTRACE(MT::LEVEL_INFO, "STATISTICS.CPP: fLast = %f", fLast);
Gamedata\Races\Empire.cpp
void CEmpire::Serialize(CArchive &ar)
// wenn gespeichert wird
for (int i = 0; i <= DERITIUM; i++)
#ifdef SEE_ALL_OF_MAP
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s m_lResourceStorages[i] = %i", m_sEmpireID, m_lResourceStorages[i]);
ar << m_lResourceStorages[i];
#ifdef SEE_ALL_OF_MAP
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: only...if SEE_ALL_OF_MAP = true");
//MYTRACE(MT::LEVEL_INFO, "Empire.cpp: m_sEmpireID = %s", m_sEmpireID);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_byNumberOfSystems = %i", m_sEmpireID, m_byNumberOfSystems);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iCredits = %i", m_sEmpireID, m_iCredits);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iCreditsChange = %i", m_sEmpireID, m_iCreditsChange);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iShipCosts = %i", m_sEmpireID, m_iShipCosts);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_iPopSupportCosts = %i", m_sEmpireID, m_iPopSupportCosts);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s: m_lFP Research points = %i", m_sEmpireID, m_lFP);
void CEmpire::AddFP(int add)
- ifdef SEE_ALL_OF_MAP
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: only...if SEE_ALL_OF_MAP = true");
//MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s m_lFP Research points add = %i", m_sEmpireID, add);
MYTRACE(MT::LEVEL_INFO, "Empire.cpp: %s m_lFP Research points = %i", m_sEmpireID, m_lFP);
Gamedata\Races\Major.cpp
void CMajor::Serialize(CArchive &ar)
// wenn gespeichert wird
ar << m_sEmpireName; // längerer Imperiumsname
MYTRACE(MT::LEVEL_INFO, "Major.cpp: Empire = %s", m_sEmpireName);
Gamedata\Races\MoralObserver.cpp
CString CMoralObserver::GenerateText
...
text += s;
MYTRACE(MT::LEVEL_INFO, "MoralObserver: %s", text);
short CMoralObserver::GetMoralValue(BYTE byMappedRaceNumber, unsigned short Event)
MYTRACE(MT::LEVEL_INFO, "MoralObserver - MoralValue of ? = %i", m_iMoralMatrix[Event][byMappedRaceNumber - 1]);
Gamedata\Races\VictoryObserver.cpp
pIni->ReadValue("Victory_Conditions", "Elimination", m_bConditionStatus[VICTORYTYPE_ELIMINATION]);
MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Elimination: %s", m_bConditionStatus[VICTORYTYPE_ELIMINATION] ? "true" : "false");
pIni->ReadValue("Victory_Conditions", "Diplomacy", m_bConditionStatus[VICTORYTYPE_DIPLOMACY]);
MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Diplomacy: %s", m_bConditionStatus[VICTORYTYPE_DIPLOMACY] ? "true" : "false");
pIni->ReadValue("Victory_Conditions", "Conquest", m_bConditionStatus[VICTORYTYPE_CONQUEST]);
MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Conquest: %s", m_bConditionStatus[VICTORYTYPE_CONQUEST] ? "true" : "false");
pIni->ReadValue("Victory_Conditions", "Research", m_bConditionStatus[VICTORYTYPE_RESEARCH]);
MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Research: %s", m_bConditionStatus[VICTORYTYPE_RESEARCH] ? "true" : "false");
pIni->ReadValue("Victory_Conditions", "Combat", m_bConditionStatus[VICTORYTYPE_COMBATWINS]);
MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Combat: %s", m_bConditionStatus[VICTORYTYPE_COMBATWINS] ? "true" : "false");
pIni->ReadValue("Victory_Conditions", "Sabotage", m_bConditionStatus[VICTORYTYPE_SABOTAGE]);
MYTRACE(MT::LEVEL_INFO, "Victory_Conditions - Sabotage: %s", m_bConditionStatus[VICTORYTYPE_SABOTAGE] ? "true" : "false");
case VICTORYTYPE_DIPLOMACY:
// über 50% der Rassen auf Mitgliedschaft bzw. Bündnis (mindestens 10)
nValue = pDoc->GetRaceCtrl()->GetRaces()->size();
// eigene Rasse nicht mitzählen
nValue--;
MYTRACE(MT::LEVEL_INFO, "VICTORYTYPE_DIPLOMACY - needed value: %i", nValue/2);
case VICTORYTYPE_CONQUEST:
// über 50% aller bewohnten Systeme sind erobert (mindestens 10)
MYTRACE(MT::LEVEL_INFO, "VICTORYTYPE_CONQUEST - needed value: %i", nValue/2);
// Anzahl Majorraces noch im Spiel
int nMajorsAlive = 0;
map<CString, CMajor*>* pmMajors = pDoc->GetRaceCtrl()->GetMajors();
for (map<CString, CMajor*>::const_iterator it = pmMajors->begin(); it != pmMajors->end(); ++it)
if (it->second->GetEmpire()->GetNumberOfSystems())
nMajorsAlive++;
MYTRACE(MT::LEVEL_INFO, "nMajorsAlive: %i", nMajorsAlive);