From 7a0a3cd4273bb29be3fb4d545a577785785669ec Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 28 Jul 2025 18:38:07 +0300 Subject: [PATCH] Remove logging, update docs --- client/netlag/NetworkLagCompensator.cpp | 10 ++-- docs/players/Cheat_Codes.md | 63 +++++++++++++------------ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/client/netlag/NetworkLagCompensator.cpp b/client/netlag/NetworkLagCompensator.cpp index 629754e23..a0a601862 100644 --- a/client/netlag/NetworkLagCompensator.cpp +++ b/client/netlag/NetworkLagCompensator.cpp @@ -56,7 +56,7 @@ void NetworkLagCompensator::onPacketReceived(const std::shared_ptrinfo("Predicting effects of pack '%s'", typeid(*serverPack).name()); + logGlobal->trace("Predicting effects of pack '%s'", typeid(*serverPack).name()); NetworkLagReplyPrediction newPrediction; newPrediction.requestID = serverPack->requestID; @@ -77,12 +77,12 @@ void NetworkLagCompensator::onPacketReceived(const std::shared_ptrsendPack(request); - logGlobal->info("Scheduled prediction of effects of pack '%s'", typeid(request).name()); + logGlobal->trace("Scheduled prediction of effects of pack '%s'", typeid(request).name()); } bool NetworkLagCompensator::verifyReply(const CPackForClient & pack) { - logGlobal->info("Verifying reply: received pack '%s'", typeid(pack).name()); + logGlobal->trace("Verifying reply: received pack '%s'", typeid(pack).name()); const auto * packageReceived = dynamic_cast(&pack); const auto * packageApplied = dynamic_cast(&pack); @@ -180,11 +180,11 @@ void NetworkLagCompensator::applyPack(CPackForClient & pack) pack.visit(visitor); if(!visitor.canBeRolledBack()) { - logGlobal->info("Prediction not possible: pack '%s'", typeid(pack).name()); + logGlobal->trace("Prediction not possible: pack '%s'", typeid(pack).name()); throw RollbackNotSupportedException(std::string("Prediction not possible ") + typeid(pack).name()); } - logGlobal->info("Prediction: pack '%s'", typeid(pack).name()); + logGlobal->trace("Prediction: pack '%s'", typeid(pack).name()); NetworkLagPredictedPack packWriter; BinarySerializer serializer(&packWriter); diff --git a/docs/players/Cheat_Codes.md b/docs/players/Cheat_Codes.md index 27a12b270..738148f01 100644 --- a/docs/players/Cheat_Codes.md +++ b/docs/players/Cheat_Codes.md @@ -133,46 +133,47 @@ Below a list of supported commands, with their arguments wrapped in `<>` #### Game Commands -`die, fool` - quits game -`save ` - saves game in given file (at the moment doesn't work) -`mp` - on adventure map with a hero selected, shows heroes current movement points, max movement points on land and on water -`bonuses` - shows bonuses of currently selected adventure map object +- `die, fool` - quits game +- `save ` - saves game in given file (at the moment doesn't work) +- `mp` - on adventure map with a hero selected, shows heroes current movement points, max movement points on land and on water +- `bonuses` - shows bonuses of currently selected adventure map object #### Extract commands -`translate` - save game texts into json files -`translate missing` - save untranslated game texts into json files -`translate maps` - save map and campaign texts into json files -`get config` - save game objects data into json files -`get scripts` - dumps lua script stuff into files (currently inactive due to scripting disabled for default builds) -`get txt` - save game texts into .txt files matching original heroes 3 files -`def2bmp <.def file name>` - extract .def animation as BMP files -`extract ` - export file into directory used by other extraction commands -`generate assets` - generate all assets at once +- `translate` - save game texts into json files +- `translate missing` - save untranslated game texts into json files +- `translate maps` - save map and campaign texts into json files +- `get config` - save game objects data into json files +- `get scripts` - dumps lua script stuff into files (currently inactive due to scripting disabled for default builds) +- `get txt` - save game texts into .txt files matching original heroes 3 files +- `def2bmp <.def file name>` - extract .def animation as BMP files +- `extract ` - export file into directory used by other extraction commands +- `generate assets` - generate all assets at once #### AI commands -`setBattleAI ` - change battle AI used by neutral creatures to the one specified, persists through game quit -`gosolo` - AI takes over until the end of turn (unlike original H3 currently causes AI to take over until typed again) -`controlai <[red][blue][tan][green][orange][purple][teal][pink]>` - gives you control over specified AI player. If none is specified gives you control over all AI players -`autoskip` - Toggles autoskip mode on and off. In this mode, player turns are automatically skipped and only AI moves. However, GUI is still present and allows to observe AI moves. After this option is activated, you need to end first turn manually. Press `[Shift]` before your turn starts to not skip it +- `setBattleAI ` - change battle AI used by neutral creatures to the one specified, persists through game quit +- `gosolo` - AI takes over until the end of turn (unlike original H3 currently causes AI to take over until typed again) +- `controlai <[red][blue][tan][green][orange][purple][teal][pink]>` - gives you control over specified AI player. If none is specified gives you control over all AI players +- `autoskip` - Toggles autoskip mode on and off. In this mode, player turns are automatically skipped and only AI moves. However, GUI is still present and allows to observe AI moves. After this option is activated, you need to end first turn manually. Press `[Shift]` before your turn starts to not skip it #### Settings -`set ` - sets special temporary settings that reset on game quit. Below some of the most notable commands: --`autoskip` - identical to `autoskip` option --`onlyAI` - run without human player, all players will be *default AI* --`headless` - run without GUI, implies `onlyAI` is set --`showGrid` - display a square grid overlay on top of adventure map --`showBlocked` - show blocked tiles on map --`showVisitable` - show visitable tiles on map --`hideSystemMessages` - suppress server messages in chat +- `set ` - sets special temporary settings that reset on game quit. Below some of the most notable commands: +- `autoskip` - identical to `autoskip` option +- `onlyAI` - run without human player, all players will be *default AI* +- `headless` - run without GUI, implies `onlyAI` is set +- `showGrid` - display a square grid overlay on top of adventure map +- `showBlocked` - show blocked tiles on map +- `showVisitable` - show visitable tiles on map +- `hideSystemMessages` - suppress server messages in chat +- `antilag` - toggles network lag compensation in multiplayer on or off #### Developer Commands -`crash` - force a game crash. It is sometimes useful to generate memory dump file in certain situations, for example game freeze -`gui` - displays tree view of currently present VCMI common GUI elements -`activate <0/1/2>` - activate game windows (no current use, apparently broken long ago) -`redraw` - force full graphical redraw -`screen` - show value of screenBuf variable, which prints "screen" when adventure map has current focus, "screen2" otherwise, and dumps values of both screen surfaces to .bmp files -`tell hs ` - write what artifact is present on artifact slot with specified ID for hero with specified ID. (must be called during gameplay) +- `crash` - force a game crash. It is sometimes useful to generate memory dump file in certain situations, for example game freeze +- `gui` - displays tree view of currently present VCMI common GUI elements +- `activate <0/1/2>` - activate game windows (no current use, apparently broken long ago) +- `redraw` - force full graphical redraw +- `screen` - show value of screenBuf variable, which prints "screen" when adventure map has current focus, "screen2" otherwise, and dumps values of both screen surfaces to .bmp files +- `tell hs ` - write what artifact is present on artifact slot with specified ID for hero with specified ID. (must be called during gameplay)