Skip to content

my treasure table refuses to work 100% properly

sarevok57sarevok57 Member Posts: 6,122
im at my wits end here, i have dotted all the i's and crossed all the t's and for some reason when it's treasure spawning time, i get "blank unremovable items" every once in awhile, all my scrolls are good on my scroll list so i have no clue whats happening, and worse yet, since i have some doubles on some of the lines, every scroll does appear by chance, but i have no clue which ones arent, here are my tables;

random level 1 scroll table;

- the random treasure "item" used to summon said scroll-
RNDTRE9D RNDSCR01 RNDSCR02 * * * * * * * * * * * * * * * * * *

- the actual scroll tables the random treasure uses-
RNDSCR01 SCRL66 SCRL67 SCRL68 SCRL69 SCRL70 SCRL72 SCRL75 SCRL76 SCRL77 SCRL78 SCRL79 SCRL80 SCRL81 SCRL82 SCRL83 SCRL84 SCRL5U SCRLA6 SCRL6D

RNDSCR02 SPWI126 SCRL66 SCRL67 SCRL68 SCRL69 SCRL70 SCRL72 SCRL75 SCRL76 SCRL77 SCRL78 SCRL79 SCRL80 SCRL81 SCRL82 SCRL83 SCRL84 SCRL5U SCRLA6

and even for my level 2 list, im still getting the same problem where one of them ( at least i think its one of them? ) keeps giving me the "unremovable invisible item" based on these tables;

- level 2 random scroll table-
RNDTRE9E RNDSCR03 RNDSCR04 * * * * * * * * * * * * * * * * * *

- scroll table used for level 2 scrolls-
RNDSCR03 SCDECA SCRL1B SCRL1C SCRL3G SCRL6E SCRL6F SCRL71 SCRL73 SCRL85 SCRL86 SCRL87 SCRL89 SCRL90 SCRL91 SCRL92 SCRL93 SCRL94 SCRL95 SCRL96

RNDSCR04 SCRL97 SCRL98 SCRL99 SCRLA2 SCRLA3 SCSNILL SPWI223A SCRL1B SCRL1C SCRL71 SCRL73 SCRL85 SCRL86 SCRL87 SCRL89 SCRL90 SCRL91 SCRL92 SCRL93



i have looked over and over and over again, none of the letters are wrong, and even the whacky ones like spwi223a which looks out of place still works, so why do i keep getting the "unremovable invisible item" every once in while?

Comments

  • GraionDilachGraionDilach Member Posts: 628
    edited June 14
    Do you clone RNDTRE01.ITM to your new random treasures? Are you using RNDSCROL.2DA here or RNDTRES.2DA? (Mixing in the oBG2 random treasure filenames to RNDTRES when both can have records is a bad omen for sure. You should use your own filenames if you're using RNDTRES, not RNDSCR/RNDMAG and friends.)

    If the randomization is stuck or frozen for any reason, you get/keep the ITM of the random treasure entry. Dropping it to the ground retriggers the rolling code, so that is a workaround. (Note that while RNDTRE01.ITM by default lacks icons or text, but is still droppable as a precaution.) It's been years ago when I last looked at the randomization in detail though (during the days I was implementing both the random scrolls and the inventory sanitizer for Random Graion Tweaks).
  • argent77argent77 Member Posts: 3,619
    edited June 14
    I've noticed two issues with your setup:
    1. All RNDSCROL.2DA definitions seem to be one entry short (only go up to column 19).
    2. RNDSCR02 defines SPWI126. An item of that name doesn't exist in the unmodded game.
  • sarevok57sarevok57 Member Posts: 6,122
    Do you clone RNDTRE01.ITM to your new random treasures? Are you using RNDSCROL.2DA here or RNDTRES.2DA? (Mixing in the oBG2 random treasure filenames to RNDTRES when both can have records is a bad omen for sure. You should use your own filenames if you're using RNDTRES, not RNDSCR/RNDMAG and friends.)

    If the randomization is stuck or frozen for any reason, you get/keep the ITM of the random treasure entry. Dropping it to the ground retriggers the rolling code, so that is a workaround. (Note that while RNDTRE01.ITM by default lacks icons or text, but is still droppable as a precaution.) It's been years ago when I last looked at the randomization in detail though (during the days I was implementing both the random scrolls and the inventory sanitizer for Random Graion Tweaks).

    i believe if im not mistaken in bg1 or bg2 i tried making my own new "rndxxx.2da" files and the rndtrexx.itm would not recognize them, hence the reason why im using the already existent ones, perhaps IWDEE isnt so picky?

    argent77 wrote: »
    I've noticed two issues with your setup:
    1. All RNDSCROL.2DA definitions seem to be one entry short (only go up to column 19).
    2. RNDSCR02 defines SPWI126. An item of that name doesn't exist in the unmodded game.

    #1 yes, because there are only 19 entries in the random scroll slots, i cranked it to 20 and 21, and i still got the "invisible item"

    #2 yes you are correct, originally i thought that the file name was too big originally, so i made a custom one with one letter less, and whether it was default size or smaller size, both files worked the same
  • argent77argent77 Member Posts: 3,619
    It works reliably for me after fixing both issues. You should double-check that there are no more "gaps" in the randomization.

    RNDTRES.2DA processes every column up to the first asterisk or end of defined table headers (whatever comes first), and allows you to reference entries in any other random treasure table.

    RNDSCRL.2DA requires 20 fully defined columns after the row label. It cannot reference other random treasure tables, because it is at the bottom of the random treasure table hierarchy. Also make sure that RNDSCRL.2DA contains exactly 20 table column header labels (1 to 20).
  • sarevok57sarevok57 Member Posts: 6,122
    so i went back to the rndtres.2da columns and filled out all 20 columns with RNDSCR01 RNDSCR02

    then added a column to rndscrl.2da ( since it defaults as 19 ) so now there are 20 filled columns

    and now its working fine

    i swear i already did this and it wasn't working before, holy moly i must be getting old or something, because sometimes ya do things and they don't work and then you do them for 99th time, and now it magically works

    even with the column number starting at 2 and going to 21 or starting at 1 and going to 20 it works

    perhaps another reason why i was using only 19 columns for the rndscrl.2da is because a) it defaults at 19 and b) rndmag.2da also defaults to 19 and i never had problems with that one giving me "invisible items that dont exist" although it will not allow me to do more than 9 rows once i get to RNDMAG10 or higher, rndtres.2da no longer recognizes the RNDMAGxx above 09
  • argent77argent77 Member Posts: 3,619
    so i went back to the rndtres.2da columns and filled out all 20 columns with RNDSCR01 RNDSCR02
    That's not really needed. RNDTRES.2DA is open-ended and only parsed up to the first asterisk or the end of defined table headers.

    The second fix is more relevant. Unlike RNDMAGIC.2DA (which goes from 2 to 20), RNDSCRL.2DA starts at 1. That's also mentioned in the IESDP.
  • sarevok57sarevok57 Member Posts: 6,122
    is it possible to have rndtreXX read off of custom made .2da's? or is: RNDMAGIC.2DA, RNDSCROL.2DA, and RNDWEP.2DA the limit? i believe GraionDilach said something about it but i believe i have tried in the past and it didnt work? ( although that was with bg1ee )
Sign In or Register to comment.