Jump to content

Lords of Scripting, I need help with script for adding markers to NPCs


Recommended Posts

I would really love some help -- perhaps education -- on some scripting because I'm just running out of hair everywhere with this.

 

I’m basically wanting to add a tracking/location marker — a quest pip — a custom NPC much like you see in the Inigo and Sofia follower mods. I used the Sofia follower mod as a reference. The mod doesn't come with the PSC source file so I used Champollion to decompile the relevant PEX file to get the script code.


I've done some research everywhere and found some ideas, tried a couple of suggestions but have had no success -- the quest just doesn't fire up in my game.

 

I want the script to work much like how the Sofia follower mod works.

  • A Misc objective pops up on the screen as soon your game loads,
  • A Misc objective that displays in the journal and can be turned on and off (of course) and basically shows a marker/pip over the follower when it is on, and not when it is off.

 

Click here to see a shared document that might help anyone to help me with my issue.

This script below will compile with no issues but the quest/message doesn’t seem to fire up when I startup my game.

Scriptname QF_JWDKyrenthiaMarkerQST_05034CDF Extends Quest Hidden

ReferenceAlias Property Alias_JWDKyrenthiaALIAS Auto

Function Fragment_10()
self.SetObjectiveDisplayed(1, false, true)
EndFunction

Function Fragment_8()
self.SetObjectiveDisplayed(1, true, true)
EndFunction

I also tried creating a SEQ file in SSEdit -- it created but still no workie.

Any kind help would be appreciated!

Link to comment
Share on other sites

Start Game Enabled

 

Place SetObjectDisplayed(params here) in the first quest stage, tick the box that says "Start Up Stage".

 

There, at its basic function, it'll start and run code when the game starts.

 

But it will not start at all if the alias isn't filling for any reason unless it's an optional alias.

 

For the marker bit, the target needs to be set - I think you know this part, if not, look at Quest Target Data in the Objective tabe - but the "alias needs to be filled" applies here as well.

Edited by Rasikko
Link to comment
Share on other sites

According to the images on your shared document, you have no start up stage selected. You also do not have anything that sets the stage to 5 or 10.

 

Without a start up stage, nothing will run.

Without using SetStage, the quest will not advance to the next stage.

 

In essence, it is starting but there is nothing it can do currently.

Link to comment
Share on other sites

Hello and thanks for the assistance! Much appreciated!

I believe I have fixed the issue and was able to get it working :smile:

 

  • I checked Start Up Stage (at one point I had this ticked but still nothing worked) BUT...
  • I then removed the "self" function from the self.SetObjectiveDisplayed part of the script for each fragment and this seems to have solved my problem.

The quest/follower tracking works like a charm now :smile: Thanks again for help!

So if anyone else wants to do this with their NPCs/followers, the script I used is below:

Scriptname SCRIPTNAME Extends Quest Hidden

ReferenceAlias Property Alias_NAMEOFALIAS Auto

Function Fragment_0()
SetObjectiveDisplayed(1, true, true) ;pasted this into the first stage papyrus fragment and the 1 is the objective index number that I assigned
EndFunction

Function Fragment_2()
SetObjectiveDisplayed(1, false, true) ;pasted this into the next stage papyrus fragment and the 1 is the objective index number that I assigned
EndFunction
Edited by justinglen75
Link to comment
Share on other sites

  • Recently Browsing   0 members

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