Flatten resources to gfx and sfx folders

This commit is contained in:
shweet committed 2026-11-13 00:48:36 -05:00
1 parent fdfea89373
commit 4fac37b7f5
46 files changed
+25 -25

No files matched your search

+10 -10
View File
@@ -28,11 +28,11 @@ Know that despite Anm2Ed supporting sounds for animations, don't expect these to
# Resources # Resources
There's two folders inside resources; "characters" and "font". There's three folders inside resources; "characters", "common" and "font". Each character folder (and "common") holds its JSON files, a "gfx" folder with every graphic (anm2s and their spritesheets side by side) and an "sfx" folder with every sound. There are no deeper folders.
"font" holds the one font the whole game uses (Mali, under the SIL Open Font License; see its LICENSE.txt). "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`, 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/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/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). 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).
@@ -57,10 +57,10 @@ Some things aren't set in the data, they're always found at the same place or by
| What | Where | | What | Where |
|---|---| |---|---|
| The character's anm2 | `gfx/character/character.anm2` | | The character's anm2 | `gfx/character.anm2` |
| Select screen render and portrait | `gfx/preview/render.png` and `gfx/preview/portrait.png` (both optional) | | Select screen render and portrait | `gfx/render.png` and `gfx/portrait.png` (both optional) |
| The background | `gfx/areas/area.anm2`, with the world's bounds in its `Bounds` null and where items spawn in its `ItemSpawn` null | | The background | `gfx/area.anm2`, with the world's bounds in its `Bounds` null and where items spawn in its `ItemSpawn` null |
| The cursor | `gfx/cursor/cursor.anm2`, with the animations `Default`, `Click`, `Hover` (over an item), `Grab` (an item), `Pan` (with middle mouse), `Zoom` (with the mouse wheel) and `Dispose` (right clicking an item) | | The cursor | `gfx/cursor.anm2`, with the animations `Default`, `Click`, `Hover` (over an item), `Grab` (an item), `Pan` (with middle mouse), `Zoom` (with the mouse wheel) and `Dispose` (right clicking an item) |
| Stage names | Stages are named `Stage1`, `Stage2` and so on. Past the first, the stage's name is added to every animation's name, and each stage's "How are you feeling?" dialogue is the pool of its name. | | Stage names | Stages are named `Stage1`, `Stage2` and so on. Past the first, the stage's name is added to every animation's name, and each stage's "How are you feeling?" dialogue is the pool of its name. |
| Dialogue when over capacity | An interaction plays its pool with `Full` added (e.g. `BellyRubFull`) instead, if there is one. | | Dialogue when over capacity | An interaction plays its pool with `Full` added (e.g. `BellyRubFull`) instead, if there is one. |
@@ -160,7 +160,7 @@ The first expand area is treated as the belly: it breathes, jiggles when smacked
| `type` | string | (Areas only) The interaction type to use. | | `type` | string | (Areas only) The interaction type to use. |
| `null` | string | (Areas) The null in which the interact area can be triggered. | | `null` | string | (Areas) The null in which the interact area can be triggered. |
| `layer` | string | The layer that the scale effect (e.g. smacks) applies to. | | `layer` | string | The layer that the scale effect (e.g. smacks) applies to. |
| `icon` | string | The region of `gfx/ui/icons.anm2` shown on this type's taskbar button. | | `icon` | string | The region of `gfx/icons.anm2` shown on this type's taskbar button. |
| `isHold` | bool | If true, the interaction is held rather than clicked once. | | `isHold` | bool | If true, the interaction is held rather than clicked once. |
| `cursorHover` | string | The animation the cursor will play when hovering over the interact area. | | `cursorHover` | string | The animation the cursor will play when hovering over the interact area. |
| `cursorActive` | string | The animation the cursor will play when interacting. | | `cursorActive` | string | The animation the cursor will play when interacting. |
@@ -183,10 +183,10 @@ The first expand area is treated as the belly: it breathes, jiggles when smacked
| `gurgle` | Ambient sounds that play randomly based on capacity; see `gurgleChance`. | | `gurgle` | Ambient sounds that play randomly based on capacity; see `gurgleChance`. |
### area ### area
How items move in the background (`gfx/areas/area.anm2`): `gravity` (applied to items' velocities per tick), `friction` (applied when items are grounded or hit walls) and `airResistance`. How items move in the background (`gfx/area.anm2`): `gravity` (applied to items' velocities per tick), `friction` (applied when items are grounded or hit walls) and `airResistance`.
### cursor ### cursor
The cursor's sounds and particles. Its look is `gfx/cursor/cursor.anm2` (see "Fixed files and names"). The cursor's sounds and particles. Its look is `gfx/cursor.anm2` (see "Fixed files and names").
| Key | Meaning | | Key | Meaning |
|---|---| |---|---|
@@ -209,7 +209,7 @@ Has all items and their parameters, alongside additional behavior. Items share o
```json ```json
{ {
"anm2": "gfx/items/item.anm2", "anm2": "gfx/item.anm2",
"spawnDelay": 10, "spawnDelay": 10,
"rarities": {"Common": {"weight": 1, "sound": "sfx/common.ogg"}}, "rarities": {"Common": {"weight": 1, "sound": "sfx/common.ogg"}},
"items": [ "items": [
+1 -1
View File
@@ -62,4 +62,4 @@ See [MODDING.md](MODDING.md).
## License ## License
See [LICENSE](LICENSE). The taskbar icons are from [Tabler Icons](https://tabler.io/icons) (MIT), see `resources/common/gfx/ui/LICENSE.txt`. See [LICENSE](LICENSE). The taskbar icons are from [Tabler Icons](https://tabler.io/icons) (MIT), see `resources/common/gfx/icons_license.txt`.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 373 KiB

After

Width:  |  Height:  |  Size: 373 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"anm2": "gfx/items/item.anm2", "anm2": "gfx/item.anm2",
"spritesheet": 0, "spritesheet": 0,
"spawnDelay": 10, "spawnDelay": 10,
"spawnDelayMultiplier": 0.75, "spawnDelayMultiplier": 0.75,
File renamed without changes.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@@ -717,7 +717,7 @@
{"name": "ButtBack", "showRect": true} {"name": "ButtBack", "showRect": true}
], ],
"events": ["Eat", "Grow", "Groan"], "events": ["Eat", "Grow", "Groan"],
"sounds": ["../../sfx/eat1.ogg", "../../sfx/eat2.ogg", "../../sfx/eat3.ogg", "../../sfx/grow.ogg", "../../sfx/groan.ogg", "../../sfx/rip.ogg", "../../sfx/step.ogg", "../../sfx/step2.ogg", "../../sfx/rustle.ogg"], "sounds": ["../sfx/eat1.ogg", "../sfx/eat2.ogg", "../sfx/eat3.ogg", "../sfx/grow.ogg", "../sfx/groan.ogg", "../sfx/rip.ogg", "../sfx/step.ogg", "../sfx/step2.ogg", "../sfx/rustle.ogg"],
"defaultAnimation": "Neutral", "defaultAnimation": "Neutral",
"animations": { "animations": {
"Appear": { "Appear": {
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"anm2": "gfx/items/item.anm2", "anm2": "gfx/item.anm2",
"spritesheet": 0, "spritesheet": 0,
"spawnDelay": 10, "spawnDelay": 10,
"spawnDelayMultiplier": 0.75, "spawnDelayMultiplier": 0.75,
+1 -1
View File
@@ -7,7 +7,7 @@
"capacity": 300, "capacity": 300,
"overstuffedDigestBonus": 0.25, "overstuffedDigestBonus": 0.25,
"caloriesToKilogram": 0.0005, "caloriesToKilogram": 0.0005,
"alternate": {"texture": "gfx/character/snivy_alt.png", "sound": "sfx/shiny.ogg", "chance": 0.001}, "alternate": {"texture": "gfx/snivy_alt.png", "sound": "sfx/shiny.ogg", "chance": 0.001},
"stages": [10, 12.5, 17.5, 27.5, 40, 55, 75, 100, 130], "stages": [10, 12.5, 17.5, 27.5, 40, 55, 75, 100, 130],
"blink": {"destination": "Head"}, "blink": {"destination": "Head"},
"expandAreas": [{"layer": "Torso", "null": "Belly", "scaleMax": 7.5}, {"layer": "Tail", "null": "Tail", "scaleMax": 7.5}], "expandAreas": [{"layer": "Torso", "null": "Belly", "scaleMax": 7.5}, {"layer": "Tail", "null": "Tail", "scaleMax": 7.5}],
File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

@@ -1083,7 +1083,7 @@
{"name": "TailBack", "showRect": true} {"name": "TailBack", "showRect": true}
], ],
"events": ["Eat"], "events": ["Eat"],
"sounds": ["../../sfx/cry.ogg", "../../sfx/stage_up_start.ogg", "../../sfx/stage_up_end.ogg", "../../sfx/eat.ogg", "../../sfx/pat.ogg", "../../sfx/stomp.ogg", "../../sfx/muffled.ogg", "../../sfx/burp1.ogg", "../../sfx/burp2.ogg", "../../sfx/burp3.ogg"], "sounds": ["../sfx/cry.ogg", "../sfx/stage_up_start.ogg", "../sfx/stage_up_end.ogg", "../sfx/eat.ogg", "../sfx/pat.ogg", "../sfx/stomp.ogg", "../sfx/muffled.ogg", "../sfx/burp1.ogg", "../sfx/burp2.ogg", "../sfx/burp3.ogg"],
"defaultAnimation": "Neutral", "defaultAnimation": "Neutral",
"animations": { "animations": {
"Appear": { "Appear": {
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"anm2": "gfx/items/item.anm2", "anm2": "gfx/item.anm2",
"spritesheet": 0, "spritesheet": 0,
"spawnDelay": 10, "spawnDelay": 10,
"spawnDelayMultiplier": 0.75, "spawnDelayMultiplier": 0.75,
+2 -2
View File
@@ -56,8 +56,8 @@
} }
}, },
"particles": { "particles": {
"Circle": {"anm2": "gfx/particle/circle.anm2", "animation": "Main"}, "Circle": {"anm2": "gfx/circle.anm2", "animation": "Main"},
"Puff": {"anm2": "gfx/particle/puff.anm2", "animation": "Main"} "Puff": {"anm2": "gfx/puff.anm2", "animation": "Main"}
}, },
"area": {"gravity": 0.95, "friction": 0.75, "airResistance": 0.975} "area": {"gravity": 0.95, "friction": 0.75, "airResistance": 0.975}
} }
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

+4 -4
View File
@@ -1,12 +1,12 @@
#include "character.h" #include "character.h"
#include "json.h" #include "json.h"
constexpr const char* AREA_PATH = "gfx/areas/area.anm2"; constexpr const char* AREA_PATH = "gfx/area.anm2";
constexpr const char* BOUNDS_NULL = "Bounds"; constexpr const char* BOUNDS_NULL = "Bounds";
constexpr const char* CURSOR_PATH = "gfx/cursor/cursor.anm2"; constexpr const char* CURSOR_PATH = "gfx/cursor.anm2";
constexpr const char* DATA_FILE = "character.json"; constexpr const char* DATA_FILE = "character.json";
constexpr const char* PORTRAIT_PATH = "gfx/preview/portrait.png"; constexpr const char* PORTRAIT_PATH = "gfx/portrait.png";
constexpr const char* RENDER_PATH = "gfx/preview/render.png"; constexpr const char* RENDER_PATH = "gfx/render.png";
constexpr const char* SPAWN_NULL = "ItemSpawn"; constexpr const char* SPAWN_NULL = "ItemSpawn";
constexpr const char* STAGE_PREFIX = "Stage"; constexpr const char* STAGE_PREFIX = "Stage";
constexpr const char* TAG_NAMES[] = {"animation", "big", "color", "delay", "screenshake", constexpr const char* TAG_NAMES[] = {"animation", "big", "color", "delay", "screenshake",
+2 -2
View File
@@ -62,9 +62,9 @@ enum Hook
HOOK_COUNT HOOK_COUNT
}; };
constexpr const char* ANM2_PATH = "gfx/character/character.anm2"; constexpr const char* ANM2_PATH = "gfx/character.anm2";
constexpr const char* COMMON_FOLDER = "common/"; constexpr const char* COMMON_FOLDER = "common/";
constexpr const char* ICONS_PATH = "gfx/ui/icons.anm2"; constexpr const char* ICONS_PATH = "gfx/icons.anm2";
constexpr const char* CURSOR_ANIMATION_CLICK = "Click"; constexpr const char* CURSOR_ANIMATION_CLICK = "Click";
constexpr const char* CURSOR_ANIMATION_DISPOSE = "Dispose"; constexpr const char* CURSOR_ANIMATION_DISPOSE = "Dispose";
constexpr const char* CURSOR_ANIMATION_GRAB = "Grab"; constexpr const char* CURSOR_ANIMATION_GRAB = "Grab";