File information

Last updated

Original upload

Created by

Shaklin

Uploaded by

Shaklin

Virus scan

Safe to use

Tags for this mod

About this mod

Download or create your own Products

Requirements
Permissions and credits
Changelogs
Custom Products



You need BepInEx 5.x
(Extract BepInEx into the game's main folder. Start the game so BepInex can create all the folders. Close the game)
Extract the Custom Products mod into the plugins folder. It should look like this:
Supermarket Together\BepInEx\plugins\CustomProducts\CustomProducts.dll

Be careful! Do not use your favorite savegame, while you have the mod installed.
The mod can possibly mess up your save game and make it unplayable!




To easily edit all global mod settings, I recommend the Configuration Manager:
https://github.com/BepInEx/BepInEx.ConfigurationManager/releases
(BepInEx.ConfigurationManager_BepInEx5_v18.4.zip)
Extract it like any other mod to: Supermarket Together\BepInEx\plugins\
Ingame you can now hit F1 and config all mods.



A big Thank you to XSoulMasterX for all the help, testing and wonderful ideas!


How to create a custom Product?

Download the Example (shaklin_products.zip under optional downloads), you can use it as a template.

Short Tutorial:
1. Create in the subfolder "Products" your own folder (name doesn't matter, but it should be unique)

2. Place your mesh (obj), texture (png) and the icon (png) into your new folder
Names must be unique! You can use your nexus-name or the tier+productID number, etc

3. Create a json file (copy it from the template), rename it as you want (must be unique!) and open it with an Editor.
Edit it as you like.
Note:
If you already have old .json files from previous versions, start the game once (main menu) and close it again. After that, all json files should be updated.


Product_ID and Product_Tier must be unique, otherwise the products will overwrite each other.
You can enter your name and claim IDs here:
https://docs.google.com/spreadsheets/d/1cWF8RmsxK_D9D6fUa0UlC8PA5KO1e4ksVt38b89Od0k/edit?usp=sharing
(simply write your name there. You have to ask for access beforehand (sorry there's no other way, but it's safer this way))
4. Finish! Test it in-game

If you need help with:
Product_ContainerClass
0 = Shelf
1 = Fridge
2 = Freezer
3 = Produce Shelf
4 = Pegboard Shelf

Tier_Requirement
0 = Basic Products I
1 = Basic Products II
2 = Basic Products III
3 = Basic Products IV
4 = Basic Products V
5 = Basic Products VI
6 = Dairy Products I
7 = Dairy Products II
8 = Soda Drinks I
9 = Frozen Foods I
10 = Frozen Foods II
11 = Hygiene I
12 = Hygiene II
13 = Hygiene III
14 = Cleaning Products I
15 = Cleaning Products II
16 = Sweets And Snacks I
17 = Sweets And Snacks II
18 = Sweets And Snacks III
19 = Sweets And Snacks IV
20 = Meat I
21 = Preserves I
22 = Infusions I
23 = Seafood I
24 = Books Pack I
25 = Books Pack II
26 = Alcoholic Drinks I
27 = Alcoholic Drinks II
28 = Alcoholic Drinks III
29 = Pharmacy I
30 = Pharmacy II
31 = Produce I
32 = Produce II
33 = Produce III
34 = Produce IV
35 = Child Care I
36 = Child Care II
37 = Soda Drinks II
38 = Soda Drinks III
39 = Sweets And Snacks V
40 = Sweets And Snacks VI
41 = Preserves II
42 = Gardening I
43 = Gardening II
44 = Gardening III
45 = Gardening IV
46 = Small Electronics I
47 = Small Electronics II


Example .json file for a new custom product:
[
  {
"Tier_ID": 1028,
"Tier_Name": "Baked Goods I",
"Tier_Requirement": 0,
"Blackboard_CategoryName": "Baked Goods",
"Blackboard_Color": "#F5E9AF",
"Product_ID": 1150,
"Product_Name": "Wheat Bread",
"Product_Brand": "Bakery Factory",
"Product_ContainerClass": 3,
"Product_maxItemsPerBox": 16,
"Product_isStackable": true,
"Product_basePricePerUnit": 3.80,
"Mesh_Name": "1028_1150_bread_wheat",
"Texture_Name": "1028_1150_bread_wheat",
"Sprite_Name": "1028_1150_bread_wheat_icon",
"Sprite_Tier_Name": "1028_Tier_icon",
"Hitbox_Width": 0,
"Hitbox_Height": 0,
"Hitbox_Depth": 0,
"Mesh_AutoSmooth": false
  }
]

Explain:
Tier_ID = the ID for your new Tier (a Tier can have more than 1 product btw)
Tier_Name = the name of the Tier
Tier_Requirement = what Tier ID it needs before it can be unlocked (you can even write here one of your Tier IDs)
Blackboard_CategoryName = the category name in the shopping list (Blackboard Manager)
Blackboard_Color = the color in the shopping list (Blackboard Manager) and for the boxes
Product_ID = the ID for your new product
Product_Name = the name of your new product
Product_Brand = the brand-name of your new product
Product_ContainerClass = in which shelf can it be placed
Product_maxItemsPerBox = how many products are in one box
Product_isStackable = true if it stackable, if not then false
Product_basePricePerUnit = the base-price of your product
Mesh_Name = the mesh (obj) name for your product
Texture_Name = the texture (png) name for your product
Sprite_Name = the icon (png) name for your product
Sprite_Tier_Name = the icon (png) name for your Tier
Hitbox_Width = the width of the product mesh (if you write 0 then the mod will write it automatically in the json for you)
Hitbox_Height  = the width of the product mesh (if you write 0 then the mod will write it automatically in the json for you)
Hitbox_Depth = the width of the product mesh (if you write 0 then the mod will write it automatically in the json for you)
Mesh_AutoSmooth = if your mesh not looking good, you can turn on Autosmooth (true). If not, then write false

Hitbox widht, height and depth are important because with that the game calculate how much product items can be placed in the shelf. If you want to place more and make the spaces between the product items narrower for example, then reduce the width value. Nothing is changed on the mesh itself! You just trick the game into thinking it's narrower/wider or shorter/longer

Because you dont know the widht, height and depth yes, you have to write 0. Then start the game (Main Menu) and close it again. The mod has now automatically updated your JSON file and added the values.
There's a help function in the game for fiddling with the values. Press F1, go to Custom Products and Hitbox Helper.





FAQ:

Does it work in multiplayer mode?
Yes. If the host has this mod, ALL clients must have the mod and download all the same products.
Note: Do not make your game public if you use this mod. It will cause errors for users without this mod.


I downloaded/created custom products and I want remove them. But I want to keep the mod/other products
Simply remove the specific product folder. The mod will automatically remove all references to this product from the savegame in-game


I used this mod with custom products and now I don't want the whole mod + custom products anymore.
But I want to keep my savegame and continue playing with the vanilla game.

The savegame must be cleaned up for this.
To do this, open the shaklin.CustomProducts.cfg (in Supermarket Together\BepInEx\config) and set this to true:
CLEAN SAVE MODE = true

Start the game, load your savegame that has the custom products, wait until you can move around in the game.
Then close the game. Remove the custom products mod + all products folders.
Also, delete the shaklin.CustomProducts.cfg.
Now start the game and see if the save works again.


I am a creator and I want to use multiple textures and also transparent ones. How?
Your mesh (obj) can have more than 1 groups.
Make sure to always load and save obj files with separate groups (unfortunately this is not activated by default in Blender).

When importing:


When exporting:


Here you can see again that the milkshake (included in shaklin_products.zip under optional Downloads) has 2 groups:

In the json file:
"Texture_Name": "1004_1013_Milkshake",

So we put for the first group a 1004_1013_Milkshake.png in our folder.
For a group2 1004_1013_Milkshake2.png, for a group3 1004_1013_Milkshake3.png and so on.

In our example the milkshake has only 2 groups, but the 2.group is transparent. To tell that to the mod we add _transparent at the end.
So in this example we have 2 png files in our folder:
1004_1013_Milkshake.png
1004_1013_Milkshake2_transparent.png


For transparent Textures are 4 variants:
_transparent (just transparent without any glow/shiny)
_transparentshiny (transparent with shiny)
_plastic
(plastic-like, alpha not adjustable)
_glass (glass-like, alpha not adjustable)



I am a creator and want to use normal maps etc for my products. How?
Put the textures in your folder and name them like the texture and add this after the name:
Normal Map: _n (for example mytexture_n.png or mytexture2_n.png)
MetallicGloss Map: _m
Occlusion Map: _o
Specular Map: _s
Emission Map: _e

And for the transparent texture (if needed):
Normal Map: _n (for example mytexture_transparent_n.png or mytexture2_transparent_n.png)
MetallicGloss Map: _transparent_m
Occlusion Map: _transparent_o
Specular Map: _transparent_s
Emission Map: _transparent_e

Note: Emission Map is for the glowing/Light. Use colors to glow it, and black for non-glowing parts.






Credits:
The mod uses Runtime OBJ Importer:
https://assetstore.unity.com/packages/tools/modeling/runtime-obj-importer-49547

Donuts 3D Meshes:
https://sketchfab.com/3d-models/lowpoly-doughnut-pack-9d31a8f686b44e968d3f1028c3a3fdc6

Purple Cat Model:
Karis
https://sketchfab.com/squgily3d

Milkshake:
https://sketchfab.com/3d-models/the-grimaces-birthday-milkshake-7e7121241b5d4c09b7ea2e29e4510996

Bakery Products collection
https://sketchfab.com/3d-models/bakery-products-collection-5cc69d0b0ae244b1a7c5b26dfc2ca721

Baguette Basket
https://sketchfab.com/3d-models/baguette-basket-227e1cfecce148318531bc1b157192d7

Game Ready Food Asset Pack
https://sketchfab.com/3d-models/game-ready-food-asset-pack-822fa185ff9d492ca5999dd4df18e0d0