Jump to content

[LE] Pulling functions/properties from another script into a dialogue fragment


Recommended Posts

I'm trying to make an addon for a long-abandoned mod. Specifically, I want to take some functions and properties introduced in that mod's scripts and utilize them at the end of certain dialogue options. There is another mod that does the same thing, so I used champollion to decompile that mod's fragments so I might have an idea of how to go about it myself. What is confusing me though, is that I'm not quite sure how to reference the scripts containing the functions/properties I need.

 

The decompiled source code of the addon I'm using as a reference point looks something like this (with the actual function/property I need replaced with [function] and [property] respectively:

 

  Reveal hidden contents
;-- Properties --------------------------------------
eventhandlerscript property EventHandlerQuest auto
registryscript property Manager auto
;-- Variables ---------------------------------------
;-- Functions ---------------------------------------
; Skipped compiler generated GetState
; Skipped compiler generated GotoState
function Fragment_2(ObjectReference akSpeakerRef)
actor akSpeaker = akSpeakerRef as actor
EventHandlerQuest.[property] = 2
ManagerQuest.[function](akSpeaker, game.getPlayer(), 1)
endfunction

 

 

 

 

So it looks to me like it's pulling the functions from the quests in which the desired scripts are attached, but when I try to compile something myself, the CK doesn't recognize "eventhandlerscript" or "registryscript" as a "known user-defined" type. I tried replacing both unknown types with "quest", but the CK wouldn't recognize the property or the function I need, spitting this out:

 

  Reveal hidden contents

 

 

I am super new to scripting, so I'm probably missing something simple and/or horribly misunderstanding something, and I hope I've conveyed enough information for a solution to be apparent.

Edited by DairyProduct92
Link to comment
Share on other sites

You are inside the Skyrim forum. The forum for Skyrim SE you'll find here: https://forums.nexusmods.com/index.php?c=4040,4045

wiki pages (browser with cookies enabled!)
papyrus: https://www.creationkit.com/index.php?title=Category:Papyrus
scripting: https://www.creationkit.com/index.php?title=Category:Scripting

the dialog fragment, that you posted: TIF__02000D73

  Reveal hidden contents

 

 

a missing script from mod you need as source: EventhandlerScript

  Reveal hidden contents

 

a missing script from mod you need as source: RegistryScript

  Reveal hidden contents

 

Edited by ReDragon2013
Link to comment
Share on other sites

  • Recently Browsing   0 members

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