Search found 9 matches

by melrief
02 Aug 2022, 11:14
Forum: General Modding
Topic: lua engine handler for hitting a target
Replies: 0
Views: 362

lua engine handler for hitting a target

I would like to experiment with the new lua support in openmw by making a mod that adds sneak experience when a sneak attach is successful. I've been having a look at the https://openmw.readthedocs.io/en/latest/reference/lua-scripting/engine_handlers.html#engine-handlers-reference but I can't find a...
by melrief
02 Aug 2022, 11:10
Forum: General Modding
Topic: 0.47 Multimark OMW Issues
Replies: 2
Views: 649

Re: 0.47 Multimark OMW Issues

I have the same issue.
by melrief
06 Dec 2015, 17:26
Forum: General Development
Topic: SWIG Scripting Extensions project
Replies: 34
Views: 23184

Re: SWIG Scripting Extensions project

I don't think creating/extending a programming language should be taken that easily. It is a quite complex task and theory behind PLs is huge. Instead of creating your own language you should really let people who did it for decades write it and then just use it. To answer the comment metatables cou...
by melrief
06 Dec 2015, 12:11
Forum: General Development
Topic: SWIG Scripting Extensions project
Replies: 34
Views: 23184

Re: SWIG Scripting Extensions project

Actually, for Python and/or Lua maintenance is minimal after you have created the bindings unless you change something core which I don't think you'll do easily. You do have to maintain MWScript, that's true, but I think MWScript would still be required to be compatible with most of the mods. MWScri...
by melrief
05 Dec 2015, 21:35
Forum: General Development
Topic: SWIG Scripting Extensions project
Replies: 34
Views: 23184

Re: SWIG Scripting Extensions project

I feel forced to add a few comments: Python can be sandboxed using PyPy or similar tools. For a videogame scripting language, you want PyPy or something like RPython anyway. Lua is better than MWScript, it is a quite mature and polished language for scripting. For the record, having AND and OR opera...
by melrief
05 Dec 2015, 21:17
Forum: Off Topic
Topic: Meaning of GameHour and GetCurrentTime
Replies: 7
Views: 4131

Re: Meaning of GameHour and GetCurrentTime

scripting with lua or python is already possible but in another fork and need updating to current master. python can't be merged as sandboxing is nearly impossible and lua maybe from discussion on it. https://forum.openmw.org/viewtopic.php?f=6&t=2713 extension https://forum.openmw.org/viewtopic...
by melrief
05 Dec 2015, 19:48
Forum: Off Topic
Topic: Meaning of GameHour and GetCurrentTime
Replies: 7
Views: 4131

Re: Meaning of GameHour and GetCurrentTime

You can of course implement modulo in a scripting language, you could even implement a set of math libraries on top of it. The reason why you usually don't do this is that the scripting language is not good for implementing computationally expensive operations. I wonder if OpenMW will, at a certain ...
by melrief
05 Dec 2015, 14:46
Forum: Off Topic
Topic: Meaning of GameHour and GetCurrentTime
Replies: 7
Views: 4131

Re: Meaning of GameHour and GetCurrentTime

Nice, thanks for the answer! I always wondered why not giving a SecondsFromStartOfTheDay which returns the seconds since the 00:00:00 of the current day instead of this GameHour function. I guess I have to dig more into Morrowind scripts and see how this thing is used to check in game time passing f...
by melrief
04 Dec 2015, 21:08
Forum: Off Topic
Topic: Meaning of GameHour and GetCurrentTime
Replies: 7
Views: 4131

Meaning of GameHour and GetCurrentTime

Hi people, first of all thank you for the amazing OpenMW and OpenMW-CS! I'm back playing and modding Morrowind thanks to you! I have a question that maybe who developed the engine again can answer: what is the exact meaning of the GameHour variable? I know 10.5 is equivalent to 10:30:00 but how do y...