Drop character credits

This commit is contained in:
shweet committed 2026-11-13 00:15:18 -05:00
1 parent ee13be56d7
commit 518e2b3cc5
10 files changed
+13 -31

No files matched your search

+1 -2
View File
@@ -32,7 +32,7 @@ There's two folders inside resources; "characters" and "font".
"font" holds the one font the whole game uses (Mali, under the SIL Open Font License; see its LICENSE.txt).
"common" holds files characters share (sounds, particles, the cursor and so on). Whenever a character names a file, the game looks in the character's folder first, then in "common", so a character can use anything there as is, or replace it by having its own file at the same path. This includes the taskbar's icons, `gfx/ui/icons.anm2`: one region per icon, named after its button (`talk`, `mood`, `spawn`, `autofeed`, `home`, `stats`, `catalog`, `settings`, `cheats`, `help`, `credits`, plus whatever `icon`s the interaction types name). A character with its own `gfx/ui/icons.anm2` gets its own icons.
"common" holds files characters share (sounds, particles, the cursor and so on). Whenever a character names a file, the game looks in the character's folder first, then in "common", so a character can use anything there as is, or replace it by having its own file at the same path. This includes the taskbar's icons, `gfx/ui/icons.anm2`: one region per icon, named after its button (`talk`, `mood`, `spawn`, `autofeed`, `home`, `stats`, `catalog`, `settings`, `cheats`, `help`, plus whatever `icon`s the interaction types name). A character with its own `gfx/ui/icons.anm2` gets its own icons.
EVERYTHING ELSE is stored inside character folders in the "characters" folder; one folder per character, named however you like (the folder name is also the name of its save file). This has all data associated with characters. Think of characters more as tailored game experiences rather than literally being just the characters. Not only is there the character graphics, but backgrounds, items, parameters, etc. These are intensely customizable to suit whatever experience you'd like (within the confines of the engine, of course).
@@ -86,7 +86,6 @@ This is the main character file where much of the functionality is stored. It's
| `id` | string | What the character's save is named after. Defaults to the folder name; set it to keep the save when renaming the folder. |
| `name` | string | Name of the character; will appear in dialogue, stats, etc. Defaults to the folder name. |
| `description` | string | A general description of the character; will show in the Select screen. |
| `credits` | string | Credits text shown in the Select screen's Credits tab. |
| `color` | [r, g, b], 0-1 | UI accent color for the character. |
| `weight` | float, kg | The character's starting weight. |
| `weightMax` | float, kg | Maximum weight the character can reach. |
@@ -1,7 +1,6 @@
{
"name": "Braixen",
"description": "A fire-wielding, enigmatic Fox Pokémon. You're her apprentice!",
"credits": "Art, Animation, Dialogue: ShweetMagnet Sound Effects: Pokemon, skunkwhoplunks Commissioned by @FatGirIsHMU on Twitter",
"color": [0.901961, 0.156863, 0.160784],
"weight": 32,
"weightMax": 250,
-1
View File
@@ -1,7 +1,6 @@
{
"name": "Princess Mini",
"description": "A sprightly, pampered, petite princess. Don't call her \"Mint\"!",
"credits": "Art, Animation, Dialogue: ShweetMagnet Character: 2x/MerchantAnon Sound Effects: JC Sounds (CC-BY 4.0), artisticdude (CC0), Kronbits (CC0), Vehicle (CC0), pixabay.org, ShweetMagnet Font: DPComic",
"color": [0.188, 0.651, 0.424],
"weight": 40,
"weightMax": 100,
@@ -1,7 +1,6 @@
{
"name": "Snivy",
"description": "A Grass Snake Pokémon with rather large ambitions.",
"credits": "Art, Animation, Dialogue: ShweetMagnet Character - Pokémon Sound Effects - Pokémon; ShweetMagnet",
"color": [0.12, 0.515, 0.115],
"weight": 8.1,
"weightMax": 200,
+1 -2
View File
@@ -18,8 +18,7 @@
{"name": "settings", "crop": [195, 65], "size": [64, 64], "origin": "center"},
{"name": "help", "crop": [260, 65], "size": [64, 64], "origin": "center"},
{"name": "close", "crop": [325, 65], "size": [64, 64], "origin": "center"},
{"name": "cheats", "crop": [390, 65], "size": [64, 64], "origin": "center"},
{"name": "credits", "crop": [455, 65], "size": [64, 64], "origin": "center"}
{"name": "cheats", "crop": [390, 65], "size": [64, 64], "origin": "center"}
]
}
],
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

+1 -2
View File
@@ -84,7 +84,6 @@ void Character::preview_load(const std::string& path, Renderer& renderer)
id = json_string(root, "id", key);
name = json_string(root, "name", key);
description = json_string(root, "description");
credits = json_string(root, "credits");
color = json_color(root, "color", color);
traits.weight = json_float(root, "weight");
auto texture_get = [&](const char* relative) {
@@ -147,7 +146,7 @@ static void interact_parse(object source, InteractArea& area, Character& charact
static void character_parse(object root, Character& character, Renderer& renderer, Audio& audio)
{
json_keys_check(root,
{"id", "name", "description", "credits", "color", "weight", "weightMax", "capacity", "capacityMax",
{"id", "name", "description", "color", "weight", "weightMax", "capacity", "capacityMax",
"overstuffedMultiplier", "overstuffedDigestBonus", "caloriesToKilogram", "digestionRate",
"digestionRateMin", "digestionRateMax", "digestionTime", "blinkChance", "gurgleChance",
"gurgleCapacityMultiplier", "alternate", "stages", "animations", "talk", "blink", "eatAreas",
-1
View File
@@ -308,7 +308,6 @@ class Character
{
public:
std::array<Sounds, SOUND_COUNT> sounds;
std::string credits;
std::string description;
std::string folder;
std::string id;
+9 -19
View File
@@ -43,12 +43,12 @@ constexpr float TASKBAR_FIT = 0.8f;
constexpr int BUTTONS_FIXED = 9;
constexpr float INFO_GAP = 4;
constexpr int COOLDOWN_SEGMENTS = 48;
constexpr const char* PANEL_ICONS[] = {"", "stats", "catalog", "settings", "cheats", "credits"};
constexpr const char* PANEL_NAMES[] = {"", "Stats", "Catalog", "Settings", "Cheats", "Credits"};
constexpr const char* PANEL_ICONS[] = {"", "stats", "catalog", "settings", "cheats"};
constexpr const char* PANEL_NAMES[] = {"", "Stats", "Catalog", "Settings", "Cheats"};
constexpr float PREVIEW_FRACTION = 0.68f;
constexpr float PREVIEW_WIDTH = 760;
constexpr float SELECT_BUTTON_SIZE = 112;
constexpr int SELECT_BUTTONS_FIXED = 2;
constexpr int SELECT_BUTTONS_FIXED = 1;
constexpr float KG_TO_G = 1000;
constexpr float KG_TO_LB = 2.20462f;
constexpr float LB_TO_OZ = 16;
@@ -1049,6 +1049,8 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
{
Character& entry = characters[i];
ImGui::PushID(i);
if (i > 0)
ImGui::SameLine();
style_push(entry.color);
bool isCurrent = i == characterIndex;
if (isCurrent)
@@ -1065,18 +1067,13 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
ImGui::SetItemTooltip("%s", entry.name.c_str());
style_pop();
ImGui::PopID();
ImGui::SameLine();
}
ImGui::SameLine(0, style.ItemSpacing.x * INFO_GAP / 2);
float gap = style.ItemSpacing.x * (INFO_GAP + 1);
ImGui::SameLine(0, gap);
ImVec2 cursor = ImGui::GetCursorScreenPos();
ImGui::GetWindowDrawList()->AddLine({cursor.x, cursor.y}, {cursor.x, cursor.y + buttonSize},
cursor.x -= gap / 2;
ImGui::GetWindowDrawList()->AddLine(cursor, {cursor.x, cursor.y + buttonSize},
ImGui::GetColorU32(ImGuiCol_Separator));
ImGui::SameLine(0, style.ItemSpacing.x * INFO_GAP / 2);
ImGui::BeginDisabled(!selected);
if (icon_button("credits", "Credits", BUTTON_NORMAL))
panel = PANEL_CREDITS;
ImGui::EndDisabled();
ImGui::SameLine();
if (icon_button("settings", "Settings", BUTTON_NORMAL))
panel = PANEL_SETTINGS;
}
@@ -1181,13 +1178,6 @@ void Ui::select_update(std::vector<Character>& characters, Settings& settings)
if (window_begin(screen, height))
{
if (panel == PANEL_CREDITS && selected)
{
ImGui::PushStyleColor(ImGuiCol_Text, imvec4_get(GRAY));
ImGui::TextWrapped("%s", selected->credits.empty() ? "No credits listed." : selected->credits.c_str());
ImGui::PopStyleColor();
}
else
settings_draw(settings);
window_end();
}
+1 -2
View File
@@ -23,8 +23,7 @@ enum Panel
PANEL_STATS,
PANEL_CATALOG,
PANEL_SETTINGS,
PANEL_CHEATS,
PANEL_CREDITS
PANEL_CHEATS
};
enum ButtonState