Bowabos
Member-
Posts
6 -
Joined
-
Last visited
Bowabos's Achievements
-
When setting "smallwaterbottle": { "probability": 21, "maxStack": 1, "minStack": 1, "blueprintChancePercent": 0, "skins": [] }, I do get a Small Water Bottle in the foodbox, however it is empty. I suspect the object to inject is more complex and need to provide the quantity of liquid that is to be put inside. Found this info the the Oxide forum if it helps... private Item BuildItem(int itemid, int amount, ulong skin) { if (amount < 1) amount = 1; Item item = ItemManager.CreateByItemID(itemid, amount, skin); if (itemid == 927253046) // water bottle item.contents.AddItem(ItemManager.FindItemDefinition(112903447), 250); if (itemid == 547302405) // water jug item.contents.AddItem(ItemManager.FindItemDefinition(112903447), 500); return item; } https://oxidemod.org/threads/water-jug-and-small-water-bottle-are-empty.24617/
-
OK I think I may have got it. If my container has "maxItems": 6, "minItems": 6, it will do 6 draws of 1/91 for the rare category, and select Items based on their probability in this category (calculated in the same way... 4/4+5+5 if there was 3 items with probability of 4, 5 and 5). However if "maxItems": 6, "minItems": 4, how the number of draw get decided? is it based on the number of items for the category selected? i.e. in Food, if apple get selected, which has "maxStack":2 and "minStack": 1, if 2 get picked, I have only 4 slot left, when number of slot >= minItems, no more draw? I'll log another ticket for water bottle (so others can find your answer if they search later)...
-
Apologies, please close the ticket. Possibly formalising the question helped me. I tried instead to put some probabilities to 100% and managed to get what I want. Not sure how I would use the AlwaysSpawnList but I don't need it so don't waste time on this...
-
CustomLoot does not seem to take into account config. Trying to get started, so picked up oil_barrel as an example... Edit oxide\config\CustomLoot.json: "oil_barrel": { "enabled": true, "lootTable": "oil_barrel", "maxItems": 6, "minItems": 6, "gunsWithAmmo": false, "noGuns": false, "MaxBps": 3, "MinWeaponCondition": 50, "MaxWeaponCondition": 50, "ClearContainerFirst": true }, Tried also "ClearContainerFirst": false (I would expect that I would have normal loot + what is in CustomLoot in this case)... Moreover edit oxide\data\CustomLoot\oil_barrel.json (which was auto created) "AlwaysSpawnList": [ "jackhammer" ], + Removed from BlackList To check if I'll get a jackhammer... in server console: oxide.reload CustomLoot Unloaded plugin CustomLoot v1.0.4 by Steenamaroo Loaded plugin CustomLoot v1.0.4 by Steenamaroo Calling 'OnServerInitialized' on 'CustomLoot v1.0.4' took 348ms [CustomLoot] Finished populating all containers. In game, break an oil_barrel (red one with usually crude+oil)... I get the default spawn (crude+oil). Tried spawning a new oil_barrel too. I'm probably doing something stupid somewhere... Thanks in advance for your help...