Minion health bar color

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
oli25
Posts: 62
Joined: Sun Sep 18, 2011 9:38 pm

Minion health bar color

Post by oli25 » Mon Apr 22, 2019 1:08 am

I wanted to change minions health bar color to always be red, someones got an idea how to do it?

User avatar
HarvestWombs
Senior Moderator
Angel
Posts: 962
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Minion health bar color

Post by HarvestWombs » Mon Apr 22, 2019 4:36 am

Minions and Hirelings share the same draw function just fyi.

The following code can be found in D2Client, here are the 1.10f addresses

Code: Select all

Address   Hex dump          Command                                  Comments
6FADB1E5  |. /75 43         JNZ SHORT 6FADB22A
6FADB1E7  |. |6A 00         PUSH 0                                   ; /Arg3 = 0
6FADB1E9  |. |68 80000000   PUSH 80                                  ; |Arg2 = 80
6FADB1EE  |. |6A 00         PUSH 0                                   ; |Arg1 = 0
6FADB1F0  |. |C605 9736BB6F MOV BYTE PTR DS:[6FBB3697],1             ; |
6FADB1F7  |. |E8 920D0900   CALL <JMP.&D2Win.#10034>                 ; \D2Win.#10034
6FADB1FC  |. |A2 9436BB6F   MOV BYTE PTR DS:[6FBB3694],AL
6FADB201  |. |6A 00         PUSH 0                                   ; /Arg3 = 0
6FADB203  |. |68 C0000000   PUSH 0C0                                 ; |Arg2 = 0C0
6FADB208  |. |68 C0000000   PUSH 0C0                                 ; |Arg1 = 0C0
6FADB20D  |. |E8 7C0D0900   CALL <JMP.&D2Win.#10034>                 ; \D2Win.#10034
6FADB212  |. |A2 9536BB6F   MOV BYTE PTR DS:[6FBB3695],AL
6FADB217  |. |6A 00         PUSH 0                                   ; /Arg3 = 0
6FADB219  |. |6A 00         PUSH 0                                   ; |Arg2 = 0
6FADB21B  |. |68 FF000000   PUSH 0FF                                 ; |Arg1 = 0FF
6FADB220  |. |E8 690D0900   CALL <JMP.&D2Win.#10034>                 ; \D2Win.#10034
Each triplet of PUSH's represents the color at different health values, starting from the top Full, Middle, and Low health.

Each individual PUSH starting from Arg3 and going down controls Blue, Green, and Red hex values.
In you're case, you would need to change each to match the following.

Code: Select all

PUSH 0 
PUSH 0
PUSH 0FF
This outputs the color #FF0000 or This is Red
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

Post Reply

Return to “General Mod Making”