Jump to content

PST: random item 2da files


Displacer

Recommended Posts

I'm sure this is known, but just in case all the random items you can get are hard coded. Random magic items (per RNDMAG) seem to have been removed, the list is there but it just contains a long repeating list of the number "234". the RNDTRE, and RNDSCR lists contain valid items, but all these lists are hard coded in the exe.

Link to comment
Do you know the rules for random items?

 

It uses the number attached to the name, such as RNDTRE01, RNDTRE02, etc. RNDTRE has a span between 01 and 05, RNDMAG between 01 and 02, and RNDSCR between 01 and 02. Anything else and it will spit out an error. Not sure yet, but it uses the numbers to generate a random range and picks the item based on that. I would assume it works similarly to the way it does with 2DA files, just using hard coded lists.

Link to comment

Just traced the function through, it works exactly as its 2DA counterpart, the number on the end of the RNDxxx is a row, and it adds 2D10 to the result to pick the item. Only difference is the lists are internal, and it doesn't have row and column numbering, just a raw list of items.

Link to comment

Seems there is some leftover code from v1.0 of items, specifically robes. It checks the item type and sees if its armor, if it is it checks if its DUSTROBE (special case). If its not the dustrobe then it checks 0x23 for a "W" (denotes a robe in v1.0) and goes from there. It may be possible to put robe animations into the game if the rest of the code is present besides the check.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...