Headless Mode

Everything about development and the OpenMW source code.
Post Reply
User avatar
laxon
Posts: 21
Joined: 24 Mar 2013, 10:24
Location: Oslo
Contact:

Headless Mode

Post by laxon »

I am curious if it would be possible to setup OpenMW in a headless mode (for linux/macos). Something that would allow for a save to be loaded and then an in-game console command(s) or script to be executed after load.

With the steps being:

Code: Select all

Start OpenMW >
Load Save > 
Run Game Script (transition to a cell/coordinate & activate spell) > 
Take Screen Shot > 
Quit
With arguments like:

Code: Select all

OpenMW --save=path-to-save --script-(id/name/file)=string
If this isn't possible already it could be handy to automate certain visual tests for mod authors/openmw developers.
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Headless Mode

Post by lysol »

I guess this is what you are looking for?
User avatar
laxon
Posts: 21
Joined: 24 Mar 2013, 10:24
Location: Oslo
Contact:

Re: Headless Mode

Post by laxon »

Yes! But more of the thing that that PR is turning into a GUI: https://wiki.openmw.org/index.php?title ... _Arguments

The elements missing are:
  • Running Headless (no GUI)
  • Triggering an exit (via a script, or event?)
  • Capturing a Screenshot (ether via script, or on exit)
I am not new to C++ but am new to the OpenMW codebase. Could anyone tell me if adding this would be hard or medium difficulty?

I believe that OSG can already run in a headless mode, rendering without output to a GUI.

Thanks for taking a look!
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Headless Mode

Post by AnyOldName3 »

In later Elder Scrolls games, there's a script command which quits the engine, so I wouldn't be surprised if Morrowind had that too, in which case, OpenMW will support it.
User avatar
Atahualpa
Posts: 1176
Joined: 09 Feb 2016, 20:03

Re: Headless Mode

Post by Atahualpa »

AnyOldName3 wrote: 28 Jul 2018, 23:58 In later Elder Scrolls games, there's a script command which quits the engine, so I wouldn't be surprised if Morrowind had that too, in which case, OpenMW will support it.
AFAIK, there is no such command in Morrowind. Oblivion and Skyrim have the "qqq" command to quit the game - is that what you meant?
Last edited by Atahualpa on 29 Jul 2018, 15:20, edited 1 time in total.
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Headless Mode

Post by AnyOldName3 »

I think it is.
User avatar
laxon
Posts: 21
Joined: 24 Mar 2013, 10:24
Location: Oslo
Contact:

Re: Headless Mode

Post by laxon »

That sounds like a promising reason to maybe add this command.

I also found this relating to running OSG without a GUI: https://stackoverflow.com/questions/316 ... stem-using

It seems that they were also looking for GUI free draw and screen capture.

Any advice on where in the codebase I should begin editing to do a quick test of this functionality?
Post Reply