Vanilla Bug Question (Container Icons)

Discussion in 'General Modification' started by DarkStorm, Sep 13, 2019.

Remove all ads!
  1. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    So, I've been rummaging through the looting UI, and noticed a discrepancy.
    In the code that choses the icon based on the container's proto, there are two entries for which the corresponding icons are never loaded. One is for lareth's dresser, the other is for the earth temple altar.

    Has anyone ever noticed that those two containers don't have an icon in the looting UI?
    TP even displays it as a white square (which is a quirk of ours for invalid texture ids, the original game I think just didn't display it at all):
    lareths_dresser.png

    Was this always the case? Or did this get introduced by one of the DLL hacks?

    Here's the code from temple.dll:
    Code:
      switch ( GetProto(critterLooted) )
      {
        case 1028:
          a1.textureId = looting_container_icons[2];
          break;
        case 1031:
          a1.textureId = looting_container_icons[3];
          break;
        case 1045:
          a1.textureId = looting_container_icons[4];
          break;
        case 1047:
          a1.textureId = looting_container_icons[5];
          break;
        case 1030:
        case 1052:
          a1.textureId = looting_container_icons[1];
          break;
        default:
          a1.textureId = looting_container_icons[0];
          break;
      }
    Index 4 and 5 are never loaded, while the other ones are:
    Code:
    if ( RegisterUiTexture("art\\interface\\char_ui\\char_looting_ui\\Looting_ChestPortrait.tga", looting_container_icons)
        || RegisterUiTexture("art\\interface\\char_ui\\char_looting_ui\\HommletWell.tga", &looting_container_icons[2])
        || RegisterUiTexture("art\\interface\\char_ui\\char_looting_ui\\RainbowRock.tga", &looting_container_icons[3])
        || RegisterUiTexture("art\\interface\\char_ui\\char_looting_ui\\Anvil.tga", &looting_container_icons[1])
    It's an easy fix, but I am just super confused that this was never noticed...
     
  2. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    I can definitely confirm I've always seen the earth temple alter icon blanked out.
     
  3. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    514
    Likes Received:
    3
    Alright, something to fix then. Both texture's are actually in the folder and present, so they can just be used as-is.
    EarthAltar.tga.png and LarethDresser.tga.png
     
  4. WinstonShnozwick

    WinstonShnozwick Established Member

    Joined:
    Mar 2, 2011
    Messages:
    628
    Likes Received:
    23
    Those look new to me!
     
  5. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,177
    Likes Received:
    34
    I've never seen either one of those... nice find!
     
  6. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    982
    Likes Received:
    120
    Time to tell @Sitra Achara about this for T+!

    Thanks, DarkStorm!
     
  7. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    I'm sure it was noticed but without a .dll hack it could never be fixed so probably no one mentioned it (not a high priority either). I've never had the slightest clue how to fix it and would love to add custom images to new containers. Anyway, well done.
     
Our Host!