-
Notifications
You must be signed in to change notification settings - Fork 3
Creating Capsian Packages
Packages have recently been added to Capsian. This allows anyone to build addons for Capsian, extend and implement new features, and more.
Of course, to create a package, you need to know how to do it. It is not, in fact, as simple as creating python files in the addons folder. You can do that, but it is not recommended.
The prefered way to build a package is, well, building a package. The process starts by creating a simple folder somewhere (Preferebly inside the folder in which main.py is stored in). Then, follow these steps:
- Create a
setup.json
file inside the new folder - Create an
src
folder inside the new folder - Open the
setup.json
file and paste this:
{
"name": "you package's name",
"capsian": "The capsian version for which you're developing (Like #2021.2.1)",
"version": "The package's version (Like 1.0.0)",
"description": [
"Write your description here",
"Every string is a line"
],
"files": [
"every string is a file. Do NOT include src\\ in the file paths!"
]
}
- Open
src
and write you code inside. You can use multiple files - Include all the files inside the JSON array 'files". Do NOT put src\ before the name, put just the file name
Packages are extremelly powerful. They are, in fact, just python code. Ideally, you would use these jsut to extend or implement new features, but you can do anything with it. A simple example would be an automatic window and camera creator: such a package would save you a couple of lines of code.
Keep in mind, this is not the definitive system, don't do big things with it if you don't want to risk losing it all. For now, jsut play with it 😂