Skip to content

BPSeries Party AI Goes WeiDu!

135

Comments

  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @horredtheplague I've been using it for a time now with no problems at all.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    The link was dead when I went to get the file (dropbox page w/ "No goodies for you" msg). Must be in the works again. Naturally, I don't have Applescript Editor nor anything that can run it (for the line changes). Even if my mod was used as the example, I doubt I'd be so fortunate as to have a working prefab.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    Probably being updated for the latest Weidu build...
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    Updated mod to v 0.3062, with UPX weidu for Mac OX and several other changes. Files available in the SHS downloads section as per usual. Please let me know if you have any issues, esp with the Mac OX install. Not that I could fix them, but neither can I test them...
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @horredtheplague I'll test it when I get home :)
  • SpiteSpite Member Posts: 18
    edited May 2013
    I can't seem to get this to work properly. When I run the installer it says it installs everything properly, but nothing works and the installer itself disappears :S
    EDIT: Seems like it was a problem with another installed mod, but making both run as administrator seems to have fixed the problem :)
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    New version of BP Series posted, v0.3070. While many of the changes were made for cross-mod compatibility with BG2 mods, including the new BPv181 release and SCS 1/2--some changes affect BG:EE as well. BP Series can now detect the SCS install (if installed after SCS), and skip duplicate components like Detectable Spells and Weapon Enchantment Stat.

    Also added was a complete overhaul of the Cloud Detection & Response system. Much happier with the results in-game.

    Enjoy!
  • KeryvianKeryvian Member Posts: 14
    Excellent timing. I was just getting ready to start a new game.

    Thanks again for doing this. These scripts make the game a lot more enjoyable for me.
  • rathlordrathlord Member Posts: 171
    Just wanted to point out that right now in the part of Cloakwood with the spiders, every time a spider trap is sprung my party starts attacking my CHARNAME for no apparent reason. Not sure if it might be because she has web in her book and they think it's coming from her? In any case, I suggest putting in some kind of safeguard to prevent party members from ever attacking each other, ESPECIALLY CHARNAME as that can be game-wrecking.

    Otherwise, nice work and it seems good.

    Afterthought: also, detect traps mode seems to not be functional with Imoen. She has yet to detect traps when it's cut on, is there something I'm missing?
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    @rathlord Thanks for your reports. Are you using the most recent version, posted this last weekend, by chance?

    I just completed Cloakwood recently and did not experience this at all. In fact, the latest code has them running safely for the edge of the web but not past it, even switching to a bow/sling/etc to attack any enemies still within. If I still have a save game in Cloakwood I'll check it again tonight.

    There are several safeguards in place to prevent attacks on other players (maybe a large AoE spell might get through)--even if it does happen a "Friendly Fire" message is sent but surely no attacks. I even have code to prevent attacks on charmed party members (avoid them or try to cure them instead).

    Telling me Imoen is not enough. Which script are you using with Imoen? That I can trace through and see if there's a code typos &/or a part missing in the Detect Traps code. And what is her chance of detection? My more recent versions should have shut off the minimal % success checks entirely, leaving it all in the player's control. (Note: constantly checking for traps on a PC with low ability doesn't nec find the traps.) It is possible I forgot to add this to one or more of the scripts?
  • rathlordrathlord Member Posts: 171
    edited June 2013
    Sure, sorry for the inadequate reports, let me throw up some details for you:

    I should be using the most recent version- 0.3055 or something along those lines? It's the with-WeiDU version.

    Imoen is using BPFT-TH. I made sure to toggle find traps mode with "b." I could be missing something silly, this is my first time using your scripts. Her detect traps is at 60, but it never even toggles on without me clicking it.

    As for the Cloakwood issues, it seems like it might stem from the party thinking my CHARNAME is attacking them for some reason (since the web spell is one of the spells in her spellbook). I can't fathom why but every single time I trigger a web trap my entire party (including CHARNAME, oddly enough) says "Attacking CHARNAME," and turns to attack her.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @rathlord Current version is 3071...

    @horredtheplague The current version stripped the x flag from weidu and the install script making tem non-executables in OSX. It's easy to correct if the user chmod +x both files.
  • rathlordrathlord Member Posts: 171
    I thought I had 3071 (which is the number I had before the edit) but my instal file said 3055, so now I'm not sure. I'll make sure I do have the most recent version (is there an easy way to update?) and see what's what.
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @rathlord Just uninstall the mod, delete the mod folders and install the new version :)
  • rathlordrathlord Member Posts: 171
    edited June 2013
    Just Re-installed the most latest version from the download link for 3071. It just doesn't change the "read-me" file name, I think. My team is still attacking CHARNAME every time a web trap is sprung on them, still including CHARNAME targetting herself (which I didn't even think was possible).

    Edit: There's also some really odd auto-pausing going on at the same time. It's pausing the game and saying they see an enemy somewhere around the traps when in fact nothing is there.
  • rathlordrathlord Member Posts: 171
    edited June 2013
    This keeps getting stranger and stranger. Every time said web traps are sprung my text box continually says "CHARNAME held" even when she's nowhere near the trap and certainly *not* held.

    And my party thinks there's a person where the trap is.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    Good news! I had a save game in cloakwood, and I ran into the error as well. Funny you mentioned safety checks before. It was a safety check of a different sort that made it possible. The bad news for scriptors is, the trigger See(NearestEnemyOf(Myself)) somehow worked on an invisible creature...one that also has its animation and foot circle removed, and is set to transparency 255 (as transparent as it gets).

    *theory* There is a possibility that the brief split-second where the cloud spell "pulses" its effect (where you roll your save throw), our invisible creature is forced into "visibility" due to the attack--even though you don't see them onscreen, AI just might... (????)

    So, I merely removed the "safety catch" block. It was the one that tried to make sure you'd at least attack your nearest enemy if no other target sufficed in the script. If we see any side effects that players now stand still in battle, I can put it back in with a Specifics() check to check "specifically" for this creature. The invisible creature has very unique Identifiers in scripting terms, so it can't be confused with any other creature in the game.

    Your observations were correct. There is indeed a creature summoned with the cloud spells. The "invisible" creature described above; side effect is you see a puff of smoke at the spells onset, very briefly. The creature is summoned at the spell's epicenter. Why, you might wonder? Because in order to know exactly where a cloud is at, you have to know where the bullseye is. The only was to do this is to place a concrete object (e.g., an invisible creature) right there. Something that the script can detect. Now, our players know exactly where to RunAwayFrom(), and even for how far (usually Range 15, so at Range16+ I try to stop the running). The same code works for enemies in the BP enemy AI for BG2, btw. And in BG2, the invisible creature is not detected by a See(NearestEnemyOf(Myself)) so you'd not see this happen ever.

    And good news for Immy as well. I had the single-hotkey code in BPFT-TH by mistake. I replaced it with the dual-hotkey code, and it seems to be working as intended.

    I also tinkered with the Detectable Spells code to further enhance the SCS compatibility. You now should be able to install BPSeries and SCS in either order, w/o issues. And updated the Read-Me file.

    @rathlord: Thanks for the good bug reports! That's how these scripts will keep getting better and better

    New version uploaded to SHS, v0.3072, reflecting these changes.


    Upcoming
    I have some other things in the works, eventually. As mentioned, I just did a very massive overhaul of the Big Picture mod for BG2/BGT/etc. In that, I also overhauled the enemy AI--largest reworking I've in almost 10 years. Some of the code I worked out there could actually benefit this mod. In particular, the checks for whether to cast a spell or not.

    Also, with a little tinkering I may be able to set up a crude BGEE version of enemy AI from BP. In fact, I already started to, in 'private'. It would not be nearly as encompassed as SCS, nor anywhere near as challenging. And it would not be compatible with SCS, I'd wager. It would merely replace a few of the default enemy AI scripts with BP's systems. This would affect a large chunk of the creatures in the game. But, it would be a light alternative, or something to try if you tire of the repetition of other AI packs. BP always has and always will have a touch of randomness to it---I believe this increases re-playability, when you're never exactly sure what the enemy will do next. It's something that if people liked, I "might be" able to be coaxed into expanding upon (time/availability is also a factor, I'm a pretty busy guy usually). We'll see...
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    :lol: With a very quick and minor hotfix--I forgot to update the installer to report latest version, last couple passes. @rathlord: No wonder you're reporting v0.3050.... Sorry gang!
  • mlnevesemlnevese Member, Moderator Posts: 10,214
    @horredtheplague I'll ask if the See(NearestEnemyOf(Myself)) behavior can be considered a bug so that it is fixed in a future patch. I didn't see any report about this behavior in the tracker although it has caused other problems AFAIK.
  • rathlordrathlord Member Posts: 171
    @horredtheplague Glad I could help, and thanks for the quick responses and fixes- that's impressive! I'll be on the lookout for any other goofiness, but things look great so far.
  • rathlordrathlord Member Posts: 171
    edited June 2013
    And just checkin back in now that I've given it some use, most things seem to be working fantastically.

    Edit: Although in stealth mode Imoen is attempting to hide in shadows one time *after* she's successfully entered, causing it to toggle off. Probably is attempting to Hide faster than checking to see if it's successful?

    Also my two mages appear to be giving up on moving to their destinations early. I seem to remember this happening before once. Currently I can recreate by simply ordering them anywhere more than a few yards, and they just stop walking. The ground marker goes away as well. They are two of the back members of the pyramid formation and set to the standard mage AI ( just tested, formation not relevant). It happens whether I select them individually or as part of a group. Confirmed not fixed by reloading the game. Confirmed fixed by changing to a standard AI script. Confirmed fixed by disabling mage AI while active. Upon further study, it interupts all actions every few seconds. I can't loot with them currently because the loot window drops every 5seconds or so. I wasn't having this error pre-patch so it must be something new. Is it making some kind of check every few seconds that requires all other actions be cancelled? Seems to be limited to BP-Mage. Swapped them to BP-Range and they're doing fine now.
    Post edited by rathlord on
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited June 2013
    @rathlord: Were your mages injured by chance? I saw a possible break in the continuity if they were injured, nothing else thus far. The only time I've really seen this commonly happen is when a person is mortally wounded, and the cleric healer is out of spells( and no cure pots available by toggle switch or in inventory). It's a difficult check to account for, checking what others have available. Especially if mods add/alter curing potions or spells (SCS potion-enemy components e.g.).

    On the bright side, I've added code that handles Detect Illusions for rogues. BPFT-TH will have it as a double-toggle choice from Detect Traps hotkey. Other scripts with condensed thieving hotkeys will only use it if skill is 36% or higher. We can toy with the percentages, but there simply aren't enough hotkeys free to do all the groovy things I'd like to.

    And finally, I threw together a quick "BP for BG1" component. This does what I described in a previous post. It will be offered with a BG:EE or BGT installation.

    While at it, I added a few spells to Tarnesh (his selection was only half-full for 5th level) and swapped the +1 short sword he cannot use (and normal staff) for a +1 staff and 20 throwing daggers. Finally, bumped his hit points from 12 to 20 (max @ 5th level mage). His mage script adds a pre-combat buff of random selection (5 spell levels total, level 3 spells max, c. 5-8 buffing possibilities). Also, smarter AI and some "anti-cheesing" code. Same cloud detection code the players get (and was just worked out). And enough random checks so that you most likely won't have the exact same fight two times in a row.

    This is a good example of the level of 'creature enhancing' I have in mind. Very light, mostly bringing them up to their "fair-share". I'll add more creatures and bosses as I go through a play run. Essentially done to my own tastes, as this is a 'house mod' I'm merely sharing with you all--take it or leave it, with no malice intended. Feel free to suggest, by all means. :)

    I'll put up a new version when I can get a better look at BP-Mage in-game, try & make sure I beat the stutter. It's something dumb like a missing ActionListEmpty() check, 98% likelihood.
  • rathlordrathlord Member Posts: 171
    edited June 2013
    @horredtheplague I can confirm mages were not injured at the time. I'm fairly confident there are no external factors to the issue (in which case you'd think it would be happening to anyone using BP-Mage with the newest version, no idea if that's true or not). It's happening across multiple zones including town zones with no encounters.

    Edit: Now my mages are both doing it again, but this time under BP-Range! Very odd that it's only them. Must be something to do with one of the caster checks?

    Let me know if there's anything else I can do to help.

    Also did you notice the thief issue where they try to Hide in Shadows one too many times and pop themselves out of it?
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited June 2013
    rathlord said:

    @horredtheplague I can confirm mages were not injured at the time. I'm fairly confident there are no external factors to the issue (in which case you'd think it would be happening to anyone using BP-Mage with the newest version, no idea if that's true or not). It's happening across multiple zones including town zones with no encounters.

    Edit: Now my mages are both doing it again, but this time under BP-Range! Very odd that it's only them. Must be something to do with one of the caster checks?

    Also did you notice the thief issue where they try to Hide in Shadows one too many times and pop themselves out of it?

    I just tested a BP-Mage user out (Xzar), and in one click I was able to cross an entire exterior. Another click, back. I'll keep watching, but I'm not seeing it yet.

    It could be a spell check, namely a spell you have and my first level party does not. A test for this is to exhaust all your mage's spells, one by one and see if the stutter remains &/or note where it ends. This will be a big help in finding it, because it tells me roughly where to start looking.

    Or, I found the spot in my passes, and fixed it.I did a pass on every script in both games, both mods even (BP & BPSeries) fixing several things besides this problem. One other thing of note was making the BG2 side of the BPSeries scripts more BGT low-level friendly.

    I haven't noticed this with hide, but I ran into something similar with Detect Illusion last night. If I tried to FindTraps() right away (FindTraps() = DetectIllusion()) it started and immediately broke. I had to only set a variable one round , and use the variable in the following round (a second later) to trigger the FindTraps() check. It's an engine quirk causing it actually, not bad scripting per se. The workaround isn't the best, but it does work. I can get a 6-second Detect Illusions check out of it, that won't break unlesss the player goes below 50% hit pts.

    Maybe Hide() is doing something similar? Like I said, haven't noticed a problem. My stealthy party is usually quite hidden at all times...the checks spam by so fast it's hard to keep track of what's what. Technically that 1/second check is an exploit, and a scripted 'stock rules' 6-second cooldown would probably cure this problem too? I'll sort through the long string of Hide attempts some time, and see what I see.If I get the same issue, I wager the fix above will also fix this.

  • rathlordrathlord Member Posts: 171
    @horredtheplague I'll pop through and check every spell. Gotta be a spell my two mages have in common, too. And ya, sounds like the 6 second check migh be better just to prevent self-unstealthing. If it's worth anything, I'm running completely vanilla other than your scripts. I'll give it a quick run through and see if I can narrow it down. Is it easier for you to track my progress if I post a new comment each time with a mention, or if I just edit my posts?
  • rathlordrathlord Member Posts: 171
    @horredtheplague I must have been off track thinking it was a spell check. Problem persists with no spells available, no abilities available, no equipment, and an empty inventory. This is in Baldur's Gate city with no enemies to confuse things. I'm at a loss.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    I'll upload a new version some time tomorrow with my current fixes--just in case I solved it already. If it's not spells/inventory involved, I'm not seeing it locally at all. There's plenty of other fixes coming as well. Let's get past this show-stopper first, and then we can solve that hiding issue. Hiding bug is minor by comparison.
  • rathlordrathlord Member Posts: 171
    @horredtheplague Absolutely. I'll keep an eye out for anything else. If there's anything else you can think of for me to try on my end let me know. I'm sure I could upload a video, but there's not much to it.
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited June 2013
    BPSeries updated to v0.3074. As promised, there's much more here than a hopeful fix for mage stuttering. From the release notes:
    v0.3074 Proposed fix for reported stuttering behavior with mages (???)
    Fixes to cure potion passing and consumption code
    Fixes to enemy targetting blocks
    Made the BG2/BGT scripts more BG1-friendly--added targetting, threat levels, and curative code geared for lower levels
    NEW: Charming Rogue Kit for Imoen, by Vlad Pappar, and a custom BPSeries script for the class (BPCROGUE) *English only, for now*
    NEW: BP for BG1 -- Several of the Big Picture Enemy AI mod's scripts exported or converted over to BG1 counterparts. Very small-reaching at this stage, will be expanded upon as time passes. This singular component is NOT compatible with SCS!
    @rathlord: Please let me know how this does with your stuttering issue.

    Enjoy!
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    edited June 2013
    This is what I got when I tested the stealth, with traps:
    image
    @rathlord: If you mean the "Leaving Shadows" you see in this block, that is not a bug at all. You never actually leave the shadows, but the engine merely reports that you do. This is actually part of a very cool thing only possible with scripting (at the least, in BG2). This is part of the code that allows you to detect traps while stealthed. In BG2 you can't do that with just the quick-slot buttons.

    Now here is BPFT-TH, using just the stealth and NO traps...
    image
    Everything ran very smoothly here. Every one of the "Leaving Shadows" msg's came after the expected 18-second delay. BP makes another attempt at hiding at the 17-second point, so as not to break this. This 1-second stagger is possibly the point of error you're seeing, but that would be an internal engine issue and nothing a script could fix. w/o that stagger you'll turn visible before trying to hide again. At the end, you see the 3 Succeeded checks in a row? (Not bad for 1st level, heh) He was hidden for about 50 seconds there, never blinked out of it. I think that is worth an occasional engine hiccup. :)
Sign In or Register to comment.