Jump to content

[LE] Need help with scripts in quests


ThanksNex1

Recommended Posts

If your game is written in Russian, I speak English and you speak Kyrgyz, we might have some problems! I will try to help as much as I can.
We must get the first phase of the quest line to start and stop correctly.
Then we can try and create the other phases.
So we will concentrate on finding the letter, going to Shor's Stone and ending that phase of the quest.
First, your letter. I think you said the map markers are not removed after the battle.
You have a script in the letter to start the quest.
There must also be a script to stop it.
We can stop it either when the player gets to Shor's Stone or after the battle when he talks to the leader.
The problem then will be making a script that chooses a faction when the player joins the battle.
He will join the fight before he can talk to the leader and end the quest phase.
We also need a QUST form for the Quest outline. I asked you to post these, but if they are in Russian they might not help me much. :sad:
In one of my Mods I have a letter to start the quest. The quest ends when the player finds and reads a book.
One special thing to note:
all objects and forms in my mods start with _shb_
As this is from the Silver Weapon Smithing Quest, they then have SWSQ_
This makes things much easier to find in the CK, and helps make all my mod elements unique to that mod: _shb_SWSQ_
So, you could start your forms and scripts with _tn1_ for ThanksNex1, or whatever else you prefer.
The details of the letter are:

ID          _shb_SWSQ_NoteAlvor
Name        Letter to Alvor
Book Text   <font size='16'><font face="$HandwrittenFont">
Dear Alvor,
 
Then the letter talks about the ancient book Alvor wants and bandits at Snowpoint Beacon having dealings with the Silver Hand. I removed all the fluff.
</font>
 
SCRIPT
Properties  _shb_SWSQ_Silver
            _shb_SWSQ_Silver_Stage
            _shb_SWSQ_MapSilverMRKR
The letter has the following script in it:
ACTUAL SCRIPT in LETTER
Scriptname _shb_SWSQ_SilverStartSCRIPT extends ObjectReference
 
Quest             Property _shb_SWSQ_Silver         Auto  
int               Property _shb_SWSQ_Silver_Stage   Auto  <---- you must add this for your mod
ObjectReference   Property _shb_SWSQ_MapSilverMRKR  Auto  <---- you must add this for your mod
 
Event onRead()
                  _shb_SWSQ_Silver.setStage(10)
                  _shb_SWSQ_MapSilverMRKR.addtomap() <---- you must add this for your mod
EndEvent
This starts the quest, updates the journal and adds the Map Marker.
So you will need to add the Map Marker for Shor's Stone. EG _tn1_MapShorMRKR
By the way, what is the name of your mod?
As it is about Penitus Oculatus and Dark Brotherhood, you could use PODB, so your marker would be called _tn1_PODB_MapShorStoneMRKR
This will make it easy to sort from other map markers etc.
EG for the Dragon Bridge phase of the Quest you could use _tn1_PODB_MapDragonBridgeMRKR
~.~
Anyway, in my mod, when the player gets to Snowpoint Beacon he will fight the bandits. When he reads the book, the quest ends.
Scriptname _shb_SWSQ_SilverStopSCRIPT extends ObjectReference
 
Quest     Property _shb_SWSQ_Silver            Auto
int       Property _shb_SWSQ_Silver_Stage      Auto
Perk      Property _shb_SWSQ_SilverSmithPerk   Auto
 
Event onRead()
          _shb_SWSQ_Silver.setStage(20)
          Game.GetPlayer().AddPerk(_shb_SWSQ_SilverSmithPerk)
EndEvent
You do not need the SilverSmithPerk or AddPerk. That is for my mod so silver weapons do more damage to undead and werewolves.
You just need to rename everything in my script for your mod.
Note that this script is for reading a book. It will be different if you end your first quest phase by arriving at a location or by talking to an NPC.
It might be easier to end it when he arives at Shor's Stone and start the next phase when he joins the fight.
Then that phase will end when he talks to the leader.
The 3rd phase will start when he is told to go to Dragon Bridge.
~.~
Then we must have a Quest outline using a QUST form. The TABS OF THE FORM are in Block Capitals.
QUST _shb_SWSQ_Silver
QUEST DATA
ID                    _shb_SWSQ_Silver
Type                  Side Quests
Quest Name            The Ancient Art of Silver Weaponsmithing
Priorty               30
Event                 None
Start Game Enabled    tick

QUEST STAGES
1                     Blank
10  Log Entry         I have read a private letter blah blah
    Papyrus Fragment  SetObjectiveDisplayed(10)
                      Alias__shb_SWSQ_MapSilverMRKR.GetReference().Enable()
 
QUEST OBJECTIVES
Index 10
Display Text          Find "The Ancient Art of Silver Weaponsmithing" at Snowpoint Beacon
Target Ref            _shb_SWSQ_MapSilverMRKR
 
QUEST ALIASES
Alias Name            _shb_SWSQ_MapSilverMRKR
Optional              N
Type                  Ref
Fill                  Type
Forced MapMarker      [000C2EF6]   <---- This is the reference for Snowpoint Beacon. You will have Shor's Stone.
Flags
Allow                 Disabled
 
SCRIPTS
QF__shb_SWSQ_Silver_02000D9F

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 7
Scriptname QF__shb_SWSQ_Silver_02000D9F Extends Quest Hidden

;BEGIN ALIAS PROPERTY _shb_SWSQ_MapSilverMRKR
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias__shb_SWSQ_MapSilverMRKR Auto
;END ALIAS PROPERTY

;BEGIN FRAGMENT Fragment_1
Function Fragment_1()
;BEGIN CODE
SetObjectiveCompleted(10)
;END CODE
EndFunction
;END FRAGMENT
 
;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN CODE
SetObjectiveDisplayed(10)
Alias__shb_SWSQ_MapSilverMRKR.GetReference().Enable()
;END CODE
EndFunction
;END FRAGMENT
 
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
(I could not get Spoiler tags to work properly)
PROPERTIES
Alias__shb_SWSQ_MapSilverMRKR
I think the Papyrus Quest Fragments are generated by the CK.
Looking at stage 20 in my QUST form:
QUST _shb_SWSQ_Silver
QUEST STAGES
20
Log Entry          I have found and read "The Ancient Art of Silver Weaponsmithing" at Snowpoint Beacon. Blah blah...
Papyrus Fragment   SetObjectiveCompleted(10)
Quest Completed    ticked
This ends my quest to craft Silver weapons. The mod also has another quest for crafting Mithril alloy weapons.
I hope this is some help.
So you must decide when you want the first phase to end. When he arrives at Shor's Stone or when he talks to the leader?
:smile:
Link to comment
Share on other sites

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...