forked from slayergod13/slashdiablo-maphack
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable item description, native-looking ilvl/alvl display #46
Merged
planqi
merged 12 commits into
planqi:master
from
youbetterdont:feature/ilvl-alvl-properties
May 10, 2020
Merged
Configurable item description, native-looking ilvl/alvl display #46
planqi
merged 12 commits into
planqi:master
from
youbetterdont:feature/ilvl-alvl-properties
May 10, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youbetterdont
force-pushed
the
feature/ilvl-alvl-properties
branch
from
March 24, 2020 13:26
ecffbfb
to
a6ab7b4
Compare
youbetterdont
force-pushed
the
feature/ilvl-alvl-properties
branch
from
March 24, 2020 13:34
a6ab7b4
to
ecf886d
Compare
… rules into a separate list. Instead of showing blank item names, flag items that would normally be blocked at the packet level with [blocked]. Tweak rule logic a bit to prevent map and description only commands from setting the name blank, thus creating an ignore rule. The new behavior will only create ignore rules when there is no name, map action, descrption, or continue statement used for a specific ItemDisplay rule.
Merged
Included in #50 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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: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:Here's an example showing that the
%ILVL%
keyword still works in the description field: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:
Update 3/25
The above previously resulted in a blank item name. The item was not blocked because of the `%MAP% command, but still this is probably not desirable behavior. After this fix, the item name will no longer be blank.
The above would also result in a blank item name. Additionally, the item will be blocked in this case. After the fix, the item name is preserved, and no ignore rule is created. This is kind of a corner case, but I think this is the more desirable behavior.
%CONTINUE%
statement. Essentially only blank lines can create ignore rules now.[blocked]
tag is added to the item. For example:The blocked tag is only generated when the item has an ignore rule and not a map rule. This change also fixes some other undesirable behavior.
Previously, the above would result in a blank item name, but the item would still spawn in game and ping. After the fix, the item name will no longer be blank. The item will ping as before.