-
Notifications
You must be signed in to change notification settings - Fork 0
Design Custom Cards
The whole design process is being done in the JSON notation. Every object like rectangle, text or image have their own special properties but the constructions is most likely the same.
There is a plan to create an graphical interface for creating and editing card designs but this is not a priority at the moment an will take some time. If it exists sometime in the future it will be based on the same .json formated designs.
Every card design needs 4 needed Parameters:
- setname
- width
- height
- body
These will be the basic parameter to generate any card. In the json file it'll look like this:
{
"setname": "Your Setname",
"width": 1200,
"height": 1800,
"body": []
}🔹 The width and height are defined in pixels.
The body is generated in the "body" parameter and is the very heart of each design. Yoshida is layer based so that objects that come first will be in the background. You append objects with dictionaries inside the array {}.
"body": [
{
"type": "rectangle"
},
{
"type": "text"
}
]In this example the text will be in the foreground because it is later defined as the rectangle.
An object in theory only needs the "type" parameter as seen in th upper example to function. In that case every other value will stay default which does not really make sense. You can look in the objects tab what objects exist and how to use them. To overwrite or change a parameter just add the parameter in the body objects.
Since the "logic" parameter does have some complexity look into the specified section.
The rest is just combine different objects and functions and create your card.
There are already a few examples in the card_design folder so do not hesitate to look into that. There will also be a example_objects card design which contains every currently available object type and should be updated with every new funtion or object.
Anything missing or inacurate? Please write an issue or contact me.