將下面的代碼保存為文件autoexec.lua,放到遊戲安裝目錄目錄下(比如 C:\Program Files\THQ\Company of Heroes\,修改遊戲快捷方式,在命令行最後增加 -dev 參數):
g_bShowTaskbar = 1
g_bShowGameUI = 1
function UpdateTaskbarAndGameUI()
if (g_bShowTaskbar == 1) then
taskbar_show()
message_show()
else
taskbar_hide()
message_hide()
end
if (g_bShowGameUI == 1) then
game_showui()
else
game_hideui()
end
end
function ToggleShowTaskbar()
if (g_bShowTaskbar == 0) then
g_bShowTaskbar = 1
else
g_bShowTaskbar = 0
end
UpdateTaskbarAndGameUI()
end
function ToggleShowGameUI()
if (g_bShowGameUI == 0) then
g_bShowGameUI = 1
else
g_bShowGameUI = 0
end
UpdateTaskbarAndGameUI()
end
g_bShowFPS = 0
function ToggleShowFPS()
if (g_bShowFPS == 0) then
g_bShowFPS = 1
statgraph_set_visible(1)
statgraph_channel_set_enabled("fps",1)
else
g_bShowFPS = 0
statgraph_channel_set_enabled("fps",0)
statgraph_set_visible(0)
end
end
function GameSpeed_Slower()
if (getsimrate() > 2) then
setsimrate(getsimrate() - 1)
end
end
function GameSpeed_Faster()
if (getsimrate() < 20) then
setsimrate(getsimrate() + 1)
end
end
function TakeSuperScreenShot()
taskbar_hide()
message_hide()
Misc_SuperScreenshot()
UpdateTaskbarAndGameUI()
end
bind("MouseMiddle", "ToggleShowTaskbar()")
bind("F7", "ToggleShowGameUI()")
bind("F8", "ToggleShowFPS()")
bind("Control+B", "ee_bigheadmode()")
bind("Control+W", "VIS_Wireframe()")
bind("Control+X", "VIS_Overdraw()")
bind("Control+Left", "GameSpeed_Slower()")
bind("Control+Right", "GameSpeed_Faster()")
bind("Control+Up", "setsimrate(8)")
bind("Control+Down", "setsimrate(2)")
bind("Control+F", "Camera_FollowSelection()")
bind("Control+S", "TakeSuperScreenShot()")
以後進入遊戲就可以使用以下快捷鍵了:
鼠標中鍵 - 切換操作面板(不再同時隱藏指示標記)
F7 - 切換遊戲畫面上的指示標記
F8 - 切換FPS顯示(遊戲內部的FPS graph,比外掛軟體準確)
Ctrl+W - 切換框架渲染模式
Ctrl+B - 切換大頭模式
Ctrl+Up - 恢復正常速度
Ctrl+Down - 慢速(子彈時間)
Ctrl+Left - 減速
Ctrl+Right - 加速
Ctrl+F - 鏡頭跟隨選擇單位移動
Ctrl+S - 超級抓屏(可以抓圖4倍精度的截圖) |