Jump to content

The deal with Coran and generic wyverns


Ascension64

Recommended Posts

I'm sure the thing with Coran's quest to kill the wyverns in the caves and then going on to kill generic encountered wyverns is annoying many a person.

 

Does BG1NPC deal with this problem in any way?

 

When perusing the Phase1 scripts and dialogue, I notice it is based upon the party having (_)MISC52.ITM.

Also, Coran giving warnings is still based on !Dead("Wyvern"), which is easily suppressed by killing a wyvern.

 

I also noticed the following script block that will never trigger because the global variable P#CoranReward is not mentioned anywhere else in the mod (unless I'm blind, please correct me).

IF %BGT_VAR%
Global("P#CoranReward","GLOBAL",1)
PartyHasItem("%tutu_var%MISC52") //wyvern head
Global("P#CoPC1","GLOBAL",0)
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
See(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
SetGlobal("P#CoPC1","GLOBAL",1)
END

 

 

If nothing has been done about this problem, I have an idea of what we could do about it.

 

In vanilla BG1, Coran won't say anything when you kill the wyvern. I think BG1NPC restores this. BGT Tweak has a component that does restore the dialogue by adding a script action to trigger it after the wyvern is killed.

 

The only approach I can see to correct this is to modify the wyverns in the caves to have a unique CRE and DV, and modify KELDDA.DLG (Kelddath) to detect for the death of the specific DV.

 

However, I didn't want to change anything on my side yet in case changing the DV would screw up the way that BG1NPC handles the wyvern. Is anything of concern here? Or any other ideas of comments?

Link to comment

We do

  /* Disabling Coran's old leaving timer, to be replaced by X#CORWYV.BAF */
 COPY_EXISTING ~%CORAN_BCS%.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE
  ~GlobalTimerExpired("Coran","GLOBAL")~ ~GlobalTimerExpired("Coran","GLOBAL") Global("X#CoranWyvernDisable","GLOBAL",1)~
COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

 /* Fixing Coran's Wyvern script */
 EXTEND_TOP ~%CORAN_BCS%.bcs~ ~BG1NPC/Core/baf/X#CORWYV.BAF~
 EVALUATE_BUFFER

 

with replacement .baf extension

IF %BGT_VAR%
OR(2)
!Global("P#CoranMatch","GLOBAL",1)
Global("P#CoranRomanceInactive","GLOBAL",1)
GlobalTimerExpired("coran","GLOBAL")
InParty(Myself)
!Dead("wyvern")
Global("X#CoranWyvernWarning1","GLOBAL",0)
Global("P#CoranWyvern","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("X#CoranWyvernWarning1","GLOBAL",1)
SetGlobal("P#CoranWyvern","GLOBAL",1)
StartDialogueNoSet(Player1)
END

IF %BGT_VAR%
OR(2)
!Global("P#CoranMatch","GLOBAL",1)
Global("P#CoranRomanceInactive","GLOBAL",1)
GlobalTimerExpired("coran","GLOBAL")
InParty(Myself)
!Dead("wyvern")
Global("X#CoranWyvernWarning2","GLOBAL",0)
Global("P#CoranWyvern","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("X#CoranWyvernWarning2","GLOBAL",1)
StartDialogueNoSet(Player1)
END

 

and in dialog (Coran's)

/* Chat w PC */
/* Wyvern head */
IF %BGT_VAR%
Global("CoranReward","GLOBAL",1)
PartyHasItem("%tutu_var%MISC52") //wyvern head
Global("P#CoPC1","GLOBAL",0)
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
SetGlobal("P#CoPC1","GLOBAL",1)
END

IF %BGT_VAR%
Global("P#CoPC1","GLOBAL",1)
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("coran99")
StartDialogueNoSet(Player1)
END

 

I see several problems here - so it is definitely time for a bugfix. I will definitely take suggestions; it sounds like a good idea to patch in unique dv's and reset the dialog correctly, removing out timer calls and making this specifically a item-driven talk. I am not around for a few days, but when I get back I will integrate whatever consensus is reached here :D

Link to comment

So the first two contain the two warnings if the player hasn't killed the wyvern yet. If the wyvern DV were to change, then the !Dead("Wyvern") lines will also need to change. Alternatively, we could replace it with Global("CoranReward","GLOBAL",0).

 

The third one contains the dialogue after the wyvern is dead. I don't think this one triggers at all, since Global("CoranReward","GLOBAL",1) never triggers.

 

The stock BG1 response to the death of the wyvern is:

IF ~Dead("Wyvern")
InParty("Coran")
Global("CoranReward","GLOBAL",0)~ THEN BEGIN 0
 SAY ~Now, we must take the beast's head, and bring it to the Temple of Morning  in Beregost.  It is there that we can receive our reward.~ /* #16789 */
 IF ~~ THEN DO ~SetGlobal("CoranReward","GLOBAL",1)~ EXIT
END

However, in BG1 this never triggers because there is no script block to trigger it. I can't find any script block in BG1NPC that triggers this one either. This is the only place that "CoranReward","GLOBAL" becomes 1.

 

So if I've got this right, we could do the following things. Basically, we've got to keep in mind the vanilla behaviour, so we can't use any globals or such that aren't being set in vanilla. Also note in vanilla that Coran doesn't initiate dialogue when the wyvern is killed.

 

Fix KELDDA.DLG

State 6: add trigger for Dead("<newWyvernDV>")

 

Whether to change it further depends on whether we will allow the player to get a reward: (i) even if they hadn't even heard of the bounty yet; (ii) if they heard of the bounty from Coran but declined to help Coran; and (iii) if they heard of the bounty from Coran and accepted to help Coran.

 

No further changes required for (i).

For (ii), need to add a GLOBAL to CORAN.DLG, and then add extra trigger to check for that GLOBAL in KELDDA.DLG (State 6).

For (iii), same as (ii).

 

Fix uniqueness of wyverns

Duplicate existing WYVERN.CRE and rename to something, changing the DV in the process. I want to change this in BGT, not sure about Macready's readiness to change this in EasyTutu. Should come up with something common.

 

Unfortunately, Coran's quest mentions only one, but there are two in the cave. Also the final journal entry in KELDDA.DLG mentions more than one. It should be OK then to make both wyverns in the cave the same, but unique from other wyverns that appear in the game.

 

Change Coran's warnings to check for !Dead("<newWyvernDV>") (States 5 and 6).

 

For BG1UB/BGTTweak: change Coran's dialogue trigger to comment on the death of a wyvern to Dead("<newWyvernDV>") (State 0)

 

For BG1NPC: change Coran's wyvern comment dialogue trigger from:

Global("CoranReward","GLOBAL",1)
PartyHasItem("%tutu_var%MISC52") //wyvern head
Global("P#CoPC1","GLOBAL",0)[/code[
to
[code]Dead("<newWyvernDV>")
PartyHasItem("%tutu_var%MISC52") //wyvern head
Global("P#CoPC1","GLOBAL",0)

Link to comment

Dammit - forgot completely about this.

 

OK. The regular Coran materials for the timered "yo, do my quest" thing are patched in:

[F:\BG1NPC_Workspace\bg1npc-v16\bg1npc\core\dlg\x#jfix_bgt.d]

Line 2 : ADD_STATE_TRIGGER CORANJ %BGTCORANJState6% ~Global("X#CoranWyvernWarning1","GLOBAL",1)~

Line 3 : ADD_TRANS_ACTION CORANJ BEGIN %BGTCORANJState6% END BEGIN END ~SetGlobal("X#CoranWyvernWarning1","GLOBAL",2)~

Line 4 : ADD_STATE_TRIGGER CORANJ %BGTCORANJState5% ~Global("X#CoranWyvernWarning2","GLOBAL",1)~

Line 5 : ADD_TRANS_ACTION CORANJ BEGIN %BGTCORANJState5% END BEGIN END ~SetGlobal("X#CoranWyvernWarning2","GLOBAL",2)~

 

They trigger two replacement warnings. These are the regular "do it or I leave" things, adjusted so they only play if PC is not romancing Coran or is not matched for a Coran romance, and the !Dead("wyvern") condition is in play. That works - and matches what Domi wanted, which is for Coran to not bother leaving if he is interested in the PC.

 

I see a problem - I changed the "CoranReward" to "X#CoranReward" in the mass findings. But, as you said, it never gets set. So it doesn't matter - it didn't fire anyways.

 

The replacement dialog is an open friend talk,

@0 = ~*Holding the wyvern’s dead head in his outstretched hand*

Alas, poor wyvern. With no flesh upon her bones

Lives not the wyvern's life... but brings us coin.

Is she not a beauty?~

@1 = ~Now, now, Coran, we do not even know if that was a female wyvern.~

@2 = ~Coran, stop it! I don’t like when the sacred is ridiculed!~

@3 = ~Coran, you have an odd concept of beauty. Next you will be making advances at goblin maids...~

@4 = ~Hmm, actually, we do. Look at the shape of the skull - it was definitely a female.~

@5 = ~How would a thief know things like this? I would rather expect it coming from a druid’s or a ranger’s mouth.~

@6 = ~Alright, female it was. But, Coran, you have an odd concept of beauty. Next you will be making advances at goblin maids.~

@7 = ~*sigh* Just shut up!~

@8 = ~Tell me, who killed your sense of humor?~

@9 = ~One annoying elf, named Coran.~

 

We also work off of a variable P#CoranWyvern, which enables some situational PID talks only for folks not (or unable) to romance Coran, set via that code above, and closed only after this:

 

I_C_T ~%tutu_var%KELDDA~ 6 X#CoranWyvernReward
== ~%CORAN_JOINED%~ IF ~InParty("coran") InMyArea("coran") !StateCheck("coran",CD_STATE_NOTVALID)~ THEN @93
= @94 DO ~SetGlobal("P#CoranWyvern","GLOBAL",10)~
== ~%tutu_var%KELDDA~ IF ~InParty("coran") InMyArea("coran") !StateCheck("coran",CD_STATE_NOTVALID)~ THEN @1002
END

 

Then, of course, we have a loophole - those talks only fire if Coran is not matched and/or is not in a romance... I will recheck that dialog to make sure it is exclusively non-romance material.

 

I can't find anything that BG1NPC adds in terms of Dead("wyvern") script triggers for Coran, so that definitely needs to be added for BG1NPC.

 

Let's try starting with the easiest. If the darned state doesn't trigger, let's jointly add a script block that DOES trigger CoranReward. We will need to check that macready doesn't already do this in EasyTutu.

 

Then, let's have BG1NPC, UB, and BGT all patch in a new DV for the two wyverns, and make the appropriate replacements. (how about ~corwyvrn~... but to tell you the truth, since you are the UB guy, you tell me and I will match your code. In the grand hierarchy, this is a game bug, UB's province, and I will just replicate the code with a B_O_I_I_C).

 

The last and trickiest part is how to make it more "ok" for other mods. I am leaning towards saying "well, we add and change DVs to regular .cres that someone else might want to name something else")... basically, beacuse there are already other Wyverns in the game. If we were to add the dv "wyvern" to all the other wyverns called, it might shortcut the quest for some other person's code, but it would allow their content to continue.

 

I really like the idea of making this quest DV specific rather than item-specific.

 

Further thoughts?

Link to comment
Let's try starting with the easiest. If the darned state doesn't trigger, let's jointly add a script block that DOES trigger CoranReward. We will need to check that macready doesn't already do this in EasyTutu.
Was the purpose of the extra friend talk for Coran to 'override' the original unused comment that tells the player to take the wyvern head back to Kelddath Ormyr, or as an 'addition'?

 

Then, let's have BG1NPC, UB, and BGT all patch in a new DV for the two wyverns, and make the appropriate replacements. (how about ~corwyvrn~... but to tell you the truth, since you are the UB guy, you tell me and I will match your code. In the grand hierarchy, this is a game bug, UB's province, and I will just replicate the code with a B_O_I_I_C).
For DV, I'm happy to use the BG1NPC prefix (e.g. X#CoranWyvern), since BG1NPC will probably be used much more than the others, and BG1NPC usually comes first. So, how about X#CoranWyvern?

 

The last and trickiest part is how to make it more "ok" for other mods. I am leaning towards saying "well, we add and change DVs to regular .cres that someone else might want to name something else")... basically, beacuse there are already other Wyverns in the game. If we were to add the dv "wyvern" to all the other wyverns called, it might shortcut the quest for some other person's code, but it would allow their content to continue.
Well, I propose to duplicate WYVERN.CRE (new filename X#CORWYV.CRE), and change the DV of this new file only. That way, no other wyverns are touched.

 

So, the plan:

 

1. [bG1NPC/BGT/BG1UB/BGTTweak] Duplicate wyvern with new DV

COPY_EXISTING ~%tutu_var%WYVERN.CRE~ ~override/X#CORWYV.CRE~
 WRITE_ASCII 0x280 ~X#CoranWyvern~

 

2. [bG1NPC/BGT/BG1UB/BGTTweak] Replace wyverns in cave

COPY_EXISTING ~%CloakwoodWyverns_WyvernCave%.ARE~ ~override/%CloakwoodWyverns_WyvernCave%.ARE~
 READ_LONG 0x54 actors_off
 READ_SHORT 0x58 actors_num
 FOR (i = 0; i < %actors_num%; i += 1) BEGIN
READ_ASCII (%actors_off% + %i% * 0x110 + 0x80) actor_resref
PATCH_IF !(%actor_resref% STRING_COMPARE_CASE "WYVERN") BEGIN
  WRITE_ASCII (%actors_off% + %i% * 0x110 + 0x80) X#CORWYV (8)
END
 END
BUT_ONLY_IF_IT_CHANGES

 

3. [bG1NPC/BGT/BG1UB/BGTTweak] Modify wyvern warning (wyvern DV only)

REPLACE_TRIGGER_TEXT %CORAN_JOINED% ~!Dead("Wyvern")~ ~!Dead("X#CoranWyvern")~

 

4. [bG1NPC/BGT/BG1UB/BGTTweak] Ensure Kelddath knows that a unique wyvern is dead

ADD_STATE_TRIGGER %tutu_var%KELDDA 6 ~Dead("X#CoranWyvern")~

 

5 [bGT/BG1UB/BGTTweak/BG1NPC] Allow stock response to wyvern death

EXTEND_BOTTOM %tutu_var%CORAN.BCS <below>

IF %BGT_VAR%
Dead("X#CoranWyvern")
Global("CoranReward","GLOBAL",0)
PartyHasItem("%tutu_var%MISC52")
InParty(Myself)
CombatCounter(0)
!See([ENEMY])
InMyArea(Player1)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
Dialogue([PC])
END

Link to comment

And you even did my code for me - dude, you rock. I now really have to figure out how to pour fresh squeezed Orange Juice into the internet and have it show up at your terminal.

 

I looked back, and (Domi can correct me here) I think the changes to Coran were twofold - 1. bugfix the stuttering Wyverns problem in BG/Tutu originally, just like TutuFix, and replace the original dialog with his poem, and b. make sure Coran didn't take off if he was in a romance and didn't get the quest done on time. Since Coran's added talk doesn't reference the conclusion of the quest (where to go) I am leaning towards merging that into Coran's stock response - but hopefully Domi will be along to say whether she wants the "replacement" or the adition" option for BG1NPC.

 

 

This looks really good as a set of fixes. I am going through (probably Tuesday now) and seeing what else there is for fixes, so I will set up a testing version of BG1 NPC and check this out - with an eye to an update relatively soon.

Link to comment
Guest PetrusOctavianus

Isn't Coran supposed to say something and the journal be updated after defeating the Wyvern family in the cave?

He hasn't said *anything* about the Wyverns since he joined.

Link to comment

I hope it's not presumptuous for a player to comment on this thread, but I have the following suggestions re: the component that makes Coran avaialable prior to chapter four by opening up Cloakwood:

 

* Eliminate the Make Cloakwood Areas Available Before Completing the Bandit Camp component. It's just very awkward to traverse Cloakwood early in the game. Faldorn needs to remain in Cloakwood, I think, so players will just have to wait until chapter 4 to get her.

 

* However, Coran can be made available at FAI from the getgo. FAI is where I think he would be hoping to recruit a party, since the wyvern attacks on caravans would most likely be occuring on the Trade Way close to the nest.

 

* Change the timer on Coran's quest to an infinite amount of time.

 

* add the following dialogue to the end of Coran's join-up conversation (new dialogue in green):

 

CORAN: It's refreshing to find other people in this wood. My name is Coran: thief and archer! I've been alone in the wilderness for far too long. I wouldn't mind returning to the big city but I have yet to collect my bounty. I'd share the reward with the lot of you, if you would help hasten the hunt. You interested in hearing more?

 

CHAR NAME: Yes, tell us more.

 

CORAN: Good, I'm glad you're smart enough to recognize opportunity when it comes knocking. The deal is this: I've been hired out by the mayor of Beregost to hunt down a great winged dragon that's been plaguing the caravan routes. He's offered 2,000 gold for its head. Now before you get cold feet, let me allay your fears. The only descriptions of the beast have always mentioned its deadly barbed tail. From what I know about dragons they don't have barbs on their tails: that's something unique to wyverns. So all we have to do is find this wyvern's nest and kill it. Our only worries are if it has friends over for dinner! So what is your decision, yea or nay?

 

CHAR NAME: Yea.

 

CORAN: Very well then. We shouldn't tarry any longer; let's collect the heads of those soon-to-be-sorry wyverns. I suspect the nest lies somewhere in the dense forests of this region, probably easily within a half day's flight from the Trade Way.

 

CHAR NAME: Alright, but know that I have matters of my own to attend to first. It may take a while before we can begin tracking down the wyvern nest.

 

CORAN: As long as we are steadily collecting treasure and begin the wyvern hunt at a suitable time I am content.

 

CHAR NAME: Welcome aboard, Coran.

 

Such a change does necessitate changing any lines in BG1 NPC Project that reference Coran being found at the bridge in the first Cloakwood map. And from what I understand this is a dealbreaker, since BG1 NPC Project and BG2 Tweaks are closed for all but bugfixing. But I figured I'd pitch the idea anyway, since it seems more sensible than opening Cloakwood prior to chapter 4.

 

***

 

Addendum:

 

This line

 

CORAN: It's refreshing to find other people in this wood. My name is Coran: thief and archer! I've been alone in the wilderness for far too long. I wouldn't mind returning to the big city but I have yet to collect my bounty. I'd share the reward with the lot of you, if you would help hasten the hunt. You interested in hearing more?

 

might need editing too, unless you place Coran at the Friendly Arm's main gate. (Then he can help with Tarnesh.)

 

 

If he is located inside the inn, then maybe change the dialogue slightly:

 

CORAN: It's refreshing to find other adventurers seeking their fortune in the wilderness of the Sword Coast. My name is Coran: thief and archer! I've been roaming these wilds alone for far too long. I wouldn't mind returning to the big city but I have yet to collect my bounty. I'd share the reward with the lot of you, if you would help hasten the hunt. You interested in hearing more?
Link to comment

Good ideas, but definitely all part of a change - the start of a good mod there, Lemernis. Since it definitely changes multiple-authored lines, adds new dialog, and changes his starting position to another place, it means none of it can make it into BG1 NPC. But there's always room for another mod. It won't fit UB, as that aims at restoring and fixing unfinished content, but it might make it inot a Tweak Pack - but I think there is enough change there to mean you could add and expand to Coran and do a new mod.

Link to comment

I am against moving Coran. I looked at it when we were moving the NPCs initially, and there are a number of reasons I don't like this idea. Dialogues that mention him as coming from Cloakwood; absence of his content for the early areas; stripping the already bare Cloakwood area from the encounter; being seriously away from the wyverns, and either cancelling or extending the timer to an unknown value to account for 3! chapters of playing.... it just doesn't make sense to me.

Link to comment
Guest PetrusOctavianus
It was in addition, but I am not sure if both triggered.

 

I just did the Wyvern quest and Coran did not say anything after killing the wyverns. I also have the Coran friendship mod installed.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...