Jump to content


Photo

BWP crash when using BPSeries with some bp scripts.


  • Please log in to reply
24 replies to this topic

#1 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 14 December 2012 - 06:47 PM

Tactics install removing ROT main component. The crash occurs when using bp-TH, bp FT-TH, bp FT-CL, bp multi, bp ranged, bp RNG, and bp MG-TH; taking about 3 seconds for the crash to occur. Bp FT-CL takes slightly longer to crash possibly indicating the error is coming later in the script. BP Mage ran fine, as did BP PureF, and BP Bard.

TobEx.log
Spoiler


The error from CHVideo.cp occurs after i die, probably indicating the video for that is missing as well.

Weidu.log
Spoiler


This has occured over multiple reinstalls using BWS 20121202; Tactics selected, very few changes to install besides some things that were skipped by BWS during the install. Maybe i can try an install with fewer kits, as it may be an Innate that isn't set to level 1 by innate fix?

#2 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 23 December 2012 - 08:49 AM

I cannot seem to figure this one out. Can anyone recommend an install that has the bp-series and has a greater challenge than standard install? I had a tactics install working near flawlessly with bg2 only years before, and I greatly enjoy the added challenge, but I absolutely love the ai in bp-series and would like to get this working. I even tried an install with eSeries replacing bp-series and experienced the same crashes. The Baldur.err and ToBex logs aren't providing me with any information. Any help is greatly appreciated.

#3 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 23 December 2012 - 08:32 PM

1. Does the crash happen for any PC/NPC with the AI assigned or just a particular one?

2. Consider removing all items from the crashing NPC and then assign the AI :P Tell us if the crashing stops when the toon is nekkid :D

3. The crash during death movie thing is kinda freaky :o Google gave me a thread in Bioware social that suggested replacing the entire death movie file (and the crashing stopped for that guy)
Why did the movie get corrupted in the first place though? :blink:

Also, that's one of the nicest install orders I've seen in a while :clap:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#4 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 24 December 2012 - 02:37 AM

1. yes
2. it crashes at start of bg1 when all you have is a quarterstaff in inventory
3. i was missing deathand movie file, googled it and replaced and it works fine. Install error i guess

I had this problem before with BWS. Before BWS during the time of manual installs, I could get these scripts working, but ever since bws came to be, I have had this issue. I tried before and eventually gave up, this time i am really in the mood for some BG, but not in mood for 3 days of installing :(. I can't really test anything atm. I have a fresh install of bg2 ready for another go, but kind of want to figure this out before i attempt. Ive tried this over multiple installs and still same problem. I have an i5-2500k, 8gb ram, windows 7 if its possibly memory related. Not installed in program files.

#5 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 24 December 2012 - 08:00 AM

The thing that's confusing is that not even the logs report anything amiss when it crashes (an error message like it gave for the video crash would've helped a lot) :(

I've notified the author of BPSeries to have a look. He could probably narrow it down why it crashes on some scripts and not on others :cheers:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#6 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 25 December 2012 - 07:11 AM

Well, horred seems to suggest the script is trying to cast something that's broken by some random mod :unsure:

If you're bent on making the scripts work though, grab NearInfinity, put it in your BGII folder, run it and expand the "Scripts" tree.
You should see all the AI scripts there.
Pick the smallest one that crashes and start deleting portions of the script and saving and playing the game (keep a backup made in case you find the actual crashing block and need to revert back) each time check if it crashes.

Hope you find the little git in the script :)

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#7 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 25 December 2012 - 07:22 AM

You could also try the newly released scripts for BGEE (as well as for BG2:ToB) w/o any mod content support, and see if you have the same crashes. While that won't guarantee you it's a problem with the scripts (still too many outside factors to confirm), it will tell you if some mod installed is definitely the issue. I've tested these core scripts for weeks in BGEE, and zero of these sorts of crashes. I saw them every couple hours or so in a BWP install. This "suggests" that the scripts are not the problem, but something between a vanilla BGEE and a heavily-modded BG2:ToB is.


BTW, I tried the "delete this/that" bug tracking weeks ago. I could find nothing conclusive, which is why I recommended this test instead. But maybe someone else will have better luck than I?

Edited by horred the plague, 25 December 2012 - 07:25 AM.


#8 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 27 December 2012 - 12:59 PM

I just attempted this with a new install with the new scripts for BGEE, and experienced the same crashes. Could this be a hardware issue? My current dvd drive has died so I used torrents to install the game. Could that be it?

#9 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 29 December 2012 - 04:10 AM

I figured it out; spcl910.spl, spcl911.spl, spcl912.spl were all innates set to level 9. They are spike traps, exploding trap, and time trap.



#10 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 December 2012 - 06:25 AM

I figured it out; spcl910.spl, spcl911.spl, spcl912.spl were all innates set to level 9. They are spike traps, exploding trap, and time trap.

 

 I'm using the BWP fixpack code for level one innates, that was injected into my tp2 file in a BWP install. So if there's a problem perhaps the fixpack needs fixing.

 

 

// INNATE FIXER
// (BWP Fixpack version)
PRINT @130
COPY_EXISTING_REGEXP GLOB ~.*\.spl~ ~override~
  READ_SHORT 0x1c spell_type
  PATCH_IF (%spell_type% = 4) BEGIN
    READ_LONG 0x34 spell_level
    PATCH_IF (((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL412~) AND (%spell_level% != 4)) OR // SET_SNARE_TRAP
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL414~) AND (%spell_level% != 4)) OR // SET_SPECIAL_SNARE_TRAP
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN592~) AND (%spell_level% != 5)) OR // HELM_RITUAL_SCROLL
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN593~) AND (%spell_level% != 5)) OR // ODREN_RITUAL_SCROLL
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN642~) AND (%spell_level% != 6)) OR // POISONOUS_CLOUD - eSeries
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN666~) AND (%spell_level% != 6)) OR // ZOMBIE_LEVEL_DRAIN
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL910~) AND (%spell_level% != 9)) OR // ROGUE_SET_SPIKE_TRAP
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL911~) AND (%spell_level% != 9)) OR // ROGUE_SET_EXPLODING_TRAP
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL912~) AND (%spell_level% != 9)) OR // ROGUE_SET_TIME_TRAP
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN940~) AND (%spell_level% != 9)) OR // MEPHIT_STINKING_CLOUD - eSeries
              ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN979~) AND (%spell_level% != 9))) BEGIN // GOLEM_GASCLOUD - eSeries
      PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL412~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL414~) BEGIN
        WRITE_LONG 0x34 ~4~
      END ELSE
      PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN592~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN593~) BEGIN
        WRITE_LONG 0x34 ~5~
      END ELSE
      PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN642~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN666~) BEGIN
        WRITE_LONG 0x34 ~6~
      END ELSE
      PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL910~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL911~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL912~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN940~) OR
               (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN979~) BEGIN
        WRITE_LONG 0x34 ~9~
      END
    END ELSE
    PATCH_IF (%spell_level% != 1) BEGIN
      WRITE_LONG 0x34 ~1~
    END
  END
BUT_ONLY_IF_IT_CHANGES
 

 

 

 

Sure enough the exceptions are there, presumably to "fix" some other mod using an obscure Trigger or Action unnecessarily. I think instead their code should be changed, even if it's vanilla BG2 code. My original innate fixer years back certainly did not have these exceptions, and for good reasons. Perhaps I'll revert my code, and let others fix their own issues.


Edited by horred the plague, 29 December 2012 - 06:43 AM.


#11 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 December 2012 - 09:43 AM

COPY_EXISTING_REGEXP GLOB ~.*\.spl~ ~override~
  READ_SHORT 0x1c spell_type
  PATCH_IF (%spell_type% = 4) BEGIN
    READ_LONG 0x34 spell_level
    PATCH_IF (%spell_level% =0) BEGIN
      WRITE_LONG 0x34 ~1~
    END
    PATCH_IF (%spell_level% > 1) BEGIN
      WRITE_LONG 0x34 ~1~
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~.*\.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY EXACT_MATCH ~SpellCastInnate~ ~SpellCast~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES
 

Something like this, perhaps?

 

If it's the option of a SpellCast check failing, or a game exploding....(*thinks of the Helm scroll at watcher's keep*)

 

Another way could be found to get the same results perhaps. e.g., make the scroll spell into a wizard spell, change its name, and use a SpellCastRES check instead. Going to test it now, I guess the BP release is put on hold again. :(


Edited by horred the plague, 29 December 2012 - 09:54 AM.


#12 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 December 2012 - 10:32 AM

SpellCastInnateRES works without the level being set to the spell.ids level. So, we can have level one innate spells checked for casting, and also have scripts cast said spells w/o KABOOM!!!

 

So, instead we need to change the script lines to match up--and also all the Innates to level one. Needless to say, this will be tricky to automate with weidu. It's much easier to use REPLACE_TEXTUALLY on the exact script text, but what we'd really want is to switch the Action as well as the inner format [(O:Object,I:Spell) to (S:Spell,O:Object)] so it can account for anything a mod adds in.

 

I tried the new function REFACTOR_TRIGGER, but it's not working like it should. It's choosing scripts that do not even have SpellCast (any variant) in them and doing nothing that I can see, and not choosing the ones that need help. Maybe I'm using it wrong, the documentation is quite limited.

 

I'm just as guilty btw, I saw there was several of the old BP enemy scripts using SpellCastInnate(). I cannot speak for what/why I did 8+ years ago. These I'll definitely get switched over before the next release.


Edited by horred the plague, 29 December 2012 - 10:34 AM.


#13 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 29 December 2012 - 11:40 AM

I ran into another problem with the scripts. A ctd that occurs when placing an item into quickslot 1. The other slots work, and it happens across the same scripts mentioned earlier. Again Baldur.err provides nothing. I glanced through the scripts with nearinfinity, but can't put a finger on what causes a ctd for this slot only, As of now, I'm progressing by leaving that slot empty. 



#14 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 December 2012 - 01:27 PM

There's absolutely no good reason for your latest game-wrecking issue, and I don't know where to even begin to start diagnosing it let alone fixing it. Let's start with simple questions: EVERY item, or just a couple? Is this with the new script package, or the old one in BPv180? Do you have these same problems in an UNMODDED version of BG2 or just in this BWP hodgepodge?

 

After all, I only claim to support UNMODDED BG2 in my latest batch. Not 10,058+ mods as well. The rest is "Use at your own risk". I have VERY good reasons for this decision, and your problems are doing nothing but reaffirming that decision. In fact, they are the very reason WHY I chose not to support a BWP-style mega-install.

 

I do know the latest scripts are next-to-flawless in an unmodded BGEE install, where I've done lots of testing. Maybe all BG2 support will be removed instead of killing myself trying to fix what I can't even find and didn't break in the first place. OR, I remove ALL innate spell support from this day on.  At the least, I've lost this entire day's work on the new Big Picture mod chasing my tail in this mess of mods. I'm not even including party AI in BP package any longer, it has enough headaches of its own to offer.

 

I found how to work-around your first issue, but several hours of weidu hammering has given me nothing but a steamy pile. FILE_CONTAINS_EVALUATED, REFACTOR_TRIGGER, REPLACE_EVALUATED have all let me down horribly. Only REPLACE_TEXTUALLY can even FIND a CastSpellInnate in the script, and it does us no good at all. There simply are no other weidu commands to try out, of any potential help--at least, documented commands.



#15 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 29 December 2012 - 02:32 PM

BWP install. its the script contained in bpv180. I tested potion of healing, stone of recall, potion of clarity; all caused the crash. Overall, if a fix can't be found its not a huge issue as I can live with 2 quickslots for items. Just a really weird bug to run into. 



#16 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 December 2012 - 05:40 PM

Very weird bug. First I've heard this one, in many years and thousands of script users. Not sure where to start, honestly.

 

As per the innate bug, it's been around since Bioware dumped the last patch and ran, back in 2001 or so. This needs addressing, even if I have to resort to just patching the vanilla scripts and my own files. Which is what I'm about to do, I finally got that working after I learned about "Gnu Emac" and his "extra-special" expressions. First I've heard of this. The name sounds like a yuppie petting zoo to me, not a basis for code, and has the same terms of endearment. It made weidu a lot more complex, to even do simple shit like replace a single line of text with another. As the old saying goes: "The more you spruce up the plumbing, the easier it is to stop up the drain".

 

To reiterate, the solution is to make ALL SpellCastInnate checks into SpellCastInnateRES checks, and to KEEP ALL the innates set to level 1.

 

If I can't figure out a REGEXP for this soon, I'm going to cop out and just fix the vanilla and the BP scripts---and naturally, set ALL innates to level one. That covers my ass; other modders can have their own fun with this. I've had more than my share of the joy (haven't stopped working on it a bit, since original post).



#17 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 29 December 2012 - 06:38 PM

Here, eat this one, weidu: P

 

 

BACKUP ~Innate_Fix/backup~
AUTHOR ~Nobody~ NO_IF_EVAL_BUG

BEGIN ~Innates Set to Level One~

COPY_EXISTING_REGEXP GLOB ~.*\.spl~ ~override~
  READ_SHORT 0x1c spell_type
  PATCH_IF (%spell_type% = 4) BEGIN
    READ_LONG 0x34 spell_level
    PATCH_IF (%spell_level% =0) BEGIN
      WRITE_LONG 0x34 ~1~
    END
    PATCH_IF (%spell_level% > 1) BEGIN
      WRITE_LONG 0x34 ~1~
    END
  END
BUT_ONLY_IF_IT_CHANGES
 
 
COPY_EXISTING_REGEXP GLOB ~.*\.bcs~ ~override~
DECOMPILE_AND_PATCH BEGIN
 REPLACE_EVALUATE CASE_INSENSITIVE ~SpellCastInnate(\(.*\),\([^0].*\))~
    BEGIN
      TEXT_SPRINT z "WASTEFUL"
      TEXT_SPRINT bs "0"
      TEXT_SPRINT whynow "%MATCH2%"
      PATCH_PRINT "%SOURCE_FILE%: MATCH2 = %whynow%"
      PATCH_IF ("%whynow%" STRING_EQUAL_CASE "0" != 1) BEGIN
        y = IDS_OF_SYMBOL(~spell~ ~%MATCH2%~)
        PATCH_PRINT "%SOURCE_FILE%: spell id = %y%"
        PATCH_IF (%y% > 3999) BEGIN
          y -= 4000
          PATCH_IF (y < 10) BEGIN
            TEXT_SPRINT z "SPCL00%y%"
          END ELSE PATCH_IF (y > 9) AND (y <100) BEGIN
            TEXT_SPRINT z "SPCL0%y%"
          END ELSE BEGIN
            TEXT_SPRINT z "SPCL%y%"
          END
        END ELSE PATCH_IF (%y% > 2999 AND y < 4000) BEGIN
          y -= 3000
          PATCH_IF (y < 10) BEGIN
            TEXT_SPRINT z "SPIN00%y%"
          END ELSE PATCH_IF (y > 9) AND (y <100) BEGIN
            TEXT_SPRINT z "SPIN0%y%"
          END ELSE BEGIN
            TEXT_SPRINT z "SPIN%y%"
          END
        END
        PATCH_PRINT "%SOURCE_FILE%: spell name = %z%"
      END ELSE BEGIN
        PATCH_PRINT "%SOURCE_FILE%:  Modder chose I:Spell = 0, and it slipped through the cracks somehow."
        TEXT_SPRINT z "BUGGED"
      END
    END
    ~SpellCastInnateRES("%z%",%MATCH1%)~
  END
BUT_ONLY_IF_IT_CHANGES

 

 

It will give you some parsing errors on several vanilla scripts, send bug reports to Bioware. They're not really parsed final-product anyways, just complained about by weidu's compiler.  But besides that, this does precisely what we needed it to do, REGEXP. Now, to find me a bottle of whiskey and a box of ammo... :ph34r:

 

 

EDIT: ....So, I skipped the whiskey and box of buckshot, and decided to test this out some more. I just added a small bit up above, a [^0] to the REPLACE_EVALUATE line. What does this do? It skips all the  (valid) SpellCastInnate(xxxxxxxx, 0) checks, that check for ANY innate spell cast in the last round.

 

 

For a BWP install however, first you have to fix the broken kit.ids that was hosed mercilessly by mod # 248/whatever,  in the install. Else, the scripts won't parse. This takes a LONG time to install, in a phat BWP install. What doesn't? Go make lunch, eat it, come back, and you'll probably be done....

 

I thought weidu shut had down on me, but a 20-minute-long text search in NI proved that the last qualifying file (in my install) was KRDRGBRN.bcs. The rest were shut off because of the (xxxxxxxxx,0) check I added. I also did not get any parsing errors reported, this last time. Maybe the added exception helped out? *shrugs*

 

Oh...feel free to comment out my PATCH_PRINT debug lines. I like them because it tells me weidu didn't go to sleep on me, but it makes for long debug files.


Edited by horred the plague, 29 December 2012 - 10:51 PM.


#18 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 30 December 2012 - 01:40 AM

Oh...feel free to comment out my PATCH_PRINT debug lines. I like them because it tells me weidu didn't go to sleep on me, but it makes for long debug files.
To disable that in a BWP install is actually a bad thing.... because you won't want to stair the empty screen for ten minutes and wonder if it's working or not... in a pause or non-existing-virus scan failure mode.

Deactivated account. The user today is known as The Imp.


#19 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 30 December 2012 - 09:49 AM

Time to man up and admit that I'm responsible for all the shit you went through then :unsure:

 

horred the plague's new code looks awesome and hope that fixes all issues :) (the original cause for the creation of the exclusion list was the Demogorgon scroll not working properly because the relevant innate was set to level 1)


"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#20 MetaTate

MetaTate
  • Member
  • 8 posts

Posted 31 December 2012 - 06:12 PM

Horred's patch fixed even the ctd when an item was in quickslot 1! I'd like to thank all who helped; I've been wanting to play another BWP install for awhile, but I'm one of those people where one small bug will eat at me and not let me continue until its fixed. Thanks all.