Displacer Posted August 3, 2009 Posted August 3, 2009 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.
Displacer Posted August 4, 2009 Author Posted August 4, 2009 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.
Displacer Posted August 4, 2009 Author Posted August 4, 2009 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.
Displacer Posted August 5, 2009 Author Posted August 5, 2009 Quick question, does anyone know why 3 different Quantity/Charges are needed? Could it be max amount, current amount, and an unknown?
Avenger Posted August 5, 2009 Posted August 5, 2009 Maybe because there are 3 different charges (extended headers)?
Displacer Posted August 5, 2009 Author Posted August 5, 2009 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?
Avenger Posted August 5, 2009 Posted August 5, 2009 3 different charge counters, but more than 3 extended headers.
Displacer Posted August 5, 2009 Author Posted August 5, 2009 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
Displacer Posted August 11, 2009 Author Posted August 11, 2009 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.
Displacer Posted August 11, 2009 Author Posted August 11, 2009 Ok, I got a new robe into the game. I posted how to do it over at SHS here. Clearly more research is needed but it is possible to have TNO wear robes in the game.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.