Changes

Jump to navigation Jump to search
m
Line 17: Line 17:  
Each event has a key which includes an event ID and any preconditions. Event IDs are a max of 10 digits, with a maximum value of 2147483647 (based on the game coding).  
 
Each event has a key which includes an event ID and any preconditions. Event IDs are a max of 10 digits, with a maximum value of 2147483647 (based on the game coding).  
   −
You may use any ID for testing '''BUT When you are ready to publish, you are recommended to use the four digit mod ID you get from Nexus (found in the mod page URL) as the prefix instead'''. ''Note that any other id (like last 4 digit of user id is not guarenteed to be unique across other mods)'' You can actually reserve an ID for your mod in Nexus by creating the page without clicking "Publish". Of course, this is not a rule, but a good convention to prevent mods from clashing. If uploading to Moddrop or another site instead, adjust according to the number of digits found in that site's IDs.
+
You may use any ID for testing '''BUT When you are ready to publish, you are recommended to use the four or five digit mod ID you get from Nexus (found in the mod page URL) as the prefix instead'''. ''Note that any other id (like last 4 digit of user id is not guarenteed to be unique across other mods)'' You can actually reserve an ID for your mod in Nexus by creating the page without clicking "Publish". Of course, this is not a rule, but a good convention to prevent mods from clashing. If uploading to Moddrop or another site instead, adjust according to the number of digits found in that site's IDs.
    
Event preconditions include any number of the following arguments (separated by <samp>/</samp>). For example, Clint's Saloon heart event preconditions are <code>97/f Clint 750/t 1900 2300/d Tue Wed Thu Fri Sat Sun</code>, which (per the tables below) means ''event #97, requires 3 hearts with Clint, between 7pm and 11pm on Monday''.
 
Event preconditions include any number of the following arguments (separated by <samp>/</samp>). For example, Clint's Saloon heart event preconditions are <code>97/f Clint 750/t 1900 2300/d Tue Wed Thu Fri Sat Sun</code>, which (per the tables below) means ''event #97, requires 3 hearts with Clint, between 7pm and 11pm on Monday''.
Line 74: Line 74:  
|-
 
|-
 
| <samp>B</samp>
 
| <samp>B</samp>
| Current player is in bed.
+
| Current player has a double bed in the farmhouse if married; single bed if roommates (Krobus excluded).
 
|-
 
|-
 
| <samp>D {{t|name}}</samp>
 
| <samp>D {{t|name}}</samp>
Line 95: Line 95:  
|-
 
|-
 
| <samp>a {{t|x}} {{t|y}}</samp>
 
| <samp>a {{t|x}} {{t|y}}</samp>
| Current player is on that tile position. Note that since events are only checked for while entering a map, you can only use tiles that other maps warp to.
+
| Current player entered the map on that tile position. Note that since events are only checked for while entering a map, you can only use tiles that other maps warp to.
 
|-
 
|-
 
| <samp>b {{t|number}}</samp>
 
| <samp>b {{t|number}}</samp>
Line 106: Line 106:  
| Current player has seen the specified event (may contain multiple event IDs).
 
| Current player has seen the specified event (may contain multiple event IDs).
 
Usage:  
 
Usage:  
''/e <event ID>'' means has seen that event, then ''/e <event ID <event ID>'' means has seen EITHER events, and ''/e <event ID>/e <event ID>'' means has seen BOTH events.
+
''/e <event ID>'' means has seen that event, then ''/e <event ID> <event ID>'' means has seen EITHER events, and ''/e <event ID>/e <event ID>'' means has seen BOTH events.
 
|-
 
|-
 
| <samp>f {{t|name}} {{t|number}}</samp>
 
| <samp>f {{t|name}} {{t|number}}</samp>
Line 166: Line 166:  
|-
 
|-
 
| <samp>C</samp>
 
| <samp>C</samp>
| Host player has finished the [[Community Center]].
+
| Host player has finished the [[Community Center]] or [[Joja Warehouse]].
 
|-
 
|-
 
| <samp>X</samp>
 
| <samp>X</samp>
| Host player has not finished the [[Community Center]].
+
| Host player has not finished the [[Community Center]] or [[Joja Warehouse]].
 
|-
 
|-
 
| <samp>H</samp>
 
| <samp>H</samp>
Line 259: Line 259:  
|-
 
|-
 
| <samp>advancedMove {{t|actor}} {{t|loop}} {{t|x y}}... OR {{t|direction duration}}</samp>
 
| <samp>advancedMove {{t|actor}} {{t|loop}} {{t|x y}}... OR {{t|direction duration}}</samp>
| Set multiple movements for an actor.  You can set True to have the actor walk the path continuously. Example: <samp>/advancedMove Robin false 0 3 2 0 0 2 -2 0 0 -2 2 0/</samp>
+
| Set multiple movements for an actor.  You can set True to have the actor walk the path continuously. Example: <code>/advancedMove Robin false 0 3 2 0 0 2 -2 0 0 -2 2 0/</code>
   −
To make the actor move along the x axis (left/right), use the number of tiles to move and 0. For example, <samp>-3 0</samp> will cause the actor to walk three tiles to the left while facing left. <samp>2 0</samp> will cause the actor to walk two tiles to the right while facing right.
+
To make the actor move along the x axis (left/right), use the number of tiles to move and 0. For example, <code>-3 0</code> will cause the actor to walk three tiles to the left while facing left. <code>2 0</code> will cause the actor to walk two tiles to the right while facing right.
   −
To make the actor move along the y axis (up/down), use 0 and the number of tiles to move. For example, <samp>0 1</samp> will cause the actor to walk one tile down while facing down. <samp>0 -5</samp> will cause the actor to walk five tiles up while facing up.
+
To make the actor move along the y axis (up/down), use 0 and the number of tiles to move. For example, <code>0 1</code> will cause the actor to walk one tile down while facing down. <code>0 -5</code> will cause the actor to walk five tiles up while facing up.
    
To make an actor pause, use the direction to face and the number of milliseconds to pause. 1 is right, 2 is down, 3 is left, and 4 is up. The reason 4 is up and not 0 is so that advancedMove can tell the difference between a pause command and a move up/down command.
 
To make an actor pause, use the direction to face and the number of milliseconds to pause. 1 is right, 2 is down, 3 is left, and 4 is up. The reason 4 is up and not 0 is so that advancedMove can tell the difference between a pause command and a move up/down command.
Line 269: Line 269:  
The code can tell the difference between a move command and a pause command because a move command must have 0 for either x or y. A pause command must have non-zero numbers for both numbers in the pair.
 
The code can tell the difference between a move command and a pause command because a move command must have 0 for either x or y. A pause command must have non-zero numbers for both numbers in the pair.
   −
Example: <samp>/advancedMove Clint true 4 0 2 5000 -4 0 1 3000</samp> Clint will have continuous movement moving 4 tiles to the right, facing down upon arriving, waiting for 5 seconds, then moving 4 tiles to the left, facing right upon arriving, then waiting for 3 seconds, then loops because the loop was set to true(see above).
+
Example: <code>/advancedMove Clint true 4 0 2 5000 -4 0 1 3000/</code> Clint will have continuous movement moving 4 tiles to the right, facing down upon arriving, waiting for 5 seconds, then moving 4 tiles to the left, facing right upon arriving, then waiting for 3 seconds, then loops because the loop was set to true(see above).
   −
Example: <samp>advancedMove Pam true 5 0 0 3 3 5000 -6 0 0 -4</samp> Pam first moves 5 tiles to the right, then directly moves 3 tiles downward, faces the to the left upon arriving then waits 5 seconds before moving 6 tiles to the left then moves up 4 tiles directly.
+
Example: <code>/advancedMove Pam true 5 0 0 3 3 5000 -6 0 0 -4/</code> Pam first moves 5 tiles to the right, then directly moves 3 tiles downward, faces the to the left upon arriving then waits 5 seconds before moving 6 tiles to the left then moves up 4 tiles directly.
 
|-
 
|-
 
| <samp>ambientLight {{t|r}} {{t|g}} {{t|b}}</samp>
 
| <samp>ambientLight {{t|r}} {{t|g}} {{t|b}}</samp>
Line 294: Line 294:  
| This command states that the next event commands will all be done at the same time.  Must also have endSimultaneousCommand after the commands needed to execute at the same time.
 
| This command states that the next event commands will all be done at the same time.  Must also have endSimultaneousCommand after the commands needed to execute at the same time.
 
|-
 
|-
| <samp>broadcastEvent</samp>
+
| <samp>broadcastEvent [local]</samp>
| TODO: Explain broadcastEvent.
+
| Makes the event a "broadcast event", forcing others players connected to also see it. Any players connected will be forced to warp to this event. This is used in some vanilla events like when Lewis shows the farmer the abandoned Community Center.
 +
 
 +
If the "local" option is given (not a boolean), then client players will see the event as if the "farmer" actor was their own farmer instead of the Host farmer. The "local" option isn't used anywhere in the vanilla game.
 
|-
 
|-
 
| <samp>catQuestion</samp>
 
| <samp>catQuestion</samp>
Line 343: Line 345:  
|-
 
|-
 
| <samp>emote {{t|actor}} {{t|emote ID}}</samp>
 
| <samp>emote {{t|actor}} {{t|emote ID}}</samp>
| Make the given NPC name perform an emote, which is a little icon shown above the NPC's head. Emotes are stored in <samp>Content\TileSheets\emotes.xnb</samp> (see [https://www.reddit.com/r/StardewValley/comments/5s5m9g/help_annoyed_squiggle/ddd33qg/ list of emotes]).
+
| Make the given NPC name perform an emote, which is a little icon shown above the NPC's head. Emotes are stored in <samp>Content\TileSheets\emotes.xnb</samp>; see [[#Emotes|list of emotes]].
 
|-
 
|-
 
| <samp>end</samp>
 
| <samp>end</samp>
Line 428: Line 430:  
| <samp>halt</samp>
 
| <samp>halt</samp>
 
| Make everyone stop.
 
| Make everyone stop.
 +
|-
 +
| <samp>hideShadow {{t|actor}} {{t|true/false}}</samp>
 +
| Hide the shadow of the named actor. False unhides it.
 
|-
 
|-
 
| <samp>hospitaldeath</samp>
 
| <samp>hospitaldeath</samp>
Line 436: Line 441:  
|-
 
|-
 
| <samp>ignoreEventTileOffset</samp>
 
| <samp>ignoreEventTileOffset</samp>
| Tile positions in farm events are offset to match the farmhouse position. If an event shouldn't be based on the farmhouse position, add an ignoreEventTileOffset command to disable the offset for that event.
+
| Tile positions in farm events are offset to match the farmhouse position. If an event shouldn't be based on the farmhouse position, add an ignoreEventTileOffset command to disable the offset for that event. This must be the 4th command (after the 3 initial setup ones) to take effect.
 
|-
 
|-
 
| <samp>itemAboveHead {{o|type}}</samp>
 
| <samp>itemAboveHead {{o|type}}</samp>
Line 463: Line 468:  
|-
 
|-
 
| <samp>move {{t|actor}} {{t|x}} {{t|y}} {{t|facing}} {{t|continue}}</samp>
 
| <samp>move {{t|actor}} {{t|x}} {{t|y}} {{t|facing}} {{t|continue}}</samp>
| Make a named NPC move by the given tile offset from their current position (along one axis ''only''), and face the given [[#Directions|direction]] when they're done. To move along multiple axes, you must specify multiple <samp>move</samp> commands. By default the event pauses while a move command is occurring, but if {{t|continue}} is set to ''true'' the movement is asynchronous and will run simultaneously with other event commands.
+
| Make a named NPC move by the given tile offset from their current position (along one axis ''only''), and face the given [[#Directions|direction]] when they're done. To move along multiple axes, you must specify multiple <samp>move</samp> commands. By default the event pauses while a move command is occurring, but if {{t|continue}} is set to ''true'' the movement is asynchronous and will run simultaneously with other event commands. You can also move multiple people at a time in a single event command with move - an example of <samp>/move Abigail 1 0 1 Sam 0 1 1 Sebastian 2 0 1/</samp> will have Abigail, Sam, and Sebastian all move at the same time in their respective directions.
    
|-
 
|-
Line 493: Line 498:  
| <samp>quickQuestion {{t|question}}#{{t|answer1}}#{{t|answer2}}#{{t|answer3}}(break){{t|answer1 script}}(break){{t|answer2 script}}(break){{t|answer3 script}}</samp>
 
| <samp>quickQuestion {{t|question}}#{{t|answer1}}#{{t|answer2}}#{{t|answer3}}(break){{t|answer1 script}}(break){{t|answer2 script}}(break){{t|answer3 script}}</samp>
 
| Show a dialogue box with an optional question and some answers. The answer scripts are sequences of commands separated by <samp>\\</samp>. When the player chooses an answer, the relevant answer script is executed and then the event continues. Usually used when an NPC's response will depend on the answer chosen but nothing else in the event has to depend on it.
 
| Show a dialogue box with an optional question and some answers. The answer scripts are sequences of commands separated by <samp>\\</samp>. When the player chooses an answer, the relevant answer script is executed and then the event continues. Usually used when an NPC's response will depend on the answer chosen but nothing else in the event has to depend on it.
 +
*Note: If quickQuestion is used immediately at the start of an event block (Example: "ExampleEvent": "quickQuestion [rest of the event]"), it will cause a dialogue loop. Adding another command in front of quickQuestion resolves this issue (Example: "ExampleEvent": "pause 1/quickQuestion [rest of the event]").
 
|-
 
|-
 
| <samp>removeItem {{t|object ID}}</samp>
 
| <samp>removeItem {{t|object ID}}</samp>
Line 527: Line 533:  
| Shake the named NPC for the given number of milliseconds.
 
| Shake the named NPC for the given number of milliseconds.
 
|-
 
|-
| <samp>showFrame farmer flip</samp>
+
| <samp>showFrame farmer {{t|frame}} {{t|flip}}</samp>
| Flip the farmer's current sprite along the Y axis. TODO: Behavior with farmer looks strange?
+
| Flip the farmer's current sprite along the Y axis. Farmer looks strange if not facing the correct direction prior to 1.6. Flip is a true/false value.
 
|-
 
|-
 
| <samp>showFrame {{t|actor}} {{t|frame ID}}</samp>
 
| <samp>showFrame {{t|actor}} {{t|frame ID}}</samp>
Line 543: Line 549:  
|-
 
|-
 
| <samp>specificTemporarySprite {{t|sprite}} {{o|other params}}</samp>
 
| <samp>specificTemporarySprite {{t|sprite}} {{o|other params}}</samp>
| Shows the given temporary sprite. Parameters change depending on the sprite.
+
| Shows the given temporary sprite. Parameters change depending on the sprite. '''These are quite hardcoded and probably not easily reusable, other than the little heart.'''
 
|-
 
|-
 
| <samp>speed farmer {{t|modifier}}</samp>
 
| <samp>speed farmer {{t|modifier}}</samp>
Line 603: Line 609:  
|-
 
|-
 
| <samp>viewport move {{t|x}} {{t|y}} {{t|duration}}</samp>
 
| <samp>viewport move {{t|x}} {{t|y}} {{t|duration}}</samp>
| Pan the the camera in the direction (and with the velocity) defined by ''x/y'' for the given duration in milliseconds. Example: ''"viewport move 2 -1 5000"'' moves the camera 2 pixels right and 1 pixel up for 5 seconds.
+
| Pan the the camera in the direction (and with the velocity) defined by ''x/y'' for the given duration in milliseconds. Example: ''"viewport move 2 -1 5000"'' moves the camera 2 pixels right and 1 pixel up for 5 seconds. The total distance moved is based on framerate, rather than time, and may be inconsistent.
 
|-
 
|-
 
| <samp>viewport {{t|x}} {{t|y}} [true [unfreeze]&#124;clamp [true&#124;unfreeze]]</samp>
 
| <samp>viewport {{t|x}} {{t|y}} [true [unfreeze]&#124;clamp [true&#124;unfreeze]]</samp>
Line 634: Line 640:  
|}
 
|}
   −
If a command begins with the two characters '--', it is ignored. This can be used to insert comments or to disable commands temporarily while debugging an event.
+
===Comments===
 +
A command which begins with <code>--</code> is ignored. This can be used to insert comments or to disable commands temporarily while debugging an event. The comment ends at the next slash delimiter (<code>/</code>), so it can't contain slashes.
 +
 
 +
For example:
 +
<syntaxhighlight lang="js">
 +
"666/": "none/-1000 -1000/farmer 5 7 0/skippable/viewport 5 7 10/--set viewport near door/pause 2000/end"
 +
</syntaxHighlight>
    
===Directions===
 
===Directions===
Line 706: Line 718:  
| linusMoneyGone
 
| linusMoneyGone
 
| ??? (seems to be unused)
 
| ??? (seems to be unused)
 +
|-
 +
| marucomet
 +
| Maru Comet scene from her 14 heart event
 
|-
 
|-
 
| plane
 
| plane
Line 716: Line 731:  
===Dialogue format===
 
===Dialogue format===
 
See [[Modding:Dialogue#Format]].
 
See [[Modding:Dialogue#Format]].
 +
 +
==Common values==
 +
===Emotes===
 +
An ''emote'' is an animated icon bubble shown above an NPC's head to indicate a mood or reaction. Emote icons are stored in the <samp>TileSheets\emotes</samp> asset.
 +
 +
{| class="wikitable"
 +
|-
 +
! ID
 +
! <samp>Character</samp> constant
 +
|-
 +
| 4
 +
| <samp>emptyCanEmote</samp>
 +
|-
 +
| 8
 +
| <samp>questionMarkEmote</samp>
 +
|-
 +
| 12
 +
| <samp>angryEmote</samp>
 +
|-
 +
| 16
 +
| <samp>exclamationEmote</samp>
 +
|-
 +
| 20
 +
| <samp>heartEmote</samp>
 +
|-
 +
| 24
 +
| <samp>sleepEmote</samp>
 +
|-
 +
| 28
 +
| <samp>sadEmote</samp>
 +
|-
 +
| 32
 +
| <samp>happyEmote</samp>
 +
|-
 +
| 36
 +
| <samp>xEmote</samp>
 +
|-
 +
| 40
 +
| <samp>pauseEmote</samp>
 +
|-
 +
| 44
 +
| ''unused''
 +
|-
 +
| 48
 +
| ''unused''
 +
|-
 +
| 52
 +
| <samp>videoGameEmote</samp>
 +
|-
 +
| 56
 +
| <samp>musicNoteEmote</samp>
 +
|-
 +
| 60
 +
| <samp>blushEmote</samp>
 +
|}
    
==See also==
 
==See also==

Navigation menu