Jump to content

Any tuts on creating mods using the LPK framework?


Recommended Posts

I'm interested in making lover's mods using lpk, but I'm not sure how to go about it.

I have looked at the scripts in lpk.esm and other lovers mods to see what is being used, but it seems to vary amongst mods.

 

Does anyone have any insight or links on how to get started? I'm not making anything specific. 

Thanks in advance. 

Edited by ISNAN
Link to comment

scn aLoversMim ;actor

int foff   ;nude bits
int fdef   ;nude bits
ref tar   ;actor1
ref me   ;actor2

 

begin OnActivate ;actor

set me to GetSelf
set tar to GetActionRef


if tar.IsActor==1


         if Call xLoversCmnIsReady tar   ; ready or not sub function LPK
        if Call xLoversCmnIsReady me   ; ready or not
            Let foff := 8+1024   ;nude bits
            Let fdef := 8+1024   ;nude bits
            set xLoversQuest.Offence to me
            set xLoversQuest.Deffence to tar
            set xLoversQuest.SPos to 1 ;pose

            set xLoversQuest.OffNudeFlag to foff    ;nude
            set xLoversQuest.DefNudeFlag to fdef   ;nude

            tar.Call xLoversMainSafeStart   ;start sex on tar(player) point
        endif
        endif

endif


ACTIVATE
end

Link to comment

You will need to add a callback system.  Easy.

 

First off, you want your actual callback.  This script adds your conditions to the actual sex system.

 

scn xMyCallbackScript

; FUNCTION:  An example... oh and ';' semicolons show that this is a comment

;; Define values for script
short trg                            ; Function Parameter:  Trigger activity
ref offence                          ; Function Parameter:  Offensive/Aggressive Actor
ref defence                          ; Function Parameter:  Defensive/Submissive Actor
short flag                           ; Function Parameter:  Stage flag

Begin Function { trg offence defence flag }

    if trg == 1
        ;; DO STUFF HERE when sex starts
    endif

    if trg == 2
        ;; DO STUFF HERE when sex ends
    endif   

    if trg == 4
        ;; DO STUFF HERE when handling orgasm
    endif

End

 

 

The above code adds content to the sex system... but it must ITSELF be linked to the sex system.   You need to create a QUEST script that executes when your game starts that will link it to the game:

 

scn xMyQuestScript

; FUNCTION:  Yadda yadda yadda... I start running

;; Define values for script
ref r0                               ; Quest Variable:      Temporary actor reference

Begin GameMode

    ;; Perform on game start/restart
    if GetGameLoaded || GetGameRestarted

        ;; Make a callback when sex starts
        Call xLoversCmnCallbackEntry 1 xMyCallbackScript r0 r0
        ;; Make a callback when sex ends
        Call xLoversCmnCallbackEntry 2 xMyCallbackScript r0 r0
        ;; Make a callback when orgasming
        Call xLoversCmnCallbackEntry 4 xMyCallbackScript r0 r0

    endif

End

 

This is primitive...  IF your game starts or restarts, it sets up (or re-applies in case) the 'xMyCallbackScript' to the sex system by way of the xLoversCmdCallbackEntry script.  The first one is set with a '1' showing it operates this callback when sex starts, the '2' when sex ends and '4' works when orgasming.

 

Certainly, the quest script for a mod MAY be a bit more lengthy than this... this being kinda bare minimum when adding to the quest system.

Link to comment

Thanks Dukky! This works incredibly well. 

 

I'm starting to get an idea of how the LPK system works. I'm getting ideas already and I think these examples will give me a blueprint for dissecting other lover's mods in order to expand my knowledge. 

 

Much appreciated guys!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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