Jump to content

PST: random item 2da files


Displacer

Recommended Posts

Posted

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.

Posted
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.

Posted

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.

Posted
Maybe because there are 3 different charges (extended headers)?

 

Ah, so an item can only have 3 different things it can do, such as 3 different spells it can cast, correct?

Posted
3 different charge counters, but more than 3 extended headers.

 

Got it, just limited to 3 effects that use charges. Heh too bad, you could make a super wand o' doom if you could have more :)

Posted

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.

Archived

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

×
×
  • Create New...