Jump to content

NPC Fights


WizWom

Recommended Posts

OK, I'm using v11, and I Made an additional NPC, and wanted him to join in when a Party battle happens on the side of Good.

 

So, I bring along Xzar, Montaron, Khalid and Jaheira, knowing that they are the first conflict you can get, and go and recruit my Jonathan.

 

I know that Banters kick off the battles, so I use ^I to push a unch of banters. nice, nice, but no battle. It's supposed to be: Jaheira calls Xzar evil, Xzar complains about Jaheira meddling, get retorrted Oh, You're Zhents!" and then Xzar comes back with "damn harpers!" and attacks. Except that it never happens.

 

So I put in a quick tweak:

IF
Global("FightTweak","GLOBAL",1)
THEN
RESPONSE #100
	SetGlobal("FightTweak","GLOBAL",0)
	ActionOverride("Jaheira",Interact("Xzar"))
END

Well, that pushes the dialog, and they got that purple "I'm not availiable" indicator ring, and then stood there.

 

My character, of course, properly saw the fight start, and killed Xzar and Montaron.

 

But Khalid and Jaheira still have purple rings.

 

You guys done did break the NPC fight, most assuredly.

 

Weidu.LOG:

// Log of Currently Installed WeiDU Mods
// The top of the file is the 'oldest' mod
// ~TP2_File~ #language_number #component_number // [Subcomponent Name -> ] Component Name
~BG1NPC.TP2~ #0 #0 // The BG1 NPC Project for BG1 Tutu: Core Install
~BG1NPC.TP2~ #0 #1 // The BG1 NPC Project for BG1 Tutu: Phase I (Banters)
~BG1NPC.TP2~ #0 #2 // The BG1 NPC Project for BG1 Tutu: Phase II (Quests and Interjections)
~BG1NPC.TP2~ #0 #14 // Non-joinable character portraits
~BG1NPC.TP2~ #0 #15 // Coran's Romance Core (Rated: R)
~BG1NPC.TP2~ #0 #16 // Placeholder 1: New Quests
~BG1NPC.TP2~ #0 #17 // Dynaheir's Romance Core (Rated PG13)
~BG1NPC.TP2~ #0 #18 // Shar-Teel Relationship Core (Rated R)
~BG1NPC.TP2~ #0 #19 // Branwen's Romance Core (Rated PG13)
~BG1NPC.TP2~ #0 #21 // Xan's Romance Core (Rated PG13)
~BG1NPC.TP2~ #0 #22 // Ajantis Romance Core (Rated PG13)
~BG1NPC.TP2~ #0 #23 // Female Romance Challenges
~BG1NPC.TP2~ #0 #24 // Coran's Romance Speed -> Coran's Romance Speed (1 hour)
~BG1NPC.TP2~ #0 #28 // Dynaheir's Romance Speed -> Dynaheir's Romance Speed: 1 hour
~BG1NPC.TP2~ #0 #32 // Xan's Romance Speed -> Xan's Romance Speed: 1 hour
~BG1NPC.TP2~ #0 #36 // Shar-Teel's Romance Speed -> Shar-Teel's Relationship Speed: 1 hour
~BG1NPC.TP2~ #0 #40 // Branwen's Romance Speed -> Branwen's Romance Speed: 1 hour
~BG1NPC.TP2~ #0 #44 // Ajantis' Romance Speed -> Ajantis' Romance Speed: 1 hour
~BG1NPC.TP2~ #0 #100 // Install Player-Initiated Dialogues
// Recently Uninstalled: ~SETUP-WXJON.TP2~ #0 #0 // Jonathan Schattke for BGTutu
// Recently Uninstalled: ~SETUP-WXJON.TP2~ #0 #1 // Core NPC
// Recently Uninstalled: ~SETUP-WXJON.TP2~ #0 #2 // Banter Pack For Jonathan Schattke
~SETUP-WXJON.TP2~ #0 #0 // Jonathan Schattke for BGTutu
~SETUP-WXJON.TP2~ #0 #1 // Core NPC
~SETUP-WXJON.TP2~ #0 #2 // Banter Pack For Jonathan Schattke

Link to comment

I will take a look... I remember that there was some problem with BreakingPoint() that we have been fighting with for a long time. You don't have the "Happy Happy Joy Joy" patch listed on that install... I think that EasyTutu fixes some of this behavior, as does Tutufix, because some of the interaction is driven by ubnhappiness or reputation (I am fuzzy here.... I will stop and go research, so I know what I am talking about instead of just babbling. Be back in a bit...)

Link to comment

It appears the broken fights is not the BG1NPC project's your fault. Since I started with EasyTuTu, I'm going to have to explore that.

 

I get the same behaviour when I use my fightTweak Code without BG1NPC project - just a lot fewer banters to ^I thorugh. ^I still does not launch the proper Interact between Jaheira and Xzar, and if i force it, the battle happens exactly the same. Or doesn't happen, as the case may be.

Link to comment

Well, _Jaheira.bcs SEEMS to be good, and seems to tell her to battle xzar and Montaron. and her override script is set to _JAHEIRA...

 

So, now, I'm going to see how, say, the Keldorn/Viconia fight works.

 

Er, looks like the fighters LeaveParty() in BG2 NPC fights, instead of the BG1 behavior of MakeUnselectable()

 

I think that should fix the fights... but what to do about the banter not picking up the hostile conversation I get iimmediately with the forced interact?

Link to comment

I am still looking through back treads in the workrooms -- I remember a conversation about problems when two party members in the BG2 engine started attacking eachother while still InParty. I just can't find it. The makeunselectable still shows up in the minsc/edwin/dynaheir fight; I haven't tested it, though...

in _YNAHEIR.BCS

IF
 !Unselectablevariable(0)
 Global("Edwinfight","GLOBAL",0)
THEN
 RESPONSE #100
Makeunselectable(0)
END

IF
 Unselectablevariable(0)
 See("edwin")
 Global("Edwinfight","GLOBAL",1)
THEN
 RESPONSE #100
Makeunselectable(5000)
END

IF
 !Unselectablevariable(0)
 Dead("edwin")
 Global("Edwinfight","GLOBAL",1)
THEN
 RESPONSE #100
Setglobal("Edwinfight","GLOBAL",0)
Makeunselectable(0)
END

IF
 !Unselectablevariable(0)
 !See("edwin")
THEN
 RESPONSE #100
Makeunselectable(0)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_MIRROR_IMAGE)
THEN
 RESPONSE #100
Spell(Myself,WIZARD_MIRROR_IMAGE)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_ARMOR)
THEN
 RESPONSE #100
Spell(Myself,WIZARD_ARMOR)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_MAGIC_MISSILE)
THEN
 RESPONSE #100
Spell("edwin",WIZARD_MAGIC_MISSILE)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_LARLOCH_MINOR_DRAIN)
THEN
 RESPONSE #100
Spell("edwin",WIZARD_LARLOCH_MINOR_DRAIN)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_LIGHTNING_BOLT)
THEN
 RESPONSE #100
Spell("edwin",WIZARD_LIGHTNING_BOLT)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_MELF_ACID_ARROW)
THEN
 RESPONSE #100
Spell("edwin",WIZARD_MELF_ACID_ARROW)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
 Havespell(WIZARD_LARLOCH_MINOR_DRAIN)
THEN
 RESPONSE #100
Spell("edwin",WIZARD_FLAME_ARROW)
END

IF
 Global("Edwinfight","GLOBAL",1)
 See("edwin")
THEN
 RESPONSE #100
Attack("edwin")
END

IF
 Global("Edwinfight2","GLOBAL",1)
 See("edwin")
 !Dead("edwin")
THEN
 RESPONSE #100
Dialogueinterrupt(FALSE)
Attack("edwin")
END

IF
 Global("Edwinfight2","GLOBAL",1)
 Dead("edwin")
THEN
 RESPONSE #100
Dialogueinterrupt(TRUE)
Setglobal("Edwinfight2","GLOBAL",0)
END

IF
 Die()
 Inparty("edwin")
THEN
 RESPONSE #100
ActionOverride("edwin",Dialog([PC]))
END

IF
 Die()
THEN
 RESPONSE #100
Erasejournalentry(86853)
Erasejournalentry(74184)
Erasejournalentry(76694)
Erasejournalentry(74242)
END

Link to comment

Cool.... I think Macready is the dude for this; I could also include a patch for it to add to BG1 NPC Core fixes, if you can guide me a little. It obviously clobbers some content! I am looking back to check and see if the original project wanted the blows to come about, or just expected that they would be reinstated someday.

 

What I know how to do is use WeiDU tp2 commands to do this:

 

/* Reenabling fight behaviors: Dynaheir */
COPY_EXISTING ~_YNAHEIR.BCS~ ~override~
 DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY
~MakeUnselectable(5000)~ ~MakeUnselectable(6) Continue()~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

 

I still am not sure if the banters will trigger these fights, though - I am looking for the trigger. You have to corrct me on this... these are original banters from BG1, ported over. They will take a lot longer to show up (or not, as they are supposed to be relatively random, I think; could be wrong here :blush:). Pushing with ^I did not get a result, but forcing Jaheira/Xzar Interacts (banter files) eventually did force the conflict. So... logically, changing this (5000) to (6) Continue() will have the fight take place eventually, if the banter engine ever hits this dialogue. But it didn't ever hit it through straight ^I?

Link to comment

So finally are there news regarding this *2004* NPC fights reported bug and its related random banters unoccurences? Great!

 

Hope it will really work again like in vainilla BG1, there has passed a *lot* of time since the problem was communicated and *not* truly addressed by anyone.

 

Thx cmorgan and wizworm!! :blush:

Link to comment
I still am not sure if the banters will trigger these fights, though - I am looking for the trigger. You have to corrct me on this... these are original banters from BG1, ported over. They will take a lot longer to show up (or not, as they are supposed to be relatively random, I think; could be wrong here :blush:). Pushing with ^I did not get a result, but forcing Jaheira/Xzar Interacts (banter files) eventually did force the conflict. So... logically, changing this (5000) to (6) Continue() will have the fight take place eventually, if the banter engine ever hits this dialogue. But it didn't ever hit it through straight ^I?

Actual tests (BG1NPC not installed):

 

Party of PC, Ajantis, Jonathan, Xzar, Imoen; BAjanti specs a 1/10th chance each banter between Ajantis and an Evil character to yell about the evil and attack them. so, forcing Banters with ^I: Ajantis Banters on #2, not the attack. #4 is my Banter with Imoen. #5 is Ajantis non-attack again. #13 is Ajantis non-attack. #22 is Aujantis non-attack. #30 is the Ajantis Evil attack.

 

Party of PC, Khalid, Jaheira, Jonathan, Xzar, Montaron; Jah/Xzar specs a 50/50 chance of the fight banter. #1 is Xzar/Monty, #15 is Xzar/Monty again, #24 is Xzar/Monty again, up to #35 already :-(

Let's reconfigure for PC, Jaheira, Jonathan, Xzar. #4 is Jah/Xzar non-battle, #8 is Jah/Xzar non-battle, #10 is Ja/Xzar battle.

 

^I seems to select a random party member for banter, and another random party member for target. Ajantis engages in battle so fast because his banter is not testing who he interacts with, but whether he sees someone evil or not.

Link to comment

WizWom, I think I understood what you posted... what I am not sure is what you want me to code to help fix the behavior. BG1 NPC adds several (lots) more banters, but if it is possibe to get the fight banters (even if the chance is small) then we have done the job. After Macready incorporates changes into EasyTutu, I can always put a flag in BG1 NPC that will skip what we do if EasyTutu is installed...

 

What do you suggest? Just a straight tp2 patch as I listed above, changing the MakeUnselectable values for each of the .bcs of NPCs who have those scripted fights?

Link to comment

Er, actually, I just did the test to prove that it was more the crazy Random number generator keeping things from working.

 

I could (and have) gone hundreds of ^Is without getting the Jaheira/Xzar fight, and I think it was mostly the RNG playing with me. I doubt there is anything we CAN do to fix that. Unless we cycled the banters - heh, there could at most be 30 combinations of them :-)

 

Yeah, since the code stands as is, and does generate the banters which lead to fights, I don't think it's worth making it happen as often as it did in the un-modded game. Change the MakeUnselectable as I outlined (probably will make its way into the TutuFix, EasyTutu and here, If know you guys) and leave it at that, I think.

 

If I were you, I'd put in an AjantisFight variable - because otherwise, I think Ajantis gets free swings on the Evil NPCs until he kills them. Maybe if you put in an ActionOverride for The guy who ajantis Attacks to have a local AjantisFight variable.

 

So, for Ajantis' Dialog

	SetGlobal("AjantisFight","LOCALS",1)

 

And then put that in the Evil NPCs override scripts, with their typical battle behaviour.

 

And have Ajantis' script also check for it, and attack evil until dead, each round doing:

	ActionOverride(LastSeenBy(Myself),SetGlobal("AjantisFight","LOCALS",1))

So that if he switches targets, that they will all start ganging up on him automagically.

 

And if you play with the Ajantis Fight, please change it to PC.0.0.0.0.MASK_EVIL, so he doesn't go on a cleansing rampage through any evil bystanders.

Link to comment

I have not seen the whole thread, but in BG1 vanilla, fights don't ALWAYS happen. The banters between the querillios NPCs are a mix-and-match of random lines. Sometimes they exit into a fight, sometimes - not. We tried to preserve that structure, though it is a nightmare because the initial dialogues did not have variables on them. So, the banter would repeat again and again and again in slightly different variety. In BG1vanilla it was not noticeable, since they rarerly triggered. Added into BG2 banter engine, it became an annoyance. I added variables, trying to stop _identical_ dialogues from reappearing, but if they are not exactly identical, it can and will show up again, eventually ending in a fight.

Link to comment

Er, in EasyTutu, I'm getting repeated identical banters, and really, it's not a big deal. It also seems to use Interact.2da to just do the vocalization strings when there is no valid banter between the chosen participants. If it chooses a banter between two participants not listed and with no banters availiable, then the selected banterer looks at the target.

 

In the BG1NPC install (At least V11 I was using), those banters are unchanged, so can happen any time in the sequence, although, typically, it runs through the limited/test banters first.

Link to comment

WizWom, I saw your post at PPG - I am not ignoring this, but since we have not had a chance to test this, it will be in the v12 out soon only with the specific patch for MakeUnselectable(5000). I will make it a priority, and send you a test package with the other additions in the next few weekends (heck, I could practically lean out the window and hand it to you, if it weren't for the traffic on the Edens :) ). We can develop it into the (inevitable) post-release bugfixes. The thing we will need to check is getting it to work on Tutu (and BGT for Sir BillyBob) and then deciding what else we need to do to get this content working.

Link to comment

Archived

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

×
×
  • Create New...