Advanced Modding Guide

Discussions about modding and share your mods with other players in this forum.
User avatar
Stylesjl
Mod Expert
Mod Expert
Posts: 889
Joined: Sun Oct 29, 2023 4:01 am
Location: Sydney, Australia
Has thanked: 63 times
Been thanked: 82 times

Advanced Modding Guide

Post by Stylesjl »

Hi, I have written an advanced guide to modding Capitalism Lab to supplement the main modding guide on the Capitalism Lab website: https://www.capitalismlab.com/mod/.

This is an advanced guide to modding Capitalism Lab – this PDF will provide extensive details into the inner workings of modding the game along with some advice on how to align your mod in game with your creative vision as a well as how to make it better for a general audience if you publish it. This guide is written in part due to the various different problems I found when I was creating my first mod (Magitek), and so I thought it might be worthwhile to mention these common pitfalls so that you don’t waste as much time.

This is not a gameplay guide nor is an attempt to get you to create any kind of specific mod. This is just a guide on how to make the process easier in general and saving you from a lot of unnecessary frustration and to also avoid many of the problems I commonly see in a lot of other mods.

The attached guide is over 50 pages long so I have broken it down into sections to make it easier to find what you are looking for:

- Mod Theme and Creative Process
- Mod Theme and Creative Process
- Basic things to check before starting
- Helpful tools
- How to create new assets
- Images
- Checklists for adding new assets
- Modifying existing assets
- How to Set Prices, Demand and Necessity Levels of Products
- Product R&D and Obsolesce
- Gameplay Balance
- Common Errors and other problems
- DLC Compatibility
- Testing your Mod
- Creative Ideas for a new Mod
- Publishing
- Updating your mod after publishing


If you see anything I have missed anything important or if I have any information in the guide wrong please let me know.
Attachments
Advanced Modding Guide.zip
(2.96 MiB) Downloaded 56 times
Last edited by Stylesjl on Sat Dec 28, 2024 9:12 am, edited 3 times in total.
alpha117
Mod Contributor
Mod Contributor
Posts: 219
Joined: Thu Apr 28, 2016 5:20 pm
Has thanked: 20 times
Been thanked: 3 times

Re: Advanced Modding Guide

Post by alpha117 »

Wow, what a guide...brilliant, as you might have gathered I'm new to the modding; which I'm liking the more I do.

OK, I've used your script 1, the only little thing ( using my COSTA Coffee ), is that the sea ports are not importing the raw materials for the coffee shop ( Coffee beans, milk, sugar and other materials for the likes of snacks), like in a 'normal game'. Is there a way of setting up what materials the sea ports import?

Thanks
User avatar
Stylesjl
Mod Expert
Mod Expert
Posts: 889
Joined: Sun Oct 29, 2023 4:01 am
Location: Sydney, Australia
Has thanked: 63 times
Been thanked: 82 times

Re: Advanced Modding Guide

Post by Stylesjl »

Yes you can do this by adding this line to MODNAME.txt:

Add Seaport Product=<Product Type>

This is detailed under the heading:
Building a MOD resource file

In here: https://www.capitalismlab.com/mod/how-to-make-a-mod/

That way you can always guarantee coffee beans or any other products via the seaport.
alpha117
Mod Contributor
Mod Contributor
Posts: 219
Joined: Thu Apr 28, 2016 5:20 pm
Has thanked: 20 times
Been thanked: 3 times

Re: Advanced Modding Guide

Post by alpha117 »

Ok, so far...attempting to add a new product (coffee)...keeping it simple to start....will use the same raw mats as other coffees

1. Got a new image and removed the background....from your Guide

Image

2. resize image to 120 * 120......place in images\products folder??

3. Add product data to Manufacturing and Product_Types DFB's

How does it link the product to the new image?

Is that all ?

Thanks
alpha117
Mod Contributor
Mod Contributor
Posts: 219
Joined: Thu Apr 28, 2016 5:20 pm
Has thanked: 20 times
Been thanked: 3 times

Re: Advanced Modding Guide

Post by alpha117 »

I've added to the txt file

Add Seaport Product=Coffee Beans
Add Seaport Product=Milk
Add Seaport Product=Sugar
Add Seaport Product=Paper

They all work apart from Coffee!! I've tried Coffee, Coffee Beans, CoffeeB......still now coffee in game. How do you find out the correct product name to use?

Sorry to be a pain!

Thanks
User avatar
David
Community and Marketing Manager at Enlight
Posts: 10423
Joined: Sat Jul 03, 2010 1:42 pm
Has thanked: 78 times
Been thanked: 224 times

Re: Advanced Modding Guide

Post by David »

Stylesjl wrote: Mon Dec 23, 2024 4:30 am Hi, I have written an advanced guide to modding Capitalism Lab to supplement the main modding guide on the Capitalism Lab website: https://www.capitalismlab.com/mod/.
This guide is incredibly comprehensive and insightful. It will be immensely helpful for CapLab modders. Thank you for the excellent work!

I've pinned this post and added your guide to the CapLab website:
https://www.capitalismlab.com/advanced-modding-guide/

Also added the link to this guide to the following Caplab webpages:
https://www.capitalismlab.com/mod/how-to-make-a-mod/
https://www.capitalismlab.com/mod/advanced-modding/
(you can see the link at the bottom of the webpages)

I've uploaded the PDF file to the CapLab CDN and linked to it. If you update the guide in the future, please let me know and I upload updated versions to the CDN.
alpha117
Mod Contributor
Mod Contributor
Posts: 219
Joined: Thu Apr 28, 2016 5:20 pm
Has thanked: 20 times
Been thanked: 3 times

Re: Advanced Modding Guide

Post by alpha117 »

Thanks to your guide!!

Finally a new coffee. Where do you put the 'small image' product file?
New to understand the finer point of a new products (the numbers in the DBF files :-)

Image
image upload site
User avatar
Stylesjl
Mod Expert
Mod Expert
Posts: 889
Joined: Sun Oct 29, 2023 4:01 am
Location: Sydney, Australia
Has thanked: 63 times
Been thanked: 82 times

Re: Advanced Modding Guide

Post by Stylesjl »

alpha117 wrote: Mon Dec 23, 2024 4:46 pm Thanks to your guide!!

Finally a new coffee. Where do you put the 'small image' product file?
New to understand the finer point of a new products (the numbers in the DBF files :-)

Image
image upload site
The small image is supposed to appear next to the product when listing out the factories:
SmallFactory.png
SmallFactory.png (274 KiB) Viewed 2630 times
The process for setting this up is here:
viewtopic.php?t=9811

This should probably be added to the main Capitalism Lab modding page as I can't find it anywhere on it. But basically this is the process to set it up:
David wrote: Sat Aug 24, 2024 8:41 amThis issue that the product icons on the map appear visually jarring will be resolved in the new version, which uses pre-made small versions of product images that were scaled using a graphic tool, resulting in a better appearance.

The current version's icons were scaled down in-game using a simple algorithm, which caused the visual jarring. To improve this, we will include a batch file called make_small_images.BAT in the MOD kit for version 11.0, located in the \MOD_kit\Images\Products folder. This file allows you to batch produce small images based on the standard images.

Here's what the make_small_images.BAT file looks like:

rem make smaller versions of the product images and save them in \small
rem smaller versions of the product images are displayed in various places in the game. For example, factories in the Firm Summary report showing the products they produce

rem you can download the magick app that this batch file runs from https://www.imagemagick.org/

del small\*.png

magick mogrify -format png -define png:color-type=2 -resize 40x40! -path small *.png
User avatar
Stylesjl
Mod Expert
Mod Expert
Posts: 889
Joined: Sun Oct 29, 2023 4:01 am
Location: Sydney, Australia
Has thanked: 63 times
Been thanked: 82 times

Re: Advanced Modding Guide

Post by Stylesjl »

David wrote: Mon Dec 23, 2024 1:49 pm
Stylesjl wrote: Mon Dec 23, 2024 4:30 am Hi, I have written an advanced guide to modding Capitalism Lab to supplement the main modding guide on the Capitalism Lab website: https://www.capitalismlab.com/mod/.
This guide is incredibly comprehensive and insightful. It will be immensely helpful for CapLab modders. Thank you for the excellent work!

I've pinned this post and added your guide to the CapLab website:
https://www.capitalismlab.com/advanced-modding-guide/

Also added the link to this guide to the following Caplab webpages:
https://www.capitalismlab.com/mod/how-to-make-a-mod/
https://www.capitalismlab.com/mod/advanced-modding/
(you can see the link at the bottom of the webpages)

I've uploaded the PDF file to the CapLab CDN and linked to it. If you update the guide in the future, please let me know and I upload updated versions to the CDN.
Thanks, I hope to be able to keep it up to date as the game keeps on changing over time.
alpha117
Mod Contributor
Mod Contributor
Posts: 219
Joined: Thu Apr 28, 2016 5:20 pm
Has thanked: 20 times
Been thanked: 3 times

Re: Advanced Modding Guide

Post by alpha117 »

Now have small images done!!

Thanks
Post Reply