Stardew Valley
0 of 0

File information

Last updated

Original upload

Created by

TheMightyAmondee

Uploaded by

TheMightyAmondee

Virus scan

Safe to use

About this mod

Creates some custom tokens for use in Content Patcher to extend what can be done.

Requirements
Permissions and credits
Changelogs
Custom Tokens

Custom Tokens is a mod that provides some additional tokens for Content Patcher, extending what can be done.

Custom Tokens registers the following tokens:

Location Tokens:
  • MineLevel, minelevel the player is currently on
  • VolcanoFloor, volcanofloor the player is currently on
  • DeepestMineLevel, the deepest minelevel reached by the player, this includes Skull Cavern floors
  • DeepestVolcanoFloor, the deepest volcano floor reached by the player
  • DeepestNormalMineLevel, the deepest normal minelevel reached by the player
  • DeepestSkullCavernMineLevel, the deepest skull cavern minelevel reached

Marriage Tokens:
  • Anniversary of the player, split into two tokens, AnniversaryDay and AnniversarySeason
  • YearsMarried, total number of years married

Quest Tokens:
  • QuestIDsCompleted, a list of quest ids that the player has completed
  • QuestsCompleted, the total number of quests completed
  • SOIDsCompleted, a list of the special orders the player has completed, this includes qi challenges
  • SOCompleted, total number of different special orders completed

Death and Exhaustion Tokens:
  • DeathCount, total number of times the player has died
  • DeathCountMarried, an extension of DeathCount that tracks how many times a player has died after being married.
  • DeathCountPK, (provides a more accurate value than the DeathCount token for use in the PlayerKilled event)
  • DeathCountMarriedPK, an extension of DeathCountPK that tracks how many times a player has died after being married.
  • PassOutCount, how many times a player has passed out.

Advanced Tokens:
  • Child, holds information about the player's children, requires input arguments to work.

See the README on github for more information about tokens

Version 1.5.1:
- This version adds a few more location tokens for deepest levels in the normal mines, skull cavern and volcano.

Using Custom Tokens:

- SMAPI 3.12 or above must be installed.
- Ensure Custom Tokens is listed as a dependency in your content pack
- Tokens used must be prefixed with the mod's unique ID e.g TheMightyAmondee.CustomTokens/MineLevel
- Many tokens require an update rate of OnLocationChange, OnTimeChange or both in order to work properly

    [/list]The Child Token:

    This token takes exactly 3 input arguments. They are not case sensitive.

    The first argument, player, gives the player type. It must be one of host (the main player) or local (the current player that may be a farmhand). E.g player=host

    The second argument, childindex, gets the index of the child to get the value for. It must be numeric, starting from 0. 0 represents the player's oldest child, 1 the second oldest and so on. E.g childindex=1

    The third argument gives the name of the value you want. This can be either birthdayday, birthdayseason, daysold, darkskinned or hat.

    - birthdayday and birthdayseason get the day of the month and the season the child was born on respectively
    - daysold gives the child's current age in days
    - darkskinned gives true if the child uses the dark skinned sprite and false otherwise
    - hat gives the name of the hat the child is currently wearing. Note: this is always "Party Hat" for all three party hat colours.

    If no suitable values are found, the token will be equal to "null".

    Example of a full token with input arguments: TheMightyAmondee.CustomTokens/Child:player=host|childindex=0|birthdayday
     
    This token returns the day of the month the first born child of the host player was born on.

    The README on github goes into this token in further detail if needed.

    Getting old or current save files up to speed (Version 1.3.1 and below):

    Old or current save files require some additional set-up. This isn't strictly necessary and only needs to be done if the relevant tokens are used but may result in incorrect token values.

    A per-save JSON file will be generated after the day is started for each save so the mod can track values not tracked by the game. This is found in the data folder located in the mod folder. These values can be adjusted as needed as they will have an initial value of 0, which may not be accurate for older saves. Ensure the old tracker value is also updated to the same value as the current tracker value when changing values.

    While the mod can determine whether most quests have been completed, some quest ids from previously completed quests in old save files need to be added manually to the save's JSON file in AdditionalQuestsCompleted. Custom quest ids can also be added here.

     Depending on what quests have previously been completed, the field should look something like this:  "AdditionalQuestsCompleted": [6,16,128,130] 

    [list]
  • If you have completed "Getting Started", add 6
  • If you have entered the Adventurer's Guild, add 16
  • If you have done secret note 25 (Abigail), add 128
  • If you have done secret note 25 (Caroline), add 129
  • If you have finished "The Pirate's Wife", add 130


Config:
- AllowDebugging adds a single debug command so the values of the tokens can be viewed in the SMAPI console. When enabled typing "tracker" in the console will display a list of token values
- ResetDeathCountMarriedWhenDivorced will cause the DeathCountMarried token to reset to 0 when divorced, default is true


Source code