本頁面列出了遊戲中可以在控制台輸入的指令,你可以在非鐵人模式的單人遊戲中使用鍵盤上的 ~ (按鍵因鍵盤布局不同而存在變化)。鍵盤上的上下箭頭可以遍歷之前輸入執行的指令。絕大部分指令的開關是通過再次輸入實現的,但關閉某些指令是需要保存退出或重新開始遊戲的。請注意,這些指令中有許多會隨着 DLC 的開啟和關閉導致其中一些不能正常發揮作用。
請注意,鐵人模式中無法使用控制台!
指令列表
使用 ⇧Shift + 2 、 ~ 、 ` 、 ^ 、 ⇧Shift + 2 + 1 、 ⇧Shift + 3 來開啟控制台 (按鍵因鍵盤布局不同而存在變化)。
國家代碼
- 參見:Countries
國家的 tags[1] 不區分大小寫,但通常是大寫的。例如:USA, CHI, ENG, SOV。在內戰中產生的國家將依據可用性被賦予D01、D02、D03及以後的範圍的 tag (注意, D50 是最大的可用tag)。
可以通過輸入「tdebug」並將鼠標懸停在您想知道的國家的省份上,來查看該國家的 tag 。
使用鍵盤上的⇆Tab鍵可以自動補全指令和查看所有指令。
常用指令
Command | Effect | Example/Comment |
---|---|---|
gain_xp [<amount>] | 向選定的領導人/陸軍將領/海軍上將增加經驗值 | gain_xp 100000(等級最高為 9 級)。也可用來添加將領特性,例如:gain_xp desert_fox(相應列表可以在你 ../localisation/traits_l_english.yml 的文件中找到。這裡有一些對相應解釋。) |
gain_xp [<trait>] | 向選定的領導人/陸軍將領/海軍上將添加可獲取的特性。 | 例如:gain_xp seawolf (相應列表可以在你 ../localisation/traits_l_english.yml 的文件中找到。這裡有一些對相應解釋。)
注意 要讓這在新徵募的通用海軍上將上生效: |
cp [<amount>] | 增加指揮點數 | cp 100 (上限為 100) |
st [<amount>] | 增加穩定度 | st 100 (上限為 100) |
ws [<amount>] | 增加戰爭支持度 | ws 100 (上限為 100) |
allowtraits | 允許自由添加將領特性 | |
add_equipment(ae) [<equipment amount>] [<equipment name>] | 增加裝備 | 裝備要用最基礎的名字,所以用 'ae 1000 infantry_equipment_1'。你只能添加已研究了的裝備。不支持添加海軍裝備。(運輸船除外: 'ae 1000 convoy_1')。要添加艦船,考慮使用 instantconstruction (ic 對 AI 也會起作用)。
要添加衍生型裝備,你必須要指定它的名字。例子:你創建了 'Matilda LP' 型坦克的衍生型,擁有更好的裝甲和主炮,並把它命名為 'Matilda LP Mk. IV'。 現在就要使用 'add_equipment 1000 Matilda LP Mk. IV'了。 |
add_latest_equipment(ale) [<equipment amount>] | 給予玩家一定量的最新裝備 | 要添加你最新裝備中指定的一種,你需要指定它的名字。例子:你創建了 'Matilda LP' 型坦克的衍生型,擁有更好的裝甲和主炮,並把它命名為 'Matilda LP Mk. IV'。
現在就要使用 'add_equipment 1000 Matilda LP Mk. IV'了。 |
whitepeace(wp) [<country tags>] | 指定的國家之間白和。 | |
teleport(tp) | 瞬間移動 | 可以傳送軍隊到你選擇的任何地方 |
allowdiplo adiplo,nocb | 無論規則如何,可以使用所有的外交行動。(無需正當化就可以宣戰) | 這應該是想開戰而無需等待正當化最有效率的方式。如果你只想立刻正當化而不是想做正當化後才能做的事,那就用(instant_wargoal)。 |
debug_nuking | 無需任何條件向所有的世界上所有的省份投放核彈 | |
instantconstruction | 開關立刻建造的作弊碼。 | 對 AI 有效。艦船也會立刻建造完成。 |
event [event id] [<Target Country Tag>] | 觸發一個事件 | event political.3 觸發共產主義政變 6 觸發民主主義 9 觸發法西斯主義 |
trigger [scripted_trigger_name] | 檢查一個腳本觸發器的值是否為真或假 | |
effect [scripted_effect_name] | 執行一個腳本的效果 | |
research [<slot id> or "all"] | 研究完成指定科研槽的科技(slot id)或所有科技(all) | 使用"Research all"將立即研發所有科技。 |
research_on_icon_click | 在點擊科技樹上的圖標時立刻研究完相應科技 | 允許你研究完一項科技而無需其前置科技 |
annex [<Target Country Tag>] | 吞併輸入的國家 | annex USA 或者 annex d01 亦或 annex all |
manpower [<Amount>] | 向玩家增加人力 | 如果只輸入 "manpower",後面不跟數字則會給你一千萬人力 |
add_opinion [<Country tag>] | 增加指定國家好感度 | 向指定國家增加 100 (硬編碼)點好感度(例如 add_opinion ENG)。成功執行後會輸出 "<country> have 100 more opinion about you" 並會在外交界面中顯示為 "cheat_opinion_modified_good"。 |
addfunds [MIO_TOKEN] [amount] | 增加製造商經費 | 向相應製造商(沒寫全部都加)增加經費(類似製造商經驗值)
注:製造商可以在"Hearts of Iron IV\common\military_industrial_organization\organizations"找到 |
addSize [MIO_TOKEN] [amount] | 增加製造商規模 | 向相應製造商(沒寫全部都加)增加規模(類似製造商等級)
注:"Hearts of Iron IV\common\military_industrial_organization\organizations"找到 |
tag [<Country tag>] | 切換到輸入的國家 | |
observe(spectator) | 切換到無國家狀態,並且不再彈出信息或是暫停遊戲。但是,開啟觀察模式會干擾 AI 的操作,並且 AI 的行為可能會與未開啟觀察模式下不同。 | |
tdebug | 開關調試信息 | 對查看國家 tag 和 ID 很有幫助 |
spawn [<子單位類型>] [<省份 ID>] [<數量>] | 增加單位到指定的省份 | 僅在調試模式下工作。 |
occupationpaint(op) | 開關占領地區繪色。如果和國家 tag 配合使用則只繪色該國家擁有而不是控制的地區,比如,op JAP。 | |
setowner [country tag] [state id] | 設置地區擁有者 | 通過點擊選擇一個地區也會生效。當一個地區已被選中則其他地區不能再被改變。 |
setcontroller [country tag] [province id] | 設置省份控制者 | |
xp [XP amount] | 玩家獲得海陸空三軍指定數量的經驗 | 一天能用一次 |
pp(fuhrer_mana,political_power) [PP amount] | 向玩家增加政治點數 | |
fuel [<amount>] | 增加燃油 | fuel 100000 (上限取決於你的儲備容量,超出將會導致燃油減少) |
civilwar [<意識形態>] [<目標國家 TAG>] | 引發內戰 | civilwar fascism ENG :
其他可輸入意識形態 "communism"(共產主義) "democratic"(民主主義) "neutrality"(中立) |
add_party_popularity <ideology group> <value> | 增加政黨支持度 | ideology group 在鋼鐵雄心原版理念組裡有對應快捷鍵 d f n c。 |
set_ruling_party <ideology group> | 設置執政黨 | ideology group 在鋼鐵雄心原版理念組裡有對應快捷鍵 d f n c。 |
help [command name] | 輸出所有的控制台指令或者指定指令的介紹。 | |
Focus.AutoComplete | 允許國策立刻完成 | 對 AI 有效 |
Focus.NoChecks | 無視國策的條件 | 對 AI 有效 |
Focus.IgnorePrerequisites | 無視國策前提要求 | 允許從國策樹中間開始點國策 |
Decision.NoChecks | 無視決策的條件 | 同樣不會消耗政治點數 |
instant_prepare | 立刻準備好海軍入侵 | 只在調試模式下生效。 |
it | 陸軍和海軍立刻演練完成 | 對 AI 有效 |
nu [number] | 增加國家凝聚力 | 僅在 1.5 以前的版本有效 |
nuke [number] | 增加核彈數量 | 添加 100 或者 1000 |
ai_accept | AI 會同意所有外交請求 | |
add_core <province_id> | 增加核心 | |
agency.instantslotunlock | 移除在間諜招募時中間的等待時間 | |
agency.autocomplete | 立刻完成間諜機構的升級 | |
prevent_operative_detection | 你的特工/間諜不會再被發現 | |
force_operative_detection | 你的特工/間諜會被發現 | |
Operation.Instant | 秒完成任務 | |
agency.keepexcessoperatives | ||
resistance | 增加設定數值到選中省份的抵抗度 | 例如:(選擇柏林的一個省份)resistance 100(效果為增加該省分的抵抗度,增幅為100) |
compliance | 增加設定數值到選中省份的順從度 | 例如:(選擇但澤的一個省份)compliance 100(效果為增加該省分的順從度,增幅為100) |
collaboration | 快速建立合作政府 | 先右鍵一個國家,用控制台輸入collaboration 100,然後吞併全部領土,讓時間走一會,就會有事件提醒建立合作政府。注意這個代碼對D01之類的國家無效,需要將這類國家吞併後用setowner+國家代碼縮寫把這個地方原來的不是D01之類的國家調出來,然後再重複上述步驟,就可以發現所有占領區的順從度都變為100,比一個一個占領區輸入compliance 100方便多了。(PS:中國地區必須對CHI輸入該代碼,對PRC等無效) |
puppet [<宗主國>] [<要傀儡的國家>] | 快速傀儡其他國家 | 注意宗主國在前!要傀儡的國家在後! |
debug | 決議調試模式 | 在原版輸入該代碼會額外多出一些決議,比如特工位+99。在模組裡輸入:比如TNO,除了多出很多決議還能顯示民族精神代碼,配合remove_ideas可以移除這些精神 |
全部指令
指令 | 效果 | 例子/解釋 |
3dstats | Toggles 3D Stats | |
add_autonomy [<Target Country Tag>] [num] | 改變目標國家的自治度 | add_autonomy PHI -200 |
add_core [<State ID>] [<Country Tag>] | 添加核心 | |
add_diplo | 增加外交途徑 | |
add_equipment(ae) [<equipment amount>] [<equipment name>] | 添加裝備 | add_equipment 200 Sonderkraftfahrzeug 251/20:在 "equipment_l_english.yml" 中能查閱到所有裝備的名字 |
add_ideas [<idea name>] | 帶着 <id> 添加民族精神會添加到對應國家 | 在 .\common\ideas 下的文件查看各國的民族精神 |
add_interest [<Country tag>] | 將指定的國家標籤添加到您的興趣中 | |
add_latest_equipment(ale) [<equipment amount>] | 給予玩家一定量的最新裝備 | |
add_opinion [<Country tag>] | 增加指定國家好感度 | 向指定國家增加 100 (硬編碼)點好感度(例如 add_opinion ENG)。成功執行後會輸出 "<country> have 100 more opinion about you" 並會在外交界面中顯示為 "cheat_opinion_modified_good"。 |
add_party_popularity <ideology group> <value> | 增加特定政黨支持度 | 在原版遊戲中,意識形態組可以使用縮寫,f(法西斯主義),d(民主主義),c(共產主義),n(不結盟主義) |
ai | 打開或關閉 AI | |
ai_accept(yesman) | 打開或關閉AI始終接受外交 | |
ai_invasion | 打開或關閉AI海軍入侵 | |
aidump | 將AI前端數據轉儲到日誌文件,需要選擇一個單元 | |
aircombat(airc) [<scenario name>] [<result name>] [<province id>] [<state id with airbase>] [<state id with airbase>] [<equipment type>] [<equipment type>] [<equipment creator country>] [<equipment creator country>] | 在指定位置生成一場空戰 | |
airealism | 開啟真實 AI | |
aiview | 展示AI調試x | |
allowdiplo(adiplo,nocb) | 允許使用所有外交行動,無論規則如何 | |
analyzetheatres(anth) | 分析戰區的錯誤 | |
annex [<Target Country Tag>] | 吞併目標國家(不帶核心,不能繼承目標國家軍隊) | annex USA or annex d01 |
bloom | Toggles bloom | |
browser [url] | Show browser window | |
browser_base_url [url] | Set browser base url | |
building_health(bhealth) [<building type>] [<state or prov id>] [<building level>] [<health to add>] | 更改指定的建築的血量 | |
bypass_invasion_superiority_check | 無視制海權進行海軍入侵 | |
cameraclamp | Toggles the camera clamping | |
cityreload | 重新加載城市 | |
civilwar [<ideology>] [<target country tag>] | 在特定國家發起內戰 | civilwar fascism ENG |
其他可輸入意識形態 "communism"(共產主義) "democratic"(民主主義) "neutrality"(中立) | ||
collision(debug_collision) | Toggles debug display of normals/bounding boxes/collision | |
combatsound | 戰鬥視圖多久發出一次隨機聲音?? 0-50 | |
createlean | Create LEAN textures | |
Decision.NoChecks | 決議無條件 | 對 AI 有效 |
Decision.FastRemove | 決議生效時間為一天 | 對 AI 有效 |
debug_achievements_clear | Clear all achievements and user stats | |
debug_ai_budget [CountryTag] | Show ai budget data | |
debug_air_vs_land(dbg_cas) | Toggle debug mode for air vs land combat. | |
debug_assert | Toggles asserts on/off | |
debug_bloom | Toggles Bloom on/off | |
debug_borders | Toggles Borders on/off | |
debug_cities | Toggles Cities painting mode on/off | |
debug_commands | Printing commandcount to message.log | |
debug_crash(crash) | Crash! | |
debug_diploactions | Start Counting diplomatic actions | |
debug_dumpdiploactions | Dump diplomatic action data to game log | |
debug_dumpevents | Dump Event data to game log | |
debug_entities | Toggles Debug entities | |
debug_events | Start Counting events | |
debug_fronts | Toggles interpolated fronts debug | |
debug_info | Toggles Debug info | |
debug_lines | Toggles Debuglines | |
debug_lockcamera | Toggles Camera locked on/off | |
debug_nogui | Toggles GUI on/off | |
debug_nomouse | Toggles mouse scrollwheel on/off | |
debug_nuking | 無視所有條件對所有省份發射核彈 | |
debug_off_front_snap(dbg_fsnap) | Toggles offensive fronts snapping debug | |
debug_particle | Toggles Particles Debug info | |
debug_postfx | Toggles PostFX on/off | |
debug_rivers | Toggles Rivers on/off | |
debug_show_event_ID | 展示事件所對應的ID | |
debug_sky | Toggles Sky on/off | |
debug_smooth | Toggle framesmoothing | |
debug_tactics | 切換戰術調試工具提示的可見性 | |
debug_terrain | Toggles Terrain on/off | |
debug_texture | draws textures like bloom | |
debug_textures | Writes Texture info to application debug log | |
debug_tooltip | Toggles Tooltips on/off | |
debug_trees | Toggles Trees on/off | |
debug_types | Will print the data type for all dynamic reference objects. Can only be used if using RTTI. | |
debug_volume [<Volume Delta>] | Modifies music volume | |
debug_water | Toggles Water on/off | |
debug_wireframe | Toggles forced wireframe on/off | |
debug_zoom | Zooms in the game | |
deleteallunits(delall) | 刪除指定國家的全部陸軍和海軍。 | deleteallunits SPR |
deltat [<speed factor>] | 控制遊戲速度 | |
error | 在日誌中顯示錯誤 | |
event [event id] [<Target Country Tag>] | 執行事件 | event political.3 for communist coup |
filewatcher | Toggles filewatcher | |
flagsoutput [<path>] | Creates texture atlas files from memory. | |
Focus.AutoComplete(fa) | 國家焦點瞬間完成 | 同樣作用於AI |
Focus.NoChecks | 無視某些國家焦點的條件 | 同樣作用於AI |
fow(debug_fow) [<Province ID> OPTIONAL] | 打開/關掉遊戲或特定省份的戰爭迷霧 | |
fronts | 切換外國前線的可見性 | |
fullscreen | 切換為填充(全屏)模式 | |
gbpaint [layer] [channel] | Toggles gradient border painting | |
gbreload | Reloads gradient borders | 僅供開發者使用 |
goto_province [province id] | Centers to province | |
goto_state [state id] | Centers to state | |
guibounds(gui) | Toggles GUI bounds debug | |
hdr | Toggles hdr | |
hdr_debug | Toggles hdr debugging | |
help [command name] | Print out all console commands or a specific command description. | |
helphelp | Double Rainbow help. | |
helplog | Print out all console commands to game.log file. | |
hsv | Converts RGB to HSV | |
human_ai | 打開或關閉玩家 AI | |
instant_prepare | Instantly prepares naval invasions | 僅供開發者使用 |
instant_wargoal | 允許你迅速正當化戰爭理由 | |
instantconstruction(ic) | 所有建築立即完工(對ai同樣有效) | |
instanttraining(it) | 立即完成訓練 | 假設此時你已經開始訓練若干個單位,分了10個訓練線,每個生產線限制訓練5個師,則在控制台輸入這條指令後,當天24時,這10個師會訓練完畢並立即部署,之後每天24時訓練完10個師,因此以上50個師訓練完需要5天。 |
IP | 顯示你的 IP | |
ic | (參見instantconstruction) | |
it | (參見instanttraining) | |
manpower [<Amount>] | 給玩家增加人力 | |
mapmode [Mapmode type (int)] | 改變地圖模式 | |
mapnames | Toggle map names | |
massconquer(massc) | 大規模征服工具 | |
morehumans(humans) [num] | 增加人口 | |
moveunit [<Unit ID>] [<Province ID>] | 將一個單位移動到指定省份 | |
nextsong | 更改當前播放的配樂 | |
night | Toggles night | *as of 1.01 this does not seem to work (filed under developer-only command) This command can be emulated via the day/night loop option at the bottom right toolbar (shortcut key 'N') |
nomapicons | 切換地圖圖標 | |
nopausetext | 切換暫停橫幅以獲得更好的屏幕截圖 | |
nu [number] | Adds the specified amount of National Unity | |
nudge | Go to the nudge tool | |
nuke [number] | 增加玩家核彈數量 | |
observe(spectator) | 切換到觀察者模式,不再顯示消息或暫停遊戲。然而,它會干擾AI的性能,還有這並不能很好地指示AI在不使用觀察模式時會做什麼 | |
occupationpaint(op) | Toggles occupation painting | |
oos | Out of Synch | |
particle_editor | 生成一個粒子編輯器 | |
pause_in_hours | 在調用命令X小時後暫停遊戲 | |
poll | 查詢有效事件 | |
PostEffectVolumes.Default [posteffect_values name] | Toggles default posteffect values | |
pp [number] | 增加政治點數 | Not specifying the amount of political power will give the player 1000 political power. |
pp(fuhrer_mana,political_power) [PP amount] | 給玩家政治點數 | |
prices | Price Info | |
PrintSynchStuff | 打印隨機計數和種子 | |
profilelog | Prints out the profiling informations into time.log | |
provtooltipdebug(tdebug) | Toggles the debug info in province tooltip | |
reload [file name] | 重載遊戲資源 | reload loc (重載本地化文件) |
reload focus (重載國策) | ||
reload landcombat.gui (重載陸戰界面) | ||
reloadfx [參數:map/mapname/postfx 或者 *.fx 文件] | 重載着色器 | |
reloadinterface | 重新加載整個界面 | |
reloadoob [<Target Country Tag>] | 重新加載 OOBs | |
reloadsupply(relsup) | 重新初始化補給系統 | |
reloadtechnologies | 重新加載技術數據庫 | |
reloadweather [<randomseed>] | Reload and regenerate weather | |
remove_core [<State ID>] [<Country Tag>] | 移除核心. Note:Does not Work | |
remove_interest [<Country tag>] | 從您的興趣中刪除指定的國家/地區標記 | |
rendertype | 輸出所使用的渲染後端 | |
requestgamestate | Requests the gamestate from host | |
research [<slot id> or "all"] | 完成研究從科研槽或全部 | |
research_on_icon_click | 點擊科技樹圖標時研究一項技術 | |
resign | 退出遊戲 | |
run | Runs the specified file with list of commands | |
savecheck | Makes a save file (Test_01), loads the save file, makes a new savegame (Test_02). Those save files should look the same. | |
savegame | 保存遊戲 | |
set_cosmetic_tag [<country tag>] [<cosmetic tag>] | 改變國家的民族精神 | set_cosmetic_tag USA SOV |
set_country_flag [<Country Flag>] | 為當前的國家添加民族精神 | Does not work if you put another nations tag in the command such as "set_country_flag flag AUS". The console will give a message confirming the command, but in my testing no flag is set. |
set_ruling_party <ideology group> | 改變執政黨 | 可輸入意識形態縮寫c (communism), d (democratic), n (neutrality), f (facism) |
setcontroller [country tag] [province id] | 設置省份擁有者 | |
setowner [country tag] [state id] | 設置地區擁有者 | 經測試,若在與對方戰爭期間將對方的一個地區設置為自己或其他非戰爭參與國家,則在談判時不會出現該地區,因為它實際上已由該國家所「擁有」(own)而非「占領」(control),因此如果你的領土與之相連,則你依然可以在此徵兵。 |
SetRandomCount | 將隨機計數設置為0或不變 | |
sleep(wait) [time in sec] | Sleep | |
spawn [<子單位類型>] [<省份 ID>] [<數量>] | 增加單位到指定的省份 | 僅供開發者使用 |
spawnactor [<Actorname>] [<Province ID>] [<Animation> OPTIONAL] | Spawns an actor with an optional animation | |
srgb | Toggles sRGB | |
tag [<Country tag>] | 更換當前控制的國家 | |
tag_color | Test setting a country's color | |
teleport(tp) [<province_id>] | 傳送選中陸軍或海軍到指定省份 | |
testevent [<Event ID>] [<Character ID>] | 測試一個事件而不觸發它 | |
testtool(test) | 測試工具。 | |
theatersrebuild(trebuild) | 重建世界上所有的戰區,所有命令都將被清理 | |
threat [Threat amount] | 改變世界緊張度 | If one does "threat 999999999" it will reset the world tension to 0 |
time | 當前時間 | |
traderoutes | 切換貿易路線的可見性 | |
trigger_docs(effect_docs) | Print docs for triggers and effects | |
tweakergui | 生成一個調整器 GUI | |
update_loc [localization tag] | 更新本地化標記文件 | |
updateequipments | 更新設備數據庫 | |
updatesubunits | 更新子單元數據庫 | |
version | 顯示當前遊戲版本 | |
weather | Toggle weather simulation | |
whitepeace(wp) [<country tags>] | 指定的國家之間白和。 | |
window(wnd) [Arguments: open/close] [window gui name] | 打開或關閉特定窗口 | |
winwars | 在全國所有戰爭中獲得最高戰爭分數 | 該指令在 1.9.1 後無效 |
xp [XP amount] | 給予玩家相應的海陸空三軍經驗 |
另見
參考
- ↑ tag 列表文件可以在 /Hearts of Iron IV/common/country_tags/ 文件夾中找到。
文檔 | 效果 • 條件 • 定義 • 修正 • 修正列表 • 作用域 • 本地化 • 行動 • Data structures (Flags, Event targets, Country tag aliases, Variables, Arrays) |
編寫腳本 | AI • AI focuses • Autonomous states • Balances of power • 劇本 • 建築 • Characters and traits • Cosmetic tags • 國家 • 師 • 決議 • 裝備 • 事件 • 內閣/民族精神 • 意識形態 • 國策 • 資源 • Scripted GUI • 科技 • 單位 |
地圖 | 地圖 • 地區 • 補給區域 • 戰略區域 |
圖形圖像 | 界面 • 圖形資產 • 實體 • 後特效 • 離子效果 • 字體 |
裝飾性 | 肖像 • 命名列表 • 音樂 • 音效 |
其他 | 控制台指令 • 故障排除 • 模組結構 • 成就代碼分析 |