Thursday, July 19, 2007

Screen toggle for Dawn of War game series

The following is code to allow the player to toggle the screen controls off and on to get a nice clear screenshot without the game user interface. In this case press "Control z" to toggle the controls off and on.

** These instructions are for the DoW games not installed from the STEAM service. STEAM uses a different file and folder structure than the DoW games you install from boxed retail. Post a query on the STEAM user forums about where to put autoexec.lua for any DoW game from STEAM. Also, see this screen toggle code on the STEAM forum. **

For boxed retail versions of DoW games ...

Place the text code in a file autoexec.lua in the Dawn of War program folder (or in Dark Cursade program folder). Each time you run the game the autoexec.lua file will be read.

Dawn of War screentoggle; file name and location -
E:\Program Files\THQ\Dawn of War\autoexec.lua

screenmode = 0
function toggle_screenmode()
if screenmode == 0 then
taskbar_hide()
message_hide()
screenmode = 1
else
taskbar_show()
message_show()
screenmode = 0
end
end
bind("Control+z", "toggle_screenmode()")


Use a game startup icon without -dev command line option.

The screen toggle will only work when you are playing on a map (or a replay of a map). It does not work at any main menu screen.

(BELOW - click image for full size) Here is the location of autoexec.lua (Dark Crusade); put in same folder with game .exe for DoW 1 or DoW-Winter Assault ...



(BELOW - click image for full size) Here is the notepad image of the text contents for autoexec.lua ...

4 comments:

Anonymous said...

Doesn't seem to work. There is no .lua file called autoexec in the program folder and I tried making one in notepad, saving it as autoexec.lua, still didn't work...could be my game 'cause I can't get the console up when I add -dev in the shortcut.

FreeRangeAuthor said...

In my install I do not use -dev with the startup icon. (I just uninstalled my DoW 1 and DoW-Winter Assault, but it's the same for Dark Crusade)

Try removing -dev from the start icon.

Yes, you should create the autoexec.lua in the folder that has the game .exe

Anonymous said...

Had been wondering if there was any way to accomplish this in DOW. Many games have it as a standard feature. For example, in WOW it also Ctrl Z.

BTW Thanks for the code, but I can't get it to work. Just being honest, I don't know how to create the autoexec.lua in the folder. When I try it just adds a shortcut to the notepad file with the txt code in it. I realize I am missing something extremely basic here.

I have no idea if you still check this blog for posts, but if so, help would be appreciated.

FreeRangeAuthor said...

If you can get the code text saved from Notepad into any file name, in the game folder with the game .exe, save the Notepad file to a name you recognize.

Close Notepad.

Now use File Explorer to navigate to the folder and file you just created, highlight that file name, right click the highlight, choose RENAME, and rename the file to

autoexec.lua

(not this, autoexec.lua.txt)

If you saved the code correctly and renamed the file to autoexec.lua, in the game folder is should work.

If you are using any of the DOW games from STEAM, you will need to find the correct folder in the STEAM folders where the DOW game is started. Check your STEAM shortcut to the DOW game, look at shortcut properties to find where the game is started.