Jump to content

jmerry

Modders
  • Posts

    1,296
  • Joined

  • Last visited

Posts posted by jmerry

  1. Or should we drop the part about removing everything of the illusion school, and just aim for the sectype instead? Let's see, categorizing illusion school spells ... 33 exist in unmodded BGEE with SoD:

    Illusionary protections with the sectype: bddisplc, bddispb2 (Displacer Beast defenses), bdfractl (Fractal Blade mirror image), bdnighte (The Night's Embrace invisibility), OHWI212 (clone of Mirror Image), SPDM102 (DM Monk Blur), SPDM106 (DM Monk Mirror Image), SPDR401 (Avenger Improved Invisibility), SPIN118 (Quayle Invisibility), SPIN544 (Psionic Improved Invisibility), SPIN687 ("Create Shadows", an invisibility spell unused in BGEE), SPIN697 and SPIN698 (Mirror Image and Improved Invisibility for the Moon Dog), SPWI120 (Reflected Image), SPWI201 (Blur), SPWI206 (Invisibility), SPWI212 (Mirror Image), SPWI405 (Improved Invisibility), SPWI721 (Mass Invisibility), SPWI607 (Mislead), SPWI703 (Project Image), SPWI804 (Simulacrum)

    Debuffs without the sectype: SPDM101 (DM Monk Blindness), SPIN952 (Phantasmal Killer. Not really a debuff, but it relies on delayed effects so it can be removed before it goes off), SPPR704 (Nature's Beauty), SPWI106 (Blindness), SPWI125 (Spook), SPWI223 (Deafness), SPWM178 (wild surge blindness)

    Buffs without the sectype: SPPR516 (Pixie Dust), SPWI307 (Invisibility 10'), SPWI315 (Wraithform), SPWI505 (Shadow Door)

    Uh-huh. I think it makes more sense to give the ILLUSIONARYPROTECTIONS sectype to spells like Pixie Dust and Invisibility 10', but take out the school-removing ability of True Sight/Seeing.

  2. On 3/20/2024 at 8:11 AM, Graion Dilach said:

    Vanilla Centeol has all those items in fact and they exist outside her inventory...

    So it looks like what happened is that in some point in development Centeol genuinely had those items, but then the container was created, the items were placed there, and the "this slot has this item" markers were removed from her without deleting the "here's an item this creature could have somewhere" references. Interesting. I was only looking at the screen for inventory and equipped items when I made my earlier comment, so I didn't see that.

  3. So, is there any conceivable reason that, if you removed Bentley and had some later event bring him back, it would matter that it's that particular version of Bentley and not a newly created one? Stores are always global, by the way - it's just stuff like personal inventory and local variables that would care about a particular instance of an NPC.

    I'd conceptualize DestroySelf(), like EscapeArea(), as "send to nowhere". Global creatures can be recalled back from that nowhere with the MoveGlobal() action, while non-global creatures can't because any reference to their script name only "looks" in the current area.

  4. The dream cutscene (CUT69A through CUT69D) uses CreateCreatureCopyPoint, so that's an actual clone of player 1. That action also assigns a script name, which is used to control the creature in the remainder of the dream.

    Note that creating a clone strips scripts from the clone; if you want your clone to do stuff, you need an outside impetus.

  5. Vanilla Centeol has absolutely no items, and the only condition on her dialogue is the charmed option. These mods could not possibly be causing the problem on their own.

    What I suspect happened:

    - Another mod moved the contents of the nearby container to Centeol's inventory.

    - Those contents include the cursed "Discipliner" ring.

    - This mod caused her to equip that ring. In addition to the INT and WIS penalties in the description, the ring inflicts a Feeblemind state which prevents conversation.

    - Since her dialogue is what normally turns her hostile and summons additional spiders, that didn't happen.

     

    There's not much that can be done about other mods putting stuff in creatures' inventory; that's the whole point of the "Bag of Spilling" component. However, if you're going to go equip random stuff in inventories, how about a check for the "cursed" flag? Basically, don't blindly equip cursed items.

  6. Applying the change starting at level 1 was based on the drow enemies seen in BG2; the scaling you had is exactly the formula that most of them use. Including that they go up to 90% - there are some level 20 drow in Sendai's enclave with 90% MR.

    As for the mechanics of things ... here are what the spells involved do:

    - dw0 (initial): Sets base MR to zero. Applied once, when the character first joins the party.

    -dwsun (sunlight): Removes the effect of dwres. Applies the "dazzled" penalty, if you chose that option at installation.

    -dwres (resistance): Removes the effect of dwsun. Applies a MR increment appropriate to level; exact numbers depend on choices made at installation.

    Also, it is possible for characters to be out of sync; they're checked individually based on their locations, so if you have one character inside and one outside during the day, the first should have their resistance and the second should have the sunlight state.

    1 hour ago, ktchong said:

    I changed it to 50.  I loaded the edited save game.  Her MR was reset to 0 again.

    Now that? That means something weird is going on. Because the dw0 spell is the only one of the bunch that alters base MR, and it's only ever supposed to be applied once. It's all controlled by a local variable, see - 1 on the CRE file before they join, 2 in thedaylight state, 3 in the night/indoors state. My script never resets that variable to 1, and the initial zeroing spell is only ever cast at that value ... is this EEKeeper losing track of local variables again? Well, that's not something I can test - I literally can't run EEKeeper at all on my current system, because the most recent Mac version I'm aware of is a 32-bit app.

    I might have to come back to this, but not now. My attention is elsewhere at the moment.

  7. Well, that's something I'll have to look into, because I did test the drow MR component myself and didn't see anything like that. It works by flagging the characters with local variables, setting base MR to zero, and applying spells to do the day/night changes. And it looks like your problem is the light/dark scripts not working right for you. Viconia thought it was always daytime/outdoors, and Baeloth thought it was always night/indoors. The spells themselves were working exactly as expected. (Baeloth starts with archmage robes for +5 MR from equipment. Level 6 = 50+12 base, +5 equip = 67 total MR)

    Setting base MR to zero, by the way, is an essential feature of the component; it's done as soon as any of the drow characters join the party. I then use one spell to add resistance at night or indoors/underground, and a different spell to set the "dazzled" effect outdoors during the day.

    Wait. My component does the script parts by appending its blocks to the end of the global baldur.bcs script (or other global scripts for other parts of the game). If there's something earlier in the script that's always intercepting them so those blocks never run, it'll break and never update the sun/not sun status of the drow characters. Through no fault of its own, but instead some other mod breaking things.

    So that's my diagnosis: probably the fault of some other mod updating the global script with an attention-hog block that prevented this component from doing its work by always executing. After letting things through at least once to set Viconia's status to "daytime".

    What can I do on my end? Well, I did put "Continue()" in all of the blocks of my script addition; I could move it to the beginning of the script and avoid any attention hog blocks by beating them to the punch. But that only really treats this one symptom, not the underlying problem. Any other mod components that add things to the end of that global script will still fail.

  8.  

    20 minutes ago, Anterwaare said:

    That being said, 3 spells in total and you're good to go: protection from fire, chaotic commands, protection from magical energy. If the character isn't good aligned, you don't even need PfME.

    And I didn't have much trouble with the Spirit Trolls even in my run with no spellcasting at all. You see, spirit trolls have no defensive spells whatsoever. Trolls are immune to most crowd control effects so that's not an option against them, but all you have to do is put a little elemental damage on and their spells are disrupted. The Greater Commands are likely to get through because that spell casts so quickly, but you can build for excellent spell saves even pretty early in the game; my second spirit troll encounter in that no-casting run (after the first disrupted the troll's spell) had a Greater Command hit the full party and only bring down one member (Keldorn, most vulnerable at a 20% chance of failing his save).

    That party did try to focus down spirit trolls first whenever they showed up, of course. They are dangerous if you don't disrupt them.

  9. All innate abilities use the average of the class levels, for all dual-class and multiclass characters. That's pretty well known. Basically, characters have an innate caster level (that average), a divine caster level (cleric/druid/shaman level, paladin/ranger level minus whatever, or 1), and an arcane caster level (mage/sorcerer/bard level, or 1). Whatever spell you cast uses the caster level appropriate for its type. With the exception of some effects that cast a spell at a fixed level defined in the effect. So, for example, Bala's Axe has an activated ability to cast Dispel Magic. Specifically, the divine version. Which means it uses the wielder's divine caster level, which is usually pretty low unless they're a Shaman.

    Ranger/cleric casting (in the EE) is something I've tested:

    - The number of spell slots at a given spell level is whichever is larger between the cleric spell progression (including WIS bonuses) and the ranger spell progression (which doesn't include WIS bonuses).

    - All spells that a cleric can cast that aren't forbidden based on alignment are included in the spell list, if the character can cast spells of that level based on either class's progression.

    - Druid-only spells are added to the spell list only if the ranger spell progression has reached that level. (This is an EE change; pre-EE, the spells were added for all spell levels regardless of ranger level.)

    - Caster level is always the cleric level.

    So, for example, a cleric 2 -> ranger 17 with WIS 18, in the unmodded BG series, has four level 1 spell slots, three level 2 spell slots, and three level 3 spell slots. All spells from the cleric and druid lists that the character's Good alignment allows are included at those levels. And all of those spells are cast at caster level 2. Fortunately, pretty much all spells have "level 1" abilities that allow a character with a level too low to normally memorize the spell to cast it with an effect matching the lowest level it would normally be available at. So you can cast Animate Dead (for the weakest skeletons) or Holy Smite (for 5d4 damage), but your Dispel Magic and Call Lightning spells are considerably less powerful than a pure level 17 ranger's.

    I suspect that the mechanics of an early cleric -> ranger dual were never tested at all before release.

  10. Yeah. The AI-generated pictures can figure out how to replicate the style of a scientific illustration, but don't have a clue that it's meant to convey accurate information. Plus picture-generating AIs in their current form are very bad with text. So you get labels that superficially look like words but aren't real words, and often contain glyphs that aren't in any standard alphabet.

    Oh, and all of those pictures were total messes. The rat testicle illustration was just the easiest one to laugh at. (Hey, that picture managed to have one accurate label: "Rat")

  11. Of all the errors in the snippet provided, I find the DELETE_FILE one particularly vicious. Because, even as someone who knows WeiDU pretty well, I had to search the documentation to spot that one. The real command is just DELETE, by the way. With a big warning in the documentation to not use it without a good reason.

  12. It's not the first time I've seen ChatGPT fail at producing code in this modding scene's obscure languages. Here's a juicy example (I took apart one chunk of it in detail): https://forums.beamdog.com/discussion/88152/need-help-in-making-vampire-kit-spells-scripts-creatures-items

    Anyway, for this one...

    - SPWI405 isn't Magic Missile. It's Improved Invisibility (in the BG series). So right off the bat, we're editing the wrong spell.

    - Then we read some binary data. Two bytes at 0x1E (some of the kit exclusion flags), one byte at 0x20 (more kit exclusion flags), one byte at 0x21 (the last of the kit exclusion flags), and two bytes at 0x22 (the casting animation). Values 4096, 0, 0, and 13, by the way.

    - Then we write something. Add one to the number at 0x22. Now the spell has a Conjuration animation instead of Necromancy.

    - Then we write more things. In the first three cases, write what's already there. In the fourth, undo the change we just made in the last step.

    - Then, in the name of printing an unearned victory message, we bring in a string @100 (OK, I'll assume that there's a tra file somewhere for that to point to, as that's the more entertaining option). Write it at the NAME1 offset. Which is actually the name of the spell. So we've renamed "Improved Invisibility" to ... something.

    - The next line is a glaring syntax error; SAY needs two arguments, and only one is provided. The first argument has to be an integer, and that string can't be converted. So the code crashes here. All right, let's proceed as if the "SAY ~Magic Missile damage increased by 1 point.~" doesn't exist.

    - The line after that is another glaring syntax error. COMPILE ... what? EVALUATE_BUFFER is a modifier, not the argument that action needs. All right, ignore that line too.

    - Now, we close the spell (by performing an ACTION). That action is to immediately open up the same thing we were just working with. I really don't see the point.

    - Finally, the DELETE_FILE command tells us to get rid of everything we just worked on. Except - no, that command doesn't actually exist in WeiDU. So that's a third syntax error, a bit subtler than the last two.

    - OK. We've just defined a function. Which, contrary to what it's called, renames Improved Invisibility. At least, if we ignore the syntax errors. Now, we have a code snippet that invokes the function. I'll be generous and suppose this is part of a mod component, and we just don't have the boilerplate around it.

    - If Improved Invisibility exists, "modify_magic_missile". Wait. You need to LAUNCH functions in WeiDU. That's another syntax error. And what if the spell doesn't exist? Well, then we SAY something. Which is a syntax error for two reasons: that there's only one argument, and that SAY is a PATCH and we don't have a file loaded.

    So, as a summary, there are five syntax errors, and the parts that are technically functional have absolutely nothing to do with the stated purpose.

  13. I think that old version you remember was in SCS (it isn't anymore). I don't think it gave you as many choices as the new version in cdtweaks, but that's arguably better design anyway. For example, in Nashkel, some NPCs would go to the inn and some to the Belching Dragon, and that choice was believably based on their personalities.

    I think I have some old versions lying around that I can check... no, looks like I don't have anything older than v33 saved, at least on this machine.

     

  14. So ... which creatures have levels that are too high for their spellcasting power, and which creatures have spellcasting power that's too low for their level? SCS tends to lean on the side of making more challenge - which, for creatures normally encountered in ToB, is probably fair.

    And really, NTotSC shouldn't have used ToB creatures unaltered for material in the BG1 campaign.

  15. Looking at the code ... I have no idea why it would try to read the HP[class] 2da files.

    Though the overall architecture ... why load up that 2da file (table of weapon type/damage associations) as an INNER_PATCH while going through every item? Why not just read it once, build an array, and refer back to that array without the extra file-loads?

  16. The class HP table for priests, in vanilla, is HPPRS.2da, not HPPR.2da. HPPR does not exist unless a mod adds it.

    So, probably a typo in what's being looked for. The real question is why this error didn't come up earlier, because that sure looks like it would break on any install.

    (Unless that was the error InKal "reported" above?)

  17. The games just weren't designed to be easy to mod in the first place. Everything important is in binary files with bespoke specifications, and that means you need the specialized tools to get at them. By way of contrast, I've done some stuff with the Civilization games too - and there, you're using established formats like XML and SQL to edit databases, or scripting in something like Python or Lua to get at events that the database-editing can't reach. Plus the environment of people installing multiple mods that interact with each other is just really challenging; it's amazing things work as well as they do with the system we have for the IE games.

    So as long as we keep playing these games in their creaky old engine, WeiDU is how mods will be done. Is there room for improvement in how the players see this - a better interface for installing the mods themselves? Sure. But you're not going to replace the back-end. Modders just have to suck it up and learn how to work with an unusual programming language.

  18. 50 normally learnable wizard spells per level, 50 normally learnable priest spells per level. If you don't care about that, 4000 total slots split among the four (SPCL, SPIN, SPPR, SPWI) groupings. There's no way to bypass that overall limit, as spell.ids entries encode resource names.

    There is an alternative if you want to use your spells in scripts; all of the "cast a spell" actions have RES versions that take the spell resource as an argument instead of the symbolic name. For example,

    ReallyForceSpellRES("NEWSPELL",NearestEnemyof(Myself))

    will do the exact same thing as your version and cast your NEWSPELL.SPL at the nearest enemy.

  19. To clarify, this is from BG2EE, one of the battle music songs. There are a number of instances of songs with the same resource references being completely different between BGEE and BG2EE, so the game should always be specified when talking about music. In this case, vb.mus doesn't exist in BGEE, so the choice of game is clear.

    This particular song is used in three areas of the ToB campaign, most notably Yaga-Shura's camp. Which has a particularly long battle, so you're likely to hear it repeat.

    Also, I just listened to it in NI. It's not a big deal; not jarring on casual listen. But if you say it'd be better with that loop changed, I'll believe you.

  20. Not new, of course.

    The creatures in question are LARRY, DARRYL, and DARRYL2. All have the generic SHOUT script in vanilla, and clearly they should go hostile (and die easily) if you attack one of them. Best solution ... probably give them a faction-specific shout script that doesn't match the random enemies that appear on the map. In their general vicinity, that's kobolds, xvarts, and skeletons.

  21. So don't use that condition. To quote the IESDP:

    Quote
    • 10 ⟶ Delay(Extra) — Checked once per round
      • This condition is pretty unreliable because two events need to line up for it to fire: the Delay() trigger needs to return true at the same time the contingency is checked.

    Use something else instead. For example ...

    Quote
    • If you need a condition which is always true, you could set Condition to 20 and Extra to 102  hp < 102% will always be true. 102 is used because its binary representation does not have BIT0 set to 1. In so doing:

    Is that what you were looking for?

  22. There are basically two ways around it:

    - Apply immunities to the troublesome effects, so they can't stop your script from running. This is why the troll immunity item grants immunity to hold, stun, confusion, etc.

    - Do it with spells and effects instead of scripts. See EE trolls for an example. To quote myself from another thread:

    Quote

    Trolls have four undroppable items.

    - TROLLIMM: general troll immunities, which include basically everything mind-affecting or that could prevent scripts from running. Probably because previous versions of trolls did rely on scripts for the fire/acid thing.

    - TROLLBOO: Sets movement speed to 11, standardizing trolls as slightly faster than an unaugmented PC.

    - MONHP1: min HP 1, no other effects.

    - TROLLREG: Regeneration, immunity to Sleep, casts the TROLLREG spell when hit points get low (opcode 232).

    So, what does that TROLLREG spell do?

    - Immediately dispel everything and cure basically all status effects, including the stuff trolls are immune to already. Set HP to 1.

    - Immediately remove the TROLLREG and MONHP1 items.

    - Set 100% immunity to all damage types except fire and acid. Cause sleep. Set all saves to 20 (auto-fail). All with duration 20.

    - After a delay of 20, set HP to 100% and create the TROLLREG and MONHP1 items.

    Basically, adapt those mechanics to your use. If you want a way to counter the healing, then the troll mechanics are definitely the way to go. If you don't, then you can do things more simply and just have a repeating heal effect on the creature or an item it has equipped.

×
×
  • Create New...