K4thos Posted March 21, 2015 Posted March 21, 2015 Information about IWD:EE rndtres.2da implementation that has been recently (patch 1.3) ported to BG2:EE and will be also implemented in the next BG:EE patch. Here is how the random tables work in vanilla BG2: when a creature or container has item of filename RNDTREx#.ITM, where x=any character (even letters and symbols, and has no bearing on how RNDTREAS.2DA is read), and #=the row number of RNDTREAS.2DA to use (can be 1-9), RNDTREx#.ITM is replaced by the randomly generated item.In other words 2da file accepts up to 9 rows. Same deal with other random tables: rndequip.2da, rndmagic.2da, rndscrol.2da, rndwep.2da. And here is how new rndtres.2da work (notice that the file has different name than old rndtreas.2da): rndtres.2da doesn't need items that follows the 2da name and points to row number like I explained above. Engine now checks the item name that will be replaced with random loot directly in the rndtres.2da (first column). You can choose any 8 character name, so it's possible for modders to use this 2da without any conflicts, as long as they add rows with unique names (for example using mod's prefixes). Thanks to this it is not limited to 9 columns like old 2da files, or even 99 columns (which would be true if it worked with RNDTRE## names, which isn't a case). Just tested it with row named TESTITM1, placed as a 130th row and dummy item named TESTITM1.ITM - random loot spawned correctly. Another test with row name "TEST_" also spawned correctly. More information in this topic: http://forum.baldursgate.com/discussion/comment/622831
Avenger Posted March 23, 2015 Posted March 23, 2015 Note, this doesn't mean the old format was abandoned. Simply, the engines support both formats.
K4thos Posted August 11, 2017 Author Posted August 11, 2017 There are two problems worth mentioning for those interested in using RNDTRES.2DA functionality: - Different rows referencing (using dummy item resref to spawn items from another row) within RNDTRES.2DA doesn't work as expected. - There is no way for defining random lists with a chance of generating no item at all.
Avenger Posted August 12, 2017 Posted August 12, 2017 What happens if you add a no_drop entry to the bottom of the list, with just a * as the first created item? [edit] ah, i see. yeah, recursion isn't done because it could create infinite loops. GemRB does have a loop limit, didn't see the need for this in EE.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.