Stardew Valley

You can now adapt existing events, or create all new ones, to invite any NPC on an excursion.

As an example, I have created a custom event for invite menu here. You can use it as a template.

The basic structure of content.json is:


{
 invites: [
 {
name: "Balloon Ride",
location: "Railroad",
allowedNPCs:"Alex,Elliott,Harvey,Sam,Sebastian,Shane,Abigail,Emily,Haley,Leah,Maru,Penny",
allowMarried: false,
incompatibleMods:[
 "FlashShifter.StardewValleyExpandedALL"
],
date: true,
nodes: [
 {
 defaultNode: "...",
 customNodes: {
"Alex": "...",
...
 }
 },
 ...
],
forks: [
 {
 key: "BalloonRideEventInvite_afraid",
 nodes: [
{
 defaultNode: "...",
 customNodes: {
 "Alex": "...",
 ...
 }

},
...
 ],
 },
 ...
],

 },
 ...
 ],
}


So, you create an invite with a series of nodes that correspond to even parts. You could just have a single node with the entire event string, but splitting it up makes it easier to create customNodes for specific NPCs. Practically speaking, you'll want to create custom nodes for pretty much any part of the event that involves dialogue. The nodes are joined together by Mobile Phone into a game-recognizable event string, using any customNodes for the NPC you're inviting, or default nodes when there aren't any custom ones for that NPC for that part.

Forks are an optional part of the game's event system, used when the player answers dialogue. In the example, if the player asks the NPC if they are afraid, the game switches event strings to one based on the specified key, in this case it was "afraid" for the original balloon ride event, so we use BalloonRideEventInvite_afraid to make it unique.

Forks are otherwise mostly just like the main node list.

Setting date to true means you will have to be romantically involved with the NPC to go on the invitation.

Use incompatibleMods and requiredMods to avoid map conflicts - in this case we created one invite that is incompatible with SDV, and an almost identical one that requires SDV, so that the farmer and NPCs move correclty whether SDV is installed or not.

Other optional settings you can use

minPoints - required friendship points for invite to be available
season - required season
dayOfWeek - required day of the week
minTimeOfDay - earliest time of day as an integer, e.g. 600, 1200, 2300
maxTimeOfDay - time at which it is too late
allowMarried - can invite a spouse or fiance(e)
requireMarried - must be married to invite

Use https://smapi.io/json for json validation.

Article information

Added on

Edited on

Written by

aedenthorn

0 comments