控制台指令

本頁面所適用的版本可能已經過時,最後更新於pre-release

維多利亞3的控制台指令需要在debug模式(默認禁用)中鍵入,且無法在鐵人模式中使用。控制台窗口通過Shift+2、ALT+2+1、Shift+3、§~^°²`(根據鍵盤不同而異)喚起,QWERTY鍵盤下則是`。以上方法如若不行,Shift + Alt + C或可作備用快捷鍵。按上下方向鍵可以在先前執行過的命令中盡心選擇,多數已啟用的命令可以通過再次輸入來關閉,但偶爾需要保存並重新載入以保證正常執行。


調試模式

調試模式debug mode為正常的遊戲進程提供了一系列場外幫助工具,包括:

  • 控制台(僅接受控制台指令)
  • 調試菜單(包括GUI編輯器,腳本資源管理器以及其他內容)
  • Debug Info
  • Ctrl + 點擊可以切換控制權到該國家
  • 文件監聽系統,可以自動將已變更的文件再次讀入緩存,包括模組內容。

啟用調試模式

調試模式可以在進入遊戲前,通過啟動器設置來啟用,同時也可以在遊戲中喚起,通過模組還可以實現正常模式與調試模式的切換。 通過控制台也能夠開關這一模式,但關閉後除非再次手動啟用,否則將一直保持在自動關閉狀態,模組也不能改變這一設置。

啟用方法:

模組

這裏有一系列模組,Free Console Access.

這些模組允許遊戲在兩種模式間切換,這使得遊玩過程與控制台操作更加方便。但是這一操作不會使文件重新加載,故而模組與啟動器設置一同使用才能達到最好效果。

啟動器

在遊戲啟動器中:

  1. 頁面切換到右側的遊戲設置
  2. 向下滾動,尋找Open game in Debug Mode選項並勾選啟動

Steam

在Steam中:

  1. 右擊遊戲,點開屬性菜單
  2. 在通用-啟動選項中添加-debug_mode語句
  3. 開啟遊戲

Windows

若無Steam,在Windows系統中:

  1. 在Victoria3遊戲目錄中找到「binaries」文件夾
  2. 右擊victoria3.exe 並創建快捷方式
  3. 右擊快捷方式,選擇屬性
  4. 在目標一欄最末端填入 -debug_mode 語句(語句應如"...\victoria3.exe" -debug_mode
  5. 以快捷方式啟動遊戲

禁用調試模式

為了使成就可用,需要關閉所有已啟用的模組,並且在啟動器選項中移除 -debug_mode。在啟動遊戲之後,應確保校驗碼正確,該信息可在主菜單右下角尋得

調試信息

當調試模式已經啟用,一些在正常遊戲流程中不會出現的信息欄將可見。

控制台指令表

指令 描述
3dstats 調出 3D Statistics窗口
3dstats.EnableGfxZoneStats 調出 3D Gfx Zone Statistics窗口
Adjacencies.Rebuild 重建所有鄰接關係
Application.ChangeResolution 通過控制台改變解像度
Browser.OpenURL [<url>] 打開指定連結
Camera.Debug 打印鏡頭的調試信息
Camera.Load 載入鏡頭信息
Camera.Save 保存鏡頭信息
Checksum.Log 將校驗碼存入遊戲日誌
CrashReporter.DeleteCrashData 刪除X天以前的遊戲崩潰信息
CrashReporter.SimulateCrash 模擬遊戲崩潰(會導致遊戲退出)
Debug.Achievements.Lock [<key>] 根據鍵值重新鎖定某一成就
Debug.Achievements.ResetAll 重新鎖定所有成就
Debug.Achievements.ToggleDebug [<value>] 以調試模式打開成就系統
Debug.Achievements.Unlock [<key>] 根據鍵值解鎖某一成就
Debug.TextureMode [Name of debug mode] 啟用紋理調試模式
Dockables.Create [Dockable name] 創建可停靠
Dockables.CreateUserLayout [Dockable layout name] 使用新名稱創建當前佈局的新用戶佈局副本
Dockables.DeleteUserLayout [Dockable layout name] 刪除佈局作為用戶佈局
Dockables.HideLayout 隱藏任何顯示的可停靠佈局
Dockables.SaveUserLayout 將當前佈局作為用戶佈局保存到磁盤,也可以使用新名稱
Dockables.ShowLayout [Dockable layout name] 顯示現有(用戶)佈局,隱藏當前佈局
Dockables.ShowManager 顯示可停靠佈局管理器
GUI.AnimationTimeline.LogStats 將 GUI 動畫時間軸系統的統計信息轉儲到調試日誌中
GUI.ClearWidgets 清除虛擬小部件
GUI.CreateDockable [File name] [Widget name] [Dockable id. If doesn't exist, it will be registered] 創建虛擬可停靠小部件。如果參數為 0,則文件名將為 gui/test_gui.gui,小部件名稱將為 test_window
GUI.CreateWidget 創建虛擬小部件。如果參數為 0,則文件名將為 gui/test_gui.gui,小部件名稱將為 test_window
GenerateCoastalRegionNavalExits
Graphics.CapFramerate
Graphics.DumpMemoryInformation
Localization.ToggleIncludeKeyInLocOutput 在本地化輸出中包含 loc 鍵
Localization.ToggleOnlyKeyInLocOutput 在本地化輸出中僅顯示 loc 鍵
Localization.ToggleSkipDataSystemInLocOutput 根本不在 loc 中運行數據系統
Log.ClearAll 清除所有日誌
Log.ClearErrorLog 清楚錯誤日誌並清零錯誤計數
Map.SavePNG [<map mode>] [<file name>] [<yes/no> Should render flat (optional)] 為特定地圖模式保存地圖的 png 唯一已知有效的地圖模式是「國家」
MapObjects.Debug 打印出地圖對象調試信息
MapObjects.GenerateGameLocators [<type>] [<filename> (optional)] 為遊戲的地圖對象生成定位器
MapObjects.Painter.AddPosition 將地圖對象放在光標下方
ModifierNode.Graph 打開即時報價任務的圖形視圖
ModifierNode.List 打開即時報價任務的圖形視圖
Music.PauseFactor 顯示或設置音樂系統的當前pause_factor
Music.PlayTrack [<track name>] 播放特定音軌
Music.Reset 重置音樂系統
Music.StopTrack 停播當前音軌
PopsFileStorage.Sync 同步 POP 文件存儲
Portrait.ClearCache 清除肖像緩存,強制刷新所有肖像
Print.EventDebug 打印事件調試統計信息,需要設置 Debug.Events 來收集統計信息
RandomLog 切換隨機日誌記錄
RandomLog.Dump [Frame count to dump, or * to dump all available frames (defaults to *)] [Target filename (defaults to random.log)] 將隨機日誌數據轉儲到文件中
SDL.EventLogging
ScriptProfiling.Dump
SplineNetwork.AppendAssets
SplineNetwork.ClearAssets
SplineNetwork.Database.Reload
SplineNetwork.Graphics.AddAllSplines
SplineNetwork.Graphics.ClearAllSplines
SplineNetwork.SetAssetGenerationMode Sets mode for spline strips and anchors generation <naval/default>
SplineNetwork.ValidateSplines Validate the integrity of in-game spline system
Terrain.Regenerate 重新生成地形位圖
Terrain.Save
Threading.TaskThreadCount [The number of task threads] Set or get the number of task threads
TickTask.Graph Open a graph view of the tick tasks
TickTask.List Open a graph view of the tick tasks
add_approval Adds an approval timed modifier to a given IG
add_clout Adds or removes clout of the IG by changing their political strength with timed modifier
add_ideology [Target interest group.] [Ideology to add.] Add an ideology to a given IG
add_loyalists [culture] [amount] 按人口比例添加該文化的效忠派
add_radicals [culture] [amount] 按人口比例添加該文化的激進派
add_relations 以特定值改變與某國關係
add_war_support [country_tag] [amount] Alters wars support of country in ALL of their wars by amount
ai.debug [tag] dumps debug info for country
ai.goal [tag] [goal type] Checks ai goal
ai_evaluate_building [<building key> <state region key>] Prints AI debug data for selected state & building type.
ai_evaluate_interest [<strategic region key>] Prints AI debug data for selected strategic region declared interest.
ai_evaluate_production_method [<building key> <pm key> <state region key>] Prints AI debug data for selected production method in state for building type.
ai_evaluate_trade_route [<goods key> <country tag>] Prints AI debug data for selected goods & country trade partner.
annex [<country tag/id>] 吞併國家
annex_all 吞併所有國家
audio.cpu_info Shows current cpu usage
audio.list_events List audio event
audio.play_event [audio event] Play audio event
callstack Print the callstack
change_law 改變到某一法律
changestatepop [state_id] [pop_type / all] [factor] Changes the pop size of the given pop type ( can be 'all' ) by at most the given factor. Will be capped by max employment for each pop.
check_pollution_level [state region tag] Print out pollution for specified state region
check_save Checks that saving and loading is consistent
clearlines Clear lines
clearspawnedentities Clears entities spawned with spawnentity command
coa_preview_window Open the Coat of Arms Preview Window
compound_nodeeditor Compound Node Editor
conquerall [country tag] Set all enemy provinces under our control.
crash 觸發崩潰報告
create_ai [self/all/tag] Creates AI for country or countries
create_building_history Creates a game-history compliant .txt file of all buildings in the world / state ID as well as their PM / subsidy configurations.
create_country [country definition] [country type] [culture] [state id] Creates a country
create_political_movement [<law type key>] Creates a political movement
create_pop_history Creates a dump in debug.log with a complete pop history
create_state_region_data Creates a game-database compliant .txt file of all state regions in the world and their provinces/resources
cthulhu ?
data_types_explorer Opens the data types explorer dockable
data_wrappers_stats [Filter] Prints statistics about data wrappers
date [date in format yyyy.mm.dd.hh] Changes current date
debug [arguments] Various debugging actions. Possible arguments:
  • ai
  • allmoney
  • alwaysdiplo
  • alwaysreform
  • alwaysupgradecolony
  • artisanchange
  • assert
  • cb_use
  • color
  • demotiondesc
  • eco
  • focusai
  • fow
  • influence
  • info
  • lines
  • market
  • minzoom
  • pops
  • profile
  • promotiondesc
  • render
  • textures
  • tooltips
  • wireframe
  • yesmen
debug_lens_option toggles the cheat mode debug_lens_option
debug_mode Toggles debug mode
debugcharacters Creates a semi-colon delimited logfile with debug info regarding all characters.
debugcountrybudgets Creates a semi-colon delimited logfile with debug info regarding all countries and their budgets.
debugemployment Creates and appends a comma-delimited logfile with debug info regarding employment in the specified state ID.
debugmarkets Creates a semi-colon delimited logfile with debug info regarding all goods and markets.
debugpopconsumption Creates a semi-colon delimited logfile with debug info regarding all pops' consumption
debugpopwealth Creates a semi-colon delimited logfile of the current wealth status of all pops.
debugstates Write a semi-colon delimited logfile with debug info regarding all states.
debugterrainweights Prints out the number of
debugtheaters Write a semi-colon delimited logfile with debug info regarding all theaters.
deiron Disables Ironman mode
disable_ai [all/tag] 關閉AI
disable_pop_growth toggles the cheat mode disable_pop_growth
disable_retooling toggles the cheat mode disable_retooling
drawcmdsviewer Draw Cmds Viewer
dump_data_types dumps the registered data types
dump_ref_lookup_memory_report
enable_ai [all/tag] 啟用AI
entity_editor Entity Editor Dockable
escalate [<amount>] Adds escalation to player diplomatic plays.
event [event name] [<country_tag/province_id>] 執行特定事件
explorer Shows an object explorer window
exportbuildings Write a semi-colon delimited logfile with all building type info
fastbuild 快速建造
fastenact 一天通過立法
fasthire 建築一天招滿人(受人口和資質限制)
fastinstitutions 一天升級一級機構
fastinterests 一天宣告利益
fastmobilize 快速動員
fastresearch 快速研究科技
fastrevolution 快速革命
fastsecession 快速分離主義
fasttravels 快速移動
find_unemployed Find and report all unemployed pops with an optional cutoff
fix_state_regions Fix state regions.
force_oos Make this client go out of sync in multiplayer
generate_province_center_objects generates a file with meshes in the center of each province
gfx.reloadtexture Reload textures
gfx.skin select active gfx skin
gfx.texture_limit Set texture video memory limit in megabytes
gui_animation_editor GUI Animation Timeline Dockable
gui_editor Spawns gui editor
help [command name] 顯示所有控制台指令或特定指令描述
hq_show_id toggles the cheat mode hq_show_id
ignore_government_support toggles the cheat mode ignore_government_support
invalidate_character [character id] Invalidate the modifier on the character with the specified ID
invalidate_country [country id] Invalidate the modifier on the country with the specified ID
invalidate_ig [interest group id] Invalidate the modifier on the interest group with the specified ID
invalidate_state [state id] Invalidate the modifier on the state with the specified ID
io_stats Toggles IO Stats
io_stats.Reset Resets IO Stats
kill_character [character name] 殺死角色
log_status Log Status Dockable
log_ticktask_performance Start outputing ticktask performance data to profiling.log
log_viewer Log Viewer Dockable
map_editor Toggle map editor
mapmode [mapmode] Switches to a given mapmode
measure_frame_time ["start" or "stop" measuring] Measures avg/min/max frame time and prints the result to debug.log once stopped
memory_stats Toggles Memory Stats
memory_stats.Reset Resets Memory Stats
minidump [file path] Creates a minidump
money [amount] Adds specified amount of money
net_debuginfo Print debug info about the networking layer
net_stats Toggles Net Stats
net_stats.Reset Resets Net Stats
norevolution toggles the cheat mode norevolution
nosecession toggles the cheat mode nosecession
observe start observing the game
own [province id/state region tag] [country tag] Change the owner of specified province or state region
particleeditor Particle Node Editor
permitmarginalizedingovernment toggles the cheat mode permitmarginalizedingovernment
pops_account_disconnect_steam Disconnect Paradox account from Steam
pops_account_login [email] [password] Login to a POPS Account
pops_account_logout Login to a POPS Account
pops_account_status Show whether you are currently logged into POPS or not.
popstat Prints out amount of active pops.
portrait_editor Open the portrait editor
print_gamestate_modifiers Prints Gamestate Modifiers
province_borders [true/false] Toggles showing of province borders
pseudoLoc Enable/Disable Pseudo Localization on Text Widgets
recalc_cached_data Recalculate cached gamestate data.
release_mode Toggles release mode
reload [file name] Reloads assets
rendertype Reports what render backend is used
research 獲取科技
save_game_analyzer Open the save game analyzer
screenshot Take screenshot
script_docs Prints script documentation
set_devastation_level [state region tag] [amount] Set devastation level in specified state region
set_pollution_level [state region tag] [amount] Set pollution level in specified state region
settings Spawns a settings GUI with an optional argument for an initially selected category
shader_debug
shader_editor Shader Editor Dockable
show_goals Show AI goals.
skip_migration toggles the cheat mode skip_migration
sleep Sleep for specified amount of milliseconds
social_addfriend [Context Index] [Account ID] Add a friend to friends list
social_debuginfo Print debug info about the social layer
social_joinroom [Context Index] [Room Name] [Nick Name] Join a chat room using the given social context
social_sendmessage [Context Index] [Room Name] [Message] Send a message to a chat room.
spawnentity [<entity name>] [<state> (optional)] Spawns specified entity at cursor position
spawnentity_at [<entity name>] [x] [y] [<state> (optional)] Spawns specified entity at xy-position
spawnline [<line name>] [<start position 'x,y,z'> (no spaces)] [<end position x,y,z> (no spaces)] Spawns specified line between 2 positions
spawnnotification [notificationtype] [<scopeindex>] Spawns notification of specified type.
swapchain.buffers Query/Set swapchain buffers
switchlanguage [language name] Reload localization files and switch language
tag [country_tag] Switch control to another country
testaipacts Test whether AI would dissolve current pacts
testevent [event name] [<country_tag/province_id>] Tests an event
testobjective [<subgoal key (optional)>] Tests objective triggered effects
texturelist Texture List
textureviewer Texture Viewer
time 顯示時間
tools.skins Skin Editor
treatyport [<state region tag>] Takes treaty port in state region
tweak Spawns a tweaker GUI
update_distribution Updates garrison unit distribution in HQ of specified State ID
update_employment Transfers employees between buildings in the specified state ID.
validate_employment Print out unemployment in states.
validate_hubs
validate_income Print out countries with income deficits.
validate_naval_exits
validate_pops Ensures all pops have valid params and prints them to the error log otherwise.
version Shows current build information, put 1 as second parameter for long version
vsync Toggle main swapchains vsync
wagerate Get or Set a building's wage rate
yesmen AI將同意所有玩家發出的外交請求及影響

參見