How does the game manage TCs with more than 10 items?

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
salzwer2
Posts: 3
Joined: Wed Jul 19, 2023 11:19 pm
Spain

How does the game manage TCs with more than 10 items?

Post by salzwer2 » Wed Jul 19, 2023 11:36 pm

Hello, and sorry if this is a bit noobish, but...

1. If the columns of "TreasureClassEx.txt" are: Treasure Class group level Picks Unique Set Rare Magic NoDrop Item1 Prob1 Item2 Prob2 Item3 Prob3 Item4 Prob4 Item5 Prob5 Item6 Prob6 Item7 Prob7 Item8 Prob8 Item9 Prob9 Item10 Prob10 SumItems TotalProb DropChance Term

2. And, according to this https://diablo2.diablowiki.net/Item_Gen ... lassEx.txt , the game generates extra TCs for "Weap03", "Weap06", ... "Weap87"... at runtime...

3. How does the game manage to put TCs like "Weap33" (and others), which is like: Item1=Great Maul; Item2=Great Sword; Item3=Long War Bow; Item4=Repeating Crossbow; Item5=Rancid Gas Potion; Item6=Hatchet; Item7=Burnt Wand; Item8=Rune Scepter; Item9=Barbed Club; Item10=Poignard; Item11=Battle Dart; Item12=Wrist Spike; Item13=Glowing Orb; Item14=War Spear; Item15=Lochaber Axe; Item16=Razor Bow? I mean, it has 16 possible entries, so it wouldn't fit in a table like TreasureClassEx.txt, it would need extra columns with "Item11", "Prob11", etc.

So does the game actually generate new TCs and add to TreasureClassEx.txt, like it says the link from my point 2, or does it generate a new table with more fields specifically for weapons, or am I missing something?

Thank you in advance.

OrderOfTheScribble
Posts: 38
Joined: Wed Apr 05, 2023 7:35 pm
United States of America

Re: How does the game manage TCs with more than 10 items?

Post by OrderOfTheScribble » Thu Jul 20, 2023 4:11 am

salzwer2 wrote:
Wed Jul 19, 2023 11:36 pm
the game generates extra TCs for "Weap03", "Weap06", ... "Weap87"... at runtime...
Those are auto TCs, which are generated in groups of 3 from 3-99 for each item type that has a 1 in its TreasureClass entry in ItemTypes.txt. I would guess the game doesn't rely on TreasureClassEx.txt to pick from an auto TC once such a TC is picked.

salzwer2
Posts: 3
Joined: Wed Jul 19, 2023 11:19 pm
Spain

Re: How does the game manage TCs with more than 10 items?

Post by salzwer2 » Thu Jul 20, 2023 8:05 pm

OK, thank you very much!

Post Reply

Return to “General Mod Making”