Papyrus Fragment?

Post » Wed Jun 20, 2012 7:59 am

Hi.

1. What are papyrus fragments?

2. Is it possible to attach a custom made script and completely ignore the whole fragments -part?

3. Is it possible to run a script by calling some kind of function from within the fragment script?

Thanks.
User avatar
Julia Schwalbe
 
Posts: 3557
Joined: Wed Apr 11, 2007 3:02 pm

Post » Wed Jun 20, 2012 4:23 pm

1. papyrus code attached to things like quests or dialog topics. Usually, in order to make papyrus instructions functional, you need to include them in a event or in a function that is called somewhere, In this case, the event is the quest stage or the topic it's attached to.

2. You can add normal scripts, but their functions need to be called anyway, so, you'll need to add a fragment to make the callying.

3. Yes. Indeed it's pretty common.
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Wed Jun 20, 2012 1:44 pm

Here's what I did to bypass the stupid fragment script thingie:

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 6Scriptname HT_QuestProgress02 Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_5Function Fragment_5(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEQuestProgress();END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin comment  ReferenceAlias Property HT_AliasThief AutoFunction QuestProgress()  GetOwningQuest().SetObjectiveCompleted(10)  GetOwningQuest().SetObjectiveDisplayed(20)  GetOwningQuest().SetStage(20)  HT_AliasThief.GetReference().Enable()EndFunction

Sadly the last line doesn't work. I want to enable a certain actor that is marked as "Initially Disabled".
I have made sure that the alias points at the actor and I have made sure that the property for this script is set and pointing toward that alias.
I have also made sure that the script is running by adding a Debug message. (Also the other functions are working as intended.)

4. Why doesn't disable/enable work?
User avatar
Lizbeth Ruiz
 
Posts: 3358
Joined: Fri Aug 24, 2007 1:35 pm

Post » Wed Jun 20, 2012 3:12 am

Did you set the alias as "Allows Disabled?" (in the original quest it's coming from)
User avatar
Scott
 
Posts: 3385
Joined: Fri Nov 30, 2007 2:59 am

Post » Wed Jun 20, 2012 5:02 pm

Did you set the alias as "Allows Disabled?" (in the original quest it's coming from)

Yes.

Since disable/enable isn't working for me I was thinking of creating the NPC in some sort of "holding cell" and then move it via a script when it is needed.
What would be the easiest way to do this? I'm thinking I have to use "PlaceAtMe" and some sort of MarkerHeading?
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Wed Jun 20, 2012 6:06 pm

Try this, just to check if the theif is actually there:
if !HT_AliasThief.GetRef()   Debug.Notification("No reference in HT_AliasThief to enable.")endif
User avatar
rheanna bruining
 
Posts: 3415
Joined: Fri Dec 22, 2006 11:00 am

Post » Wed Jun 20, 2012 11:39 am

Try this, just to check if the theif is actually there:
if !HT_AliasThief.GetRef()   Debug.Notification("No reference in HT_AliasThief to enable.")endif

I added it to my script and, strangely enough, I saw the debug message.
So somehow I point to a certain actor and it still doesn't save it into the alias?

Here's how I do it:
-Open my Quest.
-Go to Alias tab
-Double click on "HT_AliasThief"
-Choose "Fill Type:" "Specific Reference"
-Click on the "Ref" button
-Click on the "Select Reference in Render Window" button
-Double click on my pre-placed NPC. (It shows the correct Cell and Reference.)

The pre-placed NPC is "Initially Disabled" and the Quest Alias says "Allow Disabled". =/
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Wed Jun 20, 2012 12:00 pm

And the other quest is, in fact running? If it's not running, the alias won't be loaded.
User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm

Post » Wed Jun 20, 2012 12:31 pm

And the other quest is, in fact running? If it's not running, the alias won't be loaded.

Not sure what you mean.
There is only one quest.
It appears in the player's journal, so it must be running.

I figured I'd try to skip the whole alias thing and just make an Actor property in my script that points to the same pre-placed NPC.
-The problem is that I need my NPC to carry a quest object (also an alias), and I don't know how to put it in the NPC's inventory and define it as the alias.
User avatar
Jeff Turner
 
Posts: 3458
Joined: Tue Sep 04, 2007 5:35 pm

Post » Wed Jun 20, 2012 10:55 am

In general it's best to define anything involved in your quest as an alias.

As for making the quest item be in the pocket of your NPC, just define the quest item as a "Create In" type, and create it in your NPC alias.
User avatar
josh evans
 
Posts: 3471
Joined: Mon Jun 04, 2007 1:37 am

Post » Wed Jun 20, 2012 11:20 am

In general it's best to define anything involved in your quest as an alias.

As for making the quest item be in the pocket of your NPC, just define the quest item as a "Create In" type, and create it in your NPC alias.

Yea, I know.
But since I can't target my thief alias it doesn't work. =/

EDIT: At least enabling the Actor Property works as intended.
User avatar
Emma louise Wendelk
 
Posts: 3385
Joined: Sat Dec 09, 2006 9:31 pm

Post » Wed Jun 20, 2012 2:00 pm

The Thief NPC is located in another cell. Could this cause any trouble?
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Wed Jun 20, 2012 1:47 pm

Once he's in the alias, it doesn't matter where he is...you can create the alias in his pocket even if he's in, say, Sovngard.
User avatar
Rudi Carter
 
Posts: 3365
Joined: Fri Sep 01, 2006 11:09 pm


Return to V - Skyrim