planqi / slashdiablo-maphack

A customized maphack for the slashdiablo D2 server
GNU Affero General Public License v3.0
88 stars 42 forks source link

Configurable item description, native-looking ilvl/alvl display #46

Closed youbetterdont closed 4 years ago

youbetterdont commented 4 years ago

Original

This feature adds a configurable item description that the user can set through BH.cfg. The syntax is as follows:

ItemDisplay[blah]: %NAME%{my description}

The description field can tell players more about items they pick up due to a notification (e.g., in a default config). It can also give relevant cube recipes, possible runewords, etc. The description is only displayed on the item if "Advanced Item Display" is active.

Here's an example that adds description text to a Titan's Revenge. image

Because much of the code that controls item name display was reused, many of the same features still work. That is, all keywords like colors, etc. are supported. Even the %NAME% directive still has meaning. For example: image

The above example shows that %CONTINUE% still applies as before. However, when %NAME% is used in the description field, it uses the last set description, not the item name.

If no %CONTINUE% is used, the behavior is as expected: image

Here's an example showing that the %ILVL% keyword still works in the description field: image

This PR also adds support for more native looking item level and affix level display. You can see the item level display above. Similarly, affix level is shown for magic, rare, and crafted quality items. Affix level is only shown if it is different than item level. Additionally, the user must set "Advanced Item Display" and "Show iLvl" for these features to be active. Here is the affix level display on some rare gloves: image

Update 3/25

youbetterdont commented 4 years ago

Included in #50