Possible to create very rare drops?
I’ve been tinkering with RNDTRES.2DA and trying to chain random items to create a very low-probability drop. Normally, doing a single d40 roll (2.5%) is easy, but I want to go even lower than that. Chaining random items more than once doesn’t seem to work - I guess it’s an engine limitation.
In theory, this should create 1/40 * 1/40 probability (0.0625% or one in 1600 rolls). Unfortunately, it doesn't work. It works when RNDMELE2 is omitted and RNDMELE1 points directly to RNDMELEE, but that's 2.5% chance.
Are there other workarounds? Other than creating 40 dummy random items for each weapon separately, of course.
Edit: hmmm, I think I misunderstood what * means here. It’s not "no item" - if * is rolled, it actually makes it fall back to any existing item in the row, which increases the probability all the way to 100%. What I actually meant (no item) is probably DW#BLANK.
In theory, this should create 1/40 * 1/40 probability (0.0625% or one in 1600 rolls). Unfortunately, it doesn't work. It works when RNDMELE2 is omitted and RNDMELE1 points directly to RNDMELEE, but that's 2.5% chance.
2DA V1.0
*
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
RNDMELE1 RNDMELE2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
RNDMELE2 RNDMELEE * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
RNDMELEE AX1H02 AX1H19 BLUN03 BLUN05 BLUN07 BLUN10 BLUN36 BLUN38 BLUN41 DAGG02 DAGG09 HALB02 HAMM02 HAMM04 SPER02 SW1H02 SW1H03 SW1H05 SW1H08 SW1H22 SW1H24 SW1H44 SW1H47 SW1H49 SW1H79 SW2H02 RLBLUN05 RLHALB02 RLSPER02 RLSTAF02 RLSW1H22 RLSW1H02 RLSW1H44 RLSW1H47 RLSW1H49 RLSW1H49 RLSW1H49 RLSW1H49 RLSW1H49
Are there other workarounds? Other than creating 40 dummy random items for each weapon separately, of course.
Edit: hmmm, I think I misunderstood what * means here. It’s not "no item" - if * is rolled, it actually makes it fall back to any existing item in the row, which increases the probability all the way to 100%. What I actually meant (no item) is probably DW#BLANK.
Post edited by noTime666 on
0
Comments
so items that you want to appear more often put them more in the middle of your tables ( 8, 9, 10, 11, 12 ) and items you want to be more rare, make sure they go on the outside slots ( like 1,2,19,20 )
out of all the RNG that is in the these games, for whatever reason, the treasure tables are "the worst" when it comes to; something "should" happen once every 20/40 times
So, yes, an item on the outer edges of a RNDEQUIP, RNDMAGIC, or RNDTREAS table is particularly rare - 1/100 each time on that table. That's column 2 or 20 in RNDTREAS and RNDMAGIC, column 1 or 19 in RNDEQUIP**. But it's not quite what you thought was going on.
*The random items on this table are unreachable in the unmodded game.
**Yes, this table is bugged and column 20 has zero chance. A classic zero-impact bug.
Two RNDxxx items in RNDTRES chained together can make 0.0625% so it's probably the lowest we can go.
If the second item has 20/40 columns filled it's 1.25% to pick one of the filled columns. For my use case, that's probably sufficient. After all, we don't kill that many monsters in BGEE, it's still a pretty low chance.
The problem is that if your chaining breaks off somewhere for some reason, the dummy item which was never substituted with the final result is an undroppable unstealable blocked item slot (which isn't a problem for enemy creatures if you explicitly place it into their inventory, but can be a problem from containers).
Unless that dummy item actually exists on the ITM level, because then that ITM will be used as-is.
So due to this, it might also make sense to actually create your own "blank/dummy" item and make it unstealable, undroppable and all that, so that it's at least a valid one.
I know for a fact that multichaining works, because I worked a lot with this. Have you cloned RNDTRE01.ITM for your custom treasure entries? Because if not, then you literally run into the issue I explained - that you will need to ensure that the item name is legit between the steps.
I see two chained random items, but nothing longer.
I.e. ZGTRWS9M (random) -> ZGTRWS1 (random) -> SCRL04 (resolved final item)
Analogical setup works for me as well.
My point is that above 2 random items it doesn't work:
ZGTRWS9M -> ZGTRWS1 -> ZGTRWS8M (resolved empty item instead of randomizing third time) -> SCRL04
Btw. how does the game know that ZGTRWS9M is a random item that should be resolved from RNDTRES.2DA? I thought it needs to begin with RND...
So, @GraionDilach , is that (from the RNDTRES.2DA page) something that needs a correction? If I'm understanding correctly, you say that RNDTRES tokens can be chained if [tokenid].itm exists in the game files? (Wouldn't be the only thing on that page which needs a correction - the stuff about d20 versus 2d10 rolls on the other tables is definitely wrong.)
The other random treasure tables have defined RND***## token names, regardless of what's in the first column. RNDTRES allows arbitrary token names defined in the first column, though the base game only uses names starting with RND.
Why are the potions detected as spells there though?! Did you made an edit to them?
EDIT: I'll do another check, but I do think the ITM files can be used for further chaining, because they allow redropping the item and that dropping an item/spawning the container step triggers the random logic.
EDIT2: Come to think of it, the visible limitation might be spawning triggers it once, kill/drop triggers second layer and then you just go forward with manual ITM steps.
I see - so this means every item is checked to determine whether it exists in RNDTRES.2DA, interesting.
It's also worth noting that while .cre can have multiple RNDTREAS references (or RNDEQUIx#, RNDMAG0#, etc.), only a single RDNTRES token is respected. So i.e. if a creature has ZGTRWS8M and ZGTRWS9M items, only the earlier one on the list will be resolved. This is something I haven't seen explained anywhere and had to learn the hard way myself.
If the randomization fails, you still get the ITM itself and you can make that droppable/redropping manually to fix it. In fact, because randomization doesn't happen in STO files (stores/bags), RGT 10000 outright respecifies every random treasure to ensure they can be dropped to allow manual retriggering.
I assigned ZGTRWS7M and ZGTRWS8M to an ogre.cre - indeed, it works, every ogre drops two random scrolls.
BUT if I extend the randomization chain and add two new random items to RNDTRES.2DA, both pointing to ZGTRWS7M and ZGTRWS8M:
(I've created override/ZGTRWS7N.ITM and override/ZGTRWS8N.ITM by copying it from override/ZGTRWS7M)
As I stated before, the chain will exceed two random items and thus the ogre will drop two invalid items. There is no possibility these new random items are invalid, since I've copied them from your ZGTRWS7M.ITM.
There is also no way to prevent dropping an item if one is using chained random items. SCS uses a workaround with DW#BLANK, but it works only for resolving the first random item. In second random item DW#BLANK is resolved as empty/invalid, even though other items work.
I don't understand what you mean by "RGT 10000" and "manual retriggering", can you elaborate?
- Enter the area the token is in or spawn in the non-party creature it's on.
- Load a save with the token in the party's inventory or in the active area.
- Move the item to a container or ground pile.
Note that a token in a container will normally be processed once before you pick it up, while a token on a creature will normally be processed twice - once when the creature spawns in, once when you kill it and the token/item drops to a ground pile.
(Testing procedure: I created a chain of ten tokens, placed the top token of the chain in the haystack, and messed around in the prologue with a fresh character.)