控制台指令

本頁面所適用的版本可能已經過時,最後更新於Heart of Darkness


本頁列出了可以輸入到控制台窗口的代碼,控制台窗口是一個特殊的調試窗口,可以通過按 ` 鍵訪問(非美式鍵盤上的按鈕可能有所不同)。按向上或向下箭頭鍵可遍歷以前執行的命令。許多代碼可以通過重複這個命令來關閉,但有時需要重新加載保存或退出遊戲。

使用這些代碼通常被認為是作弊。

指令列表

所需拓展包或補丁 指令 效果 例子 備註
money [amount] 將所需金額添加到玩家所在國家的現金儲備中。 money 15000
patch 1.2 prestige [amount] 玩家增加特定數目的威望 prestige 100
leadership [amount] 在玩家國家的領導力儲備中增加所需的領導力數量。 leadership 3
goods [amount] 玩家獲得特定數目的商品和等量的現金,默認增加量為10000. goods 5000 注意:使用此指令添加過多商品可能導致經濟危機。
plurality [number] 設置玩家特定數目的多元化 plurality 75
revolt [province id] 讓這個國家控制下的指定省份發動所有叛軍 revolt 1 用兩次才有效
instantconstruction 建築在一天內完成。 instantconstruction 對玩家和AI均生效。
inc 建築在一天內完成。 inc 僅對玩家生效。
instantresearch 科研在一天內完成。 instantresearch 對玩家和AI均生效。
inr 科研在一天內完成。 inr 僅對玩家生效。
yesmen AI接受與玩家或其他AI玩家的任何交易。 yesmen 在黑暗之心中改為debug yesmen
HoD debug yesmen AI接受與玩家或其他AI玩家的任何交易。 debug yesmen
tag [TAG] 將玩家國家更改為指定的國家。 tag USA 國家TAG必須大寫。

會讓受影響國家的AI休眠直到重新加載

event [event id] [province id] 在省份觸發事件,無視事件觸發的條件。 event 5162 1 該命令只適用於省份事件。如果未指定省份,事件會在玩家控制國家的首都省份發生。
event [id] [TAG] 在指定國家觸發event,不考慮事件要求。 event 2001 USA 此命令僅適用於國家事件,如果沒有指定國家,事件將在玩家所在的國家觸發。
changeowner [TAG] [province id] 將[province id]的當前所有者更改為指定的國家。 changeowner USA 1
changecontroller [TAG] [province id] 將[province id]的當前控制者更改為指定的國家。 changecontroller USA 1 除非原所有國和指定國家之間發生戰爭,否則該省將返回原所有國。
conquerall [TAG] 將所有敵人的省份置於當前國家的控制之下。 conquerall USA 除非在指定國家和當前國家之間發生戰爭,否則各省將返回原始所有國。
showprovinceid 顯示省份的id。 showprovinceid
provid 顯示省份的id。 provid 上一個指令的簡寫版本。
spawnunit [unit] [province id] 一個[單位]以0組織度和滿員狀態出現在指定省份。 spawnunit hussar 206 如果是陸軍,士兵將隨機來自一個省份。
reload <filename> Allows some files, such as the interface files, to be reloaded. reload interface.gfx 沒有人確定哪些文件可以重新加載,哪些不能。
reloadfx <effectname> 重新加載指定的着色器。 reloadfx map
reloadtexture <name> 重新加載指定的紋理。 reloadtexture grass.png
break 執行叛軍/運動的要求。 break 窗口中最上面的起義叛軍是那些要求得到滿足的叛軍。
upperhouse 觸發一次上議院的改選。 upperhouse
election Starts common elections. election
militancy [level] Changes militancy of all pops by the specified amount. militancy 1 輸入正值或負值均生效。
date 更改日期。 date 1862.5.13
fow 打開/關閉戰爭迷霧。 fow
HoD debug fow 打開/關閉戰爭迷霧。 debug fow
debug invent [invention] Discover specified invention. debug invent gas_attack The names of all inventions are in the inventions folder.
debug market 打開/關閉價格變化日誌。 debug market 日誌位於My documents/Paradox Interactive/Victoria 2/Logs/game.log中,格式如下[1]。
minzoom 控制最大和最小縮放。 minzoom
debug cb_use <cb_type> <TAG> <TAG> Show all the requirements for a certain Casus Belli, marking which ones are currently valid or invalid. The first TAG is the country trying to use the CB; the second TAG is the country against the CB is evaluated. debug cb_use conquest_cb USA MEX The list can be too long to be completely displayed.
wireframe 切換單位的3D模型到線框模式。 wireframe
blockade <provinceid> Blockades the specified province. blockade 1
reorg <provinceid> 指定一省中所有單位100%組織度並滿員。 reorg 12
fullscreen 將屏幕更改為全屏模式。 fullscreen
debug allmoney Shows info for money transfers. debug allmoney
debug alwaysdiplo 讓外交官無窮無盡。 debug alwaysdiplo
debug alwaysaddwargoal 移除添加戰爭目標的限制。 debug alwaysaddwargoal
debug researchpoints [number] 授予指定數量的研究點數。 debug researchpoints 9001
debug alwaysreform Eliminates the 1-month wait between reforms. debug alwaysreform You still need to have +50% of the upper house favorable to pass reforms. The effect of this command do not disappear until the game is restarted, and it's unknown if it also affects the AI.
debug influence 固定所有列強在所有國家的影響力為100. When deactivated, all influence levels return to normal. debug influence 對AI生效。

在控制台啟用時無任何提示。

suppress Set suppression points to 100. suppress

New commands in HoD

showrails(rails)

- Toggles the railroads visibility mode.

citysize [on/off] [<size 0-100>(if on)]

- Overrides the cities size.

newsfakegenerateall(fakenewsall) [<stylename>] [<randomseed>]

- Generates fake news for each possible fake defined.

newsfakegenerate(fakenews) [articlename] [<stylename>] [<randomseed>]

- Generates fake news for specified article name.

reloadnewsdatabase(reloadnews)

- Reloads the news databases and styles.

newsgeneratefrompath(newsfrom) [path] [<stylename>] [<randomseed>]

- Generates news from specified folder.

newsgenerate(news) [filename] [<stylename>] [<randomseed>]

- Generates news from file.

addresearch(addr) [techname]

- Adds research at specified name.

leaderprestige(lprestige) [province] [value]

- Adds prestige to leaders attached to units at specified location.

togglepopupdate(popupdate)

- Toggles ON/OFF updating pops.

popstat

- Prints out amount of active pops.

breakalliances(breakally) [<tag>]

- Breaks all alliances for you or for specific country.

lua [luacode]

- Executes lua code typed instead of arguments.

technologylist(techs)

- Prints out all technologies

morehumans(humans) [num]

- Adds more humans

window(wnd) [Arguments: open/close] [window gui name]

- Opens or closes the specified window

randomlog

- Toggles random logging

reload [file name]

- Reloads the gui or lua file

reloadinterface

- Reloads the entire interface

reloadfx [Arguments: map or *.fx filename]

- Reloads the shader

reloadtexture [texture file name]

- Reloads the specified texture

paint

- Switch to map painting mode.

rpaint

- Switch to region painting mode.

cpaint

- Switch to continent painting mode.

teleportselectionto(teleport) [province id]

- Teleports currently selected unit to location

reorg [province id]

- Reorganize all units at location (includes enemies, so use wisely)

tutorial [chapter id] [<reload>]

- Sets or reload tutorial

copyprov

- Copy selected provinces ids to clipboard

debug [Arguments: lines/alwaysupgradecolony/ai/influence/market/alwaysreform/allmoney/alwaysdiplo/alwaysaddwargoal/artisanchange/focusai/info/profile/pops/tooltips/assert/promotiondesc/demotiondesc/cb_use/eco/textures/fow/yesmen/wireframe/minzoom/render/color/save]

- Various debugging actions

spawnactor [actor name] [province id] [<animation>] [<gun>] [<hat>]

- Spawns 3d object at location

helplog

- Print out all console commands to game.log file.

help [command name]

- Print out all console commands or a specific command description.

External links

Unconfirmed or not working commands

'

promotiondesc: Somehow should descript pop promotion. Looks like game crashing.

demotiondesc: Somehow should descript pop demotion. Looks like game crashing.

cthulhu: Calls Cthulhu R'lyeh.

help: Displays the message 'No help for you!' Work in Heart of Darkness.

morehumans

rand_log Rand log enabled

tech

list

lua

window Valid commands are: open <windowName> close reload

view_ai

no_pop_update Pops are not updating Pops are updating

tutorial

All follow use with debug prefix:

debug lines

alwaysupgradecolony (Always can upgrade colony)

natfoc Prio for:

artisanchange

focusai National focus

ai debug toggled water???

shadow shadows info

profile

tooltips

assert

eco

textures Texture info has been written to the debug log.

render Render options: Trees: yes no Borders: Text: Overlay: Objects: MapObjects: Rivers: Water: WaterBorders: Effects:

save

spawnactor Syntax is spawnactor <actorname> <provinceid> [animation] [gun] [hat]

Flag

name

HelmetNode

test

addresearch

runresearch

processinvent

[1]

Format of the log generated

[worldmarket.cpp:861]: Ammunition demand: 2213.24

[worldmarket.cpp:862]: Ammunition supply: 731.901

[worldmarket.cpp:863]: Ammunition price: 15.5681

....

TOTAL_LEFT_ON_WORLD_MARKET_NOT_BOUGHT

[worldmarket.cpp:1538]: --------------------------------------------

[worldmarket.cpp:1546]: Ammunition _ActualSold Domestic markets: 444.897

[worldmarket.cpp:1547]: Ammunition Suppply World markets: 366.213

[worldmarket.cpp:1549]: Ammunition _ActualSold World: 130.501

[worldmarket.cpp:1550]: Ammunition left on market: 235.712

....

ACTUAL SOLD

[worldmarket.cpp:3001]: --------------------------------------------

[worldmarket.cpp:3006]: Ammunition(i:0) sold(domestic): 444.897

[worldmarket.cpp:3007]: Ammunition(i:0) sold(world): 130.501

....

EXPORTED_TO_WORLD_MARKET_FOR_NEXT_TURN

[worldmarket.cpp:3011]: --------------------------------------------

[worldmarket.cpp:3016]: Ammunition on next market: 290.749