Jump to content

jmerry

Modders
  • Posts

    1,296
  • Joined

  • Last visited

Posts posted by jmerry

  1. That would be the "spellcasting demiliches" component changing things on you. The component intentionally removes their blanket immunity to level 6+ spells, though they still have a number of specific immunities. In addition, it removes the script that previously used Trap the Soul, and doesn't include the spell in the new spellcaster script that replaces it - that part might be an oversight.

    You're not necessarily immune to imprisonment in that fight; Kangaxx gets level 9 spells which can include the mage version.

    As for Secret Word working, that hits as a level 5 spell, and the component that makes Breach work on liches and the like removes blanket level 5 immunity. There are a number of specific immunities that get added to replace it, but protection-breakers like Secret Word and Breach are allowed through. The one spell breaker that doesn't work is Spell Thrust (hits as level 4); all that does against a lich or demilich is trade with a Spell Shield.

  2. It should work. No problem with other deflection effects being eaten into as well, since they don't touch anything with the Spell Attack type. No problem with spell level immunities like a minor globe, since the deflection effect takes priority (I've broken liches' Spell Shields with Spell Thrust before). But I don't know how a spell with mixed levels interacts with protections, and I'm not about to test it when I already have working code for this component. It's entirely possible that the game would take one effect being eaten by a minor globe as a reason to kill the whole spell, and I don't want to create a new immunity button with this.

    I'm not the first to use a "level 10" effect like this; SCS does it with the component that lets Spellstrike break Protection from Magic.

    Now, I just have to get back to working on my mod so I can finish and release it.

  3. While 3E Sneak Attack is technically in the game, it's not really fully implemented in the Baldur's Gate EE series. For one thing, you can't get to it from the in-game options menu; you have to manually edit the lua file. Also, Crippling Strike is not implemented at all, and you can sneak attack repeatedly on the same target. Spurious messages are common.

     

    The "flanking" condition is that you're behind the enemy, just like a backstab; the only difference is that you don't have to be invisible. Creatures that are immune to backstabs are also immune to sneak attacks.

    Now, about enemy thieves ... enemies ignore the "behind" condition for backstabs, and their AI doesn't know how to get behind players. I genuinely don't know how things would work with sneak attacks instead; would they get the bonus on every hit, or would they need to be lucky enough to get behind someone?

    I wouldn't recommend it. Just play with backstabs, and adjust your strategies to mitigate the big hits - equip melee weapons, keep Stoneskin up if possible, use spells like Detect Invisibility.

  4. Class, kit, proficiencies, thieving skills, basically anything that's a choice while leveling. Spells known are automatic, and NPCs level up to match the protagonist on joining, to a considerably stronger level than the vanilla triggers.

    NPC-specific items may become unusable due to overly specific requirements, and companions'' combat scripts may not know what to do with their new class abilities. Also, Hexxat is excluded (as of the v33 copy I'm looking at); customizing her into any sort of thief would result in her skills being too low, due to a quirk of how her vampire race is handled.

  5. Yes, of course.

    The spell itself (SPCL919.spl) has nine different opcode 122 "Create Inventory Item" effects, selected using their Probability 1 and Probability 2 fields; 11 and 0 for the first, 22 and 12 for the second, and so on up to 100 and 89 for the last.

    You can change the effect by editing which items are created (the "Resource" field of those effects), or the probabilities. If you're doing the latter, note that the range of possible values you need to cover is 0 to 99.

    The spell's description is a separate matter; you'd have to edit that as well if you wanted the description to match your new list.

  6. For the EEs, you could also use item_use.2da; the items listed there can only be used by the listed characters, and not even UAI bypasses it. Both Edwin's amulet and Nalia's ring are listed there by default.

    Temporary Int penalties aren't a big deal here; item requirements are only checked when first equipping them or at level-up. If the item is on and the character gets drained below the use requirement, it won't fall off.

  7. That's it. I was pretty sure it was still accessible somewhere; I just didn't know where to look.

    With that, you put the launcher in your game folder and run it when you want to install a mod. Select from the list of mods you have available, and from there the process is the same as with any other method.

    The launcher detects mods by their setup-xxxx.tp2 files. That should be in the mod's folder, of course.

    For example, here's a pic of my current BG2EE folder. My primary, unmodded at the moment, installation. What is "test"? That's a temporary designation for the individual components of the mod I'm making. When I'm ready to test a component, I put its code in that .tp2, then run the MWL to install it.

    Folder shot.jpg

  8. Both the main-screen animation and the inventory paper doll come from the "animation" field. Any save editor should be able to work with that, selecting from among the animations in the game.

    Animations are defined in the .ini files, which are named with the hexadecimal representation of their index. For example, "MAGE_MALE_ELF" is #25089, or 6201 in hexadecimal. That means it goes with 6201.ini.

    Of course, that's not the whole picture. The .ini file will tell you things like what sort of armor is visible on the character, but the actual sprites are elsewhere, referenced by a code you'll find in the .ini. For my male elf mage example, that's CEMW. That leads you to the .bam files. There are 96 .bam files starting with CEMW, all of which go into that animation.

    The inventory paper doll is more static; it doesn't need animations for things like attacking and casting. As such, the inventory sprites are a small minority of the .bams - in this example, four of them. One for each level of robe complexity.

    Adding a paper doll to an appearance that doesn't have one would be a matter of adding ****#INV.bam files, where #### is the code and # is a number. Exactly what is needed there ... I'm not an expert. This post was me going through the process of figuring out which files connect to this element of the game, and what some of the stuff in them does. I don't expect to edit any animations myself, beyond selecting from what's already there.

  9. You'd have to remove a bunch of things, actually. There are something like seven different versions of True Seeing/True Sight, each with their own subspells to cover the repeating effect. Though, thankfully, this only modifies the primary spells; the subspells are unchanged.

    True Sight (Inquisitor): SPCL232

    True Sight (Priest of Helm): SPCL732

    Empress (Deck of Many Things): SPIN633

    True Sight (Kuo-Toa): SPIN684

    True Seeing (Cleric/Druid): SPPR505

    True Sight (Mage/Bard): SPWI609

    True Sight (?): SPPR950

    Though I'm not sure why this would happen. The SCS component involved works pretty simply; it clones and modifies a self-targeting effect (the "True Sight" portrait icon) that already exists on the spell, keeping that targeting. It certainly worked for me. Any details about what version of the game you're playing, or any other modifications to the spells that might have come before?

    On further thought, this seems to be most likely - some other mod changed True Sight to impose a portrait icon on enemies, and the SCS component picked up on that to clone it and remove blindness from enemies as well as self. On the SCS end, the fix would be to match parameter2 (108) in addition to opcode (142) when cloning the effect. It would still help if you could provide some details to help track down the other side of this incompatibility bug.

    Oh, and a bug I spotted (base game, not SCS) while I was looking through the spells: the effects of an Inquisitor's True Sight are incorrectly marked as being power level 5. In 2.5, some were power 0 and some were power 5; this was standardized to all be power 0 in 2.6. The subspell, which handles all rounds after the initial casting, is correctly power level 0. (All of the "divination attack" spells should hit as level zero, bypassing spell level immunities.)

    The effect of this bug? If you're not using that SCS component that allows Breach to hit liches, then liches and rakshasas will be immune to the first pulse of an Inquisitor's True Sight due to their level 5 spell immunity. Subsequent rounds will affect them normally.

  10. Looking at my modded 2.5 install...

    You don't. The only way to get the ring is to murder the dryad, then later speak to Halbazzar Drin with the essence in your inventory and Xzar in the party.

    The essence of Schlumpscha relates to a different Xzar quest; that should come up when you visit the Undercellar in chapter 7.

    Then again, what sort of paladin goes along with Xzar and Montaron (NPC project versions) that long? They do some seriously evil things; while joining up with them for the trip to Nashkel isn't too bad, my good-aligned parties tend to draw the line at murdering Ender Sai in the bandit camp.

  11. In the EE, most of the NPC-only items have that restriction enforced by the ITEMUSE.2da file; anything with a listing there is only usable only by an actor with the script name listed there. Not even Use Any Item bypasses this restriction.

    Some other items, like Jaheira's Harper Pin, have an opcode 319 "Restrict Item" effect on the item, linked to the script name. Use Any Item bypasses this one.

    Finally, many of the NPC items have overly restrictive class, alignment, and attribute restrictions on top of the other stuff. For example, Cernd's staff is usable only by a human pure druid, neither totemic nor avenger, with at least 13 strength, 9 dexterity, 13 constitution, 12 intelligence, 18 wisdom, and 15 charisma. Even if you spot and handle one set of restrictions, don't assume that you're done without checking the other possibilities as well.

  12. No, you don't just put the mod folders in with the game. The mod has an install script that modifies various game files and puts the modified files in the "override" folder, along with any new files.

     

    Step 1: Put the whole mod folder in your game folder. Alongside all those folders you named, not in any of them.

    Step 2. Mods that explicitly support Mac OS should have a file named "setup-xxxx.command". Pull this one out of that folder and run it. Follow any instructions, make any needed choices.

     

     

    Also, the mod probably has a readme somewhere, which should mention installation...

     

    I use an alternate step 2 myself, running the Mac Weidu Launcher tool. Unfortunately, I don't know where to find that at the moment, since the Beamdog forums are currently unavailable.

  13. Yes, the SCS "ease-of-use" scripts include some daily items. That uses a timer of about seven hours.

     

    For what I'm building here - and the fact that I'll probably never turn on the auto-use of items and spells myself outside of testing - I'll read this as "no good way to do it". My scripts will not include any daily-use items or items that stick around after you've used all of their charges.

    The idea here is an extension of the existing bddefai script, with additional blocks copied from the various bd*****c scripts or otherwise tweaked to use more stuff. And better trigger conditions on core class abilities, like allowing Shadowdancers to auto-hide when enemies are near or having clerics actually use Turn Undead.

  14. Is there a way to check an equipped item's properties in a script?

    I'm working on extending the standard party member AI, including using a considerably wider range of items, and I've run into a snag. There's no obvious way to check whether an equipped item has charges left, or for that matter if it's identified. I can put together a block that knows how to use the Gargoyle Boots, but that isn't exactly helpful if it just keeps trying to use the boots after they're drained for the day and giving "Item Drained" messages.

  15. Values for things like spell slots, base saving throws, and base THAC0 are read from 2da tables when a character's level changes, either through leveling up or a level drain effect. They will always reset back to those values unless you change the tables themselves in the game files.

    For example, a mage's spell slots come from MXSPLWIZ.2da.

    Non-party characters will not be affected by any changes made to the table.

  16. On 8/24/2021 at 2:23 AM, jastey said:

    I'm not sure advancing game time by a specific amount of hours is possible, what can be done for sure is advancing to a certain time of day (23 o'clock for example).

    A bit belated, but this certainly is possible. AdvanceTime(time) is a valid script action. See, for example, BANCUT01.bcs in BG1.

  17. Carsomyr's dispel requiring a saving throw ... oh, that must be a component I never installed. Why nerf an item I hardly ever use anyway? Looking at the file for it, it should work.

    Planetars are good at lots of things. Dispelling isn't one of them. The weapon dispel is something like level 10, a quarter of the time. Their Dispel Magic spell is level 0 or 1 (it's the divine spell, and they're single-class mages). Since I'm coding up a tweak mod right now, there goes another component - fix it so all of their spells have high caster level and the weapon actually dispels at their (base) level. I do throw the defender a bone and move the dispel effect to the end of the list - that way, Death Ward will keep you alive before it gets dispelled.

  18. No saving throw against the dispel; I'm pretty sure no dispel effects in the game use that.

    Carsomyr's on-hit dispel is level 30, as is the Staff of the Magi. Arrows of dispelling always dispel with no level check.

    The planetar weapon dispels with "use caster level", with a 26% chance coinciding with the vorpal effect. This is not changed by SCS. Planetars are level 25 mages. There's a parameter where the level goes for "use specific level"; zero in vanilla, 15 in my old SCS install. (Edit: that's not a mod change, that's a 2.6 change. SCS does not modify the weapon at all.)

    Testing it (cast Death Ward on the Jailkeep Golem, tell planetar to attack it)... in vanilla, a level 12 Death Ward stands up to the planetar's dispels for a while, but not forever. Seven dispel/vorpal hits, three failed saves, and it went down. The SCS version was about the same.

    Further testing, using a party member on my SCS install: The first vorpal hit fails to dispel either a level 8 Stoneskin or a level 12 Death Ward. The second kills the target.

    So ... the ordering doesn't let Death Ward protect against the vorpal effect if the dispel check succeeds (I'd change this, and move that dispel effect to the last spot). But on the flip side, it's definitely not a level 25 dispel; the dispel check fails way too often for that. I don't know what level of dispel it is, but I suspect around 10 (with or without SCS).

  19. On 9/16/2021 at 6:25 PM, potatoteers said:

    Okay, one more thing I want to mention is that, even the dead magic room in Watcher's Keep will not take down Spell Shield. The room strips everything except Spell Shield.

    Dead magic areas dispel everything. However, spell defenses such as Spell Deflection, Spell Turning, and Spell Shield are not dispellable. So they remain.

     

    On the Antimagic Ray/Spell Shield interaction, I'm currently building a tweak mod addressing that among other things.

    Currently, in both the vanilla game and SCS, Antimagic Ray is an abjuration spell with the MAGICATTACK secondary type that hits as level zero. The secondary type lets it go through abjuration immunity but makes it subject to the deflection effect of Spell Shield. And since it hits as level zero, it uses up none of Spell Shield's one level of deflection and the shield remains. In effect, Spell Shield grants immunity to antimagic rays for its full duration.

    I offer two options in my mod.

    - Antimagic rays ignore Spell Shield. I remove the school and secondary type for this one; antimagic rays just go through all spell defenses this way.

    - Spell Shield blocks one antimagic ray. I set the power to 10 for this one while leaving the types in place. Spell Shield (and nothing else) will still block a ray, but will be used up in the process.

  20. Filling another little gap, here's ALTER_STORE_CURE:

    Spoiler

    DEFINE_PATCH_FUNCTION ALTER_STORE_CURE
    INT_VAR
      price            = "-1"
    STR_VAR
      match_resref  = ~~
      resref        = ~~
    BEGIN
      PATCH_IF (NOT ~%match_resref%~ STR_EQ ~~) BEGIN
        READ_LONG 0x70 ofs_cures
        READ_LONG 0x74 num_cures
        FOR (idx = 0; idx < num_cures; ++idx) BEGIN
          SET ofs = ofs_cures + idx*0xc
          READ_ASCII ofs s (8) NULL
          PATCH_IF (~%match_resref%~ STR_EQ ~%s%~) BEGIN
            PATCH_IF (NOT ~%resref%~ STR_EQ ~~) BEGIN
              WRITE_ASCIIE ofs ~%resref%~ (8)
            END
            PATCH_IF (price != "-1") BEGIN
              WRITE_LONG (ofs + 0x8) price
            END
          END
        END
      END
    END

    Cures are simpler than just about everything else - only two elements and twelve bytes per cure. But it's still annoying to have to break out the low-level tools for them.

    Anyway, here's the documentation for the function, with a sample use taken from the tweak mod I'm putting together.

    Spoiler

    ALTER_STORE_CURE: This is a patch function for store files that will match an existing cure and alter it based on the defined variables.

    STR_VAR match_resref: The cure to match. Defaults to an empty string, and the function will do nothing if you leave it like that.

    Once the matching cure is found, the remaining variables allow the function to change its fields to their values.

    STR_VAR resref to the altered cure's resource reference. Defaults to an empty string for no change.

    INT_VAR price to the altered cure's price. Defaults to -1 for no change.

     

    And here's a sample snippet of my code using it. This replaces all instances of CLERIC_DISPEL_MAGIC (dispel magic at the recipient's divine caster level) in temple stores with FORCE_DISPEL_MAGIC (dispel magic with no level check).

    COPY_EXISTING_REGEXP GLOB ~^.+\.sto$~ ~override~

      LPF ALTER_STORE_CURE STR_VAR match_resref=SPPR303 resref=SPIN866 END

    BUT_ONLY

    (Also ... this is my first post here. I've been over at Beamdog for a while, and lurked here reading some things, but I only registered just now.)

×
×
  • Create New...