Jump to content

NVSE Function


senterpat

Recommended Posts

Hello again, I'm wondering if there is a NVSE command I can use to add forms to a formlist from another mod, without having that mod as a master? I'm pretty sure I've seen a mod do this before, but can't remember which to check out the script. I assume ismodloaded is the function I need, but how do I go about adding the forms to the formlist? Just adding it to the script gets the expected error of the record not existing. And I assume that if I do it with the mod loaded, then remove it as master, the records will all become null... Can anyone point me in the right direction?

Link to comment
Share on other sites

You can use the BuildRef command:

 

1. First, open the mod in question and check the Form ID of the object you want added to your list. Ignore the two leftmost digits, and use a calculator to convert the remaining six-digit hexadecimal number to decimal.

 

2. Add the following segment to a start-game-enabled quest script:

begin GameMode

	if GetGameRestarted
		if IsModLoaded "[Put the file name here, including extension]"
			set iIndex to GetModIndex "[ditto]"
			set rObjForm to BuildRef iIndex [Decimal Form ID from step 1]
			ListAddForm [YourList] rObjForm
		endif
	endif

end
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...