Jump to content

jmerry

Modders
  • Posts

    1,284
  • Joined

  • Last visited

Everything posted by jmerry

  1. 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.
  2. 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.
  3. OT: The "code" environment respects spacing and uses a monospaced font; I'd build the table in a text editor and copy it in. Also, the last button in the top bar (magnifying glass) is a preview.
  4. 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.
  5. 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.
  6. 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?
  7. 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?)
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. So don't use that condition. To quote the IESDP: Use something else instead. For example ... Is that what you were looking for?
  13. 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: 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.
  14. So now you're competing with Kelemvor.
  15. Note that those in the "modder" category get a larger limit, so they can attach their stuff. I've got 22 MB free, for example. But ... well, hosting-intensive stuff like posting a run with screenshots isn't supported here. We have other forums for that sort of thing.
  16. There's a function that converts between backslashes and forward slashes in paths; it was broken in the earliest versions of v35, but has been fixed for some time. That shouldn't be the problem now.
  17. The way I see it, a lot of portfolios are intrinsically aligned. Murder is one of those; it's intrinsically evil. If you separate out some sort of non-evil killing - hunting down and executing offenders, for example - that's not murder anymore. If you're a non-evil character ascending, you have to reject Murder and align with a different portfolio (which will, of course, depend on your role-playing choices). The last time I did this was in my "Kill It With Fire" run; that protagonist became a chaotic neutral god of Fire. Of course, I had to write that epilogue myself. And at that point, you're not competing with Cyric anymore - he gets to keep his hold on Murder. He might cause trouble for you, but he won't have it out for you specifically.
  18. Well, now. That's something completely different. Option 1: apply effects (opcode 180) that prevent your item from being used to every other character. You can apply this to joinable characters in their CRE files, or to created PCs other than player 1 by a script. Option 2: Put an effect (opcode 319) on the item so that it can only be used by creatures with no name, or only by creatures with no script name. That means only player-created characters will be able to use it. Well, normally, anyway. EE-only. I might go with a hybrid approach; the opcode 319 effect to restrict it to player characters only, and a script that runs once in campaign start areas to apply the opcode 180 effect to players 2 through 6 so that created PCs other than the protagonist can't use it..
  19. Well. If it's being assigned by an ini, it might not have an associated string. That can happen too. (Also, there's no such thing as a .waw file. Persistent error there, and the letters aren't even keyboard-adjacent or anything in the usual layout.)
  20. And if you know a creature it's associated with, you can look at that CRE file - the relevant fields are string references, after all.
  21. Hmm. I don't see a clean way to search for the string reference associated with a sound in Near Infinity. Feature request? Seems like something to add to the "StringRef" search panel. If you know the text associated with the sound, you can search for that text in the StringRef panel. For example, AJANT01.WAV in BGEE is "Halt! Be you friend or foe?" Searching for that text finds #421 (without the sound) and #3502 (with the sound).
  22. Nothing, really. I've even seen a fanfic with a drow as the Bhaalspawn protagonist. But. Every other drow character we meet in the series was raised in the Underdark, as part of that evil drow culture. Some embraced it and some rejected it, but all were shaped by it. A surface-raised drow would be something entirely different. And if you want to do justice to a character concept like that in the leading role, a game like this just isn't flexible enough to satisfy.
  23. This is a vanilla bug - the Sword of Flame and the two versions of Angurvadal each have an opcode 9 glow effect with the wrong parameters, applying a red glow to the armor trim instead of anything associated with the weapon. And the EE Fixpack is already on it. https://www.gibberlings3.net/forums/topic/35669-blinking-armour-when-firesword-is-wielding/?do=findComment&comment=311202
  24. As you've stated? Not really possible at all; I just don't see any mechanism to graft a save onto incoming effects. But. If you're willing to loosen things a bit, there's an alternative. - Step 1. Create a spell that grants immunity to all of the projectiles you want this effect to apply to. Lots of opcode 83 effects. Unconditional, with a long enough duration. - Step 2. Append two opcode 321 effects to the spell from step 1. The first one goes first and is a standard anti-stacking use of that effect; remove the effects of the spell (any previous castings) before applying the spell. The second one goes last and is decidedly non-standard; remove the effects of the spell after applying the spell if a save is failed. - Step 3. Create an EFF that casts the spell (opcode 146) from step 1 and 2. - Step 4. Create a spell that applies the EFF from step 3 repeatedly (opcode 272). Frequency is up to you, but faster rates like "once per second" have been known to cause problems with saving. - Step 5. Apply the spell from step 4 to monks at an appropriate level, by putting it in the kit CLABs. This applies to PC monks only; if you want this to work for non-party monks, you need to either apply the spell with scripts or put that opcode 272 effect in their CRE files. So, what does this scheme do? First, a monk of sufficient level gets a spell applied to them that applies a permanent op272 effect. That effect then repeatedly casts a spell on that monk. If they make their save, the spell removes any previous instances of itself and applies immunity to a bunch of projectiles. This lasts until the next time that op272 effect triggers, at which point a new instance of the spell is cast. If they fail their save, the spell removes itself immediately, resulting in a state of vulnerability that lasts until the next time the op272 effect triggers. Instead of a save for each individual projectile, a monk gets a save that applies to an interval of time; either all projectiles are blocked in that interval, or none are.
  25. Both the extra "hard to find" scrolls and the Freedom scrolls in Ribald's basic shop are in the "spell tweaks" group. The tweaks in that group don't appear to be available as stand-alone components anymore, so you'll have to install a package that includes them if you want those scrolls. Which ... wait, they aren't in the spelltweaks.2da table that defines those packages? Even "all" won't install the extra scrolls? Huh. Looks like the v35 reorganization orphaned these two extra scroll components.
×
×
  • Create New...