diff --git a/.gitignore b/.gitignore index 8c66a73..76a500d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ concept/ resources/ release/ out/ -external/ \ No newline at end of file +external/ +.codex +AGENTS.md \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c25837..549cbbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,17 +108,15 @@ set (TINYXML2_SOURCES ${TINYXML2_DIR}/tinyxml2.cpp) file(GLOB PROJECT_SRC CONFIGURE_DEPENDS include/*.cpp + src/developer/*.cpp src/*.cpp src/render/*.cpp src/resource/*.cpp - src/resource/xml/*.cpp src/state/*.cpp src/state/play/*.cpp src/state/play/menu/*.cpp - src/state/play/menu/arcade/*.cpp src/state/play/item/*.cpp src/state/select/*.cpp - src/entity/*.cpp src/window/*.cpp src/util/*.cpp src/util/imgui/*.cpp diff --git a/MODDING.md b/MODDING.md index dac8a77..31fd0a3 100644 --- a/MODDING.md +++ b/MODDING.md @@ -14,13 +14,13 @@ My process for making characters is that they're typically comprised of many "ce If you'd like a quick primer on how to use either program, check either of [these](https://www.youtube.com/watch?v=qU_GMo2l7NY) [videos](https://www.youtube.com/watch?v=QiXVM6Gwzlw) out. Much of the information is interchangeable between the programs, though both are a little out of date on their current version. -Stage-specific character animations are controlled by `AnimationAppendID` on each stage in `character.xml`. The base stage uses no suffix. Later stages append that stage's configured suffix. +Stage-specific character animations are controlled by `AppendStringForAnimations` on each stage in `character.xml`. The base stage uses no suffix. Later stages append that stage's configured suffix. Example: - stage 1: `Look` -- stage 2 with `AnimationAppendID="Stage2"`: `LookStage2` -- stage 5 with `AnimationAppendID="Stage5"`: `LookStage5` +- stage 2 with `AppendStringForAnimations="Stage2"`: `LookStage2` +- stage 5 with `AppendStringForAnimations="Stage5"`: `LookStage5` Animation references in XML should still use just the base name like `Look`, `Neutral`, or `Eat`. The game appends the current stage's suffix automatically. @@ -43,7 +43,6 @@ Shweet's Sim uses a collection of [XML](https://en.wikipedia.org/wiki/XML) files - items.xml - menu.xml - strings.xml -- skill_check.xml The game currently expects `character.xml`. The rest are optional in the sense that the loader will warn and continue if some are missing, but most real characters will want nearly all of them. @@ -57,10 +56,14 @@ If you're making your own character, your best bet would probably be just to cop ### Areas #### TextureRootPath (path) Working folder/directory of textures the areas will use. +#### Anm2RootPath (path) +Working folder/directory of anm2 files the areas will use. If omitted, TextureRootPath is used. #### Area #### Texture (path) The file path of the area's texture (background). +#### Anm2 (path) +The file path of the area's animated background. If this is set, it is used instead of Texture. #### Gravity (float) Gravity the area has; applies to items' velocities per tick. #### Friction (float) @@ -86,45 +89,43 @@ Character's "anm2" file (uses TextureRootPath); should have all the character's A general description of the character; will show in the Select screen. #### Credits (string) Credits text shown in the Select screen's Credits tab. -#### Weight (double, kilograms) +#### WeightKilograms (double) The character's starting weight, in kilograms. -#### WeightMax (double, kilograms) +#### WeightMaxKilograms (double) Maximum weight the character can reach. -#### Capacity (double, calories) +#### CapacityCalories (double) The character's starting capacity, in calories. -#### CapacityMin (double, calories) +#### CapacityMinCalories (double) The character's minimum capacity, in calories. -#### CapacityMax (double, calories) +#### CapacityMaxCalories (double) Maximum base capacity. -#### CapacityMaxMultiplier (double) +#### CapacityOverstuffedMultiplier (double) Multiplier used when computing the effective full threshold from current base capacity. #### CapacityIfOverStuffedOnDigestBonus (double, multiplier) Additional capacity gained on digest when the character was over base capacity. #### CaloriesToKilogram (double) Determines how many calories become a kilogram (1 cal -> X kg). -#### DigestionRate (double, percent/tick) -The base digestion rate, in percent per tick (60 ticks per second). -#### DigestionRateMin (double, percent/tick) -The minimum digestion rate for the character, in percent per tick. -#### DigestionRateMax (double, percent/tick) -The maximum digestion rate for the character, in percent per tick. +#### DigestionRatePerSecond (double, percent/second) +The base digestion rate, in percent per second. +#### DigestionRatePerSecondMin (double, percent/second) +The minimum digestion rate for the character, in percent per second. +#### DigestionRatePerSecondMax (double, percent/second) +The maximum digestion rate for the character, in percent per second. #### DigestionTimerMax (int, ticks) When digesting, the digestion bar will count down, and then when it hits 0, the current calories will be digested. This determines how long this takes, in ticks. -#### EatSpeed (double) +#### EatSpeedMultiplier (double) A multiplier that speeds/slows down the eating animation, at base. -#### EatSpeedMin (double) +#### EatSpeedMinMultiplier (double) Determines the minimum eating speed multiplier. -#### EatSpeedMax (double) +#### EatSpeedMaxMultiplier (double) Determines the maximum eating speed multiplier. #### BlinkChance (double, percent) Chance each tick to trigger a blink override. #### GurgleChance (double, percent) Determines how often the character will gurgle (see the Gurgle sounds later) per tick. -#### GurgleCapacityMultiplier (double) +#### GurgleChanceFromCapacityMultiplier (double) Per the character's capacity, multiplies the character's gurgle chance based on the percent of capacity filled (based on max capacity). Higher capacity = higher gurgle chance, using this number at maximum. -#### TextBlipPeriodBase (int) -How many displayed dialogue characters elapse between blip sounds. `3` means every third displayed character. -#### DialoguePoolID (string) +#### DialoguePool (string) Determines the character's base dialogue options (for the "How are you feeling?" option in Chat). This is effectively "Stage 1"'s dialogue; each stage should have its own dialogue pool (see later). Also see dialogue.xml for how "Pools" work. #### ColorR, ColorG, ColorB (float, 0-1) UI accent color for the character. @@ -140,13 +141,13 @@ ID of spritesheet that the alternate spritesheet will replace in the character's Chance of rolling for the alternate spritesheet on starting a new game, in percent. ### Stages A "stage" represents each visual change of the character as the weight increases. By default, there's always one stage; adding more here will add additional stages. -#### Threshold (float, kilograms) +#### ThresholdKilograms (float) The weight threshold to reach this stage, in kilograms. #### AreaID (int) Reserved for background switching. Parsed, but not currently used by gameplay. -#### DialoguePoolID (string) +#### DialoguePool (string) Determines the stage's dialogue options (for the "How are you feeling?" option in Chat). Also see dialogue.xml for how "Pools" work. -#### AnimationAppendID (string) +#### AppendStringForAnimations (string) Suffix appended to base animation names while this stage is active. Usually `Stage2`, `Stage3`, etc. ### Animations The character's animations. Know that a lot of character animations are typically easily played/activated through Dialogue; this is just for animations that aren't reliant on that system. Know that _these animations should just be the base name_; all animations are expected to have a stage number after them, so don't include the number for these. @@ -160,9 +161,9 @@ When over capacity, this idle animation will be used instead. When going to a new stage after digestion and going over a stage's threshold, this animation will play. #### Animation The name of the animation to be used for each of these. -### Overrides -"Overrides" are the term I use for when some animations will be tweaked by the game engine for effect (blinking and talking being the ones used). There are two elements; "Talk" and "Blink" for this. Typically, how this is handled is that each animation with have an invisible blinking/talking layer (just the graphic that blinks), which will change when called for. Again, review the .anm2 format for what a "layer" is. All that's sourced is just the spritesheet crop in these cases; so don't worry about how the blink/talk layers are set up. -### Override +### AnimationOverrides +"AnimationOverrides" are the term I use for when some animations will be tweaked by the game engine for effect (blinking and talking being the ones used). There are two elements; "Talk" and "Blink" for this. Typically, how this is handled is that each animation with have an invisible blinking/talking layer (just the graphic that blinks), which will change when called for. Again, review the .anm2 format for what a "layer" is. All that's sourced is just the spritesheet crop in these cases; so don't worry about how the blink/talk layers are set up. +### Talk / Blink #### LayerSource (string) The layer in the animation which will be sourced for the override. #### LayerDestination (string) @@ -174,7 +175,7 @@ An "eat area" is where the food should be dragged to. I'm pretty much expecting The null area in the animation where food will be checked for. Again, review the .anm2 format. #### Animation (string) The animation that will play when food is dragged to it. -#### Event (string) +#### EventToActivate (string) The event that will be checked for, detrermining the time the food is actually eaten/chewed. Again, review the .anm2 format. ### ExpandAreas The areas which will expand based on capacity percent; usually a stomach. This adds additional scale onto the layer of an animation. This also can scale a null as well. @@ -184,51 +185,63 @@ ExpandAreas are presently hardcoded to scale with both capacity and weight at a The layer of the animation that will expand. #### Null (string) The null of the animation that will expand. -#### ScaleAdd (float, percent) +#### ScaleMultiplierMaximum (float, percent) The scale that will be added at maximum. Know that scale is a percent; a {100, 100} scale is the default and is the normal scale of an animation. -### InteractAreas -The areas on a character which can be interacted with; usually for belly rubs, kisses, etc. +### InteractAreaTypes +Default behavior for each interaction type. These entries should not have `Null`; they define shared cursor animations, sounds, particles, and bonuses for concrete `InteractAreas`. ### InteractArea -#### Type ("Rub", "Kiss", "Smack") -Three types are presently hard-coded in, but this is kind of hacky and custom support for different interactions may later be added. The cursor will need to be set from the "Tools" in order for each interact area to be activated. -#### Null (string) -The null in which the interact area can be triggered. Again, review the .anm2 format. -#### Layer (string; optional) -Layer used for scale-effect interactions such as smacks. +#### Type (string) +The interaction type name. Concrete interact areas with the same `Type` inherit unspecified values from this definition. +#### GlyphFromIconFont (string) +The icon-font glyph used for this interaction in the tools bar. +#### IsHold (bool) +If true, the interaction is held rather than clicked once. #### AnimationCursorHover (string) The animation the cursor will play when hovering over the interact area. #### AnimationCursorActive (string) The animation the cursor will play when holding down click over the interact area. -#### DialoguePoolID (string) -The dialogue pool which will be drawn from when activating an interact area (see dialogue.xml). -#### DialoguePoolIDFull (string) -Dialogue pool used when the character is over capacity. -#### IsHold (bool) -If true, the interaction is held rather than clicked once. -#### DigestionBonusRub (float) -Digestion bonus applied repeatedly while rubbing. -#### DigestionBonusClick (float) +#### DigestionBonusOnHover (float) +Digestion bonus applied repeatedly while hovering with a held interaction. +#### DigestionBonusOnClick (float) Digestion bonus applied when a click-based interaction lands. -#### Time (float) -Used by click effects such as smacks. +#### TimeTicks (float) +Used by click effects such as smacks. If omitted, the engine uses a short default duration. +#### TimeToActivateNewDialogueTicks (int) +Ticks that must pass without this interact area being interacted with before it can start a new dialogue. #### ScaleEffectAmplitude (float) Visual scale effect amount for click interactions. #### ScaleEffectCycles (float) How many oscillations the scale effect performs. +### InteractAreas +The concrete areas on a character which can be interacted with; usually for belly rubs, kisses, etc. +### InteractArea +#### Type (string) +The interaction type to use. This should match one of the entries in `InteractAreaTypes`. +#### Null (string) +The null in which the interact area can be triggered. Again, review the .anm2 format. +#### Layer (string; optional) +Layer used for scale-effect interactions such as smacks. +#### DialoguePool (string) +The dialogue pool which will be drawn from when activating an interact area (see dialogue.xml). +#### DialoguePoolFull (string) +Dialogue pool used when the character is over capacity. ### Sound An interact area can play multiple sounds when interacting; add additional Sound elements to achieve this. Don't worry about repeatedly-loaded sounds; the game will cache them beforehand for efficiency. #### Path (path) The path of the sound being used. -### Sounds -Sounds that play in some contexts. -### Blip -Dialogue blip sounds. One is played periodically while text reveals. +### Particle +An interact area can trigger multiple particle effects. +#### Type (string) +The particle type from `particles.xml`. +### Actions +Sounds that play in character-level contexts. Each action can contain multiple `Sound` elements. ### Digest Sounds that will play when the character begins digesting (digestion bar full). ### Gurgle -Ambient sounds that will play randomly based on capacity; see GurgleChance and GurgleCapacityMultiplier above. -#### Sound (path) -The path of the sound for the specific sound type. +Ambient sounds that will play randomly based on capacity; see GurgleChance and GurgleChanceFromCapacityMultiplier above. +### Sound +#### Path (path) +The path of the sound for the specific action. ## cursor.xml Determines the cursor appearance and behavior. @@ -253,24 +266,47 @@ The cursor's zoom animation, when zooming in/out with the mouse wheel. The cursor's return animation, when holding right click to return an item to the inventory (or to dispose of it if chewed.) #### Animation (string) The animation the cursor will use in these contexts. -### Sounds -Know that multiple of these sounds can be defined for each context. +### Actions +Know that multiple sounds can be defined for each action by adding `Sound` children. ### Grab The sound that will play when grabbing an item. ### Release The sound that will play when releasing an item. ### Throw The sound that will play when throwing an item (releasing when dragging quickly). -#### Sound (path) +### Sound +#### Path (path) The path of the sound for these respective contexts. ## dialogue.xml The collection of character dialogue; likely the biggest file, depending on your needs. ### Dialogue +#### SoundRootPath (path) +Working folder/directory of where dialogue sounds will be contained within. +#### DelayTicks (int) +How many update ticks pass before the next dialogue character is revealed. +#### BlipDelayTicks (int) +How many displayed dialogue characters elapse between blip sounds. `3` means every third displayed character. +### TextPlayback +Groups the dialogue text reveal settings. +### Blip +Dialogue blip sound. One is played periodically while text reveals. Add one or more `Sound` children. +### Sound +#### Path (path) +The path to the sound that will play, based on SoundRootPath. +### DelayCharacters +Groups character-specific delay rules. +### DelayCharacter +#### Character (string) +The character that should add an extra delay while text reveals. +#### DelayTicks (int) +Extra update ticks to pause after this character. +#### IsDisableTalk (bool) +If true, the talking override pauses during this character's delay. ### Entries ### Entry Each bit of dialogue is referred to as an "entry". -#### ID (string) +#### Label (string) Name for the entry. Other entries will rely on this for dialogue chains. #### Next (string) The ID of the entry that will follow after this one. If no Next entry, the text will not continue. Make sure to connect these. @@ -278,6 +314,8 @@ The ID of the entry that will follow after this one. If no Next entry, the text The actual dialogue content of the entry. Should support Unicode, provided the font contains the characters. #### Animation (string) A character animation that will play at the beginning of the dialogue. This may be expanded into the future to allow animations to play dynamically per dialogue index. Again, make sure it's just the base name for the animation, no stage numbers. +### Effects +Dialogue effects can be added as child elements of an `Entry`. `Small` and `Big` are fixed text scale effects. `Oscillation`, `Shake`, and `Screenshake` use engine defaults for their strength/timing values; do not write `Amplitude`, `Frequency`, `Period`, `Magnitude`, or `TimeTicks` for those effects. `Scale` and `Rainbow` are no longer supported. ### Choice Dialogue can be branching; simply added "Choice" elements into the Entry element. #### Next (string) @@ -287,74 +325,74 @@ The text of the choice; will appear as a series of buttons in the text window. ### Pools A "pool" of dialogue refers to a collection of entries that can be randomly picked in some contexts. ### Pool -#### ID (string) +#### Label (string) The name of the dialogue pool; can be referenced elsewhere. -### PoolEntry -### ID (string) +### Entry +### Entry (string) The name of the entry; to be added to the pool. ### Start This dialogue will play upon a new game, once its animation has concluded. #### Animation (string) The name of the animation that will be played. -#### ID (string) +#### Label (string) The name of the entry that will be played. ### End The dialogue that will play upon completion of the game (character hitting max stage). -#### ID (string) +#### Label (string) The name of the entry that will be played. ### Help The dialogue that will be play when the player presses the "Help" button in "Chat". -#### ID (string) +#### Label (string) The name of the entry that will be played. ### StageUp Dialogue that will play after a character undergoes a stage up. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### Random The dialogue that will be play when the player presses the "Let's chat!" button in "Chat". -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### Feed The dialogue that will be play when the user begins holding a food item. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### FeedFull The dialogue that will be play when the user begins holding a food item, when the character is over capacity. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### Eat The dialogue that will be play after the character finishes a food item. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### EatFull The dialogue that will be play after the character finishes a food item, when the character is over capacity. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### Full The dialogue that will be play when the character is completely full and will deny the user feeding them. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### Throw The dialogue that will be play when the user throws food. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### LowCapacity The dialogue that will be play when the character is presented a food item completely over their maximum capacity. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### Digest The dialogue that will be play when digesting is finished. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### FoodTaken The dialogue that will play when food is removed from the null area during a character's eating animation. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ### FoodTakenFull The dialogue that will play when food is removed from the null area during a character's eating animation, when the character is over capacity. -#### PoolID (string) +#### Pool (string) The name of the pool that entries will be drawn from. ## items.xml @@ -372,23 +410,18 @@ The base anm2 file that items will use. Items can technically have their own .an When items are chewed, play this animation family. The game looks for `Chew0`, `Chew1`, `Chew2`, and so on inside the item's `.anm2`. #### Animation (string) The name of the animation. Only the base part ("Chew", usually) -### Sounds -The various item sounds. Multiple of the same element can be defined to randomly play from a selection. +### Actions +The various item actions. Each action can contain multiple `Sound` elements to randomly play from a selection. ### Bounce The sound that will play when an item is bounced (hitting a floor/wall/ceiling with velocity). -#### Sound (path) -The path to the sound that will play, based on SoundRootPath. ### Dispose The sound that will play when an item is disposed of (when an item has chewed and is right clicked). -#### Sound (path) -The path to the sound that will play, based on SoundRootPath. ### Summon The sound that will play when an item is spawned (clicking on it in inventory). -#### Sound (path) -The path to the sound that will play, based on SoundRootPath. ### Return The sound that will play when an item is returned to inventory (right clicking on it in world). -#### Sound (path) +### Sound +#### Path (path) The path to the sound that will play, based on SoundRootPath. ### Categories The kinds of items present. Will appear in inventory tooltips. @@ -408,9 +441,9 @@ Different rarities of item. Shows in inventory and each can have their own drop #### Name (string) Name of the rarity. #### Chance (float, percent) -Base chance of finding an item in the Skill Check reward logic. +Relative rarity weight for item systems. #### Sound (path) -Sound that will play when an item is found in the Skill Check minigame. +Sound that will play when an item of this rarity is awarded. #### IsHidden (bool) If true, items with this rarity will not be previewed in the inventory, unlesss possessed. Assumed false if not present. ### Items @@ -463,8 +496,6 @@ Optional item UI color. Missing components default to `0` if any color component The name of another item that this item will be able to be upgraded to. #### UpgradeCount (int; optional) The amount of this item it will take to upgrade to the upgrade item specified in UpgradeID. -#### IsSkillCheckReward (bool; optional) -The item can be given as a Skill Check reward. #### IsToggleSpritesheet (bool; optional) When used in the inventory, will toggle the character's spritesheet (in Pokemon terms, toggling normal/shiny palettes). @@ -475,105 +506,31 @@ See [`src/resource/xml/strings.hpp`](src/resource/xml/strings.hpp) for how strin ## menu.xml Determines menu and general UI appearance and behavior. -### MenuSchema +### Menu #### SoundRootPath (path) Working folder/directory of where used sounds will be contained within. #### FontRootPath (path) Working folder/directory of where used fonts will be contained within. #### Font (path) The font the menu will use, based on FontRootPath. -#### Rounding (float) +#### ButtonRounding (float) The rounding of corners the UI will use. -### Sounds -Menu sounds. +### Actions +Menu sound actions. Each action can contain one or more `Sound` elements. ### Open Will play when opening a sliding menu panel. -#### Sound (path) -The sound that will play, based on SoundRootPath. ### Close Will play when closing a sliding menu panel. -#### Sound (path) -The sound that will play, based on SoundRootPath. ### Hover Will play when hovering over a widget in a menu. -#### Sound (path) -The sound that will play, based on SoundRootPath. ### Select Will play when clicking on a widget in a menu. -#### Sound (path) -The sound that will play, based on SoundRootPath. ### CheatsActivated Sound that will play after entering a special code to activate cheats. -#### Sound (path) +### Sound +#### Path (path) The sound that will play, based on SoundRootPath. -## skill_check.xml -Determines behavior and appearance of the "Skill Check" minigame. - -### SkillCheck -#### SoundRootPath (path) -Working folder/directory of where used sounds will be contained within. -#### RewardScore (int) -The score where a rewarded item will be given (see items.xml) -#### RewardScoreBonus (float, percent) -Based on the player's score, will add additional bonus to being rewarded items. -#### RewardGradeBonus (float, percent) -Based on the player's grades for a round of play, will add additional bonus to being rewarded items. -#### SpeedMin (float, unit/tick) -The beginning/base speed of the bar in the minigame. -#### SpeedMax (float, unit/tick) -The maximum speed the bar in the minigame can achieve. -#### SpeedScoreBonus (float) -The additional speed of the bar based on the player's score. -#### RangeBase (float) -A "range" is each area in the minigame that can be hit. This is the base size of one. Per each grade, it's halved. Range size decreases as minigame progresses. -#### RangeMin (float) -The minimum size of a range; achievable at high scores. -#### RangeScoreBonus (float) -Really a negative. The range size will decrease this much per point of score. -#### EndTimerMax (int) -The period of time between plays of the minigame. -#### EndTimerFailureMax (int) -When a player fails (no ranges hit), the minigame will pause for this amount of time before restarting. -### Sounds -### Fall -The sound that plays when an item falls from being rewarded. -#### Sound (path) -The sound that will play, based on SoundRootPath. -### ScoreLoss -The sound that plays when the bar goes over the edge and loops, deducting a point. -#### Sound (path) -The sound that will play, based on SoundRootPath. -### HighScore -The sound that plays when the player achieves a high score. Only heard when a high score has been set during the play session. -#### Sound (path) -The sound that will play, based on SoundRootPath. -### HighScoreLoss -The sound that plays when the player has achieved a high score, and then fails. -#### Sound (path) -The sound that will play, based on SoundRootPath. -### RewardScore -The sound that plays when the player has hit the reward score. -#### Sound (path) -The sound that will play, based on SoundRootPath. -### Grades -A "grade" is a rank the player can get. This determines the count of ranges in the minigame; each range corresponds to a grade. -### Grade -#### Name (string) -The name of the grade; will appear when the player hits its respective range in the minigame. -#### NamePlural (string) -The plural name of the grade; will appear in Stats. -#### Value (int) -The reward value of the grade, in points. -#### Weight (float) -The "weight" of the grade; used to determine accuracy score in Stats. -#### IsFailure (bool) -If the player hits this grade's respective range, will count as failure. -#### DialoguePoolID (string; optional) -If the player hits this grade, the character will speak dialogue from this pool (see dialogue.xml) -#### Sound (path) -This sound will play when the grade is hit. - # Saves Outside of resources, Shweet's Sim also has a few files it writes outside of the game. You will find these in %AppData%/shweets-sim on Windows and ~/.local/share/shweets-sim on Linux. @@ -584,6 +541,8 @@ Stores general game settings and configuration; beyond invididual characters. Determines measurement system (kg/lb). ### Volume (int, percent) Master volume. +### IsAudioMuted (bool) +If true, all audio is muted. ### ColorR, ColorG, ColorB (float, 0-1) Red/Green/Blue components of menu color. ### WindowX, WindowY (int) @@ -601,15 +560,15 @@ Determines if the game has been completed (character's max stage has been reache Determines if the character's spritesheet is using the alternate version (in Pokemon, would be the "shiny" version ### Character -#### Weight (float) +#### WeightKilograms (float) Character's current weight, in kilograms. #### Calories (float) Character's current consumed calories. -#### Capacity (float) -Character's capacity, in calories. Remember, max capacity effectively is capacity * CapacityMaxMultiplier (from character.xml) -#### DigestionRate (float, percent) -Character's digestion rate in percent, per game tick (game ticks 60 times per second). -#### EatSpeed (float) +#### CapacityCalories (float) +Character's capacity, in calories. Remember, max capacity effectively is capacity * CapacityOverstuffedMultiplier (from character.xml) +#### DigestionRatePerSecond (float, percent/second) +Character's digestion rate in percent per second. +#### EatSpeedMultiplier (float) Eat speed multiplier for the character's Eat animation. #### IsDigesting (bool) Determines if character is currently digesting (when the bar is going down) @@ -621,20 +580,6 @@ When digestion bar is going down, this is the remaining time to 0 (in ticks) Total calories consumed by the character, per save file. #### TotalFoodItemsEaten (int) How many food items have been completely consumed by the character, per save file. -### SkillCheck -#### TotalPlays (int) -How many times the Skill Check minigame has been attempted. -#### HighScore (int) -Highest score the player has achieved in the Skill Check minigame. -#### BestCombo (int) -Highest combo the player has achieved (how many successful hits the player has gotten in one session) -#### Grades -Play grades are the ratings the game gives based on where the player hit. -##### ID (int) -ID of grade being tracked (see skill_check.xml) -##### Count (int) -How many times the grade has been hit. - ### Inventory Items. #### ID (int) diff --git a/src/developer/console.cpp b/src/developer/console.cpp new file mode 100644 index 0000000..d208883 --- /dev/null +++ b/src/developer/console.cpp @@ -0,0 +1,337 @@ +#include "console.hpp" + +#include +#include +#include +#include +#include + +#include +#include + +#include "../resources.hpp" +#include "../state/play.hpp" + +namespace game::developer +{ + namespace console + { +#define GAME_CONSOLE_COMMANDS(X) \ + X(ANIMATIONS, "animations", "animations", true) \ + X(CAPACITY, "capacity", "capacity ", true) \ + X(CHARACTER, "character", "character ", false) \ + X(CHARACTERS, "characters", "characters", false) \ + X(DIGEST, "digest", "digest", true) \ + X(DIGESTION, "digestion", "digestion <% per second>", true) \ + X(DIALOGUE, "dialogue", "dialogue", true) \ + X(EAT_SPEED, "eat_speed", "eat_speed ", true) \ + X(GIVE, "give", "give ", true) \ + X(HELP, "help", "help", false) \ + X(ITEMS, "items", "items", true) \ + X(MENU, "menu", "menu", true) \ + X(PLAY_ANIMATION, "play_animation", "play_animation ", true) \ + X(PLAY_DIALOGUE, "play_dialogue", "play_dialogue