Jump to content


Photo

BP 181 bugs?


  • Please log in to reply
100 replies to this topic

#61 -Mikael-

-Mikael-
  • Guest

Posted 01 December 2013 - 10:13 AM

 My friend from another forum found the solution :new_thumbs:.



#62 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 04 December 2013 - 01:59 PM

I found this problem, as well as another with the same script snippet. It was just a matter of missing Identifiers, and this was caused by BP and not by Tactics. Just replaced them with raw numerical entries instead. Those can compile independent of any IDS naming. Thus, I have it all fixed up and ready for next release version.



#63 -Ben-

-Ben-
  • Guest

Posted 04 January 2014 - 10:34 PM

can you give us the solution Mikael ? I have the same problem (obviously)



#64 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 06 January 2014 - 09:24 AM


can you give us the solution Mikael ? I have the same problem (obviously)

 

Attached File  tAR3000.BAF   841bytes   362 downloads

 

(From the newest version, a WIP.) Throw this in your BP/RITUAL folder, reinstall and game on.



#65 -Ablake-

-Ablake-
  • Guest

Posted 10 January 2014 - 05:44 PM

Minor addition from my part: there's another tAR3000.BAF in BP/REDB folder, which needs similar modification since it has similar codes.

Please don't get mad at me if this is redundant. :-s



#66 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 11 January 2014 - 07:22 AM

Minor addition from my part: there's another tAR3000.BAF in BP/REDB folder, which needs similar modification since it has similar codes.
Please don't get mad at me if this is redundant. :-s

Thanks for pointing it out. It doesn't need any fixes; nobody tried to use compass points (letters) instead of numbers here. Either that or it was fixed a while back. I never play Weimer's Tactics mods, because I dislike their whole approach to AI. I look forward to the day they are no longer a part of BP. Thus, I won't spend a minute on them unless somebody brings something like this to my attention.

#67 -CanWakhan-

-CanWakhan-
  • Guest

Posted 09 February 2014 - 06:32 AM

Hello everyone!

I've got a problem with component of BP - "Patching all innates abilities to level one". The error is about phrasing in sftrolxd.bcs, which makes patching a failure. I've found just one post related to the name of this file and it looks like it is a BGSpawn fault, am I right? Is there any way to repair it without starting all over?

Regards.



#68 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 13 February 2014 - 09:10 AM

Hello everyone!

I've got a problem with component of BP - "Patching all innates abilities to level one". The error is about phrasing in sftrolxd.bcs, which makes patching a failure. I've found just one post related to the name of this file and it looks like it is a BGSpawn fault, am I right? Is there any way to repair it without starting all over?

Regards.

 

Sorry, I posted in another forum about this one. In cases like these, when other mods are getting in the way, I advise using Lol's Mod Fixer instead. I devised the original code which made this fix, but Lollorian ran w/ the ball and made it work w/ many mods also.

 

As for repairing it at this point...I can't say for sure, but it sounds possible if all you missed was that singular piece. You could just install Lol's Fixer at the end, and game on.

 

 

IMPORTANT: I keep forgetting to mention this. The level one innate fix is not as important in BG2EE/BGEE as it was in BG2:ToB. In the latter it was cause a CTD. The CTD side at least was fixed for the EE series. Worst you might see is a spell not being cast, and possibly not even that. So, you can probably skip that if you like and not suffer too greatly (I hope).


Edited by horred the plague, 16 February 2014 - 08:09 AM.


#69 pro5

pro5
  • Modder
  • 722 posts

Posted 23 February 2014 - 09:09 AM

After starting a new BGT game, I was a bit surprised to have Firebeard Elvenhair start casting hostile spells (in various attempts it was either horror, melf's acid arrow, or magic missile) at me right after first entering Candlekeep Inn. He remained neutral (blue circle) and did not cast more spells after the first one.

I tracked the problem down to BPMAGE6 script the old man had assigned.

This script block (used in most BP scripts, apparently) should be preventing the above from happening - in theory. Hostile actions follow it, so they won't get a chance to execute if this block fires:
IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
END
However, for some reason it doesn't work on the first round after entering the area. The engine seems to treat such empty block as one with Continue() and Firebead happily proceeds to blast LastSeenBy(hisass) with all his sorcerous might.

I added NoAction() into the block and this appears to have fixed the problem:
IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
    NoAction()
END

At first I thought this was a result of some other mod messing with BP scripts (I was running large BWS install), but then I was able to reproduce this on a cleaner BGT + BP only install, so I'm reporting the problem.

The total amount of BP scripts with exact same script block is over a hundred.

#70 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 24 February 2014 - 07:37 AM

After starting a new BGT game, I was a bit surprised to have Firebeard Elvenhair start casting hostile spells (in various attempts it was either horror, melf's acid arrow, or magic missile) at me right after first entering Candlekeep Inn. He remained neutral (blue circle) and did not cast more spells after the first one.

I tracked the problem down to BPMAGE6 script the old man had assigned.

This script block (used in most BP scripts, apparently) should be preventing the above from happening - in theory. Hostile actions follow it, so they won't get a chance to execute if this block fires:

IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
END
However, for some reason it doesn't work on the first round after entering the area. The engine seems to treat such empty block as one with Continue() and Firebead happily proceeds to blast LastSeenBy(hisass) with all his sorcerous might.

I added NoAction() into the block and this appears to have fixed the problem:
IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
    NoAction()
END

At first I thought this was a result of some other mod messing with BP scripts (I was running large BWS install), but then I was able to reproduce this on a cleaner BGT + BP only install, so I'm reporting the problem.

The total amount of BP scripts with exact same script block is over a hundred.

 

Thanks, and I'm glad it solved your immediate problem. There's a larger problem with doing this on a grand scale however. The action NoAction() causes all script actions to end for that parsing round. So, no scripts after this, in the entire 5 slots available for creatures, will fire either. This in turn can break far more serious things, than cause something simple like casting a buff spell. To fix this exclusively would require special scripting for Firebeard, not a generic fix that would break dozens of other situations. Honestly, it's just a buff that happens to be visible. For the harm it causes (next to none), I'm not really sure it's worth the time and effort it would take to fix this on a grand scale. It would be easier to add an exclusion for Firebeard, let him keep his vanilla scripts, and be done with it.



#71 pro5

pro5
  • Modder
  • 722 posts

Posted 24 February 2014 - 08:44 AM

Thanks, and I'm glad it solved your immediate problem. There's a larger problem with doing this on a grand scale however. The action NoAction() causes all script actions to end for that parsing round. So, no scripts after this, in the entire 5 slots available for creatures, will fire either. This in turn can break far more serious things, than cause something simple like casting a buff spell. To fix this exclusively would require special scripting for Firebeard, not a generic fix that would break dozens of other situations. Honestly, it's just a buff that happens to be visible. For the harm it causes (next to none), I'm not really sure it's worth the time and effort it would take to fix this on a grand scale. It would be easier to add an exclusion for Firebeard, let him keep his vanilla scripts, and be done with it.
Ok, I didn't actually know that empty execution blocks allows lower scripts to fire. Or I did know, but completely forgot - one of those. :P

But I still think there's a better solution than to fix this on an exclusion basis (which would likely miss something somewhere and also wouldn't cover any mod-introduced NPCs unless you're volunteering to add hundreds of compatibility checks into your TP2). I can confirm that this also works:
IF
  OnCreation()
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
    NoAction()
END

IF
  OR(2)
  !Allegiance(Myself,EVILCUTOFF)
  !Detect([GOODCUTOFF])
THEN
  RESPONSE #100    
END
Like I originally thought, the problem only happens in the first AI round after entering the area. Additional OnCreation() check prevents it from happening in that particular round. Personally, I'll take the risk of some script not firing at once after entering over risk of getting a fireball or something nastier in my face for no reason. But maybe that's just me. :)

Note that it's not just "buffs" - the consequences depend on the script and the creature, and in this case, Firebeard could cast for instance Melf's Acid Arrow. Which at level 1 in Candlekeep could, well, kill you. Not to mention such things are immersion-breaking.

Edited by pro5, 24 February 2014 - 09:00 AM.


#72 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 24 February 2014 - 10:06 AM

Note that it's not just "buffs" - the consequences depend on the script and the creature, and in this case, Firebeard could cast for instance Melf's Acid Arrow. Which at level 1 in Candlekeep could, well, kill you. Not to mention such things are immersion-breaking.

Erhm, if that's so then who ever coded the MAA's casting script was unconsciously cheating, after all it's target needs first of all be visible to the caster--- as the LastSeenBy() by itself should never be used as the target ... but with an inner function, such as LastSeenBy(Myself) ---during the targeting phase. 


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#73 pro5

pro5
  • Modder
  • 722 posts

Posted 24 February 2014 - 10:16 AM


Note that it's not just "buffs" - the consequences depend on the script and the creature, and in this case, Firebeard could cast for instance Melf's Acid Arrow. Which at level 1 in Candlekeep could, well, kill you. Not to mention such things are immersion-breaking.

Erhm, if that's so then who ever coded the MAA's casting script was unconsciously cheating, after all it's target needs first of all be visible to the caster--- as the LastSeenBy() by itself should never be used as the target ... but with an inner function, such as LastSeenBy(Myself) ---during the targeting phase. 
 



Targeting blocks are there, but they have Continue(), so the casting phase happens in the same first round. At least that's my guess without picking the script apart line by line.

#74 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 24 February 2014 - 10:31 AM

Note that it's not just "buffs" - the consequences depend on the script and the creature, and in this case, Firebeard could cast for instance Melf's Acid Arrow. Which at level 1 in Candlekeep could, well, kill you. Not to mention such things are immersion-breaking.

 

 

Potential is not actual, in this case. In 11 years of that script, not one single report has come in of Firebeard attacking anybody that didn't have it coming (pickpocket failed, attacked first, etc). Not even your report makes this claim. The fire shield buff is well-known, and was dismissed as benign/trivial. Mages are well-known to buff, albeit fire shield is more a short duration combat buff than a general type. So the worst crime I can see is using the wrong buff at the right time.

 

Scripts aren't in front of my face ATM. Is the buff block before, or after, the shutoff block that you're trying to fix? As is I think you're attacking the wrong problem, and your 'fix' was more coincidental than effective. If the buffing is before this block, try moving it after that block. Also, that's not the only shutoff block in the scripts, if memory serves correctly. 

 

I'm not doing any major surgery on these scripts, especially for just a beauty-fix. I neither have the time nor inclination for a complete reworking after all these years. I was going to simply retire this old mod a couple months back, until I was asked nicely not-to.



#75 pro5

pro5
  • Modder
  • 722 posts

Posted 24 February 2014 - 11:02 AM

Horred, when I say 'for no reason' it means just that. I enter the tavern, he starts casting. There's no fire-shield or any other kind of buff, he's casting offensive spells (usually Horror, sometimes Magic Missile or MAA depending on what the RandomNum triggers roll).

The shutoff block I'm changing is at line 439. The spells being cast (Horror, Magic Missile, MAA) are after it, at lines 1259, 1295, and 1313.

Weidu.log is this:
Spoiler

Attached Images

  • Baldr001.jpg
  • Baldr002.jpg


#76 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 24 February 2014 - 11:53 AM

When I finish my second job of the day, after this job--if I'm not comatose, I'll dust off my copy and fire up BGT and give this a try. Forgive my skepticism but I need to see it for myself. It's very odd that a script that has been stable for 11 years suddenly acts up, when nobody has touched it.


Edited by horred the plague, 24 February 2014 - 11:54 AM.


#77 pro5

pro5
  • Modder
  • 722 posts

Posted 24 February 2014 - 12:41 PM

When I finish my second job of the day, after this job--if I'm not comatose, I'll dust off my copy and fire up BGT and give this a try. Forgive my skepticism but I need to see it for myself. It's very odd that a script that has been stable for 11 years suddenly acts up, when nobody has touched it.
I understand. I'll try this on a new install on my side just in case to see if maybe my "clean" BGT installation is fubared somehow.

#78 pro5

pro5
  • Modder
  • 722 posts

Posted 24 February 2014 - 02:04 PM

Was able to reproduce it again on a clean install with this WeiDU log:
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #0 #0 // BG2 Fixpack - Core Fixes: v10
~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ #0 #1000 // BG2 Fixpack - Game Text Update -> GTU Light (by Wisp): v10
~SETUP-BGT.TP2~ #0 #0 // Baldur's Gate Trilogy - Core: 1.18 (28 Apr 13)
~SETUP-BGTMUSIC.TP2~ #0 #2 // Baldur's Gate Trilogy - Music -> Full Baldur's Gate/Shadows of Amn/Throne of Bhaal Music (WARNING: patches BGMain.exe)
~BP/SETUP-BP.TP2~ #0 #0 // Big Picture, core component (required for most subcomponents): v181-b4611
~BP/SETUP-BP.TP2~ #0 #10 // Patching all the existing innate spells, setting level to one.....: v181-b4611
~BP/SETUP-BP.TP2~ #0 #500 // Generic Mages: v181-b4611
~BP/SETUP-BP.TP2~ #0 #150 // Generic Creature & Script Processing: v181-b4611

In case it matters for script targeting, I always used the same choices in character generation (and I always started a new game for each test): male, human, fighter.

#79 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 24 February 2014 - 03:17 PM

Was bothering me enough, I checked on it between jobs. Sure enough, I saw what you described. I checked on a BP backup from 2006--the same line is in there. Obviously this hasn't been going on for 8 years, or I'd have heard it by now.

 

So, on a whim, I assigned Firebeard the vanilla script equivalents of the BP scripts--mage6 and wtasight. Did you try this test? I had the same results as with the BP scripts. Firebeard still attacked. So, obviously there's something going on, but BP is innocent I say. I don't see anything in his CRE file to cause this either. Not sure what exactly to expect, but if you installed just bp and bgt like I did, and BP is not to blame, nor the vanilla game, what's left? tob-ex and bgt. I don't recall ever seeing this in the early days of bgt, before there was a tob-ex, so tob-ex is my suspect.

 

I stake this claim on nothing more than the evidence I had in front of me--couldn't begin to tell you what is wrong. I can only tell you what isn't causing it---my mod.

 

 

P.S: My install was just BGT w/ the BP core, a couple tweaks, and all the creature AI components (inc mages & generic)


Edited by horred the plague, 24 February 2014 - 03:22 PM.


#80 pro5

pro5
  • Modder
  • 722 posts

Posted 25 February 2014 - 06:52 AM

So, on a whim, I assigned Firebeard the vanilla script equivalents of the BP scripts--mage6 and wtasight. Did you try this test? I had the same results as with the BP scripts. Firebeard still attacked. So, obviously there's something going on, but BP is innocent I say. I don't see anything in his CRE file to cause this either. Not sure what exactly to expect, but if you installed just bp and bgt like I did, and BP is not to blame, nor the vanilla game, what's left? tob-ex and bgt. I don't recall ever seeing this in the early days of bgt, before there was a tob-ex, so tob-ex is my suspect.
I didn't try it, but I'm trying it now and I also tried uninstalling BP. I hate to say it, but in either case (changing script to mage6 and uninstalling) , Firebeard doesn't attack on my end. To be sure, I tried several times, because I noticed earlier there's a certain randomness to the result (in one case during my earlier tests, he didn't attack me; although in the next attempt in exact same install, he did).

The vanilla MAGE6 script only has 80 lines and every block starts with See(NearestEnemyOf(Myself)) condition... are you certain yours is the same when he's assaulting you with it? I don't think BGT includes anything from TobEx, as Ascension64 specifically did not want it to depend on the latter. It doesn't even include the exe patch to remove songlist limit - that one was outsourced into BGTMusic.

I'll understand if you don't want to waste more time on debugging this, but it'd be nice to have a bit more clarity as to what causes this.