Lua scripting in OpenMW

Everything about development and the OpenMW source code.
User avatar
silentthief
Posts: 449
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Lua scripting in OpenMW

Post by silentthief »

ptmikheev wrote: 02 May 2021, 00:26 What to expect in the nearest months
I think that at first we should focus on adding features, that are not possible via MWScript. UI, camera control, custom AI.
Looking forward to what can be done with these two: Camera control, custom AI

I could see a modder making a mod that changes the ending of the mad god questline of tribunal, so that instead of just freezing you when you meet Almalexia in the tower of Sotha Sil, so she can talk to you, instead the camera could do some dramatic close up of her, or some other trick with the camera

(youtube vid of that meeting -> https://www.youtube.com/watch?v=5Lv4nyAEG7M)
(questline for that meeting -> https://en.uesp.net/wiki/Tribunal:The_M ... _Sotha_Sil)

---

As for AI, the concept of Morrowind Comes Alive as a way to give NPC schedules (as in, they come out during the day or go inside at night, maybe head to the tavern around dinnertime) is a start to making NPCs have actual behaviors other than the AI wander thing which makes then just walk around in the general location. AI would give the ability for plugging in certain behaviors which would make things WAY more interesting, such as proper fleeing (instead of an NPC who just runs around in the same interior, they go through doors and run to the nearest guard if attacked) or a modder could have a dark brotherhood attack where the NPC attacks, then runs away after sustaining wounds, only to lead the player into a trap with many more dark brotherhood assassins.

Just floating a few thoughts, and looking forward to the future of OpenMW

ST
ps - edited for clarification
100% not a dev, but I know a little about Linux, MW, and scripting. I try to help. LMK if you have any questions.

Current MW quote: "I don't recall using teleportation. Yet there I was. Alone. Naked."
kuyondo
Posts: 239
Joined: 29 Mar 2016, 17:45

Re: Lua scripting in OpenMW

Post by kuyondo »

ptmikheev wrote: 02 May 2021, 00:26 What to expect in the nearest months
I think that at first we should focus on adding features, that are not possible via MWScript. UI, camera control, custom AI.
I hope, some simple functions such as addItem or removeItem, even though possible with MWscript, could also be given some implementation.

Or maybe provide a way for OpenMW Lua to interact with in-game MWscripts, such as getting a local variable or global variable.
Cammera
Posts: 18
Joined: 08 Oct 2017, 22:35

Re: Lua scripting in OpenMW

Post by Cammera »

Someone just brought this up in the discord- stuff for enhanced music and sound mods shouldn't be too hard (Mostly making scripts able to check on mroe stuff, wouldn't it?) and it'd be a good early boon to rattle interest, we've had better audio mods since forever but they've all been old and lua MWSE stuff so far. Maybe a way to disable vanilla music behavior altogether too?
Just a stray thought really.
User avatar
FiftyTifty
Posts: 58
Joined: 15 Oct 2014, 21:02

Re: Lua scripting in OpenMW

Post by FiftyTifty »

When Lua does get added to OpenMW, and we have access to all sorts of properties and such, AI should be relatively easy enough to add. We already have AI packages, it's just Morrowind has such barebones and horribly limited conditions, targets, etc.

Now, if we can do the logic in Lua? We can fake a bunch. Move to a door, then teleport the NPC to the house's cell if they can unlock the door. Close enough, and it does the trick.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64
Post Reply