Jump to content

Spawn a random encounter for testing?


Recommended Posts

Its a total faff. You need to hack the event quest start conditions to include a new keyword, then find the nearest random encounter trigger and in script send the trigger object and keyword to story manager.

 

Subject.GetEventData(GetIsID:Keyword, SKK_RETravelKMK04 [KYWD:04000F9E]) = 1.000000

 

If (pSKK_RETravelKMK04.SendStoryEventAndWait(akLoc = ThisTrigger.GetCurrentLocation(), akRef1 = ThisTrigger, akRef2 = None, aiValue1 = 0, aiValue2 = 0) == false)
pSKK_RETQuestDidNotStart.Show() ; RE trigger found, but the random encounter quest could not start.
EndIf
There is an SKKRETrigger "start specific random encounters" mod you can use as a template on my discord.
Link to comment
Share on other sites

 

Its a total faff. You need to hack the event quest start conditions to include a new keyword, then find the nearest random encounter trigger and in script send the trigger object and keyword to story manager.

 

Subject.GetEventData(GetIsID:Keyword, SKK_RETravelKMK04 [KYWD:04000F9E]) = 1.000000

 

If (pSKK_RETravelKMK04.SendStoryEventAndWait(akLoc = ThisTrigger.GetCurrentLocation(), akRef1 = ThisTrigger, akRef2 = None, aiValue1 = 0, aiValue2 = 0) == false)
pSKK_RETQuestDidNotStart.Show() ; RE trigger found, but the random encounter quest could not start.
EndIf
There is an SKKRETrigger "start specific random encounters" mod you can use as a template on my discord.

 

I grabbed the mod and decompiled the scripts to take a look, but in the end this is all just too complicated. I think I'll just wait until I encounter it naturally, I'm pretty sure it works anyway.

 

Thanks for the help though, I appreciate it.

Link to comment
Share on other sites

 

Its a total faff. You need to hack the event quest start conditions to include a new keyword, then find the nearest random encounter trigger and in script send the trigger object and keyword to story manager.

 

Subject.GetEventData(GetIsID:Keyword, SKK_RETravelKMK04 [KYWD:04000F9E]) = 1.000000

 

If (pSKK_RETravelKMK04.SendStoryEventAndWait(akLoc = ThisTrigger.GetCurrentLocation(), akRef1 = ThisTrigger, akRef2 = None, aiValue1 = 0, aiValue2 = 0) == false)
pSKK_RETQuestDidNotStart.Show() ; RE trigger found, but the random encounter quest could not start.
EndIf
There is an SKKRETrigger "start specific random encounters" mod you can use as a template on my discord.

 

I gave it another go after realizing I could probably just use yours and add a new option for what I needed, but there seem to be some issues. If I decompile with Champollion it doesn't want to compile in Creation Kit. So I reset my changes and started fresh with your mod, and noticed that I also can't check properties in Creation Kit (it says 'Cannot open store for class "SKK_RETQuestScript", missing file?'

 

Any idea what's going on? And if I do manage to get it working, do you know which activator I'd use for the treasure hunts?

Link to comment
Share on other sites

'Cannot open store for class "SKK_RETQuestScript", missing file?' suggests it cant find the loose PEX file. Gotta have both PEX and PSC loose to edit and CK recompile.

 

Totally cant remember how to find the activator/quest relationship /gettin old :sad:

Link to comment
Share on other sites

'Cannot open store for class "SKK_RETQuestScript", missing file?' suggests it cant find the loose PEX file. Gotta have both PEX and PSC loose to edit and CK recompile.

 

Totally cant remember how to find the activator/quest relationship /gettin old :sad:

I found another "treasure hunt" quest that has Scene in the name, so that should make that easier. Do you still have the source files for the two scripts around? Because the ones I decompiled wouldn't compile.

Link to comment
Share on other sites

I dont have the source any more, Champollion decompiles will usually recompile.

 

Edit: I got it to compile by changing "as ScriptObject" to "as Actor". We'll see if it works.

 

Thought I had it, updated to Champollion 1.0.6 from 1.0.5 and it decompiled differently. But it still errors at every reference to OnLocationChange. Lines like:

Self.RegisterForRemoteEvent(pPlayerREF as ScriptObject, "OnLocationChange")

Error with:

SKK_RETQuestScript.psc(53,58): OnLocationChange is not an event on scriptobject or one if its parents

And OnLocationChange is defined as:

Event Actor.OnLocationChange(Actor akSender, Location akOldLoc, Location akNewLoc)

Do you know what the issue is? Maybe the OnLocationChange definition isn't decompiled correctly?

Edited by ScottyDoesKnow
Link to comment
Share on other sites

Thats one of the many pains working with story manager, zero instrumentation or debug info.

 

To see if the quest is OK change all aliases to optional. If one of the stages is [run on start] add a "I have started" debug.trace fragment or attach a quest scripot with OnQuestInit "I have started" debug.trace

Link to comment
Share on other sites

  • Recently Browsing   0 members

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