Jump to content
Sign in to follow this  
Plaius

BG2 Level1NPC's Bug - NPC's leave for good

Recommended Posts

Hello. There is a bug. When you kick out an NPC in BG2 SOA, they leave for good. They don't go hang out at the Copper Coronet, or elsewhere like they should.

 

Others have identified Level1NPC's as the source for this. Hopefully you can fix it, because you've made a fantastic mod here.

 

Please see this web link for additional information:

http://forums.gibberlings3.net/lofiversion...php/t11763.html

 

 

 

Additional info from others:

 

~LVL1NPCS/LVL1NPCS.TP2~ #0 #1216 // Yoshimo

 

In this new game I've just started, when an NPC is kicked out of the party, they say something different from the vanilla game (Yoshimo says Goodnight Ladies) and then they are gone forever.

 

No idea! How strange. Yoshi's got his own P file and everything!

 

So, the only mods are really Lvl1NPC and Banter pack. And I only have the accelerater script installed for banter pack. And I certainly don't see Lvl1NPC doing this.

 

It's not just Yoshi, but every character who says that. The actual line is 1 of 2 lines, chosen randomly. The two lines are:

 

"Goodnight Ladies, Ladies Goodnight"

 

to which you can reply

 

"Goodnight and Goodbye." (they leave forever)

"Get back in the party."

 

"It was a pleasure traveling in your party. Good luck"

 

to which you can reply

 

"Bye"

"Please rejoin the party."

 

(...)Finally, a small change that many people forget, but which is responsible for numerous headaches. Scroll to the top of your .cre file, and find the Flags field. In a newly converted .cre file, the flag "Export allowed" is still checked. Uncheck that. Odd side-effects that could crop up include scripts and dialogues behaving like those of a multi-player NPC. Not what we want at all.

 

It's what I thought. Let me guess: You have ToB installed?

 

(...)

UNLESS ~25POST~

 

Take that out.

 

"UNLESS ~25POST~" in that place means "Don't do the appending if ToB is installed". So, just write

 

APPEND ~pdialog.2da~

~KKCalin KKCalinP KKCalinJ KKCalinD~

UNLESS ~KKCalin~

 

and it should work fine. Same for the other dialogue appending, btw.

 

(I PMed theacefes about this regarding her tutorial, so it should be corrected soon.)

 

 

Thanks again. I figured out how to fix the rest of the errors I was getting on install too so......now that this is fixed too....... WOOOOHOOOOO!

Share this post


Link to post

Just a quick check in - I placed the latest available version at the very end an EasyTutu install, just to see what would happen if jaheira became a Fighter/Avenger and Khalid a Fighter Justifier.

 

I installed the "more closely matching Player experience" component, and did not install either BG2 Tweaks or SCS related components.

 

On the initial join of Jaheira and Khalid, Jaheira's script does some odd stuff, having her join with her old experiecne levels added to each of the adjusted classes, and then there is an error message in the dialogue box:

 

Action error: special case; Mysel Not Found check for proper brackets line #3

 

Khalid gets his experiecne points apportioned, but does not join the party. Ctr-Q allows him to join.

 

I will set aside some time next week to test this, and see what I come up with, but if anyone can replicate it, it would be great info :)

Edited by cmorgan

Share this post


Link to post

I'm going to have to check if I had a faulty upload, or if you had a faulty download - that really can't happen :)

Share this post


Link to post

I want to confirm the first post. I thought I saw in an earlier thread that you fixed this in near-version 1, so I didn't report it.

 

Additional: whichever part of the code that caused this also touched, it looks like, all or nearly all CRE files -- i.e. I see a buttload of CREs in the override. Why? I don't know. Third base!

Edited by Azazello

Share this post


Link to post

I did - I was referring to the error in the debug box that cmorgan is reporting.

 

Creature regexps were removed in v1.

Share this post


Link to post

I put some of them back in internals of BG1NPC, but only for materials that we want to touch with other code to make sure they are fixed before we mess with them:

 

// Nythrun's Broken CRE Order and Effects Fix

DEFINE_PATCH_MACRO ~enforce_cre_order~ BEGIN

PATCH_IF ((SOURCE_SIZE > 0x02d3) AND !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~charbase~)) THEN BEGIN

READ_BYTE 0x0033 "eff"

READ_LONG 0x02a0 "kso"

READ_LONG 0x02a4 "ksc"

READ_LONG 0x02a8 "smo"

READ_LONG 0x02ac "smc"

READ_LONG 0x02b0 "mso"

READ_LONG 0x02b4 "msc"

READ_LONG 0x02b8 "iso"

READ_LONG 0x02bc "ilo"

READ_LONG 0x02c0 "ilc"

READ_LONG 0x02c4 "elo"

READ_LONG 0x02c8 "elc"

READ_ASCII "kso" ~ks~ ELSE ~fail~ (0x0c * "ksc")

READ_ASCII "smo" ~sm~ ELSE ~fail~ (0x10 * "smc")

READ_ASCII "mso" ~ms~ ELSE ~fail~ (0x0c * "msc")

READ_ASCII "iso" ~is~ ELSE ~fail~ (0x50)

READ_ASCII "ilo" ~il~ ELSE ~fail~ (0x14 * "ilc")

READ_ASCII "elo" ~el~ ELSE ~fail~ ("elc" * (0x30 + ((("eff" & 0x01) = 0x01) ? 0xd8 : 0x00)))

DELETE_BYTES 0x02d4 (SOURCE_SIZE - 0x02d4)

SET "off" = 0x02d4

WRITE_LONG 0x02a0 "off"

PATCH_IF !(~%ks%~ STRING_EQUAL ~fail~) THEN BEGIN

INSERT_BYTES "off" (0x0c * "ksc")

WRITE_ASCIIE "off" ~%ks%~

END ELSE BEGIN

SET "ksc" = 0x00

WRITE_LONG 0x02a4 "ksc"

END

SET "off" += (0x0c * "ksc")

WRITE_LONG 0x02a8 "off"

INSERT_BYTES "off" (0x10 * 0x11)

PATCH_IF ((~%sm%~ STR_CMP ~fail~) AND (smc = 0x11)) THEN BEGIN

WRITE_ASCIIE "off" ~%sm%~

END ELSE BEGIN

SET "smc" = 0x11

WRITE_LONG 0x2ac "smc"

FOR ("i1" = 0x00; "i1" < 0x07; "i1" += 0x01) BEGIN

WRITE_SHORT ("off" + (i1 * 0x10)) "i1"

END

FOR ("i1" = 0x00; "i1" < 0x09; "i1" += 0x01) BEGIN

WRITE_SHORT ("off" + ("i1" * 0x10) + 0x070) "i1"

WRITE_SHORT ("off" + ("i1" * 0x10) + 0x076) 0x01

END

WRITE_SHORT ("off" + 0x106) 0x02

END

SET "off" += (0x10 * "smc")

WRITE_LONG 0x02b0 "off"

PATCH_IF !(~%ms%~ STRING_EQUAL ~fail~) THEN BEGIN

INSERT_BYTES "off" (0x0c * "msc")

WRITE_ASCIIE "off" ~%ms%~

END ELSE BEGIN

SET "msc" = 0x00

WRITE_LONG 0x02b4 "msc"

END

SET "off" += (0x0c * "msc")

WRITE_LONG 0x02c4 "off"

PATCH_IF !(~%el%~ STRING_EQUAL ~fail~) THEN BEGIN

INSERT_BYTES "off" ("elc" * (0x30 + ((("eff" & 0x01) = 0x01) ? 0xd8 : 0x00)))

WRITE_ASCIIE "off" ~%el%~

END ELSE BEGIN

SET "elc" = 0x00

WRITE_LONG 0x02c8 "elc"

END

SET "off" += ("elc" * (0x30 + ((("eff" & 0x01) = 0x01) ? 0xd8 : 0x00)))

WRITE_LONG 0x02bc "off"

PATCH_IF !(~%il%~ STRING_EQUAL ~fail~) THEN BEGIN

INSERT_BYTES "off" (0x14 * "ilc")

WRITE_ASCIIE "off" ~%il%~

END ELSE BEGIN

SET "ilc" = 0x00

WRITE_LONG 0x02c0 "ilc"

END

SET "off" += (0x14 * "ilc")

WRITE_LONG 0x02b8 "off"

INSERT_BYTES "off" 0x50

PATCH_IF !(~%is%~ STRING_EQUAL ~fail~) THEN BEGIN

WRITE_ASCIIE "off" ~%is%~

END ELSE BEGIN

FOR ("i1" = 0x00; "i1" < 0x4c; "i1" += 0x02) BEGIN

WRITE_SHORT ("off" + "i1") 0xffff

END

END

SET SOURCE_SIZE = ("off" + 0x50)

END

END

DEFINE_PATCH_MACRO ~use_v2_eff~ BEGIN

PATCH_IF ((SOURCE_SIZE > 0x02d3) AND !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~charbase~)) THEN BEGIN

READ_BYTE 0x0033 "eff_type"

WRITE_BYTE 0x0033 0x1

PATCH_IF (("eff_type" & 0x1) = 0x0) THEN BEGIN

READ_LONG 0x02c8 "elc"

PATCH_IF ("elc" > 0x0) THEN BEGIN

READ_LONG 0x02c4 "elo"

READ_ASCII "elo" ~efx~ (0x30 * "elc")

PATCH_FOR_EACH "off1" IN 0x02a0 0x02a8 0x02b0 0x02b8 0x02bc BEGIN

READ_LONG "off1" "off2"

WRITE_LONG "off1" (("off2" > "elo") ? ("off2" + ("elc" * (0x108 - 0x30))) : ("off2" < 0x2d4 ? 0x2d4 : "off2"))

END

DELETE_BYTES "elo" (0x030 * "elc")

INSERT_BYTES "elo" (0x108 * "elc")

SPRINT ~rfx~ ~~

INNER_PATCH ~%efx%~ BEGIN

FOR ("i1" = 0x0; "i1" < "elc"; "i1" += 0x1) BEGIN

SET SOURCE_SIZE += 0xd8

READ_SHORT (("i1" * 0x30) + 0x00) "opcode"

READ_BYTE (("i1" * 0x30) + 0x02) "target"

READ_BYTE (("i1" * 0x30) + 0x03) "power"

READ_LONG (("i1" * 0x30) + 0x04) "parameter1"

READ_LONG (("i1" * 0x30) + 0x08) "parameter2"

READ_BYTE (("i1" * 0x30) + 0x0c) "timing_mode"

READ_BYTE (("i1" * 0x30) + 0x0d) "dispellability"

READ_LONG (("i1" * 0x30) + 0x0e) "duration"

READ_BYTE (("i1" * 0x30) + 0x12) "probability1"

READ_BYTE (("i1" * 0x30) + 0x13) "probability2"

READ_ASCII (("i1" * 0x30) + 0x14) ~resref~

INNER_PATCH_SAVE ~rfx~ ~%rfx%~ BEGIN

INSERT_BYTES (("i1" * 0x108) + 0x00) 0x110

WRITE_LONG (("i1" * 0x108) + 0x10) "opcode"

WRITE_LONG (("i1" * 0x108) + 0x14) "target"

WRITE_LONG (("i1" * 0x108) + 0x18) "power"

WRITE_LONG (("i1" * 0x108) + 0x1c) "parameter1"

WRITE_LONG (("i1" * 0x108) + 0x20) "parameter2"

WRITE_BYTE (("i1" * 0x108) + 0x24) "timing_mode"

WRITE_LONG (("i1" * 0x108) + 0x28) "duration"

WRITE_SHORT (("i1" * 0x108) + 0x2c) "probability1"

WRITE_SHORT (("i1" * 0x108) + 0x2e) "probability2"

WRITE_ASCIIE (("i1" * 0x108) + 0x30) ~%resref%~

WRITE_BYTE (("i1" * 0x108) + 0x5c) "dispellability"

WRITE_LONG (("i1" * 0x108) + 0x80) (` 0x0)

WRITE_LONG (("i1" * 0x108) + 0x84) (` 0x0)

WRITE_LONG (("i1" * 0x108) + 0x88) (` 0x0)

WRITE_LONG (("i1" * 0x108) + 0x8c) (` 0x0)

WRITE_LONG (("i1" * 0x108) + 0xa4) (` 0x0)

DELETE_BYTES (("i1" * 0x108) + 0x08) 0x8

END

END

END

WRITE_ASCIIE "elo" ~%rfx%~

END

END

END

END

 

/* Apply Nythrun's Fixes to creatures we use */

ACTION_FOR_EACH ~crefile~ IN ~%tutu_scripta%varicem.cre~

~%tutu_scriptb%ullrush.cre~

~%tutu_scriptbg%neb.cre~

~%tutu_scriptd%ursword.cre~

~%tutu_scriptf%twbax_a.cre~

~%tutu_scripti%ronelit.cre~

~%tutu_scriptm%oorlock.cre~

~%tutu_scripto%grema03.cre~

~%tutu_scripts%handal2.cre~

~%tutu_var%alatos.cre~

~%tutu_var%albert.cre~

~%tutu_var%alvanh.cre~

~%tutu_var%alyth.cre~

~%tutu_var%amaran.cre~

~%tutu_var%angelo.cre~

~%tutu_var%ankheg.cre~

~%tutu_var%arkush.cre~

~%tutu_var%avarice.cre~

~%tutu_var%bandit.cre~

~%tutu_var%baresh.cre~

~%tutu_var%bassil.cre~

~%tutu_var%bayard.cre~

~%tutu_var%bearbl.cre~

~%tutu_var%bearbr.cre~

~%tutu_var%bearca.cre~

~%tutu_var%bearpo.cre~

~%tutu_var%belt.cre~

~%tutu_var%bently.cre~

~%tutu_var%bjorni.cre~

~%tutu_var%brage.cre~

~%tutu_var%brielb.cre~

~%tutu_var%brilla.cre~

~%tutu_var%cadder.cre~

~%tutu_var%calaha.cre~

~%tutu_var%chase.cre~

~%tutu_var%claird.cre~

~%tutu_var%coksmth.cre~

~%tutu_var%daitel.cre~

~%tutu_var%dalton.cre~

~%tutu_var%davaeo.cre~

~%tutu_var%deathk.cre~

~%tutu_var%delain.cre~

~%tutu_var%delsvir.cre~

~%tutu_var%deltan.cre~

~%tutu_var%dopdur1.cre~

~%tutu_var%drienn.cre~

~%tutu_var%drizzt.cre~

~%tutu_var%dryad.cre~

~%tutu_var%durlagt.cre~

~%tutu_var%durlyl.cre~

~%tutu_var%dushai.cre~

~%tutu_var%elmin2.cre~

~%tutu_var%elmin5.cre~

~%tutu_var%ender.cre~

~%tutu_var%entill.cre~

~%tutu_var%erdane.cre~

~%tutu_var%faldor.cre~

~%tutu_var%farmbr.cre~

~%tutu_var%fear.cre~

~%tutu_var%fearm.cre~

~%tutu_var%fenrus.cre~

~%tutu_var%fireb1.cre~

~%tutu_var%flame.cre~

~%tutu_var%galken.cre~

~%tutu_var%galtok.cre~

~%tutu_var%gatewa.cre~

~%tutu_var%gellan.cre~

~%tutu_var%gerde.cre~

~%tutu_var%girba2.cre~

~%tutu_var%gnoll.cre~

~%tutu_var%gorion.cre~

~%tutu_var%grael.cre~

~%tutu_var%greywo.cre~

~%tutu_var%hack.cre~

~%tutu_var%hafiz.cre~

~%tutu_var%halaca.cre~

~%tutu_var%halbaz.cre~

~%tutu_var%hurgan.cre~

~%tutu_var%ike.cre~

~%tutu_var%iron11.cre~

~%tutu_var%isla.cre~

~%tutu_var%jessup.cre~

~%tutu_var%joia.cre~

~%tutu_var%kaisha.cre~

~%tutu_var%karoug.cre~

~%tutu_var%keeper.cre~

~%tutu_var%keldda.cre~

~%tutu_var%kirinh.cre~

~%tutu_var%korax.cre~

~%tutu_var%krumm.cre~

~%tutu_var%landri.cre~

~%tutu_var%larze.cre~

~%tutu_var%liia.cre~

~%tutu_var%love.cre~

~%tutu_var%lovem.cre~

~%tutu_var%madarc.cre~

~%tutu_var%marl.cre~

~%tutu_var%meiala.cre~

~%tutu_var%mendas.cre~

~%tutu_var%mulahe.cre~

~%tutu_var%mutami.cre~

~%tutu_var%narlen.cre~

~%tutu_var%niemai.cre~

~%tutu_var%nobw2.cre~

~%tutu_var%perdue.cre~

~%tutu_var%petrin.cre~

~%tutu_var%pheirk.cre~

~%tutu_var%phlydi3.cre~

~%tutu_var%poe.cre~

~%tutu_var%pride.cre~

~%tutu_var%pridem.cre~

~%tutu_var%prost5.cre~

~%tutu_var%pumberl.cre~

~%tutu_var%rielta.cre~

~%tutu_var%riggilo.cre~

~%tutu_var%sarev1.cre~

~%tutu_var%sarevo.cre~

~%tutu_var%sarhed.cre~

~%tutu_var%scar.cre~

~%tutu_var%seniya.cre~

~%tutu_var%serva2.cre~

~%tutu_var%shoal.cre~

~%tutu_var%silke.cre~

~%tutu_var%skie.cre~

~%tutu_var%slave.cre~

~%tutu_var%taerom.cre~

~%tutu_var%takiyah.cre~

~%tutu_var%tamoko.cre~

~%tutu_var%tarnes.cre~

~%tutu_var%tarnor.cre~

~%tutu_var%tazok.cre~

~%tutu_var%tellan.cre~

~%tutu_var%tenya.cre~

~%tutu_var%thalan.cre~

~%tutu_var%therel.cre~

~%tutu_var%ulraun.cre~

~%tutu_var%unshey.cre~

~%tutu_var%vai.cre~

~%tutu_var%vail.cre~

~%tutu_var%volo.cre~

~%tutu_var%winski.cre~

~%tutu_var%winski2.cre~

~%tutu_var%winthr2.cre~

~%tutu_var%yago.cre~

~%tutu_var%zombie.cre~

~%tutu_var%zombiew.cre~

~%tutu_var%ajanti.cre~

~%tutu_var%ajanti4.cre~

~%tutu_var%ajanti6.cre~

~%tutu_var%alora.cre~

~%tutu_var%alora6.cre~

~%tutu_var%branwe.cre~

~%tutu_var%branwe5.cre~

~%tutu_var%coran.cre~

~%tutu_var%coran5.cre~

~%tutu_var%dynahe.cre~

~%tutu_var%dynahe2.cre~

~%tutu_var%dynahe4.cre~

~%tutu_var%dynahe6.cre~

~%tutu_var%edwin.cre~

~%tutu_var%edwin2.cre~

~%tutu_var%edwin4.cre~

~%tutu_var%edwin6.cre~

~%tutu_var%faldor.cre~

~%tutu_var%faldor5.cre~

~%tutu_var%garric.cre~

~%tutu_var%garric2.cre~

~%tutu_var%garric4.cre~

~%tutu_var%garric6.cre~

~%tutu_var%imoen1.cre~

~%tutu_var%imoen2.cre~

~%tutu_var%imoen4.cre~

~%tutu_var%imoen6.cre~

~%tutu_var%jaheir.cre~

~%tutu_var%jaheir2.cre~

~%tutu_var%jaheir4.cre~

~%tutu_var%jaheir6.cre~

~%tutu_var%kagain.cre~

~%tutu_var%kagain2.cre~

~%tutu_var%kagain4.cre~

~%tutu_var%kagain6.cre~

~%tutu_var%khalid.cre~

~%tutu_var%khalid2.cre~

~%tutu_var%khalid4.cre~

~%tutu_var%khalid6.cre~

~%tutu_var%kivan.cre~

~%tutu_var%kivan4.cre~

~%tutu_var%kivan6.cre~

~%tutu_var%minsc.cre~

~%tutu_var%minsc2.cre~

~%tutu_var%minsc4.cre~

~%tutu_var%minsc6.cre~

~%tutu_var%montar.cre~

~%tutu_var%montar2.cre~

~%tutu_var%montar4.cre~

~%tutu_var%montar6.cre~

~%tutu_scriptbg%quayle.cre~

~%tutu_var%quayle4.cre~

~%tutu_var%quayle6.cre~

~%tutu_var%safana.cre~

~%tutu_var%safana4.cre~

~%tutu_var%safana6.cre~

~%tutu_var%sharte.cre~

~%tutu_var%sharte4.cre~

~%tutu_var%sharte6.cre~

~%tutu_var%skie.cre~

~%tutu_var%skie6.cre~

~%tutu_var%tiax.cre~

~%tutu_var%tiax4.cre~

~%tutu_var%tiax6.cre~

~%tutu_var%viconi.cre~

~%tutu_var%viconi4.cre~

~%tutu_var%viconi6.cre~

~%tutu_scriptbg%xan.cre~

~%tutu_var%xan4.cre~

~%tutu_var%xan6.cre~

~%tutu_var%xzar.cre~

~%tutu_var%xzar2.cre~

~%tutu_var%xzar4.cre~

~%tutu_var%xzar6.cre~

~%tutu_var%yeslic.cre~

~%tutu_var%yeslic5.cre~

~idemon02.cre~

~imp01.cre~

~mepsmo01.cre~ BEGIN

ACTION_IF FILE_EXISTS_IN_GAME ~%crefile%~ THEN BEGIN

COPY_EXISTING ~%crefile%~ ~override~

LAUNCH_PATCH_MACRO ~enforce_cre_order~

LAUNCH_PATCH_MACRO ~use_v2_eff~

PATCH_IF FILE_EXISTS_IN_GAME ~fw0125.are~ BEGIN //Miloch's Fix buggered Tutu soundslots

FOR (s1 = 0xa4; s1 < 0x234; s1 += 0x4) BEGIN

READ_LONG s1 ss

PATCH_IF (ss > 10000000) BEGIN WRITE_LONG s1 ~-1~ END

END

END

BUT_ONLY_IF_IT_CHANGES

END

END

Share this post


Link to post

Okies.

 

I have an ostensibly improved version of one of those macros - I'll pass it along once I'm sure it's not volatile.

Share this post


Link to post
Okies.

 

I have an ostensibly improved version of one of those macros - I'll pass it along once I'm sure it's not volatile.

 

 

Does the issue mentioned in the original post still happen with the Sneak Peak Version One? I experienced the generic leaving dialogs with beta 6 (or was it 7?) a few months back and was waiting for it to be resolved before (eagerly) installing Lvl1NPCs. Thanks.

Share this post


Link to post

Yeah, that should have been fixed in the sneak peek (I no longer do anything with pdialog.2da).

 

Sneak peek at version two should be up as soon as I finish testing, though nothing official will happen until CamDawg digs himself out of his work-related midden.

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...