Search found 61 matches

by urm
24 Feb 2021, 18:59
Forum: General Development
Topic: Lua API for GUI
Replies: 4
Views: 444

Re: Lua API for GUI

There is already a refactor MR to get things usable for VR... not sure if that will cause conflicts. From what I know about that one, it doesn't really touch the same things I'm talking about. The main change there is the ability to render parts of the UI into separate buffers. It would, of course,...
by urm
23 Feb 2021, 20:01
Forum: General Development
Topic: Lua API for GUI
Replies: 4
Views: 444

Re: Lua API for GUI

We already have a concept of script interfaces in the Lua API. Essentially, it allows a script to assign a table to a string, which is then available to all other scripts attached to the same object. In that case, we could have every UI element be a script attached to the player, and smaller UI elem...
by urm
23 Feb 2021, 00:05
Forum: General Development
Topic: Lua API for GUI
Replies: 4
Views: 444

Lua API for GUI

With the Lua MR taking form, it's probably time to consider how to implement various parts of the Lua API. This thread is meant to be a discussion on how to best approach it for the in-game GUI. Current state of UI in OpenMW: OpenMW uses MyGUI to render in-game UI. The implementation consits of XML ...
by urm
07 Feb 2021, 21:24
Forum: General Development
Topic: SQLite based approach to storing game world state
Replies: 27
Views: 4626

Re: SQLite based approach to storing game world state

I've updated the script example to feature the current syntax (stll here https://gitlab.com/uramer/openmw/-/snippets/2072751).
Now the relations and fields are nicely read from pre-generated tables, rather than constructed manually from Lua.
by urm
06 Feb 2021, 17:13
Forum: General Development
Topic: SQLite based approach to storing game world state
Replies: 27
Views: 4626

Re: SQLite based approach to storing game world state

I think it would be beneficial to make use example-suite assets when writing tests so that we don't need to rely on Morrowind itself, if that's necessary. When I said "actual OpenMW records", I meant the structs in the esm component, not necessarily actual Morrowind data. I was planning to just har...
by urm
06 Feb 2021, 15:37
Forum: General Development
Topic: SQLite based approach to storing game world state
Replies: 27
Views: 4626

Re: SQLite based approach to storing game world state

I guess it's time for a progress update. Current status: 1. Support models with one-to-one relations of any depth. 2. Constructing queries with SQL-like features: filters ("where"), sorting ("orderBy"), taking one of a group ("groupBy"), limit, offset, including relations ("with") 3. Query through i...
by urm
23 Jan 2021, 11:14
Forum: Example-Suite
Topic: OpenMW Template art
Replies: 14
Views: 1845

Re: OpenMW Template art

Minor feedback on the second menu concept: the dot from the checker pattern is interfering with the menu buttons somewhat. Maybe shift it one checker to the side?
by urm
02 Jan 2021, 10:49
Forum: General Development
Topic: SQLite based approach to storing game world state
Replies: 27
Views: 4626

Re: SQLite based approach to storing game world state

Why does OpenMW need an ORM to query database? It's possilbe to write SQL for every query required. I don't see where you considered this approach. Pros for this approach: * No need to fight with ORM on how queries are generated * Use all SQL features without cost of C++ code in ORM * It's more cle...
by urm
29 Dec 2020, 22:59
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 81
Views: 16641

Re: Lua scripting in OpenMW

It depends on if you want to make Lua optional and mandatory. If it is aimed to be optional, you will need to spend a lot of time to write and debug a copy of all game mechanics, and after that you will have a lot of code duplication - two copies of code which does the same. Also for every change y...
by urm
29 Dec 2020, 13:06
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 81
Views: 16641

Re: Lua scripting in OpenMW

Some notes: 1. Personally I do not like event names as string literals, they are error-prone: world.activeActors[i]:sendEvent("startJumping", {}) But I suppose than they are inevitable to support custom events. So it is important is to print an error message, which shows an exact location of instru...