In-game Console Features

A generic talk on the OpenMW project.
User avatar
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland

In-game Console Features

Post by lgromanowski » 21 Aug 2011, 19:37

Greendogo wrote: I believe there was a request in the development section concerning implementing the console. I dug out the old list conversation about it: ... 302a1d9b8c
There's a lot of random stuff about segfaults and errors, so you'll have to dig through it.

Anyway, does anyone have any specific functionality they'd like to see in the console?
Zini wrote: I would see the console implementation mostly as a GUI task, i.e. a scrollable window with a input line. If we want to get fancy, a history feature would be nice (use cursor up/down to scroll through previous input).

The actual handling of the console input would be done by my script compiler (mostly).
nicolay wrote: I think moving GUI up on the task list is a good idea if you need it, Zini. I will fix up the roadmap shortly. The sound stuff is less important - but I will still leave it on the 0.08 list for now.
Greendogo wrote: An error reporting/logging feature would be pretty helpful (a screenshot feature would be too). The error reporting/logging feature would be a great early console feature since there should be enough bugs to go around. The faster it is implemented the faster it can help us help you!

There was some talk of syntax highlighting on the mailing list, but I bet that's something that can wait for a while. Also, maybe later we can get a thorough "help" command. I'd even be willing to write help dialog if you needed.
Zini wrote: Syntax highlighting in the console sounds like overkill. We could use it in the editor though (once we have an editor).

Regarding error reporting/logging: As I see it, errors resulting from console scripts should be reported to the in-game console. Other errors should be reported to the (OS-provided) console, that OpenMW is run from (and possibly a log file). Mixing these up will only make it more complicated.
Greendogo wrote: What I am suggesting the console would be helpful for, in regards to error reporting, is not error in console functionality. Rather, it would be helpful in order to report errors about graphical output, GUI bugs, non-console related scripting errors or other random stuff. The Original Morrowind engine has a similar error reporting system in its console, though it always outputs the coordinates the player is standing at, at the time. Once we can do that as well, then I would suggest updating the error reporting functionality to include the player's coordinates or containing interior cell.

It would indeed get a tad complicated when dealing with console malfunctioning. For the majority of cases it would be fine and reporting a problem with a console command (for example, the "coc" command, or the command: "player->setstrength 50") would be easy to do. However, if the error with the console command is making the program take a long time to respond or it is causing strange behavior that interferes with the ability to otherwise take advantage of the console's functions, you would be stuck.

Conclusion: Why do we need an external console at all once the internal console is finished? We would just push "~" just like in vanilla Morrowind and the console would open. Once reported, errors would be outputted to a log file. Having an external console would be useful for very little during actual use of the program.

Zini, what situations would you find yourself wanting to minimize out of OpenMW in order to enter a command into a console?

Edit: Also, syntax highlighting will not seem like overkill in six months when someone is bored with actual coding and wants to add something easy. As I said, syntax highlighting is something for down the road.
Greendogo wrote: I looked up the current format of the error reporting function in Morrowind's engine. It looks like this:
In the game/program, you find something that doesn't work right, you push "~" to open up the console screen. You type: bc "the error goes here"
You push enter. In the original Morrowind engine, you had to enable this feature in the settings file by changing this setting to the shown value:
So all the errors would be output to this file in the Morrowind install directory with the time, place, exact position, cell, and your comment.

This features can be hugely helpful for a lot of things, such as debugging mods (pretty much the only thing it gets used for now), reporting graphical glitches caused by the engine (like bump mapping being broken or weird lighting artifacts), or for reporting scripting glitches that are caused by the program and not the syntax of the scripts.

To see the "bc" command in use in the modding community, follow this link. We could use the same functionality to simply report something like "animation in bipedal creatures is malfunctioning, blah blah blah blah" with the version number.
Zini wrote:
Zini, what situations would you find yourself wanting to minimize out of OpenMW in order to enter a command into a console?
First, I would never work on Morrowind/OpenMW in full screen mode. That is for playing. For engine development and mod development windowed mode is the way to go. It is not about entering commands into a console outside of OpenMW, but rather viewing (error-) messages. If these are displayed on an external console, we can test problematic features interactively without constantly opening/closing the in-game console.
Zini wrote: Regarding the other stuff you mentioned: I honestly don't care much, what debugging aids are currently available in MW. Our task is to reimplement MW, so that the game and all mods can be played on it. But we don't necessarily have to duplicate the development environment.

Actually, I prefer if we would not. I found developing with Morrowind and CS always very tiresome. If we put our minds to it, we certainly can come up with something better.
Greendogo wrote: Oh! We are talking about different types of consoles, aren't we?

If we don't have an interior console, it will get annoying switching between the exterior console just to change the cell or create a weapon in order to test the graphics engine. Also, when people play the game when it is finished, I also doubt they'd play it in windowed mode just so they can use the console. So, I would say that the interior console is an essential game-play and modding tool, but I agree that it can be made better.
Zini wrote: Yes, we are talking about two different consoles. The in-game console and the normal operating-system-provided console, from which you start OpenMW via ./openmw.

Though we might get a version of the in-game console too, that can be run outside. But that would be optional.
Greendogo wrote: Ok, yes, definitely different consoles, ha ha.

Well, I made this thread to get ideas for the in-game console, so if anyone has any ideas beyond those I mentioned earlier please feel free to mention them.
Star-Demon wrote: Well, while any reason I would open the console would be hopefully solved by the new implementation itself, I can think of a few things I would want.

a lot of new three key commands.

PAI - "Player Additem"

OTI - "output target Info" - basically, does a toString on whatever I targetted in console- lots of things have lots of information, and this would help me from npcs to statics, would work kinda like ORI, but more verbose.

RTO - "return to origin" - would put the object back where it was originally placed. If we're implementing physics, it would really be nice when things go missing.

OCI - "output Cell items" - output every object that is in this cell.

That's all I can think of for now.
Greendogo wrote: Yes, shortcuts would be nice
best regards,