Representing Game Dialogue as Expressions inFirst-Order Logic

Not about OpenMW? Just about Morrowind in general? Have some random babble? Kindly direct it here.
1Zero
Posts: 37
Joined: 09 Feb 2020, 18:44

Re: Representing Game Dialogue as Expressions inFirst-Order Logic

Post by 1Zero » 24 Feb 2020, 08:28

During university, I was involved in a project using software verification (embedded system in a satellite) with the help of Prolog.
It is more efficient to include SWI Prolog directly, there is an interface provided.
https://www.swi-prolog.org/pldoc/man?section=embedded

Well, It's been a while and I need to review a few things. It can be integrated into LUA Oblivion scripting, exposing the interpreter with the game API.

User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Representing Game Dialogue as Expressions inFirst-Order Logic

Post by sirherrbatka » 30 Jun 2020, 19:42

That's pretty cool.

After dabbling a little bit in how Morrowind operates under the hood I start to see a lot more applications for logic programming than just dialogues. A lot of scripting in Morrowind really boils to a fairly complex condition and a fairly simple action. If so, it could probably benefit from a rudimentary logical interpreter.

More interestingly, Morrowind is essentially a database already. If I would start from scratch, I would try to put everything into logical clauses (caching should provide acceptable performance) and allow people to go nuts with mods. You could add extra information to every "record type", create new "record types" (to use TES terms) and so one. Suddenly you could make spells that would work only on characters that have a daughter already (after adding family relations) or have ability to seduce wives of the nobility (after adding family relations AND social status) while dealing with the consequences (query for capabilities of the husband). This seems to be smooth in concept. However, from the technical point of view, this requires a tight coupling of logical interpreter and data files. Not sure if SWI-Prolog is a good pick there.

User avatar
Greendogo
Posts: 1450
Joined: 26 Aug 2011, 02:04

Re: Representing Game Dialogue as Expressions inFirst-Order Logic

Post by Greendogo » 03 Jul 2020, 02:06

What a very interesting modding capability concept. :shock:

Post Reply