ISNAN Posted January 22, 2022 Posted January 22, 2022 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.
TDA Posted January 22, 2022 Posted January 22, 2022 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
ISNAN Posted January 22, 2022 Author Posted January 22, 2022 Wow, that worked like a charm! Thanks man! This will give me a base to work from. Is there a call for when sex has finished? For instance if I wanted to set a variable or add an item.
LongDukDong Posted January 23, 2022 Posted January 23, 2022 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.
ISNAN Posted January 23, 2022 Author Posted January 23, 2022 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.