Author Topic: Bugs for v3  (Read 75774 times)

0 Members and 1 Guest are viewing this topic.

Offline nethrin

  • Retired Modder
  • Level 3
  • *****
  • Posts: 1106
  • Karma: +2/-1
  • Gender: Male
    • MSN Messenger - gilalion@hotmail.com
    • View Profile
    • http://www.gilalion.com
    • Email
Bugs for v3
« on: July 29, 2018, 04:01:47 PM »
Fri Nov 05, 2004 10:02 pm    

post bugs here. thanks.
               

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #1 on: July 29, 2018, 04:01:48 PM »
Sat Nov 06, 2004 6:59 am    

Hello, I've found some more bugs. They probably started in V1 but I didn't see them until now. (Edit: please disregard this whole post.)

YASRAENA.BAF
Code: [Select]
IF
  InParty(Myself)
  RealGlobalTimerExpired("YasraenaTalkTime","GLOBAL")
  Global("YasraenaRA","GLOBAL",1)
  Global("YasraenaMatch","GLOBAL",1)
  !AreaType(DUNGEON)
  See(Player1)
  CombatCounter(0)
OR(13)
  Global("YasraenaTalk","LOCALS",1)
  Global("YasraenaTalk","LOCALS",3)
  Global("YasraenaTalk","LOCALS",5)
  Global("YasraenaTalk","LOCALS",7)
  Global("YasraenaTalk","LOCALS",9)
  Global("YasraenaTalk","LOCALS",11)
  Global("YasraenaTalk","LOCALS",13)
  Global("YasraenaTalk","LOCALS",17)
  Global("YasraenaTalk","LOCALS",19)
  Global("YasraenaTalk","LOCALS",21)
  Global("YasraenaTalk","LOCALS",25)
  Global("YasraenaTalk","LOCALS",27)
  Global("YasraenaTalk","LOCALS",29)
THEN
RESPONSE #100
  IncrementGlobal("YasraenaTalk","LOCALS",1)
  Interact(Player1)
END



This block is missing checks for values 15 and 23, so talks 16 and 24 could never happen. Recommended code block with updated OR():
Code: [Select]
IF
  InParty(Myself)
  RealGlobalTimerExpired("YasraenaTalkTime","GLOBAL")
  Global("YasraenaRA","GLOBAL",1)
  Global("YasraenaMatch","GLOBAL",1)
  !AreaType(DUNGEON)
  See(Player1)
  CombatCounter(0)
OR(15)
  Global("YasraenaTalk","LOCALS",1)
  Global("YasraenaTalk","LOCALS",3)
  Global("YasraenaTalk","LOCALS",5)
  Global("YasraenaTalk","LOCALS",7)
  Global("YasraenaTalk","LOCALS",9)
  Global("YasraenaTalk","LOCALS",11)
  Global("YasraenaTalk","LOCALS",13)
  Global("YasraenaTalk","LOCALS",15)
  Global("YasraenaTalk","LOCALS",17)
  Global("YasraenaTalk","LOCALS",19)
  Global("YasraenaTalk","LOCALS",21)
  Global("YasraenaTalk","LOCALS",23)
  Global("YasraenaTalk","LOCALS",25)
  Global("YasraenaTalk","LOCALS",27)
  Global("YasraenaTalk","LOCALS",29)
THEN
RESPONSE #100
  IncrementGlobal("YasraenaTalk","LOCALS",1)
  Interact(Player1)
END

BYASRAEN.D

In short, all you have to do to eliminate weird bugs with the banters, as far as I've been able to see so far, is change all the GlobalTimerExpired triggers in her YasraenaTalk blocks to RealGlobalTimerExpired. Aside from this being good coding form (since the game doesn't enforce type-checking with timers, alas), there is another important reason.

First I'll explain how timers work based on information at IESDP...

There are two main timers in the game, which you already know. One, TGAME, keeps track of game time that has passed. Whenever you rest or travel or do anything in a non-paused state, that time is added to TGAME to reflect the passage of game time. The second timer is TREAL, and it is updated constantly, so long as a game is loaded. It represents real time, or our time. Game evens like resting and traveling do not add to TREAL, aside from the few seconds it takes to finish the process.

Because of the different spheres of time these timers measure, TGAME will begin to have a greater value than TREAL as soon as you pause, rest or travel.

To set timers, you use SetGlobalTimer for TGAME, and RealSetGlobalTimer for TREAL. What these actions do is take the amount of time you specify, add it to the current value of the specified timer, and store the new value in a global variable. This is equivalent to setting an alarm. (The specification of the timer is inferred by the action.)

To see if the alarm has gone off, we use GlobalTimerExpired and RealGlobalTimerExpired. When a timer matches or exceeds the value in the specified alarm variable, the corresponding trigger becomes True.

Okay, so what happens if you check a TREAL alarm with a TGAME trigger (by using GlobalTimerExpired on a variable set with RealSetGlobalTimer)? Well, because TREAL lags behind TGAME, its value and any variables set with it are smaller than TGAME's value. So GlobalTimerExpired will see that, compared to the current value of TGAME, the variable's value is smaller so it must have triggered. Thus, with the exception of the very beginning of the game, any use of GlobalTimerExpired on a variable set by RealSetGlobalTimer will always evaluate as True. (Even if the same variable checked with RealGlobalTimerExpired isn't True.) Because of this, in BYASRAEN.D, the GlobalTimerExpired() check is equivalent to True().

This causes problems because Banter dialogs can trigger outside of the Interact() action, due to an internal interaction timer. So if such occurs and the game finds a YasraenaRA banter block with a valid YasraenaTalk value, it will fire off that dialog regardless of the value of TREAL, thanks to the incorrect GlobalTimerExpired trigger.

If you use RealGlobalTimerExpired with RealSetGlobalTimer and GlobalTimerExpired with SetGlobalTimer, all sorts of timer-related issues and "mysterious" bugs will be avoided.

I retyped this stuff from IESDP because Extremist's english is a bit hard to read, plus I wanted to cement this information into my brain to more easily understand how it affects Yasraena's dialogs. So please don't be offended if you already know this stuff. Also, I hope the explanation of how it pertains to Yasraena is clear enough.

Also, I noticed that the WAVs are still 44khz sampling. I guess you decided mod size was no issue then?

Thanks for the update, and sorry for the late discoveries.
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
Re: Bugs for v3
« Reply #2 on: July 29, 2018, 04:01:49 PM »
Sat Nov 06, 2004 7:14 am    

We still have the 44Khz because we still have not FOUND the master recording. icon_redface.gif Unless and until we do, we cannot change the sampling size. icon_confused.gif (If we find the master recording, we will release a fresh version, believe me! icon_biggrin.gif )

Now, I know that those two talks are missing. They are fired by separate coding located in her dream-script. That is what is necessary to fire talks triggered by resting. Since I want those to be triggered by pressing the rest button, that is what I have to do. icon_biggrin.gif

I know that TREAL lags behind TGAME. I could actually cut out the TimerExpired bit from the code altogether. The script timer does take care of it. I do not want to add additional flakiness to the triggering. I want it to basically mean True(). :wink:


Sillara

(By the way, would you mind if we asked you to beta-test in the future? Our new NPC is going to need a tester sometime! icon_biggrin.gif )
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #3 on: July 29, 2018, 04:01:50 PM »
Sat Nov 06, 2004 7:29 am    

Well, I feel stupid. I just had another look at her script and saw what you mean, so all that typing was for naught. icon_redface.gif

Yeah, removing the GlobalTimerExpired trigger is a good idea. If you wanted True() then it's redundant, and I don't like mismatched timer actions/triggers. :wink: I'll have to keep an eye on her banters in the future. There has to be an explanation for her skipping five entire dialogs with my character. Alas, I don't have an unmodified save game, so it'll have to wait until I can recreate the problem.

Sorry to hear you can't locate the master recording. Did you check under a pillow? Maybe Yoshimo took it. icon_biggrin.gif

BTW, if you don't want to reset romances already in motion when the player re-enters AR0700, just add GlobalLT("YasraenaTalk","LOCALS",1) to the trigger for her YasraenaImmyTaken block.

As for beta-testing, well, I'll have to see what the content will be when you get to that point and save my decision for then.
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #4 on: July 29, 2018, 04:01:51 PM »
Mon Nov 08, 2004 2:11 am    

In the interjection with Pai'na (SPPAIN), there is a missing parenthesis in the final state:

Code: [Select]
The strange half-drow turns back to you.)
Also, this whole interjection will not occur unless the Unfinished Business mod is installed, but this isn't mentioned in the Readme, nor is compatibility with said mod mentioned, though I'm sure it's fully compatible. (I found the typo while looking to see why she had no reaction to Pai'na - I don't have UB installed at the moment.)
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
Re: Bugs for v3
« Reply #5 on: July 29, 2018, 04:01:52 PM »
Mon Nov 08, 2004 6:41 am    

Oh! Thank you. I will fix the typo as soon as possible. UB is mentioned in the Readme as compatible, but I have had it installed for so long that I forgot you would not see the SPPAIN lines unless you had UB. icon_redface.gif I need to add another line to the Readme. Also, could you post or PM the list of what lines Pai'Na actually DOES say in a game without UB? I would really like for Yasraena to comment to her anyway. icon_biggrin.gif

Sillara
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #6 on: July 29, 2018, 04:01:53 PM »
 Mon Nov 08, 2004 11:28 am   

Ah, so sorry. I was looking for "Unfinished Business" and the readme says "UB". It was so small I passed over it. :)

If you use NI, a simple way to find the info is by turning on Ignore Overrides (under Options) and opening SPPAIN.DLG. (Remember to turn Ignore Overrides off before doing any other editing. icon_biggrin.gif ) This feature allows NI to view the original files inside the BIFs, rather than any that might be in the override folder.

The only valid starting state in the unmodded SPPAIN.DLG is State 23,
Code: [Select]
You will fall here, interloper! I did not build this sanctuary for you to tear it down in passing! Feel the wrath of the arachnids, of the divine eight legged!
that is triggered by trigger 4, NumTimesTalkedTo(0). She reacts to Viconia through transition triggers 5 and 6. #5 is !InParty("Viconia"), !See("Viconia") and #6 is InParty("Viconia"), !Dead("Viconia"). If Viconia's in the party, State 24 is displayed:

Code: [Select]
That you have a drow in your party is all the more galling! Does the bitch support the killing of spiders? No wonder she walks the surface! You will all die!
Regardless of Viconia's presence, the final outcome is State 25 where her servants turn into spiders and everyone attacks.

Code: [Select]
Stop your feeding, my spiders! New victims await! Protect your home!
With the action being:

Code: [Select]
ActionOverride("SPBene",ReallyForceSpell(Myself,SPIDER_CHANGE))
ActionOverride("SPPhil",ReallyForceSpell(Myself,SPIDER_CHANGE))
ActionOverride("SPSamar",ReallyForceSpell(Myself,SPIDER_CHANGE))
ActionOverride("SPTredd",ReallyForceSpell(Myself,SPIDER_CHANGE))
Enemy()

The rest of the entry states are disabled by False() triggers. I hope this helps.
« Last Edit: July 29, 2018, 07:32:01 PM by Wistrik »
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
Re: Bugs for v3
« Reply #7 on: July 29, 2018, 04:01:54 PM »
Mon Nov 08, 2004 4:08 pm  

I do use NI. This is good to know. However, I am not sure if Yasraena would get a chance to talk unless you have UB. Perhaps I could work in something similar to the reaction Viconia gets. I will have to see. Thank you! That was extremely helpful! icon_biggrin.gif

Sillara
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #8 on: July 29, 2018, 04:01:55 PM »
Tue Nov 09, 2004 4:18 am    

Since there is a response allowed before the attack, you could have Yasraena do anything. :)

However, since the non-UB version lacks character development for Pai'na, a modified version of the existing string that acknowledges multiple drow in the party would probably suffice.

You'd have to modify the existing transition triggers, ala Elhan, to handle the following situations:

1. Neither Viconia or Yasraena are in the party. (no drow)
2. Viconia is in the party but Yasraena is not. (1 drow)
3. Yasraena is in the party but Viconia is not. (1 drow)
4. Both Viconia and Yasraena are in the party. (2 drow)

(In case you haven't checked, there's a new beta of NI available at the beta download link.)
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #9 on: July 29, 2018, 04:01:56 PM »
Thu Nov 11, 2004 3:54 am    

There are some interjection bugs you should try to fix before V4...

Two blocks in particular are YasraenaAnoSis and YasraenaValygarWanted, in YASRAENJ.D.

The first block has Yasraena commenting at the point of a bunch of Charname responses to Anomen. The result of the ICT is that Yasraena copies all of Anomen's transitions into her own DLG file. So after she comments about Anomen's choice, her portrait and sentence remain on the screen and Charnames responses to Anomen are shown below. Somewhat messy and confusing... I'd suggest finding a way to interject and return to the state in question so that Anomen's portrait and comments are displayed.

The second block has Yasraena doing an ICT on a state with no existing transitions, rather than on the state just prior to it which several of Bioware's characters interject from. Furthermore, the way Yasraena's interjection is coded, she ends up doing the same thing that happens with Anomen as described above.

In light of this, I'd suggest double-checking your coding of the interjections, especially tracing the dialogs with NI to see how they chain together. That's how I spotted the mess of unnecessarily copied transitions in Yasraena's DLG file.

Alas, I can't offer more specific input at this time. Something bad happened and I have to re-install the game. icon_biggrin.gif (No, the mod didn't do it.) However, the saved game should be alright.
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
Re: Bugs for v3
« Reply #10 on: July 29, 2018, 04:01:57 PM »
Thu Nov 11, 2004 5:58 am    

I am familiar with the scenario. Some call it the Chloe syndrome because it happens often in that mod. I know how to fix it. Argh. All right. YasraenaAnoSis and YasraenaValygarWanted. Got it. icon_rolleyes.gif

Sillara
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.

Offline Wistrik

  • Level 1
  • *
  • Posts: 137
  • Karma: +0/-0
  • Gender: Male
    • View Profile
Re: Bugs for v3
« Reply #11 on: July 29, 2018, 04:01:58 PM »
Thu Nov 11, 2004 9:22 am    

Right on. I hate to be acting the part of post-release QA, but that's my only option with this mod. :)
This Child of Bhaal will soon encounter Saerileth. Let the realms rejoice, and let the gods watch and wonder.

Viconia talks tough, but Yasraena *is* tough.

Offline Sillara

  • Retired Modder
  • Level 2
  • *****
  • Posts: 888
  • Karma: +2/-0
  • Gender: Female
    • MSN Messenger - gilalion
    • AOL Instant Messenger - sk8pilmp
    • Yahoo Instant Messenger - charisariel
    • View Profile
    • http://www.gilalion.com
    • Email
Re: Bugs for v3
« Reply #12 on: July 29, 2018, 04:01:59 PM »
Thu Nov 11, 2004 9:13 pm    

Don't worry about it! icon_biggrin.gif I appreciate it actually. If you bother to poke through the code, then you must have enjoyed the mod in the first place! (Either that or you hated it unspeakably, but I do not like to consider that possibility! :wink: )

Sillara
Can you accept a necromancer? Can you trust a murderer? Can you love Tsujatha?
If you like Tsujatha, you should read his novels.
Natha ssin'urn lu' dwalc ilythiiri noamuth wund l' rivven: Yasraena zhah ghil!
Saerileth's bounty is as boundless as the sea; the more  she gives to you, the more she has, for her love is infinite.