UBOAT
Custom Stack Limits
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:
Emilio 10 Mar @ 12:20pm 
yay it worked! thanks again i think what i was missing was the coma? im not sure but its working now thank you again for taking the time to reply
Emilio 10 Mar @ 12:12pm 
thanks buddy I appreciate the help
DarkRaven  [author] 10 Mar @ 3:02am 
@Emilio I appreciate the effort. Good news though, I'm fairly sure that unless done intentionally, it is impossible to corrupt anything by editing Settings.cs. Additionally, the fact that you commented indicates to me that you're tech-savvy enough to do it.

You've tried to change "Replacement Parts" to 40 and it doesn't work, that tells me you've edited Settings incorrectly. If you'd like to try again, you can unsubscribe and resubscribe. Also:

{"Replacement Parts", 40},
{"MedKit", 20},
{"Sonar Decoy", 20}
Emilio 9 Mar @ 1:21am 
I tried doing it myself but couldnt and i dont know what im doing wrong, do you think you could add medkits and sonar decoys for us? i dont mean to sound demanding its just that im not very tech savy yknow, I also tried to increas the replacement parts to 40 to see if the changes would take effect but it didnt work either. Im not sure what im doint wrong and i dont wanna mess with it too much and risk corrupting something. Cheers and thank you for the mod!
Vangheist 4 Mar @ 10:25am 
A much more elegant solution than I could have come up with. Thank you for your work once again.
DarkRaven  [author] 4 Mar @ 9:59am 
@Fluffy Lamb Rip rick may Unfortunately, I am incapable of making a video primarily about copy pasting a few things. My apologies.
Fluffy Lamb Rip rick may 4 Mar @ 1:52am 
could u make a video to show how one adds new lines (not good w computer coding)
DarkRaven  [author] 3 Mar @ 10:36pm 
@MysticDaedra That's the beauty of it. You can change it to what you want, effectively when you want. 20 too many? Make it 17 or 7 or 1 or whatever. Then load up your existing save and have it applied.
MysticDaedra 3 Mar @ 10:26pm 
Very interesting, but what would you say is decently "realistic", given that IRL there was no such thing as a generic "repair part" item? I definitely feel like 5 per slot is irritatingly restrictive, but I'm not sure if 20 or more is balanced or not. Thoughts?
Sir Digby 3 Mar @ 5:45pm 
But can't I have 2,147,483,648 potatoes? Meh I'll pass :-)
But at least I can't have -1 potato either so I'm torn...
DarkRaven  [author] 3 Mar @ 9:40am 
@Winged Like Drexack said, slots and stack limits are separate things. This mod can not affect the amount of slots.
DarkRaven  [author] 3 Mar @ 9:36am 
@Drexack I haven't tested it, but I don't see why not.
Drexack 3 Mar @ 6:10am 
Great QOL mod, thank you!
Can I expect this to work also with items that originally have a stack size of one, like the explosive charges used for scuttling ships?
Drexack 3 Mar @ 5:57am 
@Winged Stack size and torpedo slots are hardly related, are they? You can use Slot Machine as a template to give you more torpedos. Teax explained how in the comments here .
Winged on battle [POL] 3 Mar @ 5:30am 
I would like to add the number of torpedo slots to the cs modification file ‘Custom Stack Limits’, but I don't know what name from the Entities file to enter. could someone tell me what name to enter, link to modification below.
Urfisch 3 Mar @ 1:44am 
Helpful, thanks!