How to force a unique monster to display a descstr?

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
Karyoplasma
Posts: 3
Joined: Sun Mar 05, 2023 2:18 am
Germany

How to force a unique monster to display a descstr?

Post by Karyoplasma » Sat Jan 20, 2024 9:41 pm

Hey guys,

I wrote a tool that basically simulates terror zones in LoD by changing the monstats.txt, levels.txt and superuniques.txt records, so monsters that spawn in a selected area are "desecrated". It works rather well so far, but I am encountering a few issues. One of them is that unique monsters don't show up as desecrated even tho they functionally are. For example, Andariel (id andariel) will always be named "Andariel" and always only have the "Demon" description. The monster seems to ignore the NameStr and DescStr entries in monstats.txt. Same with all unique mobs, they just show the description of their properties.

Formerly, I copied and modified most monsters and made MonPreset.txt spawn the desecrated version when their area is terrorized, but that was super ugly and let to a lot of issues, so I don't want to do that.

tl;dr Is there a simple way to make uniques display the DescStr of the monsterid they represent?

EDIT:
Taking this opportunity to also dump some info I haven't read anywhere:
1) TreasureClass upgrading via groups does NOT work for monsters that have the isBoss flag set in monstats.txt. They will always drop from their TreasureClass3 column of the difficulty they are in and will not check for a better suitable entry in the TC group.
2) In the case that the boss monster has a superuniques.txt entry (Griswold, The Smith, etc) they will use the TC column of the respective difficulty in superuniques.txt. Here, again, if the class column points to a monster with isBoss=1, they will not upgrade TCs within their group.
EXCEPTION: The Summoner will use the TreasureClass3 column in monstats.txt, the superunique.txt TC fields do nothing. Does not upgrade since he is a boss.
3) All other superuniques and monsters will upgrade their TCs, but in the case of Endugu, only the fetishshaman4 monster will drop from the TC column in superuniques.txt. The mounted unit will use the Act 3 Unique B TC (group 15) as a base.
4) If you want to call a different TreasureClass in treasureclassex.txt (like for example Countess Master (H) -> picks = -2 -> Countess Rune 1 Countess Item 1), you have to make sure to define your Countess Item TC before you call for it in the master table, so ordering is important here. Failing to do so will result in only dropping the runes.
5) Not terminating your treasureclassex.txt with a 0 at the eol will result in the game crashing on startup.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 465
Joined: Fri Dec 01, 2017 2:08 am

Re: How to force a unique monster to display a descstr?

Post by Cypress » Sat Jan 20, 2024 10:12 pm

Hi Karyoplasma, I don't think it's possible to do that without code editing. Andariel has a hardcoded baseid that makes her into a unique monster and drops chipped gems, so the only way to make her compatible would be some janky system where you clone Andariel without her baseid and make it so she spawns the actual Andariel on death, who is invisible and dies instantly so you get the quest/chipped gems. And for other unique monsters, there's nothing you can do. I'm not sure if this would be an acceptable alternative, but you could put in a special graphical state that only appears on Desecrated monsters, so that even if the name does not display it, you will know they are descecrated because of the overlay graphic.

Thanks for documenting your findings on TCs, I did not know TC upgrading works that way.

Karyoplasma
Posts: 3
Joined: Sun Mar 05, 2023 2:18 am
Germany

Re: How to force a unique monster to display a descstr?

Post by Karyoplasma » Sun Jan 21, 2024 12:53 am

Thanks for the reply.

I almost thought that it would be impossible without some code editing which I don't want to do. I want my mod to stay txt-file only (plust the string table).
The graphical overlay is a good idea, honestly. I'll think about a fitting one!

About the TC upgrading: it does make sense if you think about it. Bosses spawn at a set level and ignore the levels.txt entry, so there is no reason that they should upgrade in the base game. But, boy was it a mess until I figured that out. Why The Summoner is the only exception in superuniques.txt and uses its monstats entries is beyond me.

Post Reply

Return to “General Mod Making”