Skip to content

[MOD] jmerry's Tweak Collection

13

Comments

  • jmerryjmerry Member Posts: 3,882
    That, I understand. Without "Bigger random spawns", you're running into that error I found (writing at an undefined location). With it, it's the error I haven't figured out yet.
  • ReverieReverie Member Posts: 30
    Alight, well, fingers crossed! I passed on this or that during the install when I had errors, but these components sound too fun to miss out on ;)
  • jmerryjmerry Member Posts: 3,882
    edited April 2023
    Getting into testing ... I have a new version of the component which won't cause problems on a clean install without the "bigger random spawns" component before it. But that ARS005.ARE still breaks it.

    All right, speed things up by only modifying that one troublesome file. Reactivate feedback ... looks like all my reads are good. But wait, there's one last step - adding the new spawn points using the fj_are_structure function included in WeiDU. And it looks like that's what's breaking. Turn on debug mode for that function ...
    Install Component [Random spawns scale with difficulty]?
    [I]nstall, or [N]ot Install or [Q]uit? i
    
    Installing [Random spawns scale with difficulty] [3.1]
    Copying and patching 1 file ...
    Copying and patching 1 file ...
    Copying and patching 0 files ...
    Copying and patching 0 files ...
    Copying and patching 1 file ...
    Copying and patching 1 file ...
    Copying and patching 1 file ...
    Copying and patching 1 file ...
    Copying and patching 0 files ...
    Copying and patching 1 file ...
    Copying and patching 0 files ...
    Copying and patching 0 files ...
    Copying and patching 0 files ...
    Copying and patching 1 file ...
    Copying and patching 0 files ...
    Copying and patching 0 files ...
    Copying and patching 0 files ...
    
    Beginning unmarshalling.
    
    Reading actor 0.
    
    Reading actor 1.
    
    Reading actor 2.
    
    Reading actor 3.
    
    Reading actor 4.
    
    Reading actor 5.
    
    Reading actor 6.
    
    Reading actor 7.
    
    Reading actor 8.
    
    Reading actor 9.
    
    Reading actor 10.
    
    Reading actor 11.
    
    Reading actor 12.
    
    Reading actor 13.
    
    Reading actor 14.
    
    Reading actor 15.
    
    Reading actor 16.
    
    Reading actor 17.
    
    Reading actor 18.
    
    Reading actor 19.
    
    Reading actor 20.
    
    Reading actor 21.
    
    Reading actor 22.
    
    Reading actor 23.
    
    Reading actor 24.
    
    Reading actor 25.
    
    Reading actor 26.
    
    Reading actor 27.
    
    Reading actor 28.
    
    Reading actor 29.
    
    Reading actor 30.
    
    Reading actor 31.
    
    Reading region 0.
    
      Associating vertices.
    
    Reading region 1.
    
      Associating vertices.
    
    Reading region 2.
    
      Associating vertices.
    
    Reading region 3.
    
      Associating vertices.
    
    Reading region 4.
    
      Associating vertices.
    
    Reading region 5.
    
      Associating vertices.
    
    Reading region 6.
    
      Associating vertices.
    
    Reading region 7.
    
      Associating vertices.
    
    Reading region 8.
    
      Associating vertices.
    
    Reading region 9.
    
      Associating vertices.
    
    Reading region 10.
    
      Associating vertices.
    
    Reading region 11.
    
      Associating vertices.
    
    Reading region 12.
    
      Associating vertices.
    
    Reading region 13.
    
      Associating vertices.
    
    Reading region 14.
    
      Associating vertices.
    
    Reading region 15.
    
      Associating vertices.
    
    Reading region 16.
    
      Associating vertices.
    
    Reading region 17.
    
      Associating vertices.
    
    Reading region 18.
    
      Associating vertices.
    
    Reading region 19.
    
      Associating vertices.
    
    Reading region 20.
    
      Associating vertices.
    
    Reading spawn 0
    
    Reading spawn 1
    
    Reading spawn 2
    
    Reading spawn 3
    
    Reading entrance 0
    
    Reading entrance 1
    
    Reading ambient 0
    
    Reading ambient 1
    
    Reading ambient 2
    
    Reading ambient 3
    
    Reading animation 0.
    
    Reading animation 1.
    
    Reading animation 2.
    
    Reading animation 3.
    
    Reading animation 4.
    
    Reading animation 5.
    
    Reading animation 6.
    
    Reading animation 7.
    
    Reading animation 8.
    
    Reading animation 9.
    
    Reading animation 10.
    
    Reading animation 11.
    
    Reading animation 12.
    
    Reading animation 13.
    
    Reading animation 14.
    
    Reading animation 15.
    
    Reading bitmask (should only exist in saved game areas).
    
    Reading songs (obligatory structure).
    
    Trimming ARS005.BCS down to the header.
    
    Reassembling ARS005.BCS.
    
    Reinserting actor number 0.
    
    Reinserting actor number 1.
    
    Reinserting actor number 2.
    
    Reinserting actor number 3.
    
    Reinserting actor number 4.
    
    Reinserting actor number 5.
    
    Reinserting actor number 6.
    
    Reinserting actor number 7.
    
    Reinserting actor number 8.
    
    Reinserting actor number 9.
    
    Reinserting actor number 10.
    
    Reinserting actor number 11.
    
    Reinserting actor number 12.
    
    Reinserting actor number 13.
    
    Reinserting actor number 14.
    
    Reinserting actor number 15.
    
    Reinserting actor number 16.
    
    Reinserting actor number 17.
    
    Reinserting actor number 18.
    
    Reinserting actor number 19.
    
    Reinserting actor number 20.
    
    Reinserting actor number 21.
    
    Reinserting actor number 22.
    
    Reinserting actor number 23.
    
    Reinserting actor number 24.
    
    Reinserting actor number 25.
    
    Reinserting actor number 26.
    
    Reinserting actor number 27.
    
    Reinserting actor number 28.
    
    Reinserting actor number 29.
    
    Reinserting actor number 30.
    
    Reinserting actor number 31.
    
    Reinserting region number 0.
    
    Reinserting region number 1.
    
    Reinserting region number 2.
    
    Reinserting region number 3.
    
    Reinserting region number 4.
    
    Reinserting region number 5.
    
    Reinserting region number 6.
    
    Reinserting region number 7.
    
    Reinserting region number 8.
    
    Reinserting region number 9.
    
    Reinserting region number 10.
    
    Reinserting region number 11.
    
    Reinserting region number 12.
    
    Reinserting region number 13.
    
    Reinserting region number 14.
    
    Reinserting region number 15.
    
    Reinserting region number 16.
    
    Reinserting region number 17.
    
    Reinserting region number 18.
    
    Reinserting region number 19.
    
    Reinserting region number 20.
    
    Reinserting spawn number 0.
    
    Reinserting spawn number 1.
    
    Reinserting spawn number 2.
    
    Reinserting spawn number 3.
    
    Adding new spawn structure.
    
    Reinserting entrance number 0.
    
    Reinserting entrance number 1.
    
    Reinserting ambient number 0.
    
    Reinserting ambient number 1.
    
    Reinserting ambient number 2.
    
    Reinserting ambient number 3.
    
    Reassociating vertices to region 0.
    
    Reassociating vertices to region 1.
    
    Reassociating vertices to region 2.
    
    Reassociating vertices to region 3.
    
    Reassociating vertices to region 4.
    
    Reassociating vertices to region 5.
    
    Reassociating vertices to region 6.
    
    Reassociating vertices to region 7.
    
    Reassociating vertices to region 8.
    
    Reassociating vertices to region 9.
    
    Reassociating vertices to region 10.
    
    Reassociating vertices to region 11.
    
    Reassociating vertices to region 12.
    
    Reassociating vertices to region 13.
    
    Reassociating vertices to region 14.
    
    Reassociating vertices to region 15.
    
    Reassociating vertices to region 16.
    
    Reassociating vertices to region 17.
    
    Reassociating vertices to region 18.
    
    Reassociating vertices to region 19.
    
    Reassociating vertices to region 20.
    
    Reinserting animation number 0.
    
    Reinserting animation number 1.
    
    Reinserting animation number 2.
    
    Reinserting animation number 3.
    
    Reinserting animation number 4.
    
    Reinserting animation number 5.
    
    Reinserting animation number 6.
    
    Reinserting animation number 7.
    
    Reinserting animation number 8.
    
    Reinserting animation number 9.
    
    Reinserting animation number 10.
    
    Reinserting animation number 11.
    
    Reinserting animation number 12.
    
    Reinserting animation number 13.
    
    Reinserting animation number 14.
    
    Reinserting animation number 15.
    
    Reinserting bitmask number 0.
    
    Reinserting songs number 0.
    
    Beginning unmarshalling.
    
    Reading actor 0.
    
    Reading actor 1.
    
    Reading actor 2.
    
    Reading actor 3.
    
    Reading actor 4.
    
    Reading actor 5.
    
    Reading actor 6.
    
    Reading actor 7.
    
    Reading actor 8.
    
    Reading actor 9.
    
    Reading actor 10.
    
    Reading actor 11.
    
    Reading actor 12.
    
    Reading actor 13.
    
    Reading actor 14.
    
    Reading actor 15.
    
    Reading actor 16.
    
    Reading actor 17.
    
    Reading actor 18.
    
    Reading actor 19.
    
    Reading actor 20.
    
    Reading actor 21.
    
    Reading actor 22.
    
    Reading actor 23.
    
    Reading actor 24.
    
    Reading actor 25.
    
    Reading actor 26.
    
    Reading actor 27.
    
    Reading actor 28.
    
    Reading actor 29.
    
    Reading actor 30.
    
    Reading actor 31.
    
    Reading region 0.
    
      Associating vertices.
    
    Reading region 1.
    
      Associating vertices.
    
    Reading region 2.
    
      Associating vertices.
    
    Reading region 3.
    
      Associating vertices.
    
    Reading region 4.
    
      Associating vertices.
    
    Reading region 5.
    
      Associating vertices.
    
    Reading region 6.
    
      Associating vertices.
    
    Reading region 7.
    
      Associating vertices.
    
    Reading region 8.
    
      Associating vertices.
    
    Reading region 9.
    
      Associating vertices.
    
    Reading region 10.
    
      Associating vertices.
    
    Reading region 11.
    
      Associating vertices.
    
    Reading region 12.
    
      Associating vertices.
    
    Reading region 13.
    
      Associating vertices.
    
    Reading region 14.
    
      Associating vertices.
    
    Reading region 15.
    
      Associating vertices.
    
    Reading region 16.
    
      Associating vertices.
    
    Reading region 17.
    
      Associating vertices.
    
    Reading region 18.
    
      Associating vertices.
    
    Reading region 19.
    
      Associating vertices.
    
    Reading region 20.
    
      Associating vertices.
    
    Reading spawn 0
    
    Reading spawn 1
    
    Reading spawn 2
    
    Reading spawn 3
    
    Reading spawn 4
    
    Reading entrance 0
    
    Reading entrance 1
    
    Reading ambient 0
    
    Reading ambient 1
    
    Reading ambient 2
    
    Reading ambient 3
    
    Reading animation 0.
    
    Reading animation 1.
    
    Reading animation 2.
    
    Reading animation 3.
    
    Reading animation 4.
    
    Reading animation 5.
    
    Reading animation 6.
    
    Reading animation 7.
    
    Reading animation 8.
    
    Reading animation 9.
    
    Reading animation 10.
    
    Reading animation 11.
    
    Reading animation 12.
    
    Reading animation 13.
    
    Reading animation 14.
    
    Reading animation 15.
    
    Reading bitmask (should only exist in saved game areas).
    
    Reading songs (obligatory structure).
    
    Reading rest interrupt table (obligatory structure).
    ERROR: illegal 228-byte read from offset 17600 of 17600-byte file ARS005.ARE
    ERROR: [ARS005.ARE] -> [override/ARS005.ARE] Patching Failed (COPY) (Failure("ARS005.ARE: read out of bounds"))
    Stopping installation because of error.
    
    (Very long debug log spoilered)

    It isn't anything I did that broke. It's fj_are_structure choking on an area because it doesn't have a rest interrupt table. I think literally every area in BG2EE has that table - even if it's 228 bytes of zeros in some cases - but there are areas in BGEE that lack the tables. Such as the upper floor of the Flaming Fist headquarters, for example. It's still definitely bad practice to create an area without it, but I can't call it truly malformed.

    ...

    All right, there's one thing I can do. I can insert a sanity check that will exclude any such areas from modification. And throw a warning while I'm at it. Better than erroring out of the whole component.

    Version 3.1 will be coming in the not-too-distant future.
  • Christian79Christian79 Member Posts: 48
    What exactly does the Inquisitor True Sight component do? It is not listed in the description here and the readme of the tweak-collection
  • jmerryjmerry Member Posts: 3,882
    You're right, I was missing that readme entry. Here, have a newly written version:

    14. Inquisitor True Sight is consistent with other versions of the spell
    Games: BGEE, BG2EE, EET

    Unlike all other versions of True Sight/True Seeing and indeed all divination attack spells, the initial pulse of the Inquisitor kit's True Sight spell hits as a level 5 spell. This allows certain defenses such as a lich or rakshasa's low-level spell immunity to block the effect.
    This component corrects the spell to hit as level 0, like all other similar spells and even the later pulses of the inquisitor's own spell.
  • ReverieReverie Member Posts: 30
    edited April 2023
    Would it not make sense to add those missing files in a fix and fill them with 0s, as some others have? Sounds like other mods could trip over it as well, no?

    Either way, looking forward to the new version. Cheers.
  • jmerryjmerry Member Posts: 3,882
    Reverie wrote: »
    Would it not make sense to add those missing files in a fix and fill them with 0s, as some others have?

    It would, actually. And ... two lines of code? That's all it takes, aside from the conditional for when to do it? Well, OK, I still want to print a warning - make that three lines of code.
    (There is literally a WeiDU command for "insert X bytes worth of zeros starting at this point Y in the file". That's a one-line operation.)
  • ReverieReverie Member Posts: 30
    Whatever works! :blush: Hope it's smooth sailing and we get to enjoy both tweaks soon ^^
  • EndarireEndarire Member Posts: 1,519
    Thankee for the encouraging news!
  • ReverieReverie Member Posts: 30
    I have cheated the system and pulled out the ARS005 file for a second, installed the 2 components, and put it back in. Wonder if things explode. Prooobably not (: Wanted to check things out before leaving for Easter xd
  • Christian79Christian79 Member Posts: 48
    Installation of "Shapeshift corrections -> Mage polymorphs and shapechanges only" failed on my BGEE install. Logs attached in zip.
  • jmerryjmerry Member Posts: 3,882
    I've reproduced the error with nothing but that component (BGEE, mage polymorphs only). That doesn't mean I understand it. This is a simple copy operation, and the only thing I do inside it is write to a "flags" entry in the file. Also, the "all transformations" option has a bigger version of the same copy operation which doesn't break. And before that, all I did is replace some descriptions.

    ... wait, that's it. The flags are a four-byte field, and I was using the wrong "write" operation. Replace that WRITE_BYTE with a WRITE_LONG, and it'll work. Until then, the "mage only" and "druid only" options don't work in BGEE. The fix will be in 3.1, of course.
  • Christian79Christian79 Member Posts: 48
    The component installed on BGIIEE just fine. Will it work on both games after applying the fix?

    Thanks for the quick feedback btw.
  • jmerryjmerry Member Posts: 3,882
    Yes, it'll work on both games after applying the fix. The code for installing that component on BG2EE or EET is completely separate from the code for installing on BGEE anyway, due to the two games having different models for handling polymorphs. And this bit of bad code from me was only in the BGEE half.
  • Christian79Christian79 Member Posts: 48
    Installation did work now. Many thanks!
  • ReverieReverie Member Posts: 30
    I don't mean to rush you, of course, just curious if there's perhaps an ETA on the hotfix for the spawns components? Or will there not be a hotfix at all and the fix will only come with a new release?
  • jmerryjmerry Member Posts: 3,882
    No hotfix; I'm working on the next version to be released soon.
  • jmerryjmerry Member Posts: 3,882
    Did I say "soon"? Ouch. I have a serious procrastination problem. But I finally buckled down and did it. Updated to version 3.1, with two small new components and fixes to two existing components.

    The new components:
    - Warrior and rogue HLAs can't be removed by spell-breakers: Prevents abilities such as Hardiness and Evasion from being removed by spells such as Breach or Spell Thrust.
    - Deactivate Spellhold picture monsters until their doors are opened: Exactly what it says. Now if you install an AI mod that gives some of those monsters teleportation abilities (SCS), they won't come out of their rooms until you actually open the door.
  • OrlonKronsteenOrlonKronsteen Member Posts: 905
    Thank you!
  • DrAzTiKDrAzTiK Member Posts: 72
    There is a bug with this component :

    ~JTWEAKS/SETUP-JTWEAKS.TP2~ #0 #60 // NPCs don't go in inaccessible locations: 3.1

    In the dream map after Irenicus sleep the party in spellhold. The bhall avatar (sarevok ) cannot enter the candllekeep inside.

    I think the tweak anthology also offer this component. (and it was also bugged in the past)
  • jmerryjmerry Member Posts: 3,882
    That is a completely separate issue unrelated to my component. "Bhaal" is not initially placed inside a wall or ever moved inside a wall, so I don't touch it.
  • brixterbrixter Member Posts: 5
    Can you add a bonus vs druids to Kondar? They're shapeshifters too.
  • brixterbrixter Member Posts: 5
    Are NPC rings and amulets droppable? Most notably Nalia's ring. The developers made it undroppable because rings don't have stat requirements like minimum strength so any person can wear her ring. If the ring is restricted to Nalia, then there is no more need to make it undroppable.
  • jmerryjmerry Member Posts: 3,882
    Kondar - I had to draw the line somewhere. For me, what made sense was limiting it to innate racial abilities. Learned magic doesn't make you a shapeshifter for the purpose of the sword.

    Undroppable jewelry - no changes there. The component I have for companion items makes it easier for them to be used if you change that companion's class. That's not an issue for the undroppable items.
  • brixterbrixter Member Posts: 5
    Vampire and rakshasa are good additions to Kondar but it still feels kinda limited.

    It's hard to use the thief rings, like Ring of Lock Picks, Ring of Danger Sense, Mercykiller Ring, on Nalia because her other ring is usually wearing the Ring of Acuity or Ring of Wizardry. You don't want her to forget her memorized spells. Taking off her signet ring temporarily to pick a lock would be nice.
  • ValleyantValleyant Member Posts: 5
    Hi, i have been wondering if it's possible to change the random spawn algorithm to always assume a full party ( multiply whatever the sum of party levels is by (6/Players) ), while not touching anything else? So a party of size 1 and a party of size 6 would get the same enemy spawns. ( assuming equal level)

    Maybe your mod already adresses that tho? Im seeing conflicting explanations about the matter. One (your explanation here) says the random enemy spawn algorithm generates a group with a budget of (X*Y)/100, where X is the sum of party levels, and Y is some arbitrary number. ( encounter difficulty)

    And the other here says X and Y are separate caps, and it stops when it hits one or the other.

    If i understood it correctly the component "44. Random spawns scale with difficulty". raises Y ( encounter difficulty) by a factor of 1.5. So does it affect solo play? If it is a separate cap it shouldn't because it would still be capped by the 1/6 party level cap. And if it does, then it would be, assuming character level 8 and encounter difficulty 200:

    6ppl unmodded (8*6*200)/100= 96 budget
    solo unmodded (8*1*200)/100=16 budget
    solo modded ( 8*1*200*1.5)/100=24 budget
  • jmerryjmerry Member Posts: 3,882
    It's not possible to make those spawns always assume a full party - at least, not without fundamentally changing the system. My scaling component works by cloning spawn points and then deactivating all but the one corresponding to the current difficulty.

    So yes, solo play will see smaller groups of all but the weakest enemy types. Not much I can do about that; as far as I can tell, it's a fundamental difference between the EE and pre-EE games.

    There's not really any conflict between the explanations; there's just also another parameter in the picture that you didn't notice. Every spawn point also has a "maximum number" parameter, and if that difficulty budget doesn't run out, you'll stop there.
  • ValleyantValleyant Member Posts: 5
    edited November 5
    Thanks, and ye, i just wanted to know if the two parameters are linked and raising the encounter difficulty by a billion would eventually lead to a Tarrasque, or keeps it at a horde of gibberlings. ( of whatever the max creature number is) If it's the former then reasonably smaller parties would still be able to keep up, for a 4ppl party it would be ( 8*4*200*1.5*.01)=96. If it's the latter i'll install BGEESpawn if it still works, and push solving this problem until bg2.
  • jmerryjmerry Member Posts: 3,882
    The question of which creature to spawn? Each spawn point has a list of creatures, and it picks one randomly. Quite often, that's a very short list with only one or two options. The difficulty and number caps only come into play after the creature is chosen.

    BG2EE spawn points generally use a different system, using tokens that unpack to groups of related (but not identical) creatures. Like those mixed packs of melee and ranged goblins in the starter dungeon - those come from spawn points. This system is not sensitive at all to party level.
  • ValleyantValleyant Member Posts: 5
    The question of if playing a 4ppl party with the component #44 installed is generally identical to playing a 6ppl party without it.

    Im fine with everything as long as it's not 6, this crowd gets stuck at every corner 😱
Sign In or Register to comment.