Add'l scripting suggestions

Feedback on past, current, and future development.
Post Reply
dracdrac9
Posts: 1
Joined: 15 Jan 2015, 03:35

Add'l scripting suggestions

Post by dracdrac9 »

Hopefully the scripting will be a bit more robust than vanilla Morrowind... an example of which is the limit of (I think) 32k characters, approximately 1,000 lines, etc in scripts. Might this limit be extended somewhat, since memory is much more plentiful these days?

One particular peeve of mine in the scripting is that some functions accept variables and others do not; I'd prefer to see all script functions accept variables, expressions *or* literals as inputs.

Another thought would be some sort of basic 'inventory control' functions to be added... return the number of different items in inventory (count the number of icons, perhaps?), and functions to identify what each is... Inventory(17), perhaps, as an example.

Further items might be a sort of 'object variable'... say, "me" to refer to the particular item to which the script is attached, and "master" to refer to the master object, and "here" to refer to the cell containing the referenced object (PC or otherwise).

For that matter, eventually string variables might be a good idea... it would certainly make referencing cells by name easier (and in some cases, *possible*).

Access to more of the game-engine's variables might be a good idea; such as the 'health' of objects (reference objects, of course, when the master object isn't being referenced), or the nominal 'base value' of PC stats (before spell-effects, etc are added). If not this, then perhaps a value similar to "gethealthgetratio" for each stat/skill?

Fixing 'broken' script functions... I believe that there is supposed to be a script function that essentially says "What hit me"... but does not work, just like there is supposed to be one that returns what you are standing upon... that also does not work. These could be very useful.

Perhaps a 'call' function, to use other scripts as subroutines? This has been done with the current scripting system, but is quite difficult, and liable to losing synchronization.

Of course, making the base game fully functional would presumably take priority over additions, but I could easily see these as adding a great deal of functionality.

Drac
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Add'l scripting suggestions

Post by scrawl »

Hopefully the scripting will be a bit more robust than vanilla Morrowind... an example of which is the limit of (I think) 32k characters, approximately 1,000 lines, etc in scripts. Might this limit be extended somewhat, since memory is much more plentiful these days?

One particular peeve of mine in the scripting is that some functions accept variables and others do not; I'd prefer to see all script functions accept variables, expressions *or* literals as inputs.
These are already fixed, or rather, were never an issue with OpenMW in the first place.
User avatar
Pop000100
Posts: 82
Joined: 18 Aug 2014, 21:17
Location: Loitering around Gnisis.

Re: Add'l scripting suggestions

Post by Pop000100 »

dracdrac9 wrote: One particular peeve of mine in the scripting is that some functions accept variables and others do not; I'd prefer to see all script functions accept variables, expressions *or* literals as inputs.
wait... scrawl this is implemented?
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Add'l scripting suggestions

Post by scrawl »

Yes, see https://wiki.openmw.org/index.php?title ... #Scripting
Function arguments can now be expressions of arbitrary complexity. Vanilla MW would not even allow simple variable arguments for some functions.
Post Reply