Cash Shop items list

Results 1 to 3 of 3
  1. #1
    Account Upgraded | Title Enabled! Angxl is offline
    MemberRank
    Sep 2016 Join Date
    United StatesLocation
    217Posts

    Cash Shop items list

    So I've been messing around with the Cash Shop for a while now, and for the most part it's done.
    I'd say the only thing missing, or what makes it ugly is the fact that there is still only a list of 10 and 12 items.

    Spoiler:



    I'm trying to make the Cash Shop show more than 10 items, and the Item Inventory on the bottom right show more than 12 if I were to make it a list of 7x3 (similar to the fake Cash Inventory display right above it).
    I've tried messing around with the item list at around 0x004B966B and 0x004B9670 (which is how I was able to make it 4x3), but I don't know how to increase the actual amount if displayed items. How would I go about doing this? Is this data being loaded from somewhere? Any help is appreciated


  2. #2
    Member Feras is offline
    MemberRank
    Jan 2019 Join Date
    50Posts

    Re: Cash Shop items list

    Showing more than 10 items would be harder than expected because there are raw arrays of size 10 declared in the CCSWnd_List class.

    Code:
    00000000 CCSWnd_List     struc ; (sizeof=0xCE8, align=0x4, copyof_3148)
    00000000                                         ; XREF: CCashShop/r
    00000000 baseclass_0     CWnd ?
    00000080 m_pSelector     ZRef<CCtrlSelector> ?
    00000088 m_pBtPlate      ZRef<CCtrlButton> 30 dup(?)
    00000178 m_pBtShortcut   ZRef<CCtrlButton> ?
    00000180 m_nPlateNo      dd ?
    00000184 m_nPlateFocus   dd ?
    00000188 m_nButtonFocus  dd ?
    0000018C m_nCommodityIndex dd 10 dup(?)
    000001B4 m_nStockIndex   dd 10 dup(?)
    000001DC m_nLimitGoodsIndex dd 10 dup(?)
    00000204 m_nGender       dd 10 dup(?)
    0000022C m_bCannotBuy    dd 10 dup(?)
    Also notice the array of 30 buttons (3 for each item). This is the v95 structure but it's the same idea in v83. There isn't enough room in CCSWnd_List to show more than 10 items at once and any solution to that would need entire functions to be rewritten (or dozens of codecaves, but thats very unsafe and isn't much easier).

    Idk if you need this but for the cash shop inventory try changing the instruction at 0x4B040D. It's lea eax,[eax+eax*2+06], change to lea eax,[eax+eax*2+x] where x is half the number of items you wanna show (im guessing 14).

    For the item inventory the number of slots shown is in 0x4B1AA6. There's probably more you need to change but you can take a look around that address and figure it out. (The function is called CCSWnd_Inventory::Draw.) The function 0x4B1E69 (CCSWnd_Inventory::GetItemSlotRect) does some of the math for drawing the inventory.

  3. #3
    Account Upgraded | Title Enabled! Angxl is offline
    MemberRank
    Sep 2016 Join Date
    United StatesLocation
    217Posts

    Re: Cash Shop items list

    The scrolling is kinda weird but I'm getting closer, tysm!



Advertisement