[Help] How to resize items model in inventory?

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    [Help] How to resize items model in inventory?

    Hi,

    I want to change height and width of every item in the game to 1:1 (every item will ocupy 1 slot in inventory).

    By changing the values of Height and Width in item.bmd the item ocupies only 1 slot but the 3d model of the item remains the same. I need to resize the model too to fit in 1 slot.

    Does anyone know if there is a client file with the size (height/width) of items models or this is hard-coded in the .exe?

    Thanks in advance.


  2. #2
    Novice C++ allexander is offline
    ModeratorRank
    Feb 2011 Join Date
    European UnionLocation
    467Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    Hi,

    I want to change height and width of every item in the game to 1:1 (every item will ocupy 1 slot in inventory).

    By changing the values of Height and Width in item.bmd the item ocupies only 1 slot but the 3d model of the item remains the same. I need to resize the model too to fit in 1 slot.

    Does anyone know if there is a client file with the size (height/width) of items models or this is hard-coded in the .exe?

    Thanks in advance.
    You can use Milkshape to change the size of items, if you have ItemTRSData.bmd you should look there too.
    Hit the like button and add some + rep if i helped you !

  3. #3
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by allexander View Post
    You can use Milkshape to change the size of items, if you have ItemTRSData.bmd you should look there too.
    Hi, I forgot to mention I'm doing it in a Season 6 client. I couldn't find any file named "ItemTRSData.bmd". May you explain what is this Milkshape?

    Thanks.

  4. #4
    Novice C++ allexander is offline
    ModeratorRank
    Feb 2011 Join Date
    European UnionLocation
    467Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    Hi, I forgot to mention I'm doing it in a Season 6 client. I couldn't find any file named "ItemTRSData.bmd". May you explain what is this Milkshape?

    Thanks.
    Use Pentium tools to convert BMD -> SMD, use Milkshape to edit/resize the SMD, convert back -> and done
    Hit the like button and add some + rep if i helped you !

  5. #5
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by allexander View Post
    Use Pentium tools to convert BMD -> SMD, use Milkshape to edit/resize the SMD, convert back -> and done
    Hmm I see... But you know I only want to edit the size of the 3d model in inventory right?

    Editing the item's BMD to make it smaller will change the model in the game too, isn't it?

    Or there is a BMD of the item 3d model in inventory and another BMD of the 3d model displayed in the character?

  6. #6
    (づ。◕‿‿◕。) Natzugen is online now
    Alpha MaleRank
    Jun 2014 Join Date
    ElbelandLocation
    1,866Posts

    Re: [Help] How to resize items model in inventory?

    Maybe @Kiosani knows

  7. #7
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Trying to summon @Kiosani again ._.

  8. #8
    Darkness Member Kiosani is offline
    True MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,189Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    Trying to summon @Kiosani again ._.
    English:
    Well, if you make ask to me if this it's possible... it's possible, only that in the first place you did not give us details about the version of your main.exe (If it's bigger than Season 6.3) I cannot help you, since I do not work with main.exe that are packaged (or not completely unpacked). If your version of your main.exe is less than Season 6.3, I can only think of 1 way to do it... rewriting a function, the problem is that you would have to pause all the objects again, and if you use a loop: "for" to make this... surely you are going to make of the loading of the main.exe (in the: Loading Stage) be unlimited. so in the end it is something a bit tedious to do. but if it is possible to do it.

    Spanish:
    Bueno de que es posible... es posible, solo que en primer lugar no nos diste detalles sobre la versión de tu main.exe (Si es mayor que Season 6.3) no puedo ayudarte, ya que no trabajo con main.exe que están empaquetados (o bien no completamente desempaquetados). si la versión de tu main.exe es menor que Season 6.3, solo se me ocurre 1 forma de hacerlo... re-escribiendo una función, el problema es que habría que volver a parsear todos los Objetos, y si usas un bucle: "for" para eso... seguramente vas a hacer interminable la carga del main.exe (En el: Loading Stage). asique en definitiva es algo un tanto tedioso de hacer. pero si es posible hacerlo.
    Signature removed due to rules violation

  9. #9
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    735Posts

    Re: [Help] How to resize items model in inventory?

    pDrawItemModel, hook all calls and change Width and Height

    #define pDrawItemModel ((void(__cdecl*)(float PosX,float PosY,float Width,float Height,int ItemID,int Level,int Excellent,int Ancient,int Floating)) 0x5D2280) // Floating related to size

    Ps. It is for main 1.03.42 (You need to download as 1.03.43 main from webzen ftp to make a research)

    Edit:

    1.04D Main offset: sub_51EEF0

  10. #10
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by Kiosani View Post
    English:
    Well, if you make ask to me if this it's possible... it's possible, only that in the first place you did not give us details about the version of your main.exe (If it's bigger than Season 6.3) I cannot help you, since I do not work with main.exe that are packaged (or not completely unpacked). If your version of your main.exe is less than Season 6.3, I can only think of 1 way to do it... rewriting a function, the problem is that you would have to pause all the objects again, and if you use a loop: "for" to make this... surely you are going to make of the loading of the main.exe (in the: Loading Stage) be unlimited. so in the end it is something a bit tedious to do. but if it is possible to do it.

    Spanish:
    Bueno de que es posible... es posible, solo que en primer lugar no nos diste detalles sobre la versión de tu main.exe (Si es mayor que Season 6.3) no puedo ayudarte, ya que no trabajo con main.exe que están empaquetados (o bien no completamente desempaquetados). si la versión de tu main.exe es menor que Season 6.3, solo se me ocurre 1 forma de hacerlo... re-escribiendo una función, el problema es que habría que volver a parsear todos los Objetos, y si usas un bucle: "for" para eso... seguramente vas a hacer interminable la carga del main.exe (En el: Loading Stage). asique en definitiva es algo un tanto tedioso de hacer. pero si es posible hacerlo.
    The version is 1.04E. The executable is the original one but it does not seem to be packed at all. The PE sections seems right as the IAT.

    I know this is possible to do. I'm asking for some light in which direction I can go so I can save some time analysing the .exe.

    - - - Updated - - -

    Quote Originally Posted by SmileYzn View Post
    pDrawItemModel, hook all calls and change Width and Height

    #define pDrawItemModel ((void(__cdecl*)(float PosX,float PosY,float Width,float Height,int ItemID,int Level,int Excellent,int Ancient,int Floating)) 0x5D2280) // Floating related to size

    Ps. It is for main 1.03.42 (You need to download as 1.03.43 main from webzen ftp to make a research)

    Edit:

    1.04D Main offset: sub_51EEF0
    Hum, so the size (height and width) of the 3d models showed in the inventory is hard-coded in the .exe then? I thought it could be inside some binary file (those BMD, etc).

  11. #11
    (づ。◕‿‿◕。) Natzugen is online now
    Alpha MaleRank
    Jun 2014 Join Date
    ElbelandLocation
    1,866Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    Hum, so the size (height and width) of the 3d models showed in the inventory is hard-coded in the .exe then? I thought it could be inside some binary file (those BMD, etc).
    It is in the itemTRSdata from ex700+ versions and above, in s6 and lower is hardcoded in main.

    you can take the most of the offsets from zteam season 6 source (main 1.04D), to migrate them to 1.04E you have to substract 0x150 from offset 0x0068xxx and -0x180 from offset 0x009xxxx. That way you wont have to research everything from scratch.

  12. #12
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by Natzugen View Post
    It is in the itemTRSdata from ex700+ versions and above, in s6 and lower is hardcoded in main.

    you can take the most of the offsets from zteam season 6 source (main 1.04D), to migrate them to 1.04E you have to substract 0x150 from offset 0x0068xxx and [FONT="]-0x180 from offset [/FONT]0x009xxxx. That way you wont have to research everything from scratch.
    This zteam source have a patch to this variables I'm looking for? Also, may you send me the "official" link of this source you are talking?

  13. #13
    (づ。◕‿‿◕。) Natzugen is online now
    Alpha MaleRank
    Jun 2014 Join Date
    ElbelandLocation
    1,866Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    This zteam source have a patch to this variables I'm looking for? Also, may you send me the "official" link of this source you are talking?
    zTeam Season 6 EP3 + Source the source link is somewhere in that thread

  14. #14
    0x4D696E68 myheart is offline
    True MemberRank
    Jun 2017 Join Date
    261Posts

    Re: [Help] How to resize items model in inventory?



    try this: (Offset main 1.04.03)

    Code:
    BOOL GetModelScale(int ItemIndex, float * Scale)
    {
        switch (ItemIndex)
        {
        case 0x14B5:
      *Scale = 0.0032f;
      return TRUE;
        case ITEM2(7, 150):
      *Scale = 0.0155f;
      return TRUE;
        }
    
        return FALSE;
    }
    
    __declspec(naked) void SetModelScale()
    {
        static DWORD Address1 = 0x005CE8ED;
        static DWORD Address2 = 0x005CD42F;
    
        _asm
        {
      Lea Edx, Dword Ptr Ss:[Ebp-0x2C]
      Push Edx
      Mov Ecx, Dword Ptr Ss : [Ebp + 0x8]
      Push Ecx
      Call GetModelScale  
      Add Esp, 0x8
      Test Eax, Eax
      Je EXIT
      Jmp Address1
      EXIT:
      Jmp Address2
        }
    }
    
    SetCompleteHook(0xE9, 0x005CD41B, &SetModelScale);
    PHP Code:
    patch-ggp.muonline.webzen.net/1.04.03/up_list.zip 
    'Love' never die's

  15. #15
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by myheart View Post


    try this: (Offset main 1.04.03)

    Code:
    BOOL GetModelScale(int ItemIndex, float * Scale)
    {
        switch (ItemIndex)
        {
        case 0x14B5:
      *Scale = 0.0032f;
      return TRUE;
        case ITEM2(7, 150):
      *Scale = 0.0155f;
      return TRUE;
        }
    
        return FALSE;
    }
    
    __declspec(naked) void SetModelScale()
    {
        static DWORD Address1 = 0x005CE8ED;
        static DWORD Address2 = 0x005CD42F;
    
        _asm
        {
      Lea Edx, Dword Ptr Ss:[Ebp-0x2C]
      Push Edx
      Mov Ecx, Dword Ptr Ss : [Ebp + 0x8]
      Push Ecx
      Call GetModelScale  
      Add Esp, 0x8
      Test Eax, Eax
      Je EXIT
      Jmp Address1
      EXIT:
      Jmp Address2
        }
    }
    
    SetCompleteHook(0xE9, 0x005CD41B, &SetModelScale);
    PHP Code:
    patch-ggp.muonline.webzen.net/1.04.03/up_list.zip 
    Thank you very much sir.



Page 1 of 2 12 LastLast

Advertisement