[1.10] A question on monsters' mouse-hovering

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

User avatar
Ogodei
Senior Moderator
Angel
Posts: 516
Joined: Thu Mar 10, 2016 8:31 am
Italy

Hand-picked

[1.10] A question on monsters' mouse-hovering

Post by Ogodei » Sat Sep 03, 2016 9:02 am

Hello :)

I would like to know if there was a known way to alter the monster brightness when they're hovered with your mouse. I would like to lower it or to change into something like the D1's selection method (it draws coloured borders on monsters).

Thanks a lot for your time :)

User avatar
Quirinus
Posts: 3
Joined: Tue Jan 20, 2015 9:26 am

Re: [1.10] A question on monsters' mouse-hovering

Post by Quirinus » Sat Sep 03, 2016 10:09 am

I'm not sure, but maybe it handles it by using different color/colormap/shifts. There was a thread on the ranges, but I can't seem to find it.

The point is that there's darker and lighter ranges, some used for transparency.

If it is handled like that, you'd probably have to edit the *.dat files that hold the them and then change the range/entries that are used for that.

For colored borders, I'd think you'd need code editing, but just changing/shifting/mapping the color can probably be done without code editing.

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1047
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Philippines

Re: [1.10] A question on monsters' mouse-hovering

Post by weapon-x » Tue Oct 18, 2016 8:07 am

i think this can be pulled-off by high-jacking / rewriting / hooking the monsterdesc code and the sprite-drawing code...

firstly you need to add a simple script to the monsterdesc code, which will pass the unit_guid to a global variable, then perform a check in the sprite-drawing code and draw a brighter monster if the monster_guid of the monster being drawn, matches with the unit_guid being hovered to.

:)

cheers
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
South Africa

Hand-picked

Re: [1.10] A question on monsters' mouse-hovering

Post by Necrolis » Tue Oct 18, 2016 10:51 am

Normally the game just changes the transtbl used (to color mul x2) when you hover over a unit. There isn't really much selection in terms of making it less bright. The outline might also require more memory, as D2 caches these on the fly. Regardless of what you check, here is the starting point:

Code: Select all

/* 
	Date: Fri May 28 14:19:00 2010
	Author: Necrolis
	Function: UNITDRAW_CheckSelection
	Address: D2Client.0x6FB286B0
	Comments: 
*/

BOOL __fastcall UNITDRAW_CheckSelection(D2UnitStrc* pUnit)
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1047
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Philippines

Re: [1.10] A question on monsters' mouse-hovering

Post by weapon-x » Wed Oct 19, 2016 1:13 am

Necrolis" wrote:Normally the game just changes the transtbl used (to color mul x2) when you hover over a unit. There isn't really much selection in terms of making it less bright. The outline might also require more memory, as D2 caches these on the fly. Regardless of what you check, here is the starting point:

Code: Select all

/* 
	Date: Fri May 28 14:19:00 2010
	Author: Necrolis
	Function: UNITDRAW_CheckSelection
	Address: D2Client.0x6FB286B0
	Comments: 
*/

BOOL __fastcall UNITDRAW_CheckSelection(D2UnitStrc* pUnit)
aw, cool... thanks for sharing :)
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain


Return to “Code Editing”