GOsteW Posted October 1, 2019 Share Posted October 1, 2019 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 More sharing options...
GOsteW Posted October 2, 2019 Author Share Posted October 2, 2019 I stll have that problem.Anyone, please? Link to comment Share on other sites More sharing options...
Ghaunadaur Posted October 2, 2019 Share Posted October 2, 2019 Events can't be added to script fragments. The event is 'pre-defined' so to say. In case of dialogue the script code will run when the dialogue line is spoken, either on begin or end. What topic/info are you referring to exactly? Link to comment Share on other sites More sharing options...
GOsteW Posted October 2, 2019 Author Share Posted October 2, 2019 (edited) I'm not using script fragments, because I can't add a property to it (can I?).Screenshot of the conversation with notes: google drive link. Edited October 2, 2019 by GOsteW Link to comment Share on other sites More sharing options...
Ghaunadaur Posted October 2, 2019 Share Posted October 2, 2019 (edited) 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 October 2, 2019 by Ghaunadaur Link to comment Share on other sites More sharing options...
GOsteW Posted October 2, 2019 Author Share Posted October 2, 2019 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 More sharing options...
Ghaunadaur Posted October 2, 2019 Share Posted October 2, 2019 (edited) 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 October 2, 2019 by Ghaunadaur Link to comment Share on other sites More sharing options...
GOsteW Posted October 2, 2019 Author Share Posted October 2, 2019 (edited) 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 October 2, 2019 by GOsteW Link to comment Share on other sites More sharing options...
GOsteW Posted October 2, 2019 Author Share Posted October 2, 2019 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 More sharing options...
Ghaunadaur Posted October 2, 2019 Share Posted October 2, 2019 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 More sharing options...
Recommended Posts