Events

Create event triggable during adventuring with a villager

NPC Adventures events are loaded from standard resource asset for location events Data/Events/<LocationName> in vanilla SDV (like Data/Events/Mountain for the Mountains) but the companion event is prefixed by purrplingcat.npcadventure_ followed by event ID which is number. If you ommit the NA event prefix string, you are not able to use special EPU conditions to match which companion is recruited.

Adventuring story events

Story events are handled by NP Adventgures code itself in the GameMaster class and their scenarios without the event precondition. This behavior is hardcoded. Currently there is only one adventuring story event. It's Marlon's invitation event stored under key adventureBegins in resource Data/Events/AdventureGuild. Please don't change or remove this event in your content packs

Companion cutscenes

Companion cutscenes are events which are played when you are entered to a location with recruited companion (during adventuring with currently recruited companion). The key of these kind of events ere more complex, the template is: purrplingcat.npcadventure_<int:eventId>/<epu_conditions> ....

NPC Adventures prefixed events uses Extended precondition utility for check event precondition instead of vanilla's precondition checker, so you are able to use EPU's special preconditions, negate a condition with ! and use some special event preconditions defined be NPC Adventures itself:

Condition nameParametersDescription
companion<string:NpcName>Checks if player has concrete NPC as a companion.
hadCompanion<string:NpcName>Check if player had concrete NPC as a companion in past but they aren't currently recruited.

Companion event ID standard

This is not a doctrine, but to avoid event id conflict we recommend use ID format mmmmnnnn or mmmmmnnnn where m represents one digit of Nexusmods mod id and the n is one digit of your chosen event number.

List of companion events

See Events in the mod guide.

Example

There you can see some examples of NPC Adventures companion and non-companion events

// Haley companion event
{
  "Format": "1.26.0",
  "Changes": [
    {
      "LogName": "Load companion events for Mountain",
      "Action": "EditData",
      "Target": "Data/Events/Mountain",
      "Entries": {
        // This event requires Haley as a current companion, so prefix is needed
        "purrplingcat.npcadventure_45821301/companion Haley/f Haley 1000/w Sunny/t 900 1850": "..."
      }
    }
  ]
}
// Kent unlocking event
{
  "Format": "1.26.0",
  "Changes": [
    {
      "Action": "EditData",
      "Target": "Data/Events/Forest",
      "Entries": {
        // No recruited companion is needed for play this event, so we can use vanilla event id standard
        "45829901/n na_invitation/f Kent 1250/w sunny/d Sun Fri/t 600 1050": "..."
      }
    }
  ]
}

You can define events with Content Patcher or via SMAPI's content API.