Content Patcher Tokens - Floogen/FashionSense GitHub Wiki

Fashion Sense offers a Content Patcher (CP) token called PeacefulEnd.FashionSense/Appearance, which allows mod authors to determine what Fashion Sense accessory / hairstyle / hat / shirt the player is currently wearing.

The accepted values for the PeacefulEnd.FashionSense/Appearance token are as follows:

  • Hairstyle
  • Accessory
  • AccessorySecondary
  • AccessoryTertiary
  • Hat
  • Shirt
  • Pants
  • Sleeves
  • Shoes

Expected output

If the player isn't wearing a Fashion Sense appearance for the particular given value (such as Hairstyle), the returned output will be null.

If the player is wearing a Fashion Sense hairstyle (PeacefulEnd.FashionSense/Appearance:Hairstyle), the return output will be UniqueID/Hair/HairName.

If the player is wearing a Fashion Sense accessory (PeacefulEnd.FashionSense/Appearance:Accessory), the return output will be UniqueID/Accessory/AccessoryName.

If the player is wearing a Fashion Sense hat (PeacefulEnd.FashionSense/Appearance:Hat), the return output will be UniqueID/Hat/HatName.

Example

As a simple example, when using a Fashion Sense accessory (such as the One Winged Angel found in the example pack), the token PeacefulEnd.FashionSense/Appearance:Hairstyle would give you the value "PeacefulEnd.FashionSense/Accessory/One Winged Angel".

A more complex example which uses Custom Companions, changes the companion's InspectionDialogue to display what the current Fashion Sense accessory is:

{
  "Format": "1.22.0",
  "Changes": [
    {
      "Action": "EditData",
      "Target": "{{PeacefulEnd.CustomCompanions/Companions:ExampleAuthor.ExamplePack.ExampleAlternativeWanderWalkingCow}}",
      "Entries": {
        "Companion": {
          "InspectionDialogue": "{{PeacefulEnd.FashionSense/Appearance:Accessory}}",
        }
      },
      "Update": "OnLocationChange, OnTimeChange"
    }
  ]
}