devSin Posted March 21, 2007 Share Posted March 21, 2007 NPCs should be running away from the enemies, not the party (the correct behavior didn't survive the transition from BG to BG2, oops!). Now concludes my biannual fixpack commitment. See you in the fall! Link to comment
Nythrun Posted March 21, 2007 Share Posted March 21, 2007 Have fun storming the castle. Link to comment
devSin Posted April 26, 2007 Author Share Posted April 26, 2007 This is going to be really tough to fix; I'm not sure if it can be done in time for the next release or if it should go to pending. Preliminary code: COPY_EXISTING RunEnemy.bcs override DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY "(LastSeenBy(Myself)," "([255]," COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES Obviously, there's still a lot more that needs to be done to get this working correctly. Link to comment
CamDawg Posted July 2, 2007 Share Posted July 2, 2007 How about swapping the order of the See([ENEMY]) and Detect([PC]) triggers--that would set the LastSeenBy object to the enemy spotted, n'est pas? Link to comment
devSin Posted July 2, 2007 Author Share Posted July 2, 2007 Whichever seems best to you. Link to comment
CamDawg Posted July 3, 2007 Share Posted July 3, 2007 Fixed for v4. // trigger misordering causing folks to flee from party, not enemies COPY_EXISTING ~runenemy.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~\(See(\[ENEMY\])\)[%tab% %lnl%%mnl%%wnl%]+\(!?Detect(\[PC\])\)~ ~\2 \1~ COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES Link to comment
Nythrun Posted July 7, 2007 Share Posted July 7, 2007 Do we really want to do this? runenemy.bcs is used mostly by the sort of random commoners who go hostile and call the police when <CHARNAME> throws a murder party or steals their washcloths. They ought to run away from the party, not from each other and their protectors while ignoring the villain at hand (the player!) Link to comment
devSin Posted July 7, 2007 Author Share Posted July 7, 2007 Yes, we do. RUNENEMY only controls their behavior while they're neutral and see enemies onscreen. WTRUNSGT and WDRUNSGT will be used if they themselves become enemies (and haul ass away from the party, they will). But when they're neutral and they see the PC (it's essentially an "am I onscreen" test), they should be running away from the enemy they spotted, not the PC who just came into visual range. Link to comment
Nythrun Posted July 7, 2007 Share Posted July 7, 2007 WTRUNSGT and WDRUNSGT will be used if they themselves become enemies (and haul ass away from the party, they will). I was thinking specifically of the lot which lacks the shout/runenemy/wtrunsgt scripting triad - in particular, COPY_EXISTING ~aewimer1.cre~ ~override~ ~aewimer2.cre~ ~override~ ~aewimer3.cre~ ~override~ ~bdgoph01.cre~ ~override~ ~bdgoph02.cre~ ~override~ ~brat1.cre~ ~override~ ~brat2.cre~ ~override~ ~brat3.cre~ ~override~ ~ftown1.cre~ ~override~ ~ftown2.cre~ ~override~ ~ftown3.cre~ ~override~ ~ftown4.cre~ ~override~ ~haquat.cre~ ~override~ ~maria.cre~ ~override~ ~mourner5.cre~ ~override~ ~mourner6.cre~ ~override~ ~mtown1.cre~ ~override~ ~mtown2.cre~ ~override~ ~mtown3.cre~ ~override~ ~mtown4.cre~ ~override~ ~murtlen.cre~ ~override~ ~noblem1.cre~ ~override~ ~noblem2.cre~ ~override~ ~noblew1.cre~ ~override~ ~noblew2.cre~ ~override~ ~peony.cre~ ~override~ ~postul1.cre~ ~override~ ~postul3.cre~ ~override~ ~postul5.cre~ ~override~ ~postul6.cre~ ~override~ ~pwauk2.cre~ ~override~ ~radeel.cre~ ~override~ ~scbutler.cre~ ~override~ ~scqar.cre~ ~override~ ~scsarles.cre~ ~override~ ~sethle.cre~ ~override~ ~trskin02.cre~ ~override~ ~trtavp05.cre~ ~override~ ~uhmer02.cre~ ~override~ ~wellyn.cre~ ~override~ have neither of the those additional scripts. If you've already checked them, let me know please, so that I may squander my time in lazier pursuits Link to comment
SimDing0 Posted July 7, 2007 Share Posted July 7, 2007 Why not use NearestEnemyOf(Myself)? And anyone who doesn't have another script assigned is just going to stand there if you attack them, which is probably also a bug. Link to comment
devSin Posted July 7, 2007 Author Share Posted July 7, 2007 RunEnemy shouldn't help them otherwise (they still wouldn't do anything if they turn hostile). NearestEnemyOf() probably doesn't work for neutrals -- the whole point is to get neutral NPCs to react to the presence of EA 255 creatures, like SeeEnemy has neutral guards attack hostiles. As for missing scripts, I don't think it's a big enough issue to really warrant fixing (if only to avoid the inevitable discussion of the pros and cons that drags for 50 pages). Link to comment
CamDawg Posted July 7, 2007 Share Posted July 7, 2007 As for missing scripts, I don't think it's a big enough issue to really warrant fixing (if only to avoid the inevitable discussion of the pros and cons that drags for 50 pages). I think it'd be a good fit for the existing OBC Additional Script Fixes, especially as Nythrun has already put together a good starter list. Definitely low-pri, though. Link to comment
CamDawg Posted January 17, 2008 Share Posted January 17, 2008 For OBC Addt'l Script Fixes: // commoners missing scripts to turn hostile and run away if attacked COPY_EXISTING ~aewimer1.cre~ ~override~ ~aewimer2.cre~ ~override~ ~aewimer3.cre~ ~override~ ~bdgoph01.cre~ ~override~ ~bdgoph02.cre~ ~override~ ~brat1.cre~ ~override~ ~brat2.cre~ ~override~ ~brat3.cre~ ~override~ ~ftown1.cre~ ~override~ ~ftown2.cre~ ~override~ ~ftown3.cre~ ~override~ ~ftown4.cre~ ~override~ ~haquat.cre~ ~override~ ~maria.cre~ ~override~ ~mourner5.cre~ ~override~ ~mourner6.cre~ ~override~ ~mtown1.cre~ ~override~ ~mtown2.cre~ ~override~ ~mtown3.cre~ ~override~ ~mtown4.cre~ ~override~ ~murtlen.cre~ ~override~ ~noblem1.cre~ ~override~ ~noblem2.cre~ ~override~ ~noblew1.cre~ ~override~ ~noblew2.cre~ ~override~ ~peony.cre~ ~override~ ~postul1.cre~ ~override~ ~postul3.cre~ ~override~ ~postul5.cre~ ~override~ ~postul6.cre~ ~override~ ~pwauk2.cre~ ~override~ ~radeel.cre~ ~override~ ~scbutler.cre~ ~override~ ~scqar.cre~ ~override~ ~scsarles.cre~ ~override~ ~sethle.cre~ ~override~ ~trskin02.cre~ ~override~ ~trtavp05.cre~ ~override~ ~uhmer02.cre~ ~override~ ~wellyn.cre~ ~override~ SET "script_runenemy" = 0 SET "script_wtrunsgt" = 0 FOR (index = 0 ; index < 5 ; index = index + 1) BEGIN READ_ASCII (0x248 + ("%index%" * 0x08)) "script" PATCH_IF ("%script%" STRING_COMPARE_CASE "runenemy" = 0) BEGIN SET "script_runenemy" = 1 END ELSE PATCH_IF (("%script%" STRING_COMPARE_CASE "wtrunsgt" = 0) OR ("%script%" STRING_COMPARE_CASE "wdrunsgt" = 0)) BEGIN SET "script_wtrunsgt" = 1 END END PATCH_IF ("%script_runenemy%" + "%script_wtrunsgt%" != 2) BEGIN FOR (index = 0 ; index < 5 ; index = index + 1) BEGIN READ_ASCII (0x248 + ("%index%" * 0x08)) "script" PATCH_IF (("%script%" STRING_COMPARE_CASE "none" = 0) OR ("%script%" STRING_COMPARE_CASE "" = 0)) BEGIN PATCH_IF ("%script_runenemy%" = 0) BEGIN WRITE_ASCII (0x248 + ("%index%" * 0x08)) "runenemy" SET "script_runenemy" = 1 END ELSE PATCH_IF ("%script_wtrunsgt%" = 0) BEGIN WRITE_ASCII (0x248 + ("%index%" * 0x08)) "wtrunsgt" SET "script_wtrunsgt" = 1 END END END END BUT_ONLY_IF_IT_CHANGES Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.