Project

General

Profile

Feature #4277

Global variable denoting that OpenMW is the engine being run

Added by rot tor 25 days ago. Updated 13 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Scripting
Target version:
-
Start date:
12/28/2017
% Done:

0%

Severity:
Minor

Description

Is there any special global variable set by OpenMW (in the same fashion as other variables set by the engine like GameHour, Day)?

If not:

it would be useful for modders looking for compatibility at the present time. OpenMW can't possibly replicate the exact same behaviour as vanilla for non-standard scripting involving AI or collision, and there isn't always a way to make the same thing happen both in the original engine and in OpenMW with the same commands.
A name like "OpenMWversion" would be explicit enough not to be used for other purposes. The point of a global variable rather than a function is compatibility with vanilla CS ESPs, so that alternative scripting could be included in the same file (having to maintain and update two separate files means modders have less incentive to make an effort towards OpenMW compatibility, even if they don't use MGSE features)

History

#1 Updated by scrawl . 14 days ago

If we provided this test, it would probably get over-used, to the point that people don't report bugs to us anymore, no longer work on making their scripts portable or error-free, etc. So I'm not really in favor of an official 'is this openmw' test.

But if you really really want to go down that path, there are probably already enough subtle differences that a determined scripter can use to detect OpenMW.

#2 Updated by rot tor 13 days ago

Sure I see ways of testing it, but that would be precisely the opposite of clean scripting,

Admittedly I was thinking of features that don't look like they would get implemented into OpenMW soon, like SetAI functions modifying base records, where the modder's choices could be disabling the features or marking the whole mod as incompatible entirely (those are already reported),

but also I was thinking about variations in empirical fine-tuning, like the speed at which you can safely push actors with collision (might allow faster values in OpenMW while having to take FPS into account in vanilla?),
or what coordinates to give to AiTravel if you want a NPC not to stumble around too distractingly, because "NPC spins around twice as much when walking to Y -65 instead of Y -64 if two ai_rock_01 are in the way" wouldn't make for a very useful bug report... but I'll make sure to report minor differences in behaviour when possible.

Also available in: Atom PDF