Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Custom Item Info UI - Season 9

Experienced Elementalist
Joined
May 4, 2017
Messages
219
Reaction score
314
Credits: Me...
Purpose: Remake Item Info Popup for Season 9 to fix item text too long visual bug.
FK2nmOf - [Release] Custom Item Info UI - Season 9 - RaGEZONE Forums
ecnTMy0 - [Release] Custom Item Info UI - Season 9 - RaGEZONE Forums
Must have these graphic files:

(Link updated - fix a small bug)

Move all to "\Data\Interface\GFx"

Code is a mess + not pretty for sure ^^, Anyone help me make it nicer please... really appreciate :p
Anyway, debugged already... should works fine.

dllmain.cpp
Code:
#include "ItemInfo.h"
void SetHook()
{
    HookThis((DWORD)&HookItemInfo_0, HOOK_ITEM_INFO_0);
    HookThis((DWORD)&HookItemInfo_1, HOOK_ITEM_INFO_1);
    HookThis((DWORD)&HookItemInfo_2, HOOK_ITEM_INFO_2);
    HookThis((DWORD)&HookItemInfo_3, HOOK_ITEM_INFO_3);
    HookThis((DWORD)&HookItemInfo_4, HOOK_ITEM_INFO_4);
    HookThis((DWORD)&HookItemInfo_5, HOOK_ITEM_INFO_5);
    //...
}
ItemInfo.h
Code:
#pragma once

#define HOOK_ITEM_INFO_0 0x0080126E
#define JMPBACK_ITEM_INFO_0 0x008012D3
#define HOOK_ITEM_INFO_1 0x004F66C7
#define JMPBACK_ITEM_INFO_1 0x004F66CC
#define HOOK_ITEM_INFO_2 0x004F69A1
#define JMPBACK_ITEM_INFO_2 0x004F69A7
#define HOOK_ITEM_INFO_3 0x00802B44
#define JMPBACK_ITEM_INFO_3 0x00802B49
#define HOOK_ITEM_INFO_4 0x009C9D32
#define JMPBACK_ITEM_INFO_4 0x009C9D39
#define HOOK_ITEM_INFO_5 0x004F4F75
#define JMPBACK_ITEM_INFO_5 0x004F4F7C

void HookItemInfo_0();
void HookItemInfo_1();
void HookItemInfo_2();
void HookItemInfo_3();
void HookItemInfo_4();
void HookItemInfo_5();

void DrawPostItemInfo();

ItemInfo.cpp
Code:
#include "stdafx.h"
#include "ItemInfo.h"

#define pText 0x85B2D88
#define pBtn 0x85B2C48
#define pColor 0x85B2CE8

int iState = 4; //bx100
int iStart;
int iEnd;
int iCount;
char * szNewLine ="\n";
char * szCredits = "CustomItemInfo made by VICIOUS";

//temp store info
BYTE tempStoreText[5000];  //85B2D88
DWORD tempStoreBtn[100];  //85B2C48
DWORD tempStoreColor[100];  //85B2CE8

//temp ancient info
BYTE tempText[5000];  //85B2D88
DWORD tempBtn[100];  //85B2C48    //Btn-> onClick text
DWORD tempColor[100];  //85B2CE8

int iStoreLines;
#define STORE_EXTENSION_USE false    //true if using extended store currencies.

void __declspec(naked) HookItemInfo_0() //0080126E
{
    _asm
    {
        mov eax, [ebp - 0x78];
        mov iStoreLines, eax;
    }
    memset(tempStoreText, 0, sizeof(tempStoreText));
    memset(tempStoreColor, 0, sizeof(tempStoreColor));
    memset(tempStoreBtn, 0, sizeof(tempStoreBtn));
    if (STORE_EXTENSION_USE)
    {
        //removed
    }
    else 
    {
        memcpy(tempStoreText, (void*)(pText), iStoreLines * 100);
        memcpy(tempStoreColor, (void*)(pColor), iStoreLines * 4);
        memcpy(tempStoreBtn, (void*)(pColor), iStoreLines * 4);
    }

    iState |= 1; // 0x100 | bx01 -> bx101 (5)

    _asm
    {
        mov eax, 0;
        mov[ebp - 0x78], eax;
        mov edx, JMPBACK_ITEM_INFO_0;
        jmp edx;
    }
}
void __declspec(naked) HookItemInfo_1()
{
    _asm
    {
        mov eax, [ebp + 0x0C];
        mov iStart, eax;
    }
    *(DWORD*)(pColor + iStart*4) = 2 ; //set color Credits line //color table (0->19) 0:white 1:blue 2:red...
    _asm
    {
        //push 0x0106F3E0;
        push szCredits;    //I put Credits line here, to remove it... use push 0x0106F3E0; instead.
        //or you can try to find ancient set name then replace by this line.
        mov edx, JMPBACK_ITEM_INFO_1;
        jmp edx;
    }
}

void __declspec(naked) HookItemInfo_2()
{
    _asm
    {
        mov iEnd,eax;
    }
    iCount = iEnd - iStart;
    if(iCount > 0 && iCount < 160)
    {
        iState |= 2; // iState or bx10
        //iState = 2;
        memset(tempText, 0, sizeof(tempText));
        memset(tempColor, 0, sizeof(tempColor));
        memset(tempBtn, 0, sizeof(tempBtn));

        memcpy(tempText, (void*)(pText + iStart * 100), iCount * 100);
        memcpy(tempColor, (void*)(pColor + iStart * 4), iCount*4);
        memcpy(tempBtn, (void*)(pColor + iStart * 4), iCount * 4);
    }

    _asm
    {
        mov eax, iStart;
        mov edx, JMPBACK_ITEM_INFO_2;
        jmp edx;
    }
}

void __declspec(naked) HookItemInfo_3()
{
    _asm
    {
        mov edx, 0x009C9AC4; // Info_4 state -> [0-3]
        call edx;

    }
    if (iState >= 2)
    {
        memcpy((void*)pText , tempText, iCount * 100);
        memcpy((void*)pColor, tempColor, iCount * 4);
        memcpy((void*)pBtn, tempBtn, iCount * 4);
        _asm
        {
            push iCount;
            mov edx , 0x00969F14;
            call edx;
            mov ecx, eax;
            mov edx, 0x004FA686;
            call edx;
            mov ecx, eax;
            mov edx, 0x009C9AC4; //Info_4 state -> [0,1]
            call edx;
        }
    }

    if (iState >= 1)
    {
        memcpy((void*)pText, tempStoreText, iStoreLines * 100);
        memcpy((void*)pColor, tempStoreColor, iStoreLines * 4);
        memcpy((void*)pBtn, tempStoreBtn, iStoreLines * 4);
        _asm
        {
            push iStoreLines;
            mov edx, 0x00969F14;
            call edx;
            mov ecx, eax;
            mov edx, 0x004FA686;
            call edx;
            mov ecx, eax;
            mov edx, 0x009C9AC4; //Info_4
            call edx;
        }
    }

    iState = 4;    //reset state 

    _asm
    {
        mov edx, JMPBACK_ITEM_INFO_3;
        jmp edx;
    }
}

#define pInvokeUI ((DWORD(__stdcall*)(DWORD pFrame, char * method, char * format ...)) 0x0095A6EA)
DWORD pInfoFrame;
char * pHtmlString;
char * szFormat_s = "%s";
char * szSetInfoPopupEx = "SetInfoPopupEx";
char * szSetInfoPopupEx3 = "SetInfoPopupEx3";
void __declspec(naked) HookItemInfo_4()
{
    _asm
    {
        mov pHtmlString, eax;
    }

    if (iState >= 4)
    {
        iState &= 3; // and bx11
        _asm
        {
            jmp MainInfo;
        }
    }
    else if (iState >= 2) 
    {
        _asm
        {
            mov eax, [ebp - 0x000004EC];
            mov pInfoFrame, eax;
        }
        pInvokeUI(pInfoFrame, szSetInfoPopupEx, szFormat_s, pHtmlString);
        iState &= 1;
        _asm {
            jmp Info_3;
        }
    }
    else 
    {
        if (iState = 1) {
            _asm
            {
                mov eax, [ebp - 0x000004EC];
                mov pInfoFrame, eax;
            }
            pInvokeUI(pInfoFrame, szSetInfoPopupEx3, szFormat_s, pHtmlString);
        }
        iState = 0;
        _asm {
            jmp Info_3;
        }
    }

    _asm
    {
    MainInfo:
        push pHtmlString;
        push [ebp - 0x000000C8];
        mov eax, pHtmlString;
        mov edx, JMPBACK_ITEM_INFO_4;
        jmp edx;
        
    Info_3:
        //back Info_3
        mov edx, 0x009C9D5A;
        jmp edx;
        
    }
}
int iItmIdx;
int iSetBonus;
DWORD v_temp_a2;
char * szAllStatsFormat = "Increases all stats by +%d";
#define iAncientBonusMultiplier 50
#define pPrintLn ((DWORD(__stdcall*)(DWORD a2, char * format ...)) 0x00D0A18A)
void __declspec(naked) HookItemInfo_5()
{
    _asm
    {
        mov eax, [ebp + 0x08];
        mov eax, [eax + 0x04];
        mov iItmIdx, eax;
        mov eax, [ebp + 0x08];
        movzx eax, byte ptr[eax + 0x21];
        sar eax, 0x02;
        and eax, 0x80000003
        mov iSetBonus, eax;
        mov eax, [ebp + 0x0C];
        mov v_temp_a2, eax;
    }
    //is custom item (not from s9) blood angels set and above
    if (iItmIdx >= 3682 && iItmIdx < 4096 //Helm
        || iItmIdx >= 4194 && iItmIdx < 4608 //armor
        || iItmIdx >= 4706 && iItmIdx < 5120
        || iItmIdx >= 5218 && iItmIdx < 5632
        || iItmIdx >= 5730 && iItmIdx < 6144
        )
    {
        if (iSetBonus == 1 || iSetBonus == 2)
        {
            pPrintLn(v_temp_a2, szAllStatsFormat, iSetBonus * iAncientBonusMultiplier);
            _asm
            {
                mov eax, 0x01;
                mov edx, 0x004F5053; //leave ret
                jmp edx;
            }
            
        }
    }
    _asm
    {
    jmpback:
        lea eax, [ebp - 0x04];
        push eax;
        push[ebp + 0x08];
        mov edx, JMPBACK_ITEM_INFO_5;
        jmp edx;
    }
}
 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Dec 25, 2012
Messages
43
Reaction score
2
ENG: is there something missing?

VN: Tôi add vào nó bị mất khung đen bạn ạ, add vô thi thoảng nghịch chứ muốn làm ss9 mà chưa có kinh phí :)

MpilUkX - [Release] Custom Item Info UI - Season 9 - RaGEZONE Forums


Ptn3Oe0 - [Release] Custom Item Info UI - Season 9 - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Experienced Elementalist
Joined
May 4, 2017
Messages
219
Reaction score
314
ENG: is there something missing?

VN: Tôi add vào nó bị mất khung đen bạn ạ, add vô thi thoảng nghịch chứ muốn làm ss9 mà chưa có kinh phí :)
Thanks for report.
Missing graphic files... You can take it from any S13 files. literally I took this UI file from S13.
Code:
InfoPopup_I1.ozd
tooltip_bg 01 -> 09
tooltip_mn01_1 -> 03_1
or download here

Edited link 1st post again
 
Last edited:
Joined
Dec 25, 2012
Messages
43
Reaction score
2
I downloaded your new update file and replaced the file but it has not changed, it's still the same!
--------
Tải về rồi nhét hết vô GFx rồi mà vẫn chưa có gì thay đổi bạn ạ.
 
Experienced Elementalist
Joined
May 4, 2017
Messages
219
Reaction score
314
still missing 1 file InfoPopup_I1.ozd
down again here
//old link removed

PS VN: Tôi cũng bỏ dev s9 wa s13 rồi, lâu lâu vô leak ra 1 chút cho vui thui.
 
Last edited:
Joined
Aug 29, 2011
Messages
507
Reaction score
33
Credits: Me...
Purpose: Remake Item Info Popup for Season 9 to fix item text too long visual bug.

Must have these graphic files:

Move all to "\Data\Interface\GFx"

Code is a mess + not pretty for sure ^^, Anyone help me make it nicer please... really appreciate :p
Anyway, debugged already... should works fine.

dllmain.cpp
Code:
#include "ItemInfo.h"
void SetHook()
{
    HookThis((DWORD)&HookItemInfo_0, HOOK_ITEM_INFO_0);
    HookThis((DWORD)&HookItemInfo_1, HOOK_ITEM_INFO_1);
    HookThis((DWORD)&HookItemInfo_2, HOOK_ITEM_INFO_2);
    HookThis((DWORD)&HookItemInfo_3, HOOK_ITEM_INFO_3);
    HookThis((DWORD)&HookItemInfo_4, HOOK_ITEM_INFO_4);
    HookThis((DWORD)&HookItemInfo_5, HOOK_ITEM_INFO_5);
    //...
}
ItemInfo.h
Code:
#pragma once

#define HOOK_ITEM_INFO_0 0x0080126E
#define JMPBACK_ITEM_INFO_0 0x008012D3
#define HOOK_ITEM_INFO_1 0x004F66C7
#define JMPBACK_ITEM_INFO_1 0x004F66CC
#define HOOK_ITEM_INFO_2 0x004F69A1
#define JMPBACK_ITEM_INFO_2 0x004F69A7
#define HOOK_ITEM_INFO_3 0x00802B44
#define JMPBACK_ITEM_INFO_3 0x00802B49
#define HOOK_ITEM_INFO_4 0x009C9D32
#define JMPBACK_ITEM_INFO_4 0x009C9D39
#define HOOK_ITEM_INFO_5 0x004F4F75
#define JMPBACK_ITEM_INFO_5 0x004F4F7C

void HookItemInfo_0();
void HookItemInfo_1();
void HookItemInfo_2();
void HookItemInfo_3();
void HookItemInfo_4();
void HookItemInfo_5();

void DrawPostItemInfo();

ItemInfo.cpp
Code:
#include "stdafx.h"
#include "ItemInfo.h"

#define pText 0x85B2D88
#define pBtn 0x85B2C48
#define pColor 0x85B2CE8

int iState = 4; //bx100
int iStart;
int iEnd;
int iCount;
char * szNewLine ="\n";
char * szCredits = "CustomItemInfo made by VICIOUS";

//temp store info
BYTE tempStoreText[5000];  //85B2D88
DWORD tempStoreBtn[100];  //85B2C48
DWORD tempStoreColor[100];  //85B2CE8

//temp ancient info
BYTE tempText[5000];  //85B2D88
DWORD tempBtn[100];  //85B2C48    //Btn-> onClick text
DWORD tempColor[100];  //85B2CE8

int iStoreLines;
#define STORE_EXTENSION_USE false    //true if using extended store currencies.

void __declspec(naked) HookItemInfo_0() //0080126E
{
    _asm
    {
        mov eax, [ebp - 0x78];
        mov iStoreLines, eax;
    }
    memset(tempStoreText, 0, sizeof(tempStoreText));
    memset(tempStoreColor, 0, sizeof(tempStoreColor));
    memset(tempStoreBtn, 0, sizeof(tempStoreBtn));
    if (STORE_EXTENSION_USE)
    {
        //removed
    }
    else 
    {
        memcpy(tempStoreText, (void*)(pText), iStoreLines * 100);
        memcpy(tempStoreColor, (void*)(pColor), iStoreLines * 4);
        memcpy(tempStoreBtn, (void*)(pColor), iStoreLines * 4);
    }

    iState |= 1; // 0x100 | bx01 -> bx101 (5)

    _asm
    {
        mov eax, 0;
        mov[ebp - 0x78], eax;
        mov edx, JMPBACK_ITEM_INFO_0;
        jmp edx;
    }
}
void __declspec(naked) HookItemInfo_1()
{
    _asm
    {
        mov eax, [ebp + 0x0C];
        mov iStart, eax;
    }
    *(DWORD*)(pColor + iStart*4) = 2 ; //set color Credits line //color table (0->19) 0:white 1:blue 2:red...
    _asm
    {
        //push 0x0106F3E0;
        push szCredits;    //I put Credits line here, to remove it... use push 0x0106F3E0; instead.
        //or you can try to find ancient set name then replace by this line.
        mov edx, JMPBACK_ITEM_INFO_1;
        jmp edx;
    }
}

void __declspec(naked) HookItemInfo_2()
{
    _asm
    {
        mov iEnd,eax;
    }
    iCount = iEnd - iStart;
    if(iCount > 0 && iCount < 160)
    {
        iState |= 2; // iState or bx10
        //iState = 2;
        memset(tempText, 0, sizeof(tempText));
        memset(tempColor, 0, sizeof(tempColor));
        memset(tempBtn, 0, sizeof(tempBtn));

        memcpy(tempText, (void*)(pText + iStart * 100), iCount * 100);
        memcpy(tempColor, (void*)(pColor + iStart * 4), iCount*4);
        memcpy(tempBtn, (void*)(pColor + iStart * 4), iCount * 4);
    }

    _asm
    {
        mov eax, iStart;
        mov edx, JMPBACK_ITEM_INFO_2;
        jmp edx;
    }
}

void __declspec(naked) HookItemInfo_3()
{
    _asm
    {
        mov edx, 0x009C9AC4; // Info_4 state -> [0-3]
        call edx;

    }
    if (iState >= 2)
    {
        memcpy((void*)pText , tempText, iCount * 100);
        memcpy((void*)pColor, tempColor, iCount * 4);
        memcpy((void*)pBtn, tempBtn, iCount * 4);
        _asm
        {
            push iCount;
            mov edx , 0x00969F14;
            call edx;
            mov ecx, eax;
            mov edx, 0x004FA686;
            call edx;
            mov ecx, eax;
            mov edx, 0x009C9AC4; //Info_4 state -> [0,1]
            call edx;
        }
    }

    if (iState >= 1)
    {
        memcpy((void*)pText, tempStoreText, iStoreLines * 100);
        memcpy((void*)pColor, tempStoreColor, iStoreLines * 4);
        memcpy((void*)pBtn, tempStoreBtn, iStoreLines * 4);
        _asm
        {
            push iStoreLines;
            mov edx, 0x00969F14;
            call edx;
            mov ecx, eax;
            mov edx, 0x004FA686;
            call edx;
            mov ecx, eax;
            mov edx, 0x009C9AC4; //Info_4
            call edx;
        }
    }

    iState = 4;    //reset state 

    _asm
    {
        mov edx, JMPBACK_ITEM_INFO_3;
        jmp edx;
    }
}

#define pInvokeUI ((DWORD(__stdcall*)(DWORD pFrame, char * method, char * format ...)) 0x0095A6EA)
DWORD pInfoFrame;
char * pHtmlString;
char * szFormat_s = "%s";
char * szSetInfoPopupEx = "SetInfoPopupEx";
char * szSetInfoPopupEx3 = "SetInfoPopupEx3";
void __declspec(naked) HookItemInfo_4()
{
    _asm
    {
        mov pHtmlString, eax;
    }

    if (iState >= 4)
    {
        iState &= 3; // and bx11
        _asm
        {
            jmp MainInfo;
        }
    }
    else if (iState >= 2) 
    {
        _asm
        {
            mov eax, [ebp - 0x000004EC];
            mov pInfoFrame, eax;
        }
        pInvokeUI(pInfoFrame, szSetInfoPopupEx, szFormat_s, pHtmlString);
        iState &= 1;
        _asm {
            jmp Info_3;
        }
    }
    else 
    {
        if (iState = 1) {
            _asm
            {
                mov eax, [ebp - 0x000004EC];
                mov pInfoFrame, eax;
            }
            pInvokeUI(pInfoFrame, szSetInfoPopupEx3, szFormat_s, pHtmlString);
        }
        iState = 0;
        _asm {
            jmp Info_3;
        }
    }

    _asm
    {
    MainInfo:
        push pHtmlString;
        push [ebp - 0x000000C8];
        mov eax, pHtmlString;
        mov edx, JMPBACK_ITEM_INFO_4;
        jmp edx;
        
    Info_3:
        //back Info_3
        mov edx, 0x009C9D5A;
        jmp edx;
        
    }
}
int iItmIdx;
int iSetBonus;
DWORD v_temp_a2;
char * szAllStatsFormat = "Increases all stats by +%d";
#define iAncientBonusMultiplier 50
#define pPrintLn ((DWORD(__stdcall*)(DWORD a2, char * format ...)) 0x00D0A18A)
void __declspec(naked) HookItemInfo_5()
{
    _asm
    {
        mov eax, [ebp + 0x08];
        mov eax, [eax + 0x04];
        mov iItmIdx, eax;
        mov eax, [ebp + 0x08];
        movzx eax, byte ptr[eax + 0x21];
        sar eax, 0x02;
        and eax, 0x80000003
        mov iSetBonus, eax;
        mov eax, [ebp + 0x0C];
        mov v_temp_a2, eax;
    }
    //is custom item (not from s9) blood angels set and above
    if (iItmIdx >= 3682 && iItmIdx < 4096 //Helm
        || iItmIdx >= 4194 && iItmIdx < 4608 //armor
        || iItmIdx >= 4706 && iItmIdx < 5120
        || iItmIdx >= 5218 && iItmIdx < 5632
        || iItmIdx >= 5730 && iItmIdx < 6144
        )
    {
        if (iSetBonus == 1 || iSetBonus == 2)
        {
            pPrintLn(v_temp_a2, szAllStatsFormat, iSetBonus * iAncientBonusMultiplier);
            _asm
            {
                mov eax, 0x01;
                mov edx, 0x004F5053; //leave ret
                jmp edx;
            }
            
        }
    }
    _asm
    {
    jmpback:
        lea eax, [ebp - 0x04];
        push eax;
        push[ebp + 0x08];
        mov edx, JMPBACK_ITEM_INFO_5;
        jmp edx;
    }
}

Could you share the Post Item code of your season 9 ??
 
Custom Title Activated
Member
Joined
Aug 30, 2011
Messages
2,969
Reaction score
1,002
This is pretty cool. Keep up the good work! solarismu

Confirmed working perfectly fine.
FYdKdxk - [Release] Custom Item Info UI - Season 9 - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Skilled Illusionist
Joined
Dec 9, 2009
Messages
373
Reaction score
42
@solarismu: hi, from my understanding, we can change the ancient item name color as well from these source right?
——

Vie: từ source ông share mình có thể thay đổi màu của tên đồ thần được đúng ko bro nhỉ (ý tôi là hiện tại đồ thần có tên màu xanh lá, trước đây có thêm nền xanh dương bên dưới nữa nhìn rất đẹp)
 
Experienced Elementalist
Joined
May 4, 2017
Messages
219
Reaction score
314
@solarismu: hi, from my understanding, we can change the ancient item name color as well from these source right?
——

Vie: từ source ông share mình có thể thay đổi màu của tên đồ thần được đúng ko bro nhỉ (ý tôi là hiện tại đồ thần có tên màu xanh lá, trước đây có thêm nền xanh dương bên dưới nữa nhìn rất đẹp)
Not possible :))
or no easy way to make it :)
 
Last edited:
Initiate Mage
Joined
Jan 11, 2013
Messages
57
Reaction score
12
There is a small error here that when I point to the "Ancient Option" button in the bag then pointing to the ancient item in use, info popup will disappear.
 
Joined
Dec 25, 2012
Messages
43
Reaction score
2
There is a small error here that when I point to the "Ancient Option" button in the bag then pointing to the ancient item in use, info popup will disappear.
ENG:
It does not matter how serious you are, just point your mouse at the item and it will show up again!

VTM:
Không có gì nghiêm trọng, khi chỉ chuột vào option rồi chỉ chuột vào đồ thần sẽ mất hiển thị, nhưng chỉ cần chỉ vào món đồ khác bất kì là nó hiển thị lại bình thường !
 
Back
Top