EDIT POST
I deleted my old post because I realised I'm a huge dummy.
I was going to say to Chiko that you can't make subvariants of potions because I tried it almost exactly a year ago and it didn't work, but that's not true. I found out that I had simply made a typo and that's why they didn't work.
Here's the code again, fixed this time:
potion /* materialcontainer-> */
{
...
Config VIAL;
{
DefaultSize = 10;
Possibility = 600;
NameSingular = "vial";
DefaultMainVolume = 20;
DefaultSecondaryVolume = 200;
SecondaryMaterialConfig = { 11, WATER, HEALING_LIQUID, OMMEL_URINE, POISON_LIQUID, VALDEMAR, ANTIDOTE_LIQUID, VODKA, TROLL_BLOOD, OMMEL_SWEAT, OMMEL_TEARS, SULPHURIC_ACID; }
MaterialConfigChances = { 11, 15, 25, 15, 5, 5, 30, 5, 20, 15, 15, 5; }
}
}
I've tested it out now, and they work fine except for one problem: they turn into broken bottles when they shatter.
This is, because as I mentioned in my now-deleted post, bottles and broken bottles are entirely separate entities and a bottle that "dies" turns into a broken bottle entity. Since vials are sub-entities of bottles, they also turn into broken
bottles when they break.
There's no way to fix this without messing with the source code, but for most intents and purposes this is a quick way to test out the balance of my vials/flasks suggestion.
Do note the above code is just lifted almost wholesale from regular potions, particularly the materialconfigchances part which would be our balancing factor. So don't worry about those numbers too much.
EDIT: I uh, should've considered this earlier but vials don't play nice with d!pping between each other. It doesn't crash the game, but dipping a vial into a bottle takes a full 500ml portion... despite the vial only being able to hold 200ml.
So in order to
correctly implement additional liquid containers, we're going to have to make the dipping function more modular too - currently it looks like it just transfers a flat rate of 500ml of fluid into/onto whatever you specify. Regardless of anything other than the container already being full.
However it should be noted that the smaller capacity of spawned vials actually is taken into account by the game correctly - when shattered or drank, the appropriate amount of fluid is spilled or consumed. It's just the dip and vials-turning-into-broken-bottles functions that would need revising.