UBOAT
Not enough ratings
Custom Stack Limits
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
117.842 KB
3 Mar @ 12:21am
1 Change Note ( view )

Subscribe to download
Custom Stack Limits

Description
This is an expandable framework to change the stack limit of any item.

By default, it changes Replacement Parts to have a stack limit of 20.

To add an item, simply edit the Settings.cs in a text editor. That should be located in Steam\steamapps\workshop\content\494840\3437617137\Source

Copy and paste {"Replacement Parts", 20} below the original and edit the name to the item, as based on the Entities.xlxs and amount as desired. Don't forget to add a comma after the original Replacement Parts line. Avoid having duplicate items, an amount larger than 2,147,483,647 or an amount less than 0 for best results.

I would advise making a backup of your changes, in case the mod needs to be updated - as that will overwrite the files.

Savegame compatible and uninstalls cleanly.
26 Comments
Hildiboss23 19 May @ 6:43am 
no i wanted to stack 2,147,483,648 spare parts in one slot
DarkRaven  [author] 13 Apr @ 7:14pm 
@aaa No problem. =) Unity do be like that for modders, but honestly UBOAT is pretty scripting friendly, just not in this particular case.
aaa 13 Apr @ 5:52pm 
@DarkRaven thanks for taking the time to analyze the issue and answering! I wish this game would be more modder-friendly :/
DarkRaven  [author] 12 Apr @ 5:08pm 
There is a possibility to change the TransferInstantly method in StorageUI, but the relevant bits of code use a lot of the properties that "Cargo" provides, which would have to be rewritten AFAIK. For me, the juice wouldn't be worth the squeeze, so I'm probably not going to make those changes. My apologies.

TL;DR It's beyond my knowledge and ability to implement effectively.
DarkRaven  [author] 12 Apr @ 5:08pm 
@aaa To explain further, what i believe is the issue is that certain pieces of equipment are hard-coded to be (to be technical, extend from) "Cargo". These are specified when transferring / stacking items to be stackable. If the item is not coded to extended from "Cargo" and just "Equipment", it will effectively make the max stack 1. Cargo include: Ammunition, Champagne, Coffee, Fluid, Food, Fuel, GenericActionItem, MedKit, PotassiumAbsorber and StoredSonarDecoy.

As far as I know, you can't mod what an object extends from, so just changing Rebreathers, for example, for just Equipment to Cargo. Probably could edit the file directly, but there probably will be unforseen bugs and AFAIK it won't be distributable via Workshop.
DarkRaven  [author] 12 Apr @ 3:43am 
@aaa I'm unsure if it's possible. I took a quick look and all those are tagged as "Items" which may be handled differently. Unfortunately, I don't have the time to look at it properly currently.

@hdsiding Those aren't the names of the items "as based on the Entities.xlxs".
hdsiding 11 Apr @ 1:53pm 
i really love this mod, but am i dumb, is it simply not possible or how do i change the amount of ammo for the deck gun and AA?

The way i have it right now is this and the amount of amximal ammo doesnt change:

{"Replacement Parts", 100},
{"Small calliber AP Ammo", 10000},
{"Small calliber HE Ammo", 10000},
{"Large calliber AP Ammo", 200},
{"Large calliber HE Ammo", 200},
{"Sonar Decoy", 20}
aaa 11 Apr @ 1:14am 
Cool mod! already changed the stack of some items. One thing though: it seems that the stack limit can be changed only if the vanilla one was already greater than one. For example I tried to change the rebreather max stack to 10 but when I buy them from port I am not able to stack them on top of the other (or change the quantity to buy) . Same thing happens with helmets, k98, etc... Is it possible to implement this feature also for these items or is the game too hardcoded for that?
DarkRaven  [author] 8 Apr @ 2:14am 
Only one way to find out.
((TFB))-Szpickids 8 Apr @ 12:10am 
will... will this work for torpedoes also >.> ? :steamhappy: