Jump to content

Adapting Masturbate lesser power script for futa PC


Recommended Posts

The three conditions were left in for throw backs of old LPK settings and codes.  This was done so that if someone decided to use a non-LAPF animation they could select a static dick mesh of their choice futa.  With the code left in there, they would not have to look long for what to change.  This was my piss poor attempt to maintain backward compatibility as much as possible.  My coding fu is quite weak and easy to spot.   :blush:

Link to comment

The three conditions were left in for throw backs of old LPK settings and codes.  This was done so that if someone decided to use a non-LAPF animation they could select a static dick mesh of their choice futa.  With the code left in there, they would not have to look long for what to change.  This was my piss poor attempt to maintain backward compatibility as much as possible.  My coding fu is quite weak and easy to spot.   blush.gif

 

It was a part of your plan, then. Well, nobody has guessed it right. Not a bad idea I think. Except that it wasn't commented out.

 

 

 

Anyways, if the futa rolls must be memorized and re-used in the future, you could just store them somewhere just as setbody does. (or give them a token, for that matter) And as far as I can tell there is no individual futa setting in LAPF. It's just a matter of whether the girl is in offensive or not, and whether the global futa setting is on or off.

Link to comment

as far as I can tell there is no individual futa setting in LAPF. It's just a matter of whether the girl is in offensive or not, and whether the global futa setting is on or off.

 

So my idea of an all-encompassing NPC identification lacks a solid basis. Nevermind, I will limit the scope to the MB2 plugin.

Thanks Greg for your contribution.

 

Link to comment

By the way, in case I wish to use values from variables belonging to external plugins/scripts (like DefaultFutaType for instance), what's the best way to do it?

Looks no one has come up with an answer, but I was thinking... since LoverswithPK.esm is the master, it will be a fair bet assuming the existence of both LoverswithPK.esp and LoverswithPK.ini.

A call to

RunBatchScript "Data\ini\Lovers with PK.ini"

can be issued from any script present in MB2.

Am I right?

 

EDIT

I'm really sorry. Thank you for your patience, varenne.

Link to comment

 

The three conditions were left in for throw backs of old LPK settings and codes.  This was done so that if someone decided to use a non-LAPF animation they could select a static dick mesh of their choice futa.  With the code left in there, they would not have to look long for what to change.  This was my piss poor attempt to maintain backward compatibility as much as possible.  My coding fu is quite weak and easy to spot.   blush.gif

 

It was a part of your plan, then. Well, nobody has guessed it right. Not a bad idea I think. Except that it wasn't commented out.

 

No, I actually knew, no guessing involved, I was just trying to be nice about it.  ;)

Link to comment

 

By the way, in case I wish to use values from variables belonging to external plugins/scripts (like DefaultFutaType for instance), what's the best way to do it?

Looks no one has come up with an answer, but I was thinking... since LoverswithPK.esm is the master, it will be a fair bet assuming the existence of both LoverswithPK.esp and LoverswithPK.ini.

A call to

RunBatchScript "Data\ini\Lovers with PK.ini"

can be issued from any script present in MB2.

Am I right?

 

 

I'm not sitting at my desk waiting for LL posts, I have other priorities at the moment. (And I'm not being mean, it's just my current reality.)

 

And no, I don't think a call to a batch script/ini other than MB2's is the best way to go. Why initiate an ini twice??? Under what scenario would you need to?

 

To find that futa variable and setting in Lovers w/PK you'll need to read through the scripts. Since it set from the main spell and menu, shouldn't be too hard to find. In CS/E, first find the spell, then the script that fires from it. Then the menu, sub menus and then finally the exact text for the set futa choice. There may be other scripts that are related to the main one to look at too. 

 

Were I to actually put my mind and focus into working on this right now, the first thing I'd do is figure out a call from one of the MB2 scripts, for the futa variable setting that is applied by Lovers w/PK. That is typically set to what ever the player normally uses, and hardly ever changes. Then comment out the legacy support stuff and test it (MB2) on NPCs. If it works, then proceed to figure out how to make it work for your PC. 

 

That alone should keep you busy for quite a while.

Link to comment

Reading lpk ini won't get you any variable in there. It will just reinitialize LPK, not MB2, as runBatchScript does not care where it was called from. And LPK ini is not meant to be read without the user's permission. Plus, LPK ini doesn't have any real setting, they are all fakes and LPK's ini process function converts them.

Just reference them directly from LPK esm. Even if a certain setting is present in LPK esp rather than in esm, you still can get the form and get any type of variable anyway. You can even set any type of variable to any value you want. All the LPK settings can be accessed through the setting spell, so that's what you have to look into.

Link to comment

I don't necessarily see it as nonsense and wasting anyone's time. You are experiencing a high level of enthusiasm, all that is needed is help in finding your path forward, so that you focus that energy into a positive outcome and result. You need to pick one MOD and one feature to improve on, then the next and the next, etc. If you attempt to do too much all at once you'll drive yourself nuts. Navigating through the sea of Lovers MODs is challenging and can be at times even chaotic. Set yourself up a plan, identify areas where you will need to gain knowledge and implement it. Very much like new members wanting to do every MOD at once, with little to no prerequisite reading on their part, it's doomed to fail or be exceedingly frustrating.

Link to comment
  • 4 weeks later...

Ok, I've been busy taking a look at the main LoversSettings Spell in LPK esm/esp as varenne and movomo suggested. These are my findings.

 

In LPK esp, the main Settings spell calls different children scripts for each menu.

The script for "Body and (Un)dressing settings" (which no doubt is related to the futa settings) is

xLoversPkrSettingNudeSpellScript

and the code for setting the default futa body type through menus is located at lines 110-214:

 

 

    elseif step==4            ;Set Default Penis/Futa init

        let arList := Call xLoversPkrGetBodyTypeLabel

        set s1 to 0

        set step to 5



    elseif step==5            ;Set Default Penis/Futa main

        let str1 := arList[s0][ s1 + 0 ]

        let str2 := arList[s0][ s1 + 1 ]

        let str3 := arList[s0][ s1 + 2 ]

        let str4 := arList[s0][ s1 + 3 ]

        let str5 := arList[s0][ s1 + 4 ]



        if ( s0 == 0 )

            let str0 := "Futa Default (" + arList[s0][xLoversPkrQuest.DefaultFutaType] + ")"

        else

            let str0 := "Penis Default (" + arList[s0][xLoversPkrQuest.DefaultPenisType] + ")"

        endif

        MessageBox $str0 $str1 $str2 $str3 $str4 $str5 "Next Page->" "<-Previous Page" "Back"



        sv_Destruct str0 str1 str2 str3 str4 str5



        set buttonwait to 1

        set step to 6



    elseif step==6            ;Set Default Penis/Futa decision

        set step to 5

        if button==7

            set step to 7

        elseif button==5

            let s1 += 5

            if s1 >= 10

                set s1 to 0

            endif

        elseif button == 6    ;prev

            let s1 -= 5

            if s1 < 0

                set s1 to 10-5

            endif

        else

            set s2 to s1 + button

            if Call xLoversPkrCheckBodyTypeExist s2 s0

                let str0 := arList[s0][s2]

                if ( s0 == 0 )

                    MessageEx "Females have been assigned default body type %z." str0

                    set xLoversPkrQuest.DefaultFutaType to s2

                else

                    MessageEx "Males have been assigned default body type %z." str0

                    set xLoversPkrQuest.DefaultPenisType to s2

                endif

                sv_Destruct str0

                set step to 7    ;end

            else

                MessageBoxEx "Body type %.0f does not exist.  Please select a different one." s2

            endif

        endif



    elseif step==7            ;Set Default Penis/Futa cleanup

        let arList := ar_Null

        set step to 2



    elseif step==12        ;???????(1/2)

        if xLoversPkrQuest.FutanariDisabled == 0

            let str0 := "On"

        else

            let str0 := "Off"

        endif

        if xLoversPkrQuest.UnequipUnplayableEnabled

            let str1 := "On"

        else

            let str1 := "Off"

        endif

        if xLoversPkrQuest.RetryUnequipEnabled

            let str2 := "On"

        else

            let str2 := "Off"

        endif

        MessageBoxEx "[Settings For Body And (Un)Dressing]|Settings For Male Undressing|Settings For Female Undressing|Rape Undressing Settings|Penis Display Settings|Attacking Woman Grows Penis (on/off): %z|Unequip Nonplayable Equipment: %z|Re-equip again when equip during sex: %z|Remove Stripping Exceptions|Back" str0 str1 str2

        sv_Destruct str0 str1 str2

        set buttonwait to 1

        set step to 13



    elseif step==13            ;????(1/2)??

        set step to -1    ;END

        if button==0 || button==1    ;0=???? / 1=????

            set mode to button

            set page to 0        ;Rev35

            set step to 14

        elseif button==2    ;Rev86 ????????

            set step to 100

        elseif button==3    ;Chinupo

            set step to 2

        elseif button==4    ;????

            if xLoversPkrQuest.FutanariDisabled == 0

                set xLoversPkrQuest.FutanariDisabled to 1

            else

                Let i0 := Call xLoversPkrCheckFutanariFile

                if i0

                    set xLoversPkrQuest.FutanariDisabled to 0

                else

                    MessageBoxEx "To view a hermaphrodite, you must download and install a separate mesh data hermaphrodite.%r For more information, please consult the readme file."

                endif

            endif

            Call xLoversPkrSetGlobalVar    ;Rev24

            Call xLoversPkrCheckBoners xLoversPkrQuest.Pose1Chinupo    ;Rev50

            set step to 12

        elseif button==5    ;?Playable

            set xLoversPkrQuest.UnequipUnplayableEnabled to (xLoversPkrQuest.UnequipUnplayableEnabled == 0)

            if xLoversPkrQuest.UnequipUnplayableEnabled

                MessageBoxEx "Unequipping nonplayable equipment is not something most modders want you to do and it can have side effects.%r (For example, an item that changes the look of a chracter from a race mod)"

            endif

            set step to 12

        elseif button==6    ;???

            set xLoversPkrQuest.RetryUnequipEnabled to (xLoversPkrQuest.RetryUnequipEnabled == 0)

            set step to 12

        elseif button==7    ;Remove Stripping Exceptions

            ;Cleanup array first

            if ( xLoversPkrQuest.arStripExceptions == 0 )    ;Uninitialized, should never happen

                let xLoversPkrQuest.arStripExceptions := ar_Construct Array

            endif

            set i0 to ar_Size xLoversPkrQuest.arStripExceptions

            while ( i0 > 0 )

                let i0 -= 1

                let r0 := xLoversPkrQuest.arStripExceptions[i0]

                if IsFormValid r0 == 0

                    ar_Erase xLoversPkrQuest.arStripExceptions i0

                endif

            loop

            set page to 0

            set step to 20

        endif

 

 

 

Lines 212 and 213 look exactly what we're looking for:
            Call xLoversPkrSetGlobalVar    ;Rev24
            Call xLoversPkrCheckBoners xLoversPkrQuest.Pose1Chinupo    ;Rev50

 

Details for xLoversPkrSetGlobalVar

This is a helper script, called also by the following scripts:

xLoversPkrSettingSpellScript (the main Setting Spell, line 97 - stores the main menu settings I think)
xLoversPkrQuestInit    (line 280  - use here is cryptic, at least for me)
xLoversPkrSettingEffectSpellScript (occurs at lines 154, 164, 185 but not interesting for our goals SPECTATORS)
xLoversPkrSettingMotionSpellScript (line 86 but not interesting for our goals ENABLE MOTION during orgasm)

Basically this script writes down the LPK ini values in the matching global variables (GxLoversPkrFutanari among them).
I bet this is relevant and must be somehow called in MB2 at some point.

 

Details for xLoversPkrCheckBoners

This helper script is also used by

xLoversPkrQuestInit   (5 occurrences between lines 230-239, they look interesting), code:

 

 

    ;Rev49 Chinupo?????

    if xLoversPkrQuest.Pose1Chinupo != -1

        if 0 == Call xLoversPkrCheckBoners xLoversPkrQuest.Pose1Chinupo

            set xLoversPkrQuest.Pose1Chinupo to -1    ;Chinupo?????

            ;?????????

            if Call xLoversPkrCheckBoners 0

                set xLoversPkrQuest.Pose1Chinupo to 0

            elseif Call xLoversPkrCheckBoners 1

                set xLoversPkrQuest.Pose1Chinupo to 1

            elseif Call xLoversPkrCheckBoners 2

                set xLoversPkrQuest.Pose1Chinupo to 2

            elseif Call xLoversPkrCheckBoners 3

                set xLoversPkrQuest.Pose1Chinupo to 3

            endif

        endif

    endif

 

 

 

and by

xLoversPkrQuestIniRead (1 occurrence at line 79) 

This however is for reading the LPK ini file and should not be relevant.

 

I feel I can't get anywhere further, at this moment, unless some kind (and experienced) LL user/modder finds the time to throw in some suggestion.

Thanks in advance.  

Link to comment

@movomo

Recap:

1. Based on a code review MB2 has nothing to trigger a futa lower body, that's what's missing.

 

2. MB2 has a lower body setting to be used during MB2 animations, that's all.

 

3. It also has an auto mode, setting 0, but I don't think it's working as intended.

Facts:

1. MB2 uses the lapf lowerbody for NPCs (this is something I'd wish to change, later, to include Setbody support).

2. There is a futanari chance setting for NPCs that works fine (futa NPCs have male animation when hit by Instill Lust spell)

3. (odd, but positive fact)  PC mantains the setbody lowerbody. MB2 body type setting doesn't affect PC.

(This is true only for female PCs, see movomo's comment below)

4. Female PC is also an exception, in that she's limited to female animation when casting Masturbate.

 

For now, I'm focusing on ways to implement the male animation for PC characters marked as futanari by an additional setting to be added in LoversMB2.ini

Link to comment

As I see it, currently MB2 scripts look overly complicated than needed. It's always important keep the code readable.

 

Anyways, the third one, because rPlayerBoners is applied only when the pc is male. I suppose it will not maintain male pc's setbody body, am I correct? I haven't tested. This might matter when you have to add setbody support in the future.

 

As to how to trigger male animation for a female actor... What MB2 spell script essentially does is to mimic sex routine of the main Lovers plugin. Oddly enough though, we don't find anything special that is supposed to trigger animations, other than occasional pickidle command. Well, that's because this is all that is needed. There are other ways, but this is the lovers way.

 

Take a look at how the idle anim conditions are set up. In particular, xLMBMale. If the actor is male, then it evaluates to a male animation without question because it's "OR" condition. What can we do if we want to force a male animation without making the actor a male? Perhaps an override variable in the quest, or if you're worried about odd situations (such as multiple folks having fun at the same time) perhaps another token.

Well, this can be a bit tricky at times (conditions and anim priorities are quite easy to fuck up, that's why lovers idle anim priority plugin is there), but shouldn't be too difficult. How exactly this is implemented is up to you I guess.

Link to comment

As I see it, currently MB2 scripts look overly complicated than needed. It's always important keep the code readable.

I got the same impression when looking at the code. I do have some knowledge of Pascal and Java programming. The script language (and OBSE extensions to it) are quite new to me, but I can learn as I go, since I already have a grasp of the basic concepts.

Anyways, the third one, because rPlayerBoners is applied only when the pc is male. I suppose it will not maintain male pc's setbody body, am I correct? I haven't tested. This might matter when you have to add setbody support in the future.

Exactly. Tested with a new character. Usually I use Robert's muscular for all male (for compatibility), so I wouldn't even have noticed if you didn't bring this to my attention. Tried using Room 207's Bodybuilder and yes, the lowerbody is set to Robert's Muscular by LAPF. Just horrible. "The man cut in half". This must be dealt with, but as I said, one thing at a time.

Take a look at how the idle anim conditions are set up. In particular, xLMBMale.

I'm not sure what part of the code you're referring to.

 

Thanks for the valuable input, I'll try and put it to good use.

Link to comment

I mean, the menu. Not anywhere of the code. Gameplay -> Idle Animations... thing. There you will find the MB-specific entries as you expand the treeview.

 

The pickIdle function (it must be called on every masturbation stage change; whether timed change or keypressed change) forces the actor to re-evaluate their current animation choice. Once the situation meets the requirements of any of them, then the actor plays it.

 

I think Oblivion language resembles Pascal a lot. I guess you will get the hang of it very quickly. Anyways, good luck!

Link to comment

What can we do if we want to force a male animation without making the actor a male? Perhaps an override variable in the quest, or if you're worried about odd situations (such as multiple folks having fun at the same time) perhaps another token.

movomo, can you please be more specific about the 'multiple folks having fun at the same time' thing? It appears that such a thing isn't handled anywhere in the original LoversMB2, and besides I'm trying to overhaul only the player's behavior. I'd rather leave things as they are for now, and use the override variable approach. This is what I have in mind:

 

the script xLoversMB2SpellSelfSC itself is fine, the only thing to change is the condition for playing xLBMale and xLMBFemale idle animations. We could introduce a new script variable in LoversMB2.ini (sPCFutanari). This is loaded at runtime in xLoversMB2QuestSC script, when the mod is initialized, and its content copied in a new global variable GxLMBFutanari.

 

At this point, the only thing left is to change the Idle anim conditions for xLMBMale and xLMBFemale as follows:  

xLMBMale is to be played also when player.GetIsSex == Female AND GetGlobalValue(GxLMBFutanari) == 1,

xLMBFemale is to be played when player.GetIsSex == Female AND GetGlobalValue(GxLMBFutanari) == 0,

 

all the remaining conditions still standing (GetItemCount checks on the animation tokens).

What do you think?

Link to comment

 

all the remaining conditions still standing (GetItemCount checks on the animation tokens).

 

 

What do you think?

 

 

Try it. Make a backup copy of the orginal script, change the code, recompile just those scripts you edit (hopefully you're using CS/E at this point) and run Oblivion.

 

Worse that'll happen is Oblivion will CTD or lockup when you initiate the MB2 spell. Or the spell just won't work. You may need to add some debug code, so you can monitor it via the console or on screen in-game.

Link to comment

That looks fine enough if you're only interested in changing PC's behavior. Though I'd avoid using globs. It can almost always be altered with a quest var.

It looks to me like you can trigger male animation without adding any new variable if you adjust the scripts a bit. Try giving PC "xBone1" or "xLoversPkrFutanari001" two and see what happens?

 

The problem of this variable approach is that a variable can hold only one information at a time. And in addition, you have to check if the actor is PC or not as well.

You have to rework the system if you ever get to override npcs' as well.

So.. nah, I think token is better. I think PC-only override is making things more complicated.

 

For example... I'd make it completely gender-independent.

If the actor has some_female_token (this is different from the actual lowerbody item, just a token), then he/she plays female animation, otherwise male animation. Then all you need to do is to give them the token if you're certain it's non-futa female.

Or in the other way around, male token instead of female token. Shouldn't matter.

Other "normal" loves animations work similarly too. Offense animation when have an offense token, defense animation if difense token, it doesn't need gender. Otherwise it would have been much complicated to handle homo sex.

Link to comment

@varenne

Sure, I'm using CSE now. I have even gained the achievement of "Pedantic Modder" for editing a mod's header, the other day ;)

Thanks for suggesting the use of debug code.

 

@movomo

Your comment anticipated every single problem I've encountered during my tests.

So far I managed to tweak the conditions in every possible way without disrupting the NPC behavior. In one occasion I even prevented my character from playing the female animation, but the male animation didn't occur and the PC was standing, unconscious throughout the animation cycle, until the exaustion and recover phase.

I found it very difficult to set up complex animation conditions. If this were an ordinary programming language, I could nest an arbitrary number of conditions and have a higher control on the evaluation priority using "()". The Animation Editor instead places OR and AND at the end of each condition, just like they were unary operators, so I'm confused big time. The CS wiki is not much of help, it only states that "Consecutive ORs are treated like a single block when evaluating and have order preference over AND".

 

I came to realize on my own that there's no easy way of putting together gender, PC/NPC choice, type of animation, type of boners. Before reading your comments, I was almost persuaded of the need for additional siblings in the animation tree. Yes, better to get rid of the global and using a quest variable - but probably adding a token is the best option, and also the idea of making the whole thing gender independent is captivating.

I'll try each method, or a combination of them, we'll see.

 

Link to comment

I'm on the verge of release.

 

NEW IN REVISION 4 (20150430)
- Fixed a typo in LoversMB2.ini at line 1 (prefix xLoversMB2Quest. was used twice)
- Introduced a new quest variable, present in LoversMB2.ini and in xLoversMB2Quest:
 
xLoversMB2Quest.sPCFutanari

The ini value is loaded in xLoversMB2QuestSC script when the mod is initialized.

The script xLoversMB2SpellSelfSC required modifications:
- at line 244, the 'if' statement condition has been changed to include the futanari case *
- at line 400 and below, a couple of nested 'if' were added, to prevent futanari from equipping bottom slot.
  (I'm not sure it was necessary, and perhaps I did it the wrong way, needs review)

- Changed the Idle anim conditions for xLMBMale only:

(see attached picture)  EditorWindow1.7z

 

Both PC and NPCs have the right animations in place, I've tested with:

Male PC, female PC futa, female PC, checking also Instill Lust on male, female NPC, female NPC futa.

Works great, except for one thing:

female PC futa has missing boners...

I've tested first with the custom Bombshell body I play with, and then using the default LAPF body.  

(*) The reason may be the condition at line 244. I will try restoring the original and see what happens.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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