Shared character defaults, fixed paths and names, one global font
This commit is contained in:
1 parent
4962eac7a8
commit
7dbb4cc154
22 files changed
+434
-567
No files matched your search
+35
-44
@@ -14,13 +14,13 @@ If you'd like a quick primer on how to use the editor, check either of [these](h
|
||||
|
||||
The game plays spritesheets, regions, layers, nulls, layer groups, events, trigger sounds, and the position, crop, pivot, scale, rotation, tint, color offset, visibility and easing of keyframes. It doesn't play skew, depth, blur, custom shaders or animation layers. Animation groups (the editor's folders) are fine; the game just looks animations up by name, so keep those unique.
|
||||
|
||||
Stage-specific character animations are controlled by `animationSuffix` on each stage in `character.json`. The base stage uses no suffix. Later stages append that stage's suffix.
|
||||
Stage-specific character animations end with the stage's name. The first stage uses no ending.
|
||||
|
||||
Example:
|
||||
|
||||
- stage 1: `Look`
|
||||
- stage 2 with `"animationSuffix": "Stage2"`: `LookStage2`
|
||||
- stage 5 with `"animationSuffix": "Stage5"`: `LookStage5`
|
||||
- stage 2: `LookStage2`
|
||||
- stage 5: `LookStage5`
|
||||
|
||||
Animation names in the JSON files should still use just the base name like `Look`, `Neutral`, or `Eat`. The game appends the current stage's suffix automatically.
|
||||
|
||||
@@ -30,7 +30,7 @@ Know that despite Anm2Ed supporting sounds for animations, don't expect these to
|
||||
|
||||
There's two folders inside resources; "characters" and "font".
|
||||
|
||||
"font" is just a font containing the font used in the selection screen. That's literally it.
|
||||
"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.
|
||||
|
||||
@@ -50,20 +50,34 @@ Wherever sounds are listed, one is picked at random each time. A list can also b
|
||||
|
||||
Times are in seconds and chances in percent. The game warns (in its log) about keys it doesn't know, which are usually typos, and files it can't find.
|
||||
|
||||
If you're making your own character, your best bet would probably be just to copy the Snivy character and edit it based on your needs, just as a helpful start.
|
||||
If you're making your own character, your best bet would probably be just to copy the Mini character and edit it based on your needs, just as a helpful start.
|
||||
|
||||
## Fixed files and names
|
||||
Some things aren't set in the data, they're always found at the same place or by the same name:
|
||||
|
||||
| What | Where |
|
||||
|---|---|
|
||||
| The character's anm2 | `gfx/character/character.anm2` |
|
||||
| Select screen render and portrait | `gfx/preview/render.png` and `gfx/preview/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 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) |
|
||||
| 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. |
|
||||
|
||||
# character.json
|
||||
|
||||
This is the main character file where much of the functionality is stored.
|
||||
This is the main character file where much of the functionality is stored. It's read over `common/character.json`, which holds the defaults (the body's numbers, sounds, particles, the interaction types and so on), so a character only writes what it changes. Objects merge key by key (e.g. `"blink": {"destination": "Head"}` keeps the default `source`, and `"interactTypes": {"Smack": {"scaleAmplitude": 5}}` keeps the rest of Smack), while lists are replaced whole.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Snivy",
|
||||
"anm2": "gfx/character/snivy.anm2",
|
||||
"weight": 8.1,
|
||||
"stages": [{"weight": 10, "dialoguePool": "Stage2", "animationSuffix": "Stage2"}],
|
||||
"animations": {"start": "Appear", "idle": "Neutral", "idleFull": "NeutralFull", "stageUp": "StageUp"},
|
||||
"sounds": {"digest": ["sfx/digest1.ogg"], "gurgle": ["sfx/gurgle1.ogg", "sfx/gurgle2.ogg"]}
|
||||
"name": "Princess Mini",
|
||||
"color": [0.188, 0.651, 0.424],
|
||||
"weight": 40,
|
||||
"weightMax": 100,
|
||||
"capacity": 1250,
|
||||
"stages": [45, 60, 70, 90],
|
||||
"expandAreas": [{"layer": "Torso", "null": "Belly", "scaleMax": 2.5}],
|
||||
"interactAreas": [{"type": "Rub", "null": "Head", "dialoguePool": "HeadRub"}]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -73,14 +87,11 @@ This is the main character file where much of the functionality is stored.
|
||||
| `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. |
|
||||
| `render` | path | Texture for the character's "render" (i.e., a typical full-body display), will show in the Select screen. |
|
||||
| `portrait` | path | Texture for the character's "portrait" (i.e., a cropped profile view), will show in the Select screen. |
|
||||
| `anm2` | path | The character's anm2 file; should have all the character's animations. |
|
||||
| `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. |
|
||||
| `capacity` | float, kcal | The character's starting capacity. |
|
||||
| `capacityMin`, `capacityMax` | float, kcal | The range capacity stays within. |
|
||||
| `capacity` | float, kcal | The character's starting capacity, and the least it can go down to. |
|
||||
| `capacityMax` | float, kcal | The most capacity can grow to. |
|
||||
| `overstuffedMultiplier` | float | The character can eat past capacity up to capacity times this. |
|
||||
| `overstuffedDigestBonus` | float | Additional capacity gained on digest when the character was over capacity (scaled by how far over). |
|
||||
| `caloriesToKilogram` | float | How many kilograms each calorie digested becomes. |
|
||||
@@ -90,7 +101,6 @@ This is the main character file where much of the functionality is stored.
|
||||
| `blinkChance` | float, % | Chance each tick to blink. |
|
||||
| `gurgleChance` | float, % | Chance each tick of a gurgle (see `sounds`), scaled by how full the character is. |
|
||||
| `gurgleCapacityMultiplier` | float | Multiplies the gurgle chance at full capacity. Higher capacity = higher gurgle chance. |
|
||||
| `dialoguePool` | string | The character's base dialogue pool for "How are you feeling?". This is effectively "Stage 1"'s dialogue; each stage should have its own dialogue pool. |
|
||||
|
||||
### alternate
|
||||
The alternate spritesheet of the character, if applicable (in Pokemon terms, the "shiny").
|
||||
@@ -103,14 +113,7 @@ The alternate spritesheet of the character, if applicable (in Pokemon terms, the
|
||||
| `chance` | float, % | Chance of rolling the alternate spritesheet when starting a new game. |
|
||||
|
||||
### stages
|
||||
A "stage" represents each visual change of the character as the weight increases. By default, there's always one stage; each entry in this list adds another.
|
||||
|
||||
| Key | Type | Meaning |
|
||||
|---|---|---|
|
||||
| `weight` | float, kg | The weight threshold to reach this stage. |
|
||||
| `dialoguePool` | string | The stage's dialogue pool for "How are you feeling?". |
|
||||
| `animationSuffix` | string | Suffix appended to base animation names while this stage is active. Usually `Stage2`, `Stage3`, etc. |
|
||||
| `area` | int | Switches to this area (from `areas.list`) from this stage on. |
|
||||
A "stage" represents each visual change of the character as the weight increases. There's always a first stage (`Stage1`). This is a list of the weights (in kg) at which each stage after it (`Stage2`, `Stage3`...) is reached.
|
||||
|
||||
### animations
|
||||
The character's animations. Know that a lot of character animations are typically easily played through dialogue; this is just for animations that aren't reliant on that system. These are just the base names.
|
||||
@@ -149,7 +152,7 @@ The areas which will expand based on how full the character is and their progres
|
||||
| `scaleMax` | The scale (in percent) that will be added at maximum. Know that a scale of 100 is the normal scale of an animation. |
|
||||
|
||||
### interactTypes, interactAreas
|
||||
`interactTypes` is an object of interaction types by name (each gets a button on the taskbar), giving each type's defaults. `interactAreas` is a list of the concrete areas on a character which can be interacted with; usually for belly rubs, kisses, etc. Each area names its `type` and takes all of that type's settings, changing whichever it gives itself.
|
||||
`interactTypes` is an object of interaction types by name, giving each type's defaults. Rub, Smack, Kiss and Turn Around come from common. A type gets a button on the taskbar only if one of the character's areas uses it. `interactAreas` is a list of the concrete areas on a character which can be interacted with; usually for belly rubs, kisses, etc. Each area names its `type` and takes all of that type's settings, changing whichever it gives itself.
|
||||
|
||||
| Key | Type | Meaning |
|
||||
|---|---|---|
|
||||
@@ -162,8 +165,7 @@ The areas which will expand based on how full the character is and their progres
|
||||
| `cursorActive` | string | The animation the cursor will play when interacting. |
|
||||
| `animation` | string | A character animation to play on interacting, when the area has no dialogue pool. |
|
||||
| `idleOnEnd` | string | The idle animation the character uses after interacting (e.g. turning around). |
|
||||
| `dialoguePool` | string | The dialogue pool which will be drawn from when interacting. |
|
||||
| `dialoguePoolFull` | string | Dialogue pool used when the character is over capacity. |
|
||||
| `dialoguePool` | string | The dialogue pool which will be drawn from when interacting. Over capacity, the same pool with `Full` added is used, if there is one. |
|
||||
| `dialogueCooldown` | float, seconds | Time before interacting can start new dialogue again. |
|
||||
| `digestionClick` | float, % | Digestion added each click. |
|
||||
| `digestionHover` | float, %/second | Digestion added while the cursor moves, held. |
|
||||
@@ -179,33 +181,22 @@ The areas which will expand based on how full the character is and their progres
|
||||
| `digest` | Plays when the character begins digesting (digestion bar full). |
|
||||
| `gurgle` | Ambient sounds that play randomly based on capacity; see `gurgleChance`. |
|
||||
|
||||
### areas
|
||||
"Areas" refers to the backgrounds of the game. Stages can switch between them (see `stages`).
|
||||
|
||||
| Key | Type | Meaning |
|
||||
|---|---|---|
|
||||
| `anm2` | path | The anm2 the areas use. |
|
||||
| `boundsNull` | string | The null setting the world's bounds. Defaults to `Bounds`. |
|
||||
| `spawnNull` | string | The null items spawn at random points within. If omitted or missing, `boundsNull` is used. |
|
||||
| `list` | list | The areas. Each can set its own `anm2`, its `gravity` (applied to items' velocities per tick), `friction` (applied when items are grounded or hit walls) and `airResistance`. |
|
||||
### 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`.
|
||||
|
||||
### cursor
|
||||
Determines the cursor appearance and behavior. Without one, the system cursor is used.
|
||||
The cursor's sounds and particles. Its look is `gfx/cursor/cursor.anm2` (see "Fixed files and names").
|
||||
|
||||
| Key | Meaning |
|
||||
|---|---|
|
||||
| `anm2` | The anm2 file the cursor will use. |
|
||||
| `animations` | `idle`, `click`, `hover` (over an item), `grab` (an item), `pan` (with middle mouse), `zoom` (with the mouse wheel) and `dispose` (right clicking an item). |
|
||||
| `sounds` | `grab` (grabbing an item), `release` (letting go) and `throw` (letting go while dragging quickly). |
|
||||
| `particles` | `grab`: particles spawned when grabbing an item. |
|
||||
|
||||
### menu
|
||||
Determines menu and general UI appearance and behavior.
|
||||
The UI's sounds.
|
||||
|
||||
| Key | Meaning |
|
||||
|---|---|
|
||||
| `font` | The font the menu will use. |
|
||||
| `rounding` | The rounding of corners the UI will use. |
|
||||
| `sounds` | `open` and `close` (the taskbar or one of its windows), `hover` and `select` (a widget), and `cheats` (after entering a special code to activate cheats). |
|
||||
|
||||
### particles
|
||||
|
||||
Reference in new issue
Block a user