控制台指令:修订间差异

本页面所适用的版本可能已经过时,最后更新于Heart of Darkness
(merge from offical wiki)
 
Hyx讨论 | 贡献
(撤销Hyx讨论)的版本6345)
标签撤销
 
(未显示5个用户的8个中间版本)
第2行: 第2行:
{{Rewrite}}
{{Rewrite}}


This page lists the codes which may be input into the Console Window, a special debugging window which may be accessed by pressing the ` key (button may vary on non-American keyboards). Press the up or down arrow keys to traverse through previously executed commands. Many codes can be turned off by repeating the command, but sometimes reloading the save or exiting the game is necessary.
本页列出了可以输入到控制台窗口的代码,控制台窗口是一个特殊的调试窗口,可以通过按 ` 键访问(非美式键盘上的按钮可能有所不同)。按向上或向下箭头键可遍历以前执行的命令。许多代码可以通过重复这个命令来关闭,但有时需要重新加载保存或退出游戏。


They are often considered cheating to use.
使用这些代码通常被认为是作弊。


== List of Commands ==
== 指令列表 ==
{| class="wikitable"
{| class="wikitable"
|-
|-
! Expansion or patch required !! Command !! Effect !! Example !! Comments
! 所需拓展包或补丁 !! 指令 !! 效果 !! 例子 !! 备注
|-
|-
| || money [amount] || Adds the desired amount of money to the player's nation's cash reserves. || money 15000 ||
| || money [amount] || 将所需金额添加到玩家所在国家的现金储备中。 || money 15000 ||
|-
|-
| patch 1.2 || prestige [amount] || Gives a specified amount of [[prestige]] to the player. || prestige 100 ||
| patch 1.2 || prestige [amount] || 玩家增加特定数目的[[ 威望]] || prestige 100 ||
|-
|-
| || leadership [amount] || Adds the desired amount of leadership to the player's nation's leadership reserves. || leadership 3 ||
| || leadership [amount] || 在玩家国家的领导力储备中增加所需的领导力数量。 || leadership 3 ||
|-
|-
| || goods [amount] || Gives the player the amount specified of all the goods in the game plus the same amount of money. Default is 10000. || goods 5000 || Warning: creating a large amount of goods with this code will probably lead to economic problems.
| || goods [amount] || 玩家获得特定数目的商品和等量的现金,默认增加量为10000. || goods 5000 || 注意:使用此指令添加过多商品可能导致经济危机。
|-
|-
| || plurality [number] || Set the player [[plurality]] to the number given. || plurality 75 ||
| || plurality [number] || 设置玩家特定数目的[[plurality|多元化]]|| plurality 75 ||
|-
|-
| || revolt [province id] || Rise all the valid [[rebels]] of the country that controls [province id] || revolt 1 || Use twice for it to take effect
| || revolt [province id] || 让这个国家控制下的指定省份发动所有[[rebels|叛军]]|| revolt 1 || 用两次才有效
|-
|-
| || instantconstruction || [[Buildings]] finish in one day. || instantconstruction || Affects human and AI players.
| || instantconstruction || [[ 建筑]] 在一天内完成。|| instantconstruction || 对玩家和AI均生效。
|-
|-
| || inc || Buildings finish in one day. || inc || Affects only human players, not the AI.
| || inc || 建筑在一天内完成。 || inc || 仅对玩家生效。
|-
|-
| || instantresearch || [[Research]] finishes in one day. || instantresearch || Affects human and AI players.
| || instantresearch || [[ 科研]] 在一天内完成。 || instantresearch || 对玩家和AI均生效。
|-
|-
| || inr || Research finishes in one day. || inr || Affects only human players, not the AI.
| || inr || 科研在一天内完成。 || inr || 仅对玩家生效。
|-
|-
| || yesmen || The AI accepts any deal with the player or other AI players. || yesmen || This was changed to "debug yesmen" in the initial release of HoD.
| || yesmen || AI 接受与玩家或其他AI玩家的任何交易。 || yesmen || 在黑暗之心中改为debug yesmen
|-
|-
| HoD || debug yesmen || The AI accepts any deal with the player or other AI players. || debug yesmen ||
| HoD || debug yesmen || AI 接受与玩家或其他AI玩家的任何交易。 || debug yesmen ||
|-
|-
| || tag [TAG] || Change the player country to the one specified. || tag USA || The tag must be capitalized.
| || tag [TAG] || 将玩家国家更改为指定的国家。 || tag USA || 国家TAG必须大写。
More than 1 change "sleeps" the AI of the affected country until reload.
会让受影响国家的AI休眠直到重新加载
|-
|-
| || event [event id] [province id] || Trigger province [[event]]s, regardless of the event requirements. || event 5162 1 || This command applies to province events only. If the province ID is not specified, the event is triggered in the capital province of the player's country.
| || event [event id] [province id] || 在省份触发[[event|事件]] ,无视事件触发的条件。 || event 5162 1 || 该命令只适用于省份事件。如果未指定省份,事件会在玩家控制国家的首都省份发生。
|-
|-
| || event [id] [TAG] || Trigger country [[event]]s, regardless of the event requirements. || event 2001 USA || This command applies to country events only. If the country tag is not specified, the event is triggered in the player's country.
| || event [id] [TAG] || 在指定国家触发[[event]] ,不考虑事件要求。 || event 2001 USA || 此命令仅适用于国家事件,如果没有指定国家,事件将在玩家所在的国家触发。
|-
|-
| || changeowner [TAG] [province id] || Change the current owner of [province id] to the TAG specified. || changeowner USA 1 ||
| || changeowner [TAG] [province id] || [province id] 的当前所有者更改为指定的国家。|| changeowner USA 1 ||
|-
|-
| || changecontroller [TAG] [province id] || Change the current controller of [province id] to the TAG specified. || changecontroller USA 1 || Unless there is a war between the original owner and the specified country the province will return to the original owner.
| || changecontroller [TAG] [province id] || [province id] 的当前控制者更改为指定的国家。 || changecontroller USA 1 || 除非原所有国和指定国家之间发生战争,否则该省将返回原所有国。
|-
|-
| || conquerall [TAG] || Set all enemy provinces under the current country's control. || conquerall USA || Unless there is a war between the specified country and the current country the provinces will return to the original owner.
| || conquerall [TAG] || 将所有敌人的省份置于当前国家的控制之下。|| conquerall USA || 除非在指定国家和当前国家之间发生战争,否则各省将返回原始所有国。
|-
|-
| || showprovinceid || Shows the id of the provinces. || showprovinceid ||
| || showprovinceid || 显示省份的id。 || showprovinceid ||
|-
|-
| || provid || Shows the id of the provinces. || provid || A shortened version of the previous command.
| || provid || 显示省份的id。|| provid || 上一个指令的简写版本。
|-
|-
| || spawnunit [unit] [province id] || A [unit] appears in the province specified at 0 organization and full strength. || spawnunit hussar 206 || In case of a land unit, the soldiers will come from a random province.
| || spawnunit [unit] [province id] || 一个[ 单位] 以0组织度和满员状态出现在指定省份。|| spawnunit hussar 206 || 如果是陆军,士兵将随机来自一个省份。
|-
|-
| || reload <filename> || Allows some files, such as the interface files, to be reloaded. || reload interface.gfx || No-one is sure which files can be reloaded and which cannot.
| || reload <filename> || Allows some files, such as the interface files, to be reloaded. || reload interface.gfx || 没有人确定哪些文件可以重新加载,哪些不能。
|-
|-
| || reloadfx <effectname> || Reloads the specified shaders. || reloadfx map || 
| || reloadfx <effectname> || 重新加载指定的着色器。 || reloadfx map || 
|-
|-
| || reloadtexture <name> || Reloads the specified texture. || reloadtexture grass.png ||
| || reloadtexture <name> || 重新加载指定的纹理。 || reloadtexture grass.png ||
|-
|-
| || break || Enforces [[rebel]]/movement demands. || break ||  The top-level rebels available in the movement window are the ones that have their demands met.
| || break || 执行[[rebels|叛军]]/ 运动的要求。 || break ||  窗口中最上面的起义叛军是那些要求得到满足的叛军。
|-
|-
| || upperhouse || Trigger a reelection of the [[upper house]]. || upperhouse || 
| || upperhouse || 触发一次[[upper house|上议院]] 的改选。 || upperhouse || 
|-
|-
| || election || Starts common [[elections]]. || election || 
| || election || Starts common [[elections]]. || election || 
|-
|-
| || militancy [level] || Changes [[militancy]] of all pops by the specified amount. || militancy 1 || Both positive and negative values work.
| || militancy [level] || Changes [[militancy]] of all pops by the specified amount. || militancy 1 || 输入正值或负值均生效。
|-
|-
| || date || Changes the date. || date 1862.5.13 || 
| || date || 更改日期。 || date 1862.5.13 || 
|-
|-
| || fow || Turns on\of fog of war. || fow || 
| || fow || 打开/关闭战争迷雾。 || fow || 
|-
|-
| HoD|| debug fow || Turns on\of fog of war. || debug 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 invent [invention] || Discover specified invention. || debug invent gas_attack || The names of all inventions are in the ''inventions'' folder.
|-
|-
| || debug market || Turns on/off a log of price changes. || debug market || The log is located at which is located in My documents/Paradox Interactive/Victoria 2/Logs/game.log, and has a format described at [1].
| || debug market || 打开/ 关闭价格变化日志。 || debug market || 日志位于My documents/Paradox Interactive/Victoria 2/Logs/game.log 中,格式如下[1]
|-
|-
| || minzoom || Controls max and minimum zoom. || minzoom || 
| || 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.
| || 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 || Switches units' 3D models to wireframe mode. || wireframe || 
| || wireframe || 切换单位的3D模型到线框模式。|| wireframe || 
|-
|-
| || blockade <provinceid> || Blockades the specified province.|| blockade 1 || 
| || blockade <provinceid> || Blockades the specified province.|| blockade 1 || 
|-
|-
| || reorg <provinceid> || All units in the specified province get 100% organization and full strength. || reorg 12 || 
| || reorg <provinceid> || 指定一省中所有单位100% 组织度并满员。 || reorg 12 || 
|-
|-
| || fullscreen || Changes screen to fullscreen mode. || fullscreen || 
| || fullscreen || 将屏幕更改为全屏模式。 || fullscreen || 
|-
|-
| || debug allmoney || Shows info for money transfers. || debug allmoney || 
| || debug allmoney || Shows info for money transfers. || debug allmoney || 
|-
|-
| || debug alwaysdiplo || Makes diplomats endless. || debug alwaysdiplo || 
| || debug alwaysdiplo || 让外交官无穷无尽。 || debug alwaysdiplo || 
|-
|-
| || debug alwaysaddwargoal || Removes limitations for adding wargoals. || debug alwaysaddwargoal || 
| || debug alwaysaddwargoal || 移除添加战争目标的限制。|| debug alwaysaddwargoal || 
|-
|-
| || debug researchpoints [number] || Grants the specified number of research points. || debug researchpoints 9001 || 
| || 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 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 || Makes every [[Great Power]]'s [[influence]] on every country fixed at 100. When deactivated, all influence levels return to normal. || debug influence || Also affects the AI.
| || debug influence || 固定所有[[Great Power|列强]] 在所有国家的[[influence|影响力]] 为100. When deactivated, all influence levels return to normal. || debug influence || 对AI生效。
It doesn't show any message on console when activated or deactivated.
在控制台启用时无任何提示。
|-
|-
| || suppress || Set suppression points to 100. || suppress || 
| || suppress || Set suppression points to 100. || suppress || 

2024年5月6日 (一) 23:41的最新版本


本页列出了可以输入到控制台窗口的代码,控制台窗口是一个特殊的调试窗口,可以通过按 ` 键访问(非美式键盘上的按钮可能有所不同)。按向上或向下箭头键可遍历以前执行的命令。许多代码可以通过重复这个命令来关闭,但有时需要重新加载保存或退出游戏。

使用这些代码通常被认为是作弊。

指令列表

所需拓展包或补丁 指令 效果 例子 备注
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