Inventory HUD Item Limit?

Greetings... I've posted a thread on AdvancedMod... but it doesn't seem to be going anywhere, so I thought I'd syncicate it here.
I'm having some problems concerning the inventory in my mod... I think I may have encountered some sort of item limit as described in the below thread.
http://www.advancedmod.com/forums/viewtopic.php?t=370&highlight=inventory+invalid

Here's a shot of what I mean: the highlighted item in the list should say "CCLM - Conc Launcher", but instead says "CCLM - Conc La", and when selected changes to "INVALID". Any ideas as to what's going on here?
inventoryerror.png

Comments

  • Ok, here's the thing: during the cycle, the items are all grouped into one multi-field local variable to be sent to the player. If it's over 255 characters, it will get cut off. This is the cause for both of your issues, as the item is tied to that string.

    What was done to effectively double the capacity on the pack selections was to create and send the rest of the string as overflow, as you can see in the example below:
    (see line 440 inventoryHud.cs)
    if ( strlen( %packList ) > 255 )
        {
     	  %packText = getSubStr( %packList, 0, 255 );
     	  %packOverFlow = getSubStr( %packList, 255, 512 );
        }
    
  • Ok, here's the thing: during the cycle, the items are all grouped into one multi-field local variable to be sent to the player. If it's over 255 characters, it will get cut off. This is the cause for both of your issues, as the item is tied to that string.

    What was done to effectively double the capacity on the pack selections was to create and send the rest of the string as overflow, as you can see in the example below:

    Many thanks to you, sir! I've made the proper modifications to the weapon list and everything seems to be showing up properly. Thanks much!
  • Of course you always could just use less weapons, but I suppose If you wanted more, you could do that.
Sign In or Register to comment.