fixed img-generate in the Patch and some other minor issue

This commit is contained in:
Faraphel 2022-07-05 22:34:10 +02:00
parent 90ab49aa29
commit ca833eca2a
29 changed files with 306 additions and 235 deletions

View file

@ -0,0 +1,3 @@
{
"mode": "ignore"
}

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View file

@ -0,0 +1,3 @@
{
"mode": "ignore"
}

View file

@ -2,19 +2,19 @@
"operation": {
"img-generate": {
"layers": [
{"type": "image", "path": "/specific/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "text_size": 0.04, "color": [100, 100, 100], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Elke track heeft een score tussen 1 en 5 sterren", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " speelbaar", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfect", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " klein probleem", "text_size": 0.045, "color": [255, 130, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " groot probleem", "text_size": 0.045, "color": [255, 50, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " alleen dolphin", "text_size": 0.045, "color": [70, 130, 255], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" betekent dat je constant zult zijn\nversnellen op deze baan", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "De auteur van het nummer wordt gecrediteerd\nterwijl de race presentatie", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Het spel van het originele nummer, indien\ngetoond met het voorvoegsel", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Alle scores zijn niet altijd correct, je kunt een bijdrage leveren aan", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "de mod door je mening te geven over de discord : https://discord.gg/C66cfHBb7S", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"}
{"type": "image", "image_path": "files/Boot/Strap/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "font_size": 0.04, "color": [100, 100, 100], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Elke track heeft een score tussen 1 en 5 sterren", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " speelbaar", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfect", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " klein probleem", "font_size": 0.045, "color": [255, 130, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " groot probleem", "font_size": 0.045, "color": [255, 50, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " alleen dolphin", "font_size": 0.045, "color": [70, 130, 255], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" betekent dat je constant zult zijn\nversnellen op deze baan", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "De auteur van het nummer wordt gecrediteerd\nterwijl de race presentatie", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Het spel van het originele nummer, indien\ngetoond met het voorvoegsel", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Alle scores zijn niet altijd correct, je kunt een bijdrage leveren aan", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "de mod door je mening te geven over de discord : https://discord.gg/C66cfHBb7S", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"}
]
}
}

View file

@ -2,19 +2,19 @@
"operation": {
"img-generate": {
"layers": [
{"type": "image", "path": "/specific/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "text_size": 0.04, "color": [100, 100, 100], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Every track has a score between 1 and 5 stars", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " playable", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfect", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " minor issue", "text_size": 0.045, "color": [255, 130, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " major issue", "text_size": 0.045, "color": [255, 50, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " dolphin only", "text_size": 0.045, "color": [70, 130, 255], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" mean that you will be constantly\nbe accelerating on this track", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "The track's author is credited while\nthe track presentation", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "The original track's game if shown\nwith the prefix", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "All score are not always correct, you can contribute to", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "the mod by giving your opinion on the discord : https://discord.gg/C66cfHBb7S", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"}
{"type": "image", "image_path": "files/Boot/Strap/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "font_size": 0.04, "color": [100, 100, 100], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Every track has a score between 1 and 5 stars", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " playable", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfect", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " minor issue", "font_size": 0.045, "color": [255, 130, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " major issue", "font_size": 0.045, "color": [255, 50, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " dolphin only", "font_size": 0.045, "color": [70, 130, 255], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" mean that you will be constantly\nbe accelerating on this track", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "The track's author is credited while\nthe track presentation", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "The original track's game if shown\nwith the prefix", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "All score are not always correct, you can contribute to", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "the mod by giving your opinion on the discord : https://discord.gg/C66cfHBb7S", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"}
]
}
}

View file

@ -2,19 +2,19 @@
"operation": {
"img-generate": {
"layers": [
{"type": "image", "path": "/specific/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "text_size": 0.04, "color": [100, 100, 100], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Cada pista tiene una puntuación entre 1 y 5 estrellas", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " interpretable", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfecto", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " problema menor", "text_size": 0.045, "color": [255, 130, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " problema mayor", "text_size": 0.045, "color": [255, 50, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " solo dolphin", "text_size": 0.045, "color": [70, 130, 255], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" significa que estarás constantemente\nestar acelerando en esta pista", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "El autor de la pista es acreditado\nmientras presentación de la pista", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "El juego de la pista original\nsi se muestra con el prefijo", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Todos los puntajes no siempre son correctos, puedes contribuir a", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "el mod dando tu opinion en el discord : https://discord.gg/C66cfHBb7S", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"}
{"type": "image", "image_path": "files/Boot/Strap/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "font_size": 0.04, "color": [100, 100, 100], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Cada pista tiene una puntuación entre 1 y 5 estrellas", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " interpretable", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfecto", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " problema menor", "font_size": 0.045, "color": [255, 130, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " problema mayor", "font_size": 0.045, "color": [255, 50, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " solo dolphin", "font_size": 0.045, "color": [70, 130, 255], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" significa que estarás constantemente\nestar acelerando en esta pista", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "El autor de la pista es acreditado\nmientras presentación de la pista", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "El juego de la pista original\nsi se muestra con el prefijo", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Todos los puntajes no siempre son correctos, puedes contribuir a", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "el mod dando tu opinion en el discord : https://discord.gg/C66cfHBb7S", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"}
]
}
}

View file

@ -2,19 +2,19 @@
"operation": {
"img-generate": {
"layers": [
{"type": "image", "path": "/specific/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "text_size": 0.04, "color": [100, 100, 100], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Chaque course possède une note allant de 1 à 5 étoiles", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " jouable", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " parfait", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " problème mineur", "text_size": 0.045, "color": [255, 130, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " problème majeur", "text_size": 0.045, "color": [255, 50, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " seulement dolphin", "text_size": 0.045, "color": [70, 130, 255], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" indique que vous serez constamment\nen accélération sur cette course", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "L'auteur de la course est affiché lors\nde la présentation de la course", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Le jeu originel de la course est affiché\nen préfix", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Les notes ne sont pas toujours exactes, vous pouvez contribuer", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "au mod en donnant votre avi sur le discord : https://discord.gg/C66cfHBb7S", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"}
{"type": "image", "image_path": "files/Boot/Strap/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "font_size": 0.04, "color": [100, 100, 100], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Chaque course possède une note allant de 1 à 5 étoiles", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " jouable", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " parfait", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " problème mineur", "font_size": 0.045, "color": [255, 130, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " problème majeur", "font_size": 0.045, "color": [255, 50, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " seulement dolphin", "font_size": 0.045, "color": [70, 130, 255], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" indique que vous serez constamment\nen accélération sur cette course", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "L'auteur de la course est affiché lors\nde la présentation de la course", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Le jeu originel de la course est affiché\nen préfix", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Les notes ne sont pas toujours exactes, vous pouvez contribuer", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "au mod en donnant votre avi sur le discord : https://discord.gg/C66cfHBb7S", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"}
]
}
}

View file

@ -2,19 +2,19 @@
"operation": {
"img-generate": {
"layers": [
{"type": "image", "path": "/specific/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "text_size": 0.04, "color": [100, 100, 100], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Jeder track hat eine Punktzahl zwischen 1 und 5 sternen", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " spielbar", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfekt", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " kleines problem", "text_size": 0.045, "color": [255, 130, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " hauptproblem", "text_size": 0.045, "color": [255, 50, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " nur dolphin", "text_size": 0.045, "color": [70, 130, 255], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" bedeutet, dass Sie ständig sein\nwerden auf dieser track beschleunigen", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "Der Autor des Titels wird dabei\ngenannt die Track-Präsentation", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Das Spiel des Originaltracks, falls\nangezeigt mit dem Präfix", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Alle Punktzahlen sind nicht immer korrekt, Sie können zum Mod beitragen,", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "indem Sie Ihre Meinung zum Discord äußern : https://discord.gg/C66cfHBb7S", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"}
{"type": "image", "image_path": "files/Boot/Strap/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "font_size": 0.04, "color": [100, 100, 100], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Jeder track hat eine Punktzahl zwischen 1 und 5 sternen", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " spielbar", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfekt", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " kleines problem", "font_size": 0.045, "color": [255, 130, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " hauptproblem", "font_size": 0.045, "color": [255, 50, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " nur dolphin", "font_size": 0.045, "color": [70, 130, 255], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" bedeutet, dass Sie ständig sein\nwerden auf dieser track beschleunigen", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "Der Autor des Titels wird dabei\ngenannt die Track-Präsentation", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Das Spiel des Originaltracks, falls\nangezeigt mit dem Präfix", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Alle Punktzahlen sind nicht immer korrekt, Sie können zum Mod beitragen,", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "indem Sie Ihre Meinung zum Discord äußern : https://discord.gg/C66cfHBb7S", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"}
]
}
}

View file

@ -2,19 +2,19 @@
"operation": {
"img-generate": {
"layers": [
{"type": "image", "path": "/specific/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "text_size": 0.04, "color": [100, 100, 100], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Ogni traccia ha un punteggio compreso tra 1 e 5 stelle", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " giocabile", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfetto", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " problema minore", "text_size": 0.045, "color": [255, 130, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " problema serio", "text_size": 0.045, "color": [255, 50, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " solo dolphin", "text_size": 0.045, "color": [70, 130, 255], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" significa che sarai costantemente\naccelerare su questa pista", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "L'autore della traccia è accreditato\nmentre la presentazione del brano", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Il gioco della traccia originale se\nmostrato con il prefisso", "text_size": 0.045, "color": [255, 180, 0], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Tutti i punteggi non sono sempre corretti, puoi contribuire a", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "la mod dando la tua opinione sulla discordia : https://discord.gg/C66cfHBb7S", "text_size": 0.04, "color": [128, 128, 128], "font_path": "/specific/CenturyGothicBold.ttf"}
{"type": "image", "image_path": "files/Boot/Strap/bootscreen-base.png"},
{"type": "text", "x": 0.01, "y": 0.00, "text": "Mario Kart Wii - Faraphel", "font_size": 0.04, "color": [100, 100, 100], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.10, "y": 0.06, "text": "Ogni traccia ha un punteggio compreso tra 1 e 5 stelle", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.12, "text": " giocabile", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.35, "y": 0.12, "text": " perfetto", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.18, "text": " problema minore", "font_size": 0.045, "color": [255, 130, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.18, "text": " problema serio", "font_size": 0.045, "color": [255, 50, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.17, "y": 0.24, "text": " solo dolphin", "font_size": 0.045, "color": [70, 130, 255], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.25, "text": "\"Boost\" significa che sarai costantemente\naccelerare su questa pista", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.40, "text": "L'autore della traccia è accreditato\nmentre la presentazione del brano", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.45, "y": 0.67, "text": "Il gioco della traccia originale se\nmostrato con il prefisso", "font_size": 0.045, "color": [255, 180, 0], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.88, "text": "Tutti i punteggi non sono sempre corretti, puoi contribuire a", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"},
{"type": "text", "x": 0.02, "y": 0.93, "text": "la mod dando la tua opinione sulla discordia : https://discord.gg/C66cfHBb7S", "font_size": 0.04, "color": [128, 128, 128], "font_path": "files/Boot/Strap/CenturyGothicBold.ttf"}
]
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB565"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,6 +1,6 @@
{
"operation": {
"tpl-encode": {
"img-encode": {
"encoding": "TPL.RGB5A3"
}
}

View file

@ -1,7 +1,7 @@
{
"mode": "edit",
"operation": {
"bmg-replace": {
"bmg-edit": {
"mode": "id",
"data": {
"0x703e": "\\c{white}Random: All tracks",

View file

@ -1,7 +1,7 @@
{
"mode": "edit",
"operation": {
"bmg-replace": {
"bmg-edit": {
"mode": "id",
"data": {
"0x703e": "\\c{white}Aleatorio: Todas las pistas",

View file

@ -1,7 +1,7 @@
{
"mode": "edit",
"operation": {
"bmg-replace": {
"bmg-edit": {
"mode": "id",
"data": {
"0x703e": "\\c{white}Aléatoire: Toutes les pistes",

View file

@ -1,7 +1,7 @@
{
"mode": "edit",
"operation": {
"bmg-replace": {
"bmg-edit": {
"mode": "id",
"data": {
"0x703e": "\\c{white}Zufällig: Alle Tracks",

View file

@ -1,7 +1,7 @@
{
"mode": "edit",
"operation": {
"bmg-replace": {
"bmg-edit": {
"mode": "id",
"data": {
"0x703e": "\\c{white}Casuale: Tutte le tracce",

View file

@ -47,6 +47,9 @@ class PatchDirectory(PatchObject):
if game_subfile.suffix == ".szs": game_subfile = game_subfile.with_suffix(".d")
yield from subpatch.install(extracted_game, game_subfile / subpatch.full_path.name)
# ignore if mode is "ignore", useful if the file is used as a resource for an operation
case "ignore": pass
# else raise an error
case _:
raise InvalidPatchMode(self.configuration["mode"])

View file

@ -56,7 +56,7 @@ class PatchFile(PatchObject):
for operation_name, operation in self.configuration.get("operation", {}).items():
# process every operation and get the new patch_path (if the name is changed)
# and the new content of the patch
patch_name, patch_content = PatchOperation.Operation(operation_name)(**operation).patch(
patch_name, patch_content = PatchOperation(operation_name)(**operation).patch(
self.patch, patch_name, patch_content
)
@ -84,6 +84,9 @@ class PatchFile(PatchObject):
patch_content.seek(0)
file.write(patch_content.read())
# ignore if mode is "ignore", useful if the file is used as a resource for an operation
case "ignore": pass
# else raise an error
case _:
raise InvalidPatchMode(self.configuration["mode"])

View file

@ -56,7 +56,7 @@ class PatchObject(ABC):
from source.mkw.Patch.PatchDirectory import PatchDirectory
from source.mkw.Patch.PatchFile import PatchFile
obj = PatchDirectory.Patch if path.is_dir() else PatchFile
obj = PatchDirectory if path.is_dir() else PatchFile
return obj(self.patch, str(path.relative_to(self.patch.path)))
@abstractmethod

View file

@ -5,28 +5,30 @@ from typing import IO
from PIL import Image, ImageDraw, ImageFont
from source.mkw.Patch import *
from source.wt.img import IMGPath
class PatchOperation:
"""
Represent an operation that can be applied onto a patch to modify it before installing
"""
class Operation(ABC):
@abstractmethod
def patch(self, patch: "Patch", file_name: str, file_content: IO) -> (str, IO):
"""
patch a file and return the new file_path (if changed) and the new content of the file
"""
def __new__(cls, name) -> "Operation":
"""
Return an operation from its name
:return: an Operation from its name
"""
for subclass in filter(lambda subclass: subclass.type == name, cls.__subclasses__()):
for subclass in filter(lambda subclass: subclass.type == name, cls.Operation.__subclasses__()):
return subclass
raise InvalidPatchOperation(name)
class Operation(ABC):
@abstractmethod
def patch(self, patch: "Patch", file_name: str, file_content: IO) -> (str, IO):
"""
patch a file and return the new file_path (if changed) and the new content of the file
"""
class ImageGenerator(Operation):
"""
generate a new image based on a file and apply a generator on it
@ -49,9 +51,9 @@ class PatchOperation:
return file_name, patch_content
class Layer(ABC):
class Layer:
"""
represent a layer for a image generator
represent a layer for an image generator
"""
def __new__(cls, layer: dict) -> "Layer":
@ -59,11 +61,13 @@ class PatchOperation:
return the correct type of layer corresponding to the layer mode
:param layer: the layer to load
"""
for subclass in filter(lambda subclass: subclass.type == layer["type"], cls.__subclasses__()):
for subclass in filter(lambda subclass: subclass.type == layer["type"],
cls.AbstractLayer.__subclasses__()):
layer.pop("type")
return subclass(**layer)
raise InvalidImageLayerType(layer["type"])
class AbstractLayer(ABC):
def get_bbox(self, image: Image.Image) -> tuple:
"""
return a tuple of a bbox from x1, x2, y1, y2
@ -107,13 +111,14 @@ class PatchOperation:
Patch an image with the actual layer. Return the new image.
"""
class ColorLayer(Layer):
class ColorLayer(AbstractLayer):
"""
Represent a layer that fill a rectangle with a certain color on the image
"""
type = "color"
def __init__(self, color: tuple[int] = (0,), x1: int | float = 0, y1: int | float = 0, x2: int | float = 1,
def __init__(self, color: tuple[int] = (0,), x1: int | float = 0, y1: int | float = 0,
x2: int | float = 1,
y2: int | float = 1):
self.x1: int = x1
self.y1: int = y1
@ -127,7 +132,7 @@ class PatchOperation:
return image
class ImageLayer(Layer):
class ImageLayer(AbstractLayer):
"""
Represent a layer that paste an image on the image
"""
@ -144,7 +149,8 @@ class PatchOperation:
def patch_image(self, patch: "Patch", image: Image.Image) -> Image.Image:
# check if the path is outside of the allowed directory
layer_image_path = patch.path / self.image_path
if not layer_image_path.is_relative_to(patch.path): raise PathOutsidePatch(layer_image_path, patch.path)
if not layer_image_path.is_relative_to(patch.path):
raise PathOutsidePatch(layer_image_path, patch.path)
layer_image = Image.open(layer_image_path).resize(self.get_bbox_size(image)).convert("RGBA")
@ -156,13 +162,14 @@ class PatchOperation:
return image
class TextLayer(Layer):
class TextLayer(AbstractLayer):
"""
Represent a layer that write a text on the image
"""
type = "text"
def __init__(self, text: str, font_path: str | None = None, font_size: int = 10, color: tuple[int] = (255,),
def __init__(self, text: str, font_path: str | None = None, font_size: int = 10,
color: tuple[int] = (255,),
x: int | float = 0, y: int | float = 0):
self.x: int = x
self.y: int = y
@ -181,30 +188,64 @@ class PatchOperation:
else:
font_image_path = None
font = ImageFont.truetype(font=font_image_path, size=self.get_font_size(image))
font = ImageFont.truetype(
font=str(font_image_path.resolve())
if isinstance(font_image_path, Path) else
font_image_path,
size=self.get_font_size(image)
)
draw.text(self.get_layer_position(image), text=self.text, fill=self.color, font=font)
return image
class TplConverter(Operation):
class ImageEncoder(Operation):
"""
convert an image to a tpl file
encode an image to a game image file
"""
type = "tpl-encode"
type = "img-encode"
def __init__(self, *args, **kwargs):
print(args, kwargs)
def __init__(self, encoding: str = "CMPR"):
"""
:param encoding: compression of the image
"""
self.encoding: str = encoding
def patch(self, patch: "Patch", file_name: str, file_content: IO) -> (str, IO):
return file_name, file_content
"""
Patch a file to encode it in a game image file
:param patch: the patch that is applied
:param file_name: the file_name of the file
:param file_content: the content of the file
:return: the new name and new content of the file
"""
# remove the last extension of the filename
patched_file_name = file_name.rsplit(".", 1)[0]
patch_content = BytesIO()
# write the image to a temporary directory
tmp_file = Path(f"./.tmp/{file_name}")
tmp_file.parent.mkdir(parents=True, exist_ok=True)
file_content.seek(0)
tmp_file.write_bytes(file_content.read())
# write the encoded image into the file
patch_content.write(
IMGPath(tmp_file).get_encoded_data(self.encoding)
)
# delete the temporary directory when finished
tmp_file.unlink()
patch_content.seek(0)
return patched_file_name, patch_content
class BmgEditor(Operation):
"""
edit a bmg
"""
type = "bmg-replace"
type = "bmg-edit"
def __init__(self, *args, **kwargs):
print(args, kwargs)

View file

@ -20,26 +20,11 @@ class InvalidImageLayerType(Exception):
def __init__(self, layer_type: str):
super().__init__(f"Error : layer type \"{layer_type}\" is not implemented")
# TODO : extract SZS
# TODO : implement TPL
# TODO : implement BMG
# TODO : recreate SZS
configuration_example = {
"operation": { # other operation for the file
"tpl-encode": {"encoding": "TPL.RGB565"}, # encode an image to a tpl with the given format
"bmg-replace": {
"mode": "regex", # regex or id
"template": {

View file

@ -0,0 +1,33 @@
from source.wt import *
from source.wt import _run
tools_path = tools_szs_dir / ("wimgt.exe" if system == "win64" else "wimgt")
@better_wt_error(tools_path)
class IMGPath:
"""
Represent a path to an image
"""
__slots__ = ("path", )
def __init__(self, path: Path | str):
self.path: Path = Path(path)
@better_wt_error(tools_path)
def _run(self, *args) -> bytes:
"""
Return a command with wszst and return the output
:param args: command arguments
:return: the output of the command
"""
return _run(tools_path, *args)
def get_encoded_data(self, transform: str = "CMPR") -> bytes:
"""
Convert the image return the encoded image data
:transform: the type of the image encoding
:return: the data of the encoded image
"""
# using "-" for destination allow for output in the stdout
return self._run("ENCODE", self.path, "--transform", transform, "--DEST", "-")