Jump to content

About This File

This is a plugin for NVSE, providing new script functions for modders.

 

!!! FOMM REQUIREMENT !!!

This FOMOD install requires my custom FOMM build from right here @ loverslab. The original/vanilla FOMM will not install executable files like dll's. At least, if I remember correctly, it won't. I don't know if NMM will install them either.

 

Extender Version: 18

Released: 5-Jan-2019

 

Requires NVSE 4.5.7 or later

 

Project source code: nvse extender. Send myself or jaam a message here or there if you'd like to contribute to the project. We are both admins.

 

What does it do?

NVSE Extender provides additional functions available to modders. Some will provide information via the console as well. It uses the save/load notifications to save (and load!) its data whenever the game is saved.

 

How do I install it?

Download the FOMOD for the version you want and install it with FOMM. You do not need the other files, and you only need ONE fomod.

 

Advanced users:

 

 

 

Manually extract the fomod with 7z. Copy DLLs to data/nvse/plugins/

 

 

 

What functions are available?

There are many functions available. I need to redo this documention to list and explain them all.

 

Current implemented function list:

 

 

 

(ref.)NX_GetSkeletonPath

Available since: V16

- Returns the skeleton path for the actor reference. For example, returns "_male" for humans, "NVBigHorner" for big horners, etc.

 

NX_GetRandom

Available since: V14

- Takes two integer arguments (x and y) and returns a random value from x to y, inclusive.

 

NX_GetVersion

Available since: V1

- Returns an integer representing the version (release #), starting from 1.

 

int (ref.)NX_IsUsingSkeleton name:string (actor:ref)

Available since: V1 Fixed in V6, thanks Ashmedai

- Given a skeleton name fragment and an actor reference (player, NPC, or creature), returns the 1 if the actor is using a skeleton in that directory, 0 otherwise. The directory fragment must match the subdirectory under meshes, and is not case sensitive.

 


player.NX_IsUsingSkeleton "_male" ; will return 1player.NX_IsUsingSkeleton "nvgecko" ; will return 0RexREF.NX_IsUsingSkeleton "_male" ; will return 0RexREF.NX_IsUsingSkeleton "dog" ; will return 1
 

int NX_IsInList list:formlist item:object (recurse:int)

Available since: V1 Fixed in V5

- Given a formlist and an item (base object, reference, or dynamic reference), will return 0 if the item is not in the list at all, or a value greater than 0 indicating how the object was found. The recurse flag is an optional integer that should be 1 or 0. It is currently not implemented. In the future, it will search formlists contained within formlists.

 

0 : item not in list.

1 : item in list exactly.

2 : base form of item in list.

3 : item is a baseform of another item in list.

4 : base form of item is the same as base form of another item in list.

 

Take the following three vars:


set itemA to AcousticGuitarset itemB to player.placeatme AcousticGuitar 1set itemC to player.placeatme AcousticGuitar 1
 

And two formlists. List1 contains itemA, list2 contains itemB.

 

"NX_IsInList List1 itemA" and "NX_IsInList List2 itemB" will both return 1.

"NX_IsInList List1 itemB" will return 2.

"NX_IsInList List2 itemA" will return 3.

"NX_IsInList List2 itemC" will return 4.

 

Notes on the SetEV* and GetEV* functions:

1. The persist flag, as yet, does nothing. These values are saved with savegames will persist across game sessions.

 

2. The keys are NOT shared between types. You can safely store a float and a form both under the key 'my key' and they will not overwrite one another. Internally they are stored in entirely separate arrays (maps actually), one per "type."

 

(ref.)NX_SetEVFl key:string value:float (persist:int)

Available since: V3

- Stores a floating point value with a reference. 'key' is the name for the value used in the SET and GET functions. 511 character maximum.


playerREF.NX_SetEVFl "test value" 3.1415 0
 

Will create the variable 'test value', associated with the player, and set it equal to 3.1514. This is basically the same thing as an associative array in perl, php, java (via an object), etc. As yet, there is no key iterator.

 

(ref.)NX_GetEVFl key:string

Available since: V3

- Retrieves a floating point value set via the above syntax. Will return 0 if the value has never been set.

 

(ref.)NX_SetEVFo key:string value:form (persist:int)

Available since: V3 (Fixed in v9)

- See NX_SetEVFl above. This is the same, but stores a form instead (reference, base, or dynamic).

 

(ref.)NX_GetEVFo key:string

Available since: V3

- See NX_GetEVFl above. This is the same but retrieves a form.

 

(ref.)NX_GetConversationPartner

Available since: V7 Thanks a ton, jaam!

- Returns the current conversation partner if in a conversation AND the NPC initiated the conversation via StartConversation topic. Only makes sense when called on the player. Only works in MENUMODE blocks, as that is where conversations happen. To use in gamemode scripts, just create a menumode block that calls it fairly often and stores the result in a quest var that you can use in GAMEMODE blocks.


someref.startconversation sometopic; wait a bit, and be in a menumode blockref = player.NX_GetConversationPartner; ref now == someref
 

(ref.)NX_ClrEVFl key (match)

Available since: V9

- Clears out the key on ref.

- Match is optional. If set to 2, clears all keys starting with the one you specify, e.g. "mymod" will clear all keys starting with the string "mymod".

 

(ref.)NX_ClrEVFo key (match)

Available since: V9

- Same as NX_ClrEVFl, but for the form vars.

 

 

 

Can I include this with my mod, upload it elsewhere, etc?

Sure. You can do whatever you want with it.

 

If you screw up your players by installing an older version than they already have, you deserve a slap. If you upload it somewhere else and claim to be the author, you can field the bug reports and write the fixes, while rotting in hell.

 

I'm all about letting people do whatever they want with stuff I create, but be responsible about it and don't be a dick.

 

What does the future hold?

Many other functions are planned, they are discussed in the support thread.


Other Files from prideslayer


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use