Skip to content

[MOD] Nonrandom Treasures

AbelAbel Member Posts: 785
edited February 2022 in IWD:EE Mods
A mod that removes the 'random' from random treasures and more!
kp2xbqpqzjge.jpg
fm767v5h0tmy.jpg

COMPATIBILIY
The mod only works for IWD:EE.

CONFIGURATION & INSTALLATION
First, download the provided archive and extract its contents to your game folder.
  • if you have the Steam version of the game, the relevant folder should be something like: 'C:\Program Files (x86)\Steam\SteamApps\common\Icewind Dale Enhanced Edition'
  • if you have the Beamdog version of the game, the relevant folder should be something like: 'C:\Program Files (x86)\Icewind Dale Enhanced Edition\Data\00798'
Then install the mod by double-clicking the .exe file and just follow the instructions.

COMPONENTS
Each component can be separately installed.

Restore IWD Random Treasures
This component is based on @CamDawg's work in Unfinished Business for IWD. I just changed the treasure references so it works for IWDEE.
I also shamelessly stole some of @argent77's code to clean the modified tables.

The random treasure tables were changed with the HoW expansion and players could no longer find some magical items. Admittedly, most of them were extremely powerful.
This component reassigns items that were removed from the tables to their original treasure reference so explorers can chance upon them again.

I can't be bothered to write a README so if you need more details, go check the UB for IWD page! Or if you're feeling adventurous, take a look at the mod files.

Bags of (Get All) Treasures
This is the main component. With it, random treasures are no longer random. In fact, you'll get all possible reward and even more if you've installed the previous component. For convenience, every item will be well tucked inside a recognizable bag of holding (whose icon comes from @Miloch's Unique Containers, now integrated in Tweaks Anthology) so you know you looted some prize.

Whether you're just curious and don't want to switch between the game and a FAQ or an excellent guide for FOMO or if you're a hoarder, it's up to you and your play style to decide what to do with the items!

Note that random treasures which only afforded generic items were left as they were. Since they generally drop quite frequently from various creatures, it would only have made inventory management more of a nightmare.

The idea originally came from this discussion. I released a small mod then but the present version is much more improved so forget the old one!
If you want more balanced options, use Tweaks Anthology.

CHANGELOG
v1 — February 12, 2022

THANKS & CREDITS
Besides the people I already mentioned, I also want to thank subtledoctor who's always quick to help when I have trouble with WeIDU!

Comments

  • GraionDilachGraionDilach Member Posts: 422
    This is somewhat impressive, because it actually mergers mod-added random treasures as well. Although that's also it's weakness because it doesn't check what kind of mod-added randomization that treasure is.

    Good job nonetheless.
  • AbelAbel Member Posts: 785
    Indeed @GraionDilach, thanks! I actually forgot to mention that in the mod presentation!
    But yes, any modification made to RNDTRES.2DA or treasures added to areas and creatures will also be patched.

    And you're right, I didn't add any kind of checks, though I'm guessing mods that focus on altering the treasure table probably take care of that (not that I know of any).
    Also, very few people use my mods so unless requested I usually keep things very simple.
  • GraionDilachGraionDilach Member Posts: 422
    Both OlvynChuru's Improved HoF and sarevok57's IWDEE megamod adds additional random treasures/items to the random table, but I guess these are fine from your POV (haven't went through their changes in detail yet). I am also trying to write a tweak mod which would distribute random scrolls among the magic-users, but I can just add a PI rule against your mod and a note in the readme to ensure mine's installed after yours.

    Yeah, the readme should have mentioned this to keep an eye on mod compatibility.
  • AbelAbel Member Posts: 785
    Interesting, @GraionDilach! I never tested these mods because I'm quite conservative and keep the game close to vanilla. But I'll give them a look.
    Like you, I'm not sure how the changes these or yours make would conflict but I'm open to suggestions if you want some kind of compatibility between all of them.
  • GraionDilachGraionDilach Member Posts: 422
    Yes, I'd like to propose some changes to future-proof this a bit, if you don't mind. While indeed, the discoveries stems from BetterHOF, there might be other mods relying on this feature. Asin, if you list a dummy item in among the random treasures entries, that can be used for nothing and apparently BetterHOF uses this feature.

    So I'd propose this:
    
        ACTION_IF (~%entry%~ STRING_COMPARE ~*~) BEGIN // Not empty
          OUTER_SET item_count += 1
    
    [...]
    
     PATCH_IF (~%entry%~ STRING_COMPARE ~*~) BEGIN // Not empty
                      LPF ADD_STORE_ITEM_EX
                        INT_VAR charge1 = EVAL ~%item_charges%~
    

    to
    
        ACTION_IF (~%entry%~ STRING_COMPARE ~*~ && FILE_EXISTS_IN_GAME ~%entry%.itm~) BEGIN // Not empty
          OUTER_SET item_count += 1
    
    [...]
    
     PATCH_IF (~%entry%~ STRING_COMPARE ~*~ && FILE_EXISTS_IN_GAME ~%entry%.itm~) BEGIN // Not empty
                      LPF ADD_STORE_ITEM_EX
                        INT_VAR charge1 = EVAL ~%item_charges%~
    

    which would skip nonexistant items in your treasure bags.
  • AbelAbel Member Posts: 785
    edited February 2022
    I don't mind it at all! Thanks @GraionDilach for taking the time to write and offer this bit of code! I will add it to the next version.
    I didn't think about dummy items! It's true I didn't put any sanity checks, anywhere... What are they used for these items, I wonder?
  • skushaskusha Member Posts: 125
    edited February 2022
    @Abel
    May be you can traify the mod (on the next update), so it will be available for translation?
  • AbelAbel Member Posts: 785
    Sure, I can @skusha !
    I must say I just didn't bother with many things that I should have, as Graion pointed out. I'll do a proper job for the next update. Thanks for your feedback!
  • GraionDilachGraionDilach Member Posts: 422
    To be fair, you did ensured that the resulting 2DA will work via including argent77's 2DA fixer code, so there isn't as many issues with this as it might seem. That was a nice choice. This is all just nitpicking, the foundation is solid.
  • orchidMantisorchidMantis Member Posts: 17
    edited February 2022
    Hi I found a posible bug, in Shadow's Valley you can open some of yellows bags , sell in shopkeeper and open again endlesly.

    this is the only mod I am currently using.

    my version is 2.66
  • AbelAbel Member Posts: 785
    Hey, @orchidMantis ! I'm not sure what the problem is?
    You should be able to sell the items found in the bags. Are you saying they reappear and you can loot them again? Or that you can sell them and still have them in the bag somehow?
  • orchidMantisorchidMantis Member Posts: 17
    Abel wrote: »
    Hey, @orchidMantis ! I'm not sure what the problem is?
    You should be able to sell the items found in the bags. Are you saying they reappear and you can loot them again? Or that you can sell them and still have them in the bag somehow?

    I found 3 bags so far that i can open, go to sell, then open again and sell again over and over, endlestly, its a multiplayer game, if you want i can create the game and you can watch, if necesary, just want to be fixed.

    I only use this mod. I am new to the game. tell me if is necesary to coordinate the multiplayer game.

    thanks in advance

  • AbelAbel Member Posts: 785
    @orchidMantis
    Sorry, I still don't understand what you're doing exactly and how you're benefiting.
    Could you record a video of what you're doing, perhaps? Or tell me, step by step, what you're doing so I can reproduce it.
  • orchidMantisorchidMantis Member Posts: 17
    yes. here you can see it, all yellow bags al the same but with different items.

    this game is multiplayer
    Abel wrote: »
    @orchidMantis
    Sorry, I still don't understand what you're doing exactly and how you're benefiting.
    Could you record a video of what you're doing, perhaps? Or tell me, step by step, what you're doing so I can reproduce it.

  • AbelAbel Member Posts: 785
    edited February 2022
    @orchidMantis
    Thank you! That's a weird bug! I'll work on it.
    If I understand you correctly, it does happen with other bags too, right?
  • orchidMantisorchidMantis Member Posts: 17
    Abel wrote: »
    @orchidMantis

    If I understand you correctly, it does happen with other bags too, right?

    Yes, with many yellow bags, but not with all of them,
  • skushaskusha Member Posts: 125
    @Abel
    Finally, will a mod update be released? Or the mod is abandoned?
  • GraionDilachGraionDilach Member Posts: 422
    I think the mod's fine as-is. I couldn't reproduce that item duplication bug in my own game so I think it is a multiplayer-only bug.
  • AbelAbel Member Posts: 785
    @skusha As you surmised, I stopped working on the mod and didn't even implement GraionDilach's suggestions.
    I couldn't find a fix for the multiplayer bug and it seemed to me like it was caused by something in the engine rather than by bad coding on my end.
Sign In or Register to comment.