Jump to content

Simple mod not firing


Recommended Posts

Posted

Greetings,

 

One for the modders out there. I fancy having a go at modding for Skyrim but I have hit a hurdle straight off. I have a quest with a simple dialogue. Player picks a topic and the NPC should start sex with them.

 

The End of Dialogue has the Papyrus fragment

 

(GetOwningQuest() as sslMM_Dialogue).SexCall(akSpeaker)
 

 

Which calls a script with Sexlab as a property....

 

 

 

 

Scriptname sslMM_Dialogue extends Quest  

SexLabFramework property SexLab auto

function SexCall(Actor SpeakerRef)

debug.messagebox (SpeakerRef)

    ; // Create our actor array using our chosen actor references
    actor[] sexActors = new actor[2]
    sexActors[0] = Game.GetPlayer()
    sexActors[1] = SpeakerRef

debug.messagebox (sexActors[0])
debug.messagebox (sexActors[1])

    ; // Initialize our animation array as empty, so SexLab will pick the animations based on defaults
    sslBaseAnimation[] anims

    ; // "Buisness Time"
    SexLab.StartSex(sexActors, anims)

endfunction

 

 

 

 

 

Straight copy from the handy guide as you can see but for some reason the StartSex function will not fire. The debugs are showing the variables are being populated and it compiles fine. I am sure it must be something really simple and it is annoying the hell out me. The spells in the same mod (Matchmaker) work just fine.

 

Sadly with Papyrus being created by some sadist somewhere, reverse engineering a working mod is proving less than fruitful.

 

Any pointers gratefully received.

 

Ichabod

Posted

Hmm maybe this is a problem, I think "sslBaseAnimation[] anims" is not empty array, it's "none". This is empty array "sslBaseAnimation[] anims = new sslBaseAnimation[0]".

 

Also this has nothing to do with the problem but you could just do all of this in the fragment instead of creating a quest unless you have other things in the quest anyway.

Posted

Is the quest start game enabled?  Have to generate a SEQ these days if it is.

 

 

quote:

    1. Go to Steam. Switch to the tools view.
    2. Find the Creation Kit, open its properties.
    3. Click "set launch options"
    4. Enter a command like this: -GenerateSEQ:pluginname.esp (Where pluginname.esp is your mod file)
    5. Save the changes.
    6. Launch the CK and DO NOT disturb it while it processes.
    7. Once it closes, remove the launch options you entered so you can use the CK normally again.
    8. Move the file to your Data\SEQ folder.

    The SEQ file will need to be regenerated any time you add a new start-enabled quest to your mod,

    delete one from the mod, or toggle the "start game enabled" flag on a quest in your mod.

Posted

Always the simple things. It was the property...somewhere along the line it had slipped back to None from Framework. Cheers TDF

 

h38f: Not sure but it could throw a wobbly as you are defining it as zero length not empty.

I did try putting this in a fragment but it refused to compile (I am assuming as it was not in a function).

I would want it in a function for my mod anyway as it is likely to be called a lot. :P

Out of curiosity what code did you put in the fragment to get it to work?

 

mojo: TES5Edit is good for SEQ. You can generate one from there and it drops it in the right place as well.

 

Thank you all. :)

 

Now I just need to figure out how to reference a specific actor and get the Zaz framework to fire.  ;)

Posted

Just the same code in fragment will work. akSpeaker is who you are talking to and akSpeaker.GetDialogueTarget() is you. Just add the same code but you may have to do it like this:

SexLabFramework sexlab = questRef as SexLabFramework

and then you can use sexlab as .. well sexlab, but you need to add a quest property with name "questRef" and poiint it to sexlabframework quest.

 

And yeah I was wrong with new X[0] it doesn't even compile. :P

Posted
-snip

 

mojo: TES5Edit is good for SEQ. You can generate one from there and it drops it in the right place as well.

 

-snip

 

Oddly enough, I just noticed that in Tes5Edit for the first time while doing something else with it like 5 minutes ago.

Posted
 
I have the same problem, I recreated same code in my script just like Ichabod.
And papyrus end of dialog I put the same: (GetOwningQuest() as qwenewquest).SexCall(akSpeaker)
 
You can see the same code below that i recreated. But nothing happens. Both PC and Actor standing at one place.
 
if i put "if(anims.Length == 0)" code, it always returns TRUE.

 

Please help me, I've tried to figure this out for several dozen of hours. 

 

And my SexLab property is set to value SexLabQuestFramework

Scriptname qweNewQuest extends Quest  




SexLabFramework property SexLab auto


function SexCall(Actor SpeakerRef)


debug.messagebox (SpeakerRef)


    ; // Create our actor array using our chosen actor references
    actor[] sexActors = new actor[2]
    sexActors[0] = Game.GetPlayer()
    sexActors[1] = SpeakerRef


debug.messagebox (sexActors[0])
debug.messagebox (sexActors[1])


    ; // Initialize our animation array as empty, so SexLab will pick the animations based on defaults
    sslBaseAnimation[] anims


    ; // "Buisness Time"
    SexLab.StartSex(sexActors, anims)


endfunction
 
 
Posted

@mendanto: So, just so I'm sure I've got this right, your code is something like:

...
; // Initialize our animation array as empty, so SexLab will pick the animations based on defaults
sslBaseAnimation[] anims

if anims.Length == 0
   Debug.Notification("There is a problem.")
endif
...

So, you've isolated the issue to the fact that the script is not filling the array with any animations, which explains why no animations are being triggered. There must be some sort of issue with how SexLab is installed or accessed by your mod. Do other SexLab-based mods work for you?

 

EDIT: Stupid me. I don't know what I'm talking about. Ignore what I wrote above.

Posted

Yes you are correct i use debug.messagebox. I thought I was doing something wrong, then I accidentally stumbled upon this thread and the code was almost exact as my.

I went extra step and recreated the code to almost every letter. Started new quest and new esp file. But I got same problem. The strange thing is all mods still work as they are supposed to, like SexLab Romance for example.

So I have no clue where to even look.

Posted

There is theoretically nothing wrong with your script as written, so it's impossible to tell you what's wrong based of it alone. If you want to see what the problem is look at your debug log, and post that, either Papyrus or SexLab will be printing out an error telling you exactly where it's going wrong.

Posted
Posted
 ERROR: Cannot call StartSex() on a None object, aborting function call
 

 

 

Should be self explainatory, you haven't defined your SexLab property.
 
this line in your script
SexLabFramework property SexLab auto

Is empty, you have to define it within the creation kit.

 

Posted

What do you mean by define it?

You want me to go to press Properties qweNewQuest and set value to SexLab. It is currently set to SexLabQuestFramework.

Or you mean something else?

 

Btw after I put that error log, I reloaded skyrim and It worked, thought my code

 
if anims.Length == 0
   Debug.messagebox("There is a problem.")
endif
Did popup a message:"There is a problem.". Even after I hit ok, it worked, with anims.Length=0.
I don't get this scripting language.
Posted

What do you mean by define it?

You want me to go to press Properties qweNewQuest and set value to SexLab. It is currently set to SexLabQuestFramework.

Or you mean something else?

If you loaded and saved your game with the mod actaive BEFORE doing that, you have to start a new game if you want the property to take effect, otherwise your save game now has it saved in your save file as a none, and is ignoring what the esp is only now trying to define it as. Or you could rename the property and redefine it.

 

But in anycase, from the save your loading, SexLab is 100% unquestionably NOT set.

 

Btw after I put that error log, I reloaded skyrim and It worked, thought my code

 

 

if anims.Length == 0
   Debug.messagebox("There is a problem.")
endif
Did popup a message:"There is a problem.". Even after I hit ok, it worked, with anims.Length=0.

I don't get this scripting language.

 

Of course it does, you defined anims as sslBaseAnimation[] anims, a completely empty array, so it's length is always going to be 0, no matter what. The only thing it shows is your function is being called, otherwise the laws of the universe remain unchanged and 0 is still in fact equal to 0. Your anims array won't magically fill itself, but you don't HAVE to fill it, which is what the comment above it is trying to say.

 

None of this has anything to do with your SexLab property not being defined.

Posted

Mendanto: Sounds like you had the same issue I did. That sexlab property defined as none is easy to miss. :)

Glad you got it working now.

Archived

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

  • Recently Browsing   0 members

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