• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Stack of 999 Items & 255 Pokemart Purchase

3
Posts
8
Years
    • Seen Jul 4, 2021
    Increase Item Stack Limit from 99 to 999
    Increase stack to 999
    In the src\item.c
    Delete
    Code:
    if (pocket != BERRIES_POCKET)
                slotCapacity = 99;
            else

    Fully see total # of items
    In the src\item_menu.c
    Change (around line 861)
    Code:
    ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, [B]2[/B]);
    to
    Code:
    ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, [B]3[/B]);
     
    3
    Posts
    8
    Years
    • Seen Jul 4, 2021
    Increase Pokemart Max Purchase Amount from 99 to 255 (255 seems to be the max)
    In the src\shop.c
    Around (around line 986)
    Change
    Code:
    ConvertIntToDecimalStringN(gStringVar1, quantityInBag, STR_CONV_MODE_RIGHT_ALIGN, [B]4[/B]);
    to
    Code:
    ConvertIntToDecimalStringN(gStringVar1, quantityInBag, STR_CONV_MODE_RIGHT_ALIGN, [B]5[/B]);

    Around (around line 996)
    Change
    Code:
    if (maxQuantity > [B]99[/B])
        {
            gShopDataPtr->maxQuantity = [B]99[/B];
        }
    to
    Code:
    if (maxQuantity > [B]255[/B])
        {
            gShopDataPtr->maxQuantity =[B] 255[/B];
        }

    Around (around line 1028)
    Change
    Code:
    ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, 2);
    to
    Code:
    ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, 3);

    Around (around line 1050)
    Change
    Code:
    ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 2);
    to
    Code:
    ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 3);

    In the src\item_menu.c
    Around (around line 1058)
    Change
    Code:
    u8 r3 = (gBagPositionStruct.pocket == BERRIES_POCKET) ? 3 : 2;
        ConvertIntToDecimalStringN(gStringVar1, b, 2, r3);
    to
    Code:
    ConvertIntToDecimalStringN(gStringVar1, b, 2, 3);
     
    Last edited:
    3
    Posts
    8
    Years
    • Seen Jul 4, 2021
    Added bonus: Increase Bag and PC size (Unsure if there is a hard limit)
    Need to do more testing, best not to use it
    Spoiler:
     
    Last edited:
    1,591
    Posts
    10
    Years
    • Seen Mar 20, 2024
    Added bonus: Increase Bag and PC size (Unsure if there is a hard limit)
    In the include\constants\global.h
    Code:
    #define PC_ITEMS_COUNT [B]99[/B]
    #define BAG_ITEMS_COUNT [B]99[/B]
    #define BAG_KEYITEMS_COUNT 30
    #define BAG_POKEBALLS_COUNT [B]99[/B]
    #define BAG_TMHM_COUNT 64
    #define BAG_BERRIES_COUNT [B]99[/B]
    #define EVENT_OBJECT_TEMPLATES_COUNT 64
    
    #define PYRAMID_BAG_ITEMS_COUNT [B]99[/B]

    To expand bag size you'll also need to edit the size of these buffers in src/item_menu.c:
    Code:
    struct ListBuffer1 {
        struct ListMenuItem subBuffers[65];
    };
    
    struct ListBuffer2 {
        s8 name[65][24]; 
    };
    I'm not sure if the buffer size is based on the largest bag pocket or just the TMs/HMs pocket (I've only tested TMs so far), but the buffers need to be at least one larger than the TMs pocket or the item graphics won't load and the game will freeze when you try to use a TM.

    The limit on bag size depends on how much space you have available in the "SaveBlock1" struct in include/global.h; if there's nowhere to save all the extra items the bag won't work properly.
     
    Back
    Top