Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Oct 2018
tnibbz Offline OP
stranger
OP Offline
stranger
Joined: Oct 2018
Hi so as the title says, I am trying some basic quest scripting, following along to Windemere RPGs youtube series. However I am hung up and cannot get this very basic quest script to work. I am simply try to update a quest through dialogue with an NPC however nothing seems to be happening, the journal won't update. I cannot figure out what is wrong but feel like it is probably staring me right in the face. Screen shots of all my work that I thought was relevant at https://imgur.com/gallery/INaBkOz Sorry in advance if there is needed info that I did not include.

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
The problem is your TESTSCRIPT goal. It completes (and hence activates its subgoals) when the GameEventSet("GAMEEVENT_GameStarted") event arrives. However, your TESTSCRIPT goal itself is a subgoal of the __Start goal. This means that your TESTSCRIPT goal only becomes active after the __Start goal completes. That goal completes on the same event.

So what happens when the game starts, is:
1) all top-level goals in the story become active. This includes the __Start goal, but not your TESTSCRIPT goal (since it's a subgoal of __Start)
2) the GameEventSet("GAMEEVENT_GameStarted") event arrives. The rules in all currently active goals can react to this event. The __Start goal catches it and completes, making all of its subgoals (including TESTSCRIPT) active
3) Your TESTSCRIPT goal is now active, but it will never complete, because no new GameEventSet("GAMEEVENT_GameStarted") event arrives any more

The solution is to either remove this TESTSCRIPT goal and to make the subgoals of your TESTSCRIPT goal direct subgoals of __Start, or to move your TESTSCRIPT goal to the top level of the story (but I don't think you can do this in the story editor; you have to edit the TESTSCRIPT.txt file in an external text editor —while the story editor is closed— and remove the parenting to the __Start goal from it near the bottom of the file).

Joined: Oct 2018
tnibbz Offline OP
stranger
OP Offline
stranger
Joined: Oct 2018
Thank you for your reply! I actually was having the issue prior to making the TESTSCRIPT its own subgoal, when it was just a subgoal of the _start script. I made the second TESTCRIPT as an attempt to fix it because I read that the issues with scripts not firing can sometimes be due to the loading order. I actually just solved this issue by toggling who I was setting the flag on in the dialogue editor to the NPC and not the player group, however this seems counterintuitive to me and does not match up with any of the tutorials I have seen so I am alittle uncertain why it worked.

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
Ah yes, in your dialog the order of your speakers is wrong: the NPC should be speaker 1, and the player speaker 2. It "works" by setting the flag on the NPC because even if you declare them wrongly, the dialog will still be started with the NPC as speaker 1 and the player as speaker 2. This mismatch mainly causes problems in case of voice recording (because then the player lines would be recorded for the NPC and vice versa), and it's of course confusing when looking at the dialog.

Joined: Oct 2018
tnibbz Offline OP
stranger
OP Offline
stranger
Joined: Oct 2018
Shoot! You're totally right I switched the order of the speakers around and now the journal updates correctly when choosing playergroup. Thank you so much!


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5