Jump to content

[Dev/Test/Beta] LL FourPlay community F4SE plugin v43 2023 05 06 v46


About This File

;
;    Shared community library of utility function from LoverLab distributed with FourPlay resources as a F4SE plugin with sources included
;

;    Version 43 for runtime 1.10.163    2021 09 13 by jaam and Chosen Clue and EgoBallistic and Fedim

;    Runtime version: This file should be runtime neutral. The accompanying F4SE plugin (ll_fourplay_1_10_163.dll) is NOT!
;        You need to always use a plugin corresponding with the game version you play.
;        Plugin should be available just after F4SE has been updated for the modified runtime.
;        Runtime versions lower than 1.10.138 will no longer be supported.
;        Written and tested against F4SE 0.6.21. You should not use an older version of F4SE.
;
;
;

 

Known issue: errors in description and untested functionalities.

 

This is the topic for intermediate and/or test versions. The released version will be available as part of the Four_Play Community patch.
This is also where the sources for the released plugin will be found.

 

Current interface and available functions for v42:

Scriptname LL_FourPlay Native Hidden

;
;	Shared community library of utility function from LoverLab distributed with FourPlay resources as a F4SE plugin with sources included
;

;	Version 43 for runtime 1.10.163	2021 09 13 by jaam and Chosen Clue and EgoBallistic and Fedim

;	Runtime version: This file should be runtime neutral. The accompanying F4SE plugin (ll_fourplay_1_10_163.dll) is NOT!
;		You need to always use a plugin corresponding with the game version you play.
;		Plugin should be available just after F4SE has been updated for the modified runtime.
;		Runtime versions lower than 1.10.138 will no longer be supported.
;		Written and tested against F4SE 0.6.21. You should not use an older version of F4SE.
;
;
;

; Returns the version of this script (when someone has not forgotten to update it :) )
Float Function GetLLFPScriptVersion() global
	return 43.0
endFunction

; Returns the version of the plugin and servers to verify it is properly installed.
Float Function GetLLFPPluginVersion() native global

; Custom profile: written into "Data\F4SE\Plugins"
; ===============

; Returns the full path for custom profile name. IE "WhereverYourGameIs\Data\F4SE\Plugins\name". Don't forget to provide the .ini extension.
string Function GetCustomConfigPath(string name) native global

; Get the value of custom config string option
string Function GetCustomConfigOption(string name, string section, string key) native global

; Get the value of custom config integer option (Use 0/1 for boolean)
int Function GetCustomConfigOption_UInt32(string name, string section, string key) native global

; Get the value of custom config float option
Float Function GetCustomConfigOption_float(string name, string section, string key) native global

; Sets the value of custom config string option (at most 66535 characters per option). The directories and path will be created as needed. If the result is false, the set did not happen.
bool Function SetCustomConfigOption(string name, string section, string key, string value) native global

; Sets the value of custom config integer option. The directories and path will be created as needed. If the result is false, the set did not happen.
bool Function SetCustomConfigOption_UInt32(string name, string section, string key, int data) native global

; Sets the value of custom config float option. The directories and path will be created as needed. If the result is false, the set did not happen.
bool Function SetCustomConfigOption_float(string name, string section, string key, float data) native global

; Get all the keys and values contained in a section. Both at once to avoid discrepancies in the order.
;	The keys are in VarToVarArray(Var[0]) as String[] and the values in VarToVarArray(Var[1]) as String[]
Var[] Function GetCustomConfigOptions(string fileName, string section) native global

; Set a list of keys and values in a section. Any other existing key will be left alone.
bool Function SetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global

; Reset all the keys and values contained in a section.
;	Any exiting key value pair will be suppressed first, so providing none arrays will effectivly removes all keys from the section.
bool Function ResetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global

; Get all the sections in a file.
string[] Function GetCustomConfigSections(string fileName) native global

; For all array functions:
;	The implementation as an arbitrary limitation of 32767 bytes buffer for all Keys, Values or sections involved.
;		If needed because the limitation becomes a problem, another implementation can be done using memory allocation, though there will remain a limit imposed by Windows.
;	When arrays for keys and values are provided, the count of elements in both arrays must be identical or the function fails on purpose.
;	An empty value should be provided as a zero length string.	TO BE TESTED

;
;	Camera functions
;	================
;

; Forces the FlyCam state.
;	if activate is true and the FlyCam is not active AND the FXCam is not active either, the FlyCam will be activated.
;	if activate is false and the FlyCam is active, the FlyCam will be deactivated.
;	if the requested state is identical to the current state nothing is done.
;		Returns whether the FlyCam was active or not before the call so mods can restore the previous state if needed.
bool Function SetFlyCam(bool activate) native global

;	TO BE TESTED
; Forces the FlyCam state. Alternative version that allows to pause/unpause the game when entering FlyCam
;	if activate is true and the FlyCam is not active AND the FXCam is not active either, the FlyCam will be activated.
;		if pause then the game will be paused
;	if activate is false and the FlyCam is active, the FlyCam will be deactivated.
;	otherwise if the requested activate is identical to the current state nothing is done.
;		Returns whether the FlyCam was active or not before the call so mods can restore the previous state if needed.
;TBT; bool Function SetFlyCam2(bool activate, bool pause) native global
;	TO BE TESTED - So far this is useless as scripts seem to be stopped while in pause mode :(

; Get the current state of the FlyCam
bool Function GetFlyCam() native global

; Get the current pause state of the game
bool Function GetPaused() native global

; Get the current state of the FXCam
bool Function GetFXCam() native global

; Select the speed at which the FlyCam moves (identical to SetUFOCamSpeedMult/sucsm console command)
;	The console command supports an optional second parameter to control rotation speed.
;	The way it handles default value is not compatible so I use an explicit bool to select which speed to change
;	Returns the previous value of the selected speed.
float Function SetFlyCamSpeedMult(float speed, bool rotation=False) native global

;
;	Power Armor/Race/Skeleton functions
;	===================================
;

;	Returns the actor's race when in PowerArmor
Race Function GetActorPowerArmorRace(Actor akActor) native global

;	Returns the actor's skeleton when in PowerArmor
string Function GetActorPowerArmorSkeleton(Actor akActor) native global

;	Returns the actor's current skeleton, not affected by PowerArmor
string Function GetActorSkeleton(Actor akActor) native global

;Chosen Clue Edit

;
;	String functions
;	================
;

;	Returns the first index of the position the toFind string starts. You can use this to check if an animation has a tag on it. Is not case sensitive.
Int Function StringFind(string theString, string toFind, int startIndex = 0) native global

;	Returns the selected substring from theString. If no length is set, the entire string past the startIndex number is returned.
string Function StringSubstring(string theString, int startIndex, int len = 0) native global

;	Splits the string into a string array based on the delimiter given in the second parameter. 
;	As this function does ignore whitespace, putting a space as the delimiter will only result in a string being returned without spaces.
string[] Function StringSplit(string theString, string delimiter = ",") native global

;	Opposite of StringSplit.
string Function StringJoin(string[] theStrings, string delimiter = ",") native global

;	Converts an integer of any base to a hexadecimal string representation
string Function IntToHexString(Int num) native global

;	Converts a hexadecimal string to an integer
Int Function HexStringToInt(String theString) native global

;
;	Array functions
;	===============
;

;Just a precursor: This does not mean we can use Alias based scripts to store animations like sexlab does, as the F4SE team has yet to include a typedef of them in the F4SE CPP files. I am guessing that they haven't reverse engineered it yet.

Form[] Function ResizeFormArray(Form[] theArray, int theSize, Form theFill = NONE) native global

String[] Function ResizeStringArray(String[] theArray, int theSize, String theFill = "") native global

Int[] Function ResizeIntArray(Int[] theArray, int theSize, Int theFill = 0) native global

Float[] Function ResizeFloatArray(Float[] theArray, int theSize, Float theFill = 0.0) native global

Bool[] Function ResizeBoolArray(Bool[] theArray, int theSize, Bool theFill = False) native global

Var[] Function ResizeVarArray2(Var[] theArray, int theSize) native global

Var[] Function ResizeVarArray(Var[] theArray, int theSize) global
	; Because filling with invalid values will CTD
	; Bugged for any version prior to 14
	; theFill will be ignored, but kept for compatibility. Anyway nobody used it ever as it would have CTD. Please use ResizeVarArray2
	Int theFill = 0
	return ResizeVarArrayInternal(theArray, theSize, theFill)
endFunction

;	if the int theSize is negative, the resulting array is a copy of the original array unchanged.

; Sets the minimum array size required by a mod. Returns false if the current value was greater.
Bool Function SetMinimalMaxArraySize(int theMaxArraySize) native global
; This patches ArrayAdd and ArrayInsert so they respect that maximum. The value is memorised in ToolLib.ini
;[Custom Arrays]
;uMaxArraySize=nnnnnn
;
; !! Creating arrays that are too large will adversaly affect your game !!

;
;	Keyword functions
;	=================
;

; Return the first keyword whose editorID is akEditorID
Keyword Function GetKeywordByName(string akEditorID) native global

; Adds a keyword to a form (not only a reference). Does not persists.
bool Function AddKeywordToForm(Form akForm, Keyword akKeyword) native global

; Delete a keyword from a form (not only a reference). Does not persists.
bool Function DelKeywordFromForm(Form akForm, Keyword akKeyword) native global

; Return an array of all keywords loaded in game.
Keyword[] Function GetAllKeywords() native global

;
;	CrossHair functions
;	====================
;

;	Returns the Reference that is currently under the CrossHair. Returns None if there isn't one currently.
ObjectReference Function LastCrossHairRef() native global

;	Returns the last Actor that is or was under the CrossHair. Returns None until there is one since the game was (re)started.
Actor Function LastCrossHairActor() native global

;
;	ObjectReference functions
;	=========================
;

;	Set the reference display name as a string without token. TO BE TESTED
bool Function ObjectReferenceSetSimpleDisplayName(ObjectReference akObject, string displayName) native global

;
;	Actor functions
;	===============
;

;	Check if the ActorBase has a specific skin. TO BE TESTED
bool Function ActorBaseIsClean(Actor akActor) native global

;	Return the WNAM ARMO of either the actor base or the actor's race
Form Function GetActorBaseSkinForm(Actor akActor) native global

;	Copy the base skin of one actor onto another as a skin override, similar to what LooksMenu does
bool Function CopyActorBaseskinForm(Actor akSourceActor, Actor akDestActor) native global

;	MFG morph function provided by EgoBallistic

;   Apply a MFG Morph to the actor
bool Function MfgMorph(Actor akActor, int morphID, int intensity) native global

;	Set all MFG Morph values to zero on an actor
bool Function MfgResetMorphs(Actor akActor) native global

;	Save an actor's MFG Morph values to an array of float
Float[] Function MfgSaveMorphs(Actor akActor) native global

;	Restore an array of saved MFG morph values to an actor
bool Function MfgRestoreMorphs(Actor akActor, Float[] values) native global

;	Copy the MFG morph values from one actor to another
bool Function MfgCopyMorphs(Actor a0, Actor a1) native global

;	Apply a set of MFG morphs to an actor.  Morph ID morphIDs[x] will be set to values[x]
bool Function MfgApplyMorphSet(Actor akActor, int[] morphIDs, int[] values) native global

;
;	Collision functions
;	===================
;

;	Set the collision state of a reference. Returns the previous state.	TO BE TESTED _ currently fails.
;TBT;	bool Function ObjectReferenceSetCollision(ObjectReference akObject, bool enable=True) native global

;	Get the collision state of a reference. If akObject is None, return the global collision state (controlled by TCL).	TO BE TESTED
;TBT;	bool Function ObjectReferenceGetCollision(ObjectReference akObject) native global

;
;	Cell Functions
;   ==============
;

;	Returns the number of references of type formType in cell. Use GetFormType() below for formType values. If formType is 0 this returns the count of all refs in the cell.
Int Function GetNumRefsInCell(Cell akCell, Int formType) native global

;   Returns nth reference of type formType in cell.  If formType is 0 this returns the nth reference of any type.
ObjectReference Function GetNthRefInCell(Cell akCell, Int index, Int formType) native global

;
;	Misc. Form functions
;	====================
;

;	Returns the Editor ID of a Race. Originally GetFormEditorID, but passing in a form and using the F4SE function GetEditorID() has only worked on Quest and Race forms. So I've just made it for race forms only.
String Function GetRaceEditorID(Race akForm) native global

; Returns the name of the plugin that created a form
String Function OriginalPluginName(Form akForm) native global

; Returns the persistent ID of a form (excluding the load index) Should be compatible with esl files. (Fixed as of v18)
Int Function OriginalPluginID(Form akForm) native global

; Returns whether a form is in a given leveled item list
bool Function GetInLeveledItem(Leveleditem akList, Form akForm) native global

; Return a form's record flags
Int Function GetRecordFlags(Form akForm) native global

; Return a form's formType
Int Function GetFormType(Form akForm) native global

; Return whether form is persistent or not
Bool Function IsPersistent(Form akForm) native global

; Set a form persistent or not. Returns false if form does not exist
Bool Function SetPersistent(Form akForm, bool akFlag) native global

;
;	Misc functions
;	==============
;

;	Prints a message to the debug console. Exposes the internal F4SE function Console_Print using the code found in Papyrutil in Skyrim.
bool Function PrintConsole(String text) native global

;
;	HIDDEN Functions. Never call directly.
;

; hidden function, use ResizeVarArray instead
Var[] Function ResizeVarArrayInternal(Var[] theArray, int theSize, Var theFill) native global

;
;	Wav function (by Fedim)
;

;	Plays a WAV file. FileName relative to "Data\Sound\Voice\"
;	Option is possible "Data\Sound\Voice\MyPlugin\sound001.wav"
Function PlaySoundWav(string FileName) native global

;	Returns the current volume level of the player (-1 = 0xFFFFFFFF -> max)
;	LowWord	  - left channel volume
;	HeighWorg - right channel volume
;	0 <= volume <= 65535 (0xFFFF)
int Function GetVolumeWav() native global

;	Sets the volume of the player channels
;	0 <= volume <=65535 (0xFFFF)
int Function SetVolumeWav(int volumeA, int volumeB) native global

;	Randomly selects a line from the SectionText section of the "Data\F4SE\Plugins\PluginName.ini" file, plays the WAV and returns the text
;	ini file must be UTF-8 encoded
;	Sounds should be in the "Data\Sound\Voice\PluginName.esp\"
String Function VoiceMessage(String PluginName, String SectionText) native global

;
;	INI setting functions
;	=====================
;
;	Functions to retrieve INI settings, e.g. Fallout4.ini, Fallout4Prefs.ini, Fallout4Custom.ini, mod .ini files in Data folder
;	These functions retrieve the settings from the game engine, not from the INI files themselves.
;	Parameter is the .ini setting name and section, fSettingName:SectionName.  For example, fMinCurrentZoom:Camera
;	Note that typing is strict, e.g. you cannot call GetINIFloat on an Int setting
;
; Return Float setting value or 0.0 if not found
float Function GetINIFloat(string ini) native global

; Return Int setting value or 0 if not found
int Function GetINIInt(string ini) native global

; Return Bool setting value or false if not found
Bool Function GetINIBool(string ini) native global

; Return String setting value or NONE if not found
String Function GetINIString(string ini) native global

 


This is a community resource. It can be used in any way you wish in any mod.

 


The released version can be re uploaded on other sites as needed but please do not duplicate on this site.
Any part of the source code not provided as part of F4SE can be reused in your own work as you wish.

 

Use this topic to comment, request and eventually propose new functionalities on the plugin.

 

Also in v3:
Compiled DLL properly named.
Update to KK after test. Proved insufficient then commented out.

 

new in v5:
; Select the speed at which the FlyCam moves (identical to SetUFOCamSpeedMult/sucsm console command)
; The console command supports an optional second parameter to control rotation speed.
; The way it handles default value is not compatible so I use an explicit bool to select which speed to change
; Returns the previous value of the selected speed.
float Function SetFlyCamSpeedMult(float speed, bool rotation=False) native global

 

new in v6:
;
; String functions
; ================
;

 

;Returns the first index of the position the toFind string starts. You can use this to check if an animation has a tag on it. Is not case sensitive.
Int Function StringFind(string theString, string toFind, int startIndex = 0) native global

 

;Returns the selected substring from theString. If no length is set, the entire string past the startIndex number is returned.
string Function StringSubstring(string theString, int startIndex, int len = 0) native global

 

;Splits the string into a string array based on the delimiter given in the second parameter.
;As this function does ignore whitespace, putting a space as the delimiter will only result in a string being returned without spaces.
string[] Function StringSplit(string theString, string delimiter = ",") native global

 

; Opposite of StringSplit.
string Function StringJoin(string[] theStrings, string delimiter = ",") native global

 

new in v7:
;
; Array functions
; ===============
;

 

;Just a precursor: This does not mean we can use Alias based scripts to store animations like sexlab does, as the F4SE team has yet to include a typedef of them in the F4SE CPP files. I am guessing that they haven't reverse engineered it yet.

 

Form[] Function ResizeFormArray(Form[] theArray, int theSize, Form theFill = NONE) native global

 

String[] Function ResizeStringArray(String[] theArray, int theSize, String theFill = "") native global

 

Int[] Function ResizeIntArray(Int[] theArray, int theSize, Int theFill = 0) native global

 

Float[] Function ResizeFloatArray(Float[] theArray, int theSize, Float theFill = 0.0) native global

 

Bool[] Function ResizeBoolArray(Bool[] theArray, int theSize, Bool theFill = False) native global

 

Var[] Function ResizeVarArray(Var[] theArray, int theSize) global

 

; if the int theSize is negative, the reulting array is a copy of the original array unchanged.

 

;
; Misc. Form functions
; ====================
;

 

; Returns the Editor ID of a Race. Originally GetFormEditorID, but passing in a form and using the F4SE function GetEditorID() has only worked on Quest and Race forms. So I've just made it for race forms only.
String Function GetRaceEditorID(Race akForm) native global

 

new in V8:
;
; Keyword functions
; =================
;

 

; Return the first keyword whose editorID is akEditorID
Keyword Function GetKeywordByName(string akEditorID) native global

 

; Adds a keyword to a form (not a reference). Does not persists.
bool Function AddKeywordToForm(Form akForm, Keyword akKeyword) native global

 

; Return an array of all keywords loaded in game.
Keyword[] Function GetAllKeywords() native global

 

new in v9.0
;
; Shared community libray of utility function from LoverLab distributed with FourPlay ressources as a F4SE plugin with sources included
;

 

; Version 9 for runtime 1.10.20 2017 08 31 by jaam and Chosen Clue

 

; Runtime version: This file should be runtime neutral. The accompanying F4SE plugin (ll_fourplay_1_10_20.dll) is NOT!
; You need to always use a plugin corresponding with the game version you play.
; Plugin should be available just after F4SE has been updated for the modified runtime.
; Runtime versions lower than 1.10.20 will no longer be supported.
; Written and tested against F4SE 0.5.0. You should not use an older version of F4SE.
;

 

; Get the value of custom config float option
Float Function GetCustomConfigOption_float(string name, string section, string key) native global

 

; Sets the value of custom config float option. The directories and path will be created as needed. If the result is false, the set did not happen.
bool Function SetCustomConfigOption_float(string name, string section, string key, float data) native global

 

; Returns the name of the plugin that created a form
String Function OriginalPluginName(Form akForm) native global

 

; Returns the persistent ID of a form (excluding the load index) Should be compatible with esl files.
Int Function OriginalPluginID(Form akForm) native global

 

; Sets the minimum array size required by a mod. Returns false if the current value was greater.
Bool Function SetMinimalMaxArraySize(int theMaxArraySize) native global
; This patches add and insert so they respect that maximum. The value is memorised in LL_FourPLay.ini
;[Custom Arrays]
;uMaxArraySize=nnnnnn
;
; !! Creating arrays that are too large will adversaly affect your game !!

 

new in v10:
fix the FxCam offset so the FlyCam works properly
reuploaded v10 without the 1.9 DLL. For 1.9 use v8 version of the DLL

 

new in v11:
compatible with runtime version v1.10.26

 

new in v12:
compatible with runtime version v1.10.40

 

new in v13:
compatible with runtime version v1.10.50

 

new in v14:

   not needed for current version of four_play (nor the current alpha of FP 1.0)

any version prior to 14 had an issue  during ResizeVarArray or ResizeVarArrayInternal due to either copying uninitialized existing data or setting new data to the fill value.

both are replaced with a fixed ResizeVarArray2 which lets the system initilize to null the arrays. (old prototype remains otherwise the papyrus log would complain loudly).

 

new in v15:
compatible with runtime version v1.10.64

 

new in v16:
compatible with runtime version v1.10.75

 

new in v17:
compatible with runtime version v1.10.82

 

new in v18:
compatible with runtime version v1.10.89

fixed OriginalFormID

added DelKeywordFromForm (but it untested at the moment).

 

new in v20:

fix for DelKeywordFromForm.

 

; Get all the keys and values contained in a section. Both at once to avoid discrepancies in the order.
;    The keys are in VarToVarArray(Var[0]) as String[] and the values in VarToVarArray(Var[1]) as String[]
Var[] Function GetCustomConfigOptions(string fileName, string section) native global

 

; Set a list of keys and values in a section. Any other existing key will be left alone.
bool Function SetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global

 

; Reset all the keys and values contained in a section.
;    Any exiting key value pair will be suppressed first, so providing none arrays will effectivly removes all keys from the section.
bool Function ResetCustomConfigOptions(string fileName, string section, string[] keys, string[] values) native global

 

; Get all the sections in a file.
string[] Function GetCustomConfigSections(string fileName) native global

 

; For all array functions:
;    The implementation as an arbitrary limitation of 32767 bytes buffer for all Keys, Values or sections involved.
;        If needed because the limitation becomes a problem, another implementation can be done using memory allocation, though there will remain a limit imposed by Windows.
;    When arrays for keys and values are provided, the count of elements in both arrays must be identical or the function fails on purpose.
;    An empty value should be provided as a zero length string.    TO BE TESTED

 

;
;    CrossHair functions
;    ====================
;

;    Returns the Reference that is currently under the CrossHair. Returns None if there isn't one currently.
ObjectReference Function LastCrossHairRef() native global

;    Returns the last Actor that is or was under the CrossHair. Returns None until there is one since the game was (re)started.
Actor Function LastCrossHairActor() native global

 

;

;    Misc functions
;    ==============
;

;    Prints a message to the debug console. Exposes the internal F4SE function Console_Print using the code found in Papyrutil in Skyrim.
Function PrintConsole(String text) native global
 

v21: Same as v20 but with the correct DLL.

 

new in v22:
compatible with runtime version v1.10.98

 

 

new in v24:
compatible with runtime version v1.10.106

 

new in v25:
DELETED.

 

new in v26:
compatible with runtime version v1.10.111

 

new in v27:
compatible with runtime version v1.10.114 (untested for now but should work).

 

new in v28:

;    Return the WNAM ARMO (skin mesh) of either the actor base or the actor's race
Form Function GetActorBaseSkinForm(Actor akActor) native global

 

new in v29:
compatible with runtime version v1.10.120 (untested for now but should work).

 

new in v30:

; Returns whether a form is in a given leveled item list
bool Function GetInLeveledItem(Leveleditem akList, Form akForm) native global

 

new in v31:
compatible with runtime version v1.10.130

 

new in v32:
compatible with runtime version v1.10.138

 

new in v33:

Bug fix for LastCrossHairActor by EgoBalistic.  (Possible CTD, so please update)

 

new in v34:

Bug fix for SetMinimalMaxArraySize by EgoBalistic

 

new in v35:

new MFG morph functions and Scaleform integration by EgoBallistic.

 

;    MFG morph function provided by EgoBallistic

 

;   Apply a MFG Morph to the actor
bool Function MfgMorph(Actor akActor, int morphID, int intensity) native global

 

;    Set all MFG Morph values to zero on an actor
bool Function MfgResetMorphs(Actor akActor) native global

 

;    Save an actor's MFG Morph values to an array of float
Float[] Function MfgSaveMorphs(Actor akActor) native global

 

;    Restore an array of saved MFG morph values to an actor
bool Function MfgRestoreMorphs(Actor akActor, Float[] values) native global

 

;    Copy the MFG morph values from one actor to another
bool Function MfgCopyMorphs(Actor a0, Actor a1) native global

 

;    Apply a set of MFG morphs to an actor.  Morph ID morphIDs[x] will be set to values[x]
bool Function MfgApplyMorphSet(Actor akActor, int[] morphIDs, int[] values) native global

 

new in v37:
compatible with runtime version v1.10.162 and both F4SE 0.6.18 and 0.6.19

 

new in v38:
compatible with runtime version v1.10.163 and 0.6.20/0.6.21

 

new in v39:

new functions provided by EgoBallistic:

 

;    Converts an integer of any base to a hexadecimal string representation
string Function IntToHexString(Int num) native global

;    Converts a hexadecimal string to an integer
Int Function HexStringToInt(String theString) native global

 

;    Copy the base skin of one actor onto another as a skin override, similar to what LooksMenu does
bool Function CopyActorBaseskinForm(Actor akSourceActor, Actor akDestActor) native global

 

;    Cell Functions
;   ==============
;

;    Returns the number of references of type formType in cell. Use GetFormType() below for formType values. If formType is 0 this returns the count of all refs in the cell.
Int Function GetNumRefsInCell(Cell akCell, Int formType) native global

;   Returns nth reference of type formType in cell.  If formType is 0 this returns the nth reference of any type.
ObjectReference Function GetNthRefInCell(Cell akCell, Int index, Int formType) native global

 

; Return a form's record flags
Int Function GetRecordFlags(Form akForm) native global

; Return a form's formType
Int Function GetFormType(Form akForm) native global

 

new in v40:

 

;
;    Wav function (by Fedim)
;

;    Plays a WAV file. FileName relative to "Data\Sound\Voice\"
;    Option is possible "Data\Sound\Voice\MyPlugin\sound001.wav"
Function PlaySoundWav(string FileName) native global

;    Returns the current volume level of the player (-1 = 0xFFFFFFFF -> max)
;    LowWord      - left channel volume
;    HeighWorg - right channel volume
;    0 <= volume <= 65535 (0xFFFF)
int Function GetVolumeWav() native global

;    Sets the volume of the player channels
;    0 <= volume <=65535 (0xFFFF)
int Function SetVolumeWav(int volumeA, int volumeB) native global

;    Randomly selects a line from the SectionText section of the "Data\F4SE\Plugins\PluginName.ini" file, plays the WAV and returns the text
;    ini file must be UTF-8 encoded
;    Sounds should be in the "Data\Sound\Voice\PluginName.esp\"
String Function VoiceMessage(String PluginName, String SectionText) native global

 

compatible with runtime version v1.10.163 and 0.6.20/0.6.21

 

v40 was not properly packaged (same content as v39). V41 contains the correct compiled files to use.

 

new in v42:

; Return whether form is persistent or not
Bool Function IsPersistent(Form akForm) native global

; Set a form persistent or not. Returns false if form does not exist
Bool Function SetPersistent(Form akForm, bool akFlag) native global


new in v43

 

Ported from SKSE by EgoBallistic

 

;
;    INI setting functions
;    =====================
;
;    Functions to retrieve INI settings, e.g. Fallout4.ini, Fallout4Prefs.ini, Fallout4Custom.ini, mod .ini files in Data folder
;    These functions retrieve the settings from the game engine, not from the INI files themselves.
;    Parameter is the .ini setting name and section, fSettingName:SectionName.  For example, fMinCurrentZoom:Camera
;    Note that typing is strict, e.g. you cannot call GetINIFloat on an Int setting
;
; Return Float setting value or 0.0 if not found
float Function GetINIFloat(string ini) native global

 

; Return Int setting value or 0 if not found
int Function GetINIInt(string ini) native global

 

; Return Bool setting value or false if not found
Bool Function GetINIBool(string ini) native global

 

; Return String setting value or NONE if not found
String Function GetINIString(string ini) native global

 

New in v44

 

New functions by EgoBallistic

 

; Return an Actor's actor flags (not the same as the Form flags)
Int Function GetActorFlags(Actor akActor) native global

 

;   Reset an actor's persistent Essential / Protected data
;    Calling Actor.SetEssential() overrides the actor base value. Changing the state on the actor base will no longer have any effect, and

;    neither will the Essential flag on Aliases.  This function resets the override so ActorBase and alias flags will work again.
bool Function ResetActorEssential(Actor akActor) native global

 

; Return an array of all the forms in a FormList
Form[] Function FormListToArray(FormList akFormList) native global

 

; Return the form with the given formID from any type of plugin (esm, esl, esp)
Form Function GetFormFromPlugin(String modName, Int formID) native global

 

; Return an array of forms given an array of plugin names and an array of form IDs
Form[] Function GetFormArray(String[] modNames, Int[] formIDs) native global

 

; Populate a formlist with the forms given an array of plugin names and a corresponding array of form IDs
Function PopulateFormlist(FormList akFormList, String[] modNames, Int[] formIDs) native global

 

;
;    Animation functions
;    ===================
;
;    Functions to play animations on actors. They do basic sanity checking on the inputs so that None idles and actors,
;    actors who are deleted or disabled, and actors with no AI middle process will not attempt to play idles.
;
; Make one actor play an idle
Function PlayIdle(Actor akActor, Form akIdle) native global

 

; Make multiple actors play idles, in synch
Function PlayMultipleIdles(Actor[] akActor, Form[] akIdle) native global

 

New in v46

 

- Fixed Hex to int conversion

- Catch with the latest F4SE sources (v0.6.23)

- Fixed HexStringToInt() so that values above 0x00FFFFFF are handled correctly

- Fixed PopulateFormList() so that formlist additions are persistent between saves

 

 

Other files:
Test-LLFP-vX-YYYYMMDD contains the current version of the test and verification mod for the plugin.
Src-LLP-vX-YYYYMMDD contains version X source files and compiled resources for developers.

 

Edited by jaam
Various fixes


What's New in Version v46

Released

- Fixed Hex to int conversion

- Catch with the latest F4SE sources (v0.6.23)

- Fixed HexStringToInt() so that values above 0x00FFFFFF are handled correctly

- Fixed PopulateFormList() so that formlist additions are persistent between saves

 


×
×
  • 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