Jump to content

[LE] Enable a dialogue option after selecting another one without using quest stages or links


GOsteW

Recommended Posts

Hi, I'd like to understand how to add a new dialogue option that appears only after the player has selected a vanilla one. All the options in the conversation I want to edit are separate branches, some of which are handled by a quest, nothing is linked. I certainly don't want to touch the quest. I was thinking about using a global variable: set it to 0 at the start and then set it to 1 when the player selects the vanilla option that I want my new option to be a consequence of. I managed to add the script to the topic and add the global variable as property to the script, but I can't figure out what event to use, if one is needed (I don't know much about Skyrim scripting) to set the value of the global to 1.

Is this even the best way to achieve what I want?

P.s.: the conversation I'm referring to is the initial conversation with Kesh at the shrine of Peryite (DA13 quest).

Link to comment
Share on other sites

I don't think it will work that way. Better use a fragment script.

 

To add a property to that, you need to compile the script first (yes, it's weird). Just add a comment to the box and hit the compile button.

Then close and reopen the quest, and add the property by using the 'Property' button.

Edited by Ghaunadaur
Link to comment
Share on other sites

I added an image to the Drive folder that shows the content of the script fragment after I compile it with just a ";" in it.

I keep failing at adding the property: the fragment compiles with an error and the log is printed inside the script, so I can't make the fragment work even if I add the property.

Link to comment
Share on other sites

Not sure what went wrong there. On your screenshot it looks like the script has been created and the property button is not greyed out anymore.

 

I did this myself now and it's working fine. The script should have the following content:

(without Property)

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__00089984 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

I'd suggest to remove the script and delete both the .pex and .psc files. Then restart CK and try again.

Edited by Ghaunadaur
Link to comment
Share on other sites

Ok, now I repeated the same process as before, but I didn't save after closing the quest and I got the same as you. However, when I tried to add the property I got:

Starting 1 compile threads for 1 files...
Compiling "TIF__00089984"...
C:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\TIF__00089984.psc(0,0): error while attempting to read script TIF__00089984: Il processo non pu• accedere al file 'C:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\TIF__00089984.psc' perch‚ Š in uso da un altro processo.
No output generated for TIF__00089984, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__00089984

P.s.: the third line is in italian, it says that it can't access the .psc because it's being used by another process.

Edited by GOsteW
Link to comment
Share on other sites

Then, if I try to add the property anyway, it adds the property right after that stuff:

Starting 1 compile threads for 1 files...
Compiling "TIF__00089984"...
C:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\TIF__00089984.psc(0,0): error while attempting to read script TIF__00089984: Il processo non pu• accedere al file 'C:\Games\Steam\steamapps\common\Skyrim\Data\Scripts\Source\TIF__00089984.psc' perch‚ Š in uso da un altro processo.
No output generated for TIF__00089984, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__00089984

GlobalVariable Property NewProperty  Auto  

Link to comment
Share on other sites

That's really strange, I've never seen this before. If it says the file is in use, maybe restarting the computer could help? Sorry, but I'm running out of ideas.

 

If all fails, you can still open the script in the script editor, paste the line for the property manually and try to compile from there.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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