Changes

Jump to navigation Jump to search
→‎Custom movies: update for build 24016 (revamped movie selection and translations)
Line 6,324: Line 6,324:  
: ''See also: [[#Custom movie concessions|custom movie concessions]].''
 
: ''See also: [[#Custom movie concessions|custom movie concessions]].''
   −
You could already [[Modding:Movie theater data#Movie data|add/edit movies]] shown in the [[Movie Theater|movie theater]], but conflicts were likely since the poster & screen sprites for each movie had to be in the vanilla <samp>LooseSprites/Movies</samp> spritesheet.
+
[[Modding:Movie theater data#Movie data|Movie data]] was previously very limited and prone to mod conflicts, since (a) we needed incrementing movie IDs like <samp>spring_movie_3</samp>, (b) we were limited to one movie per season, and (c) all sprites for each movie had to be in the vanilla <samp>LooseSprites/Movies</samp> spritesheet.
   −
Stardew Valley 1.6 adds a new movie field in <samp>Data/Movies</samp> to fix that:
+
Stardew Valley 1.6 revamps how movies work to address those limitations.
 +
 
 +
<dl>
 +
<dt>Movie selection</dt>
 +
<dd><p>Movies were previously selected based on a specific ID pattern: <samp>spring_movie_0</samp> would play in spring the year you built the movie theater, <samp>spring_movie_1</samp> would play in spring the next year, etc.</p>
 +
 
 +
Movies are now selected based on the three new fields below instead. If multiple movies can play in the same season, each movie will be shown for an equal block of days within the month (e.g. four movies will each play for seven consecutive days). If there are more movies than days, 28 movies will be chosen at random to play that month.
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! effect
 +
|-
 +
| <samp>Seasons</samp>
 +
| ''(Optional)'' The seasons when the movie should play, or omit for any season. For example:
 +
<syntaxhighlight lang="js">"Seasons": [ "Spring", "Summer" ]</syntaxhighlight>
 +
|-
 +
| <samp>YearModulus</samp><br /><samp>YearRemainder</samp>
 +
| ''(Optional)'' If set, plays the movie on alternating years based on the formula <samp>theater_age % modulus == remainder</samp>, where <samp>theater_age</samp> is the number of years since the movie theater was built. If omitted, the movie plays in any year.
 +
 
 +
For example:
 +
 
 +
<syntaxhighlight lang="js">
 +
// play in the first year, and every other year thereafter
 +
"YearModulus": 2,
 +
"YearRemainder": 0
 +
</syntaxhighlight>
 +
<syntaxhighlight lang="js">
 +
// play in the second year, and every other year thereafter
 +
"YearModulus": 2,
 +
"YearRemainder": 1
 +
</syntaxhighlight>
 +
|}
 +
</dd>
 +
 
 +
<dt>Movie textures</dt>
 +
<dd>
 +
The new <samp>Texture</samp> field in <samp>Data/Movies</samp> lets mods use their own movie spritesheet to avoid conflicts with other mods:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 6,338: Line 6,374:  
|}
 
|}
   −
The existing <samp>SpriteIndex</samp> field is now an index within that texture.
+
The existing <samp>SpriteIndex</samp> field is now an index within that texture.</dd>
   −
For example, this content pack adds a new 'Pufferchick II' movie:
+
<dt>Asset changes</dt>
 +
<dd>In addition to the field changes above, there are two main changes to the movie format:
 +
* <samp>Data/Movies</samp> and <samp>Data/MoviesReactions</samp> no longer have language variants. Instead translations were moved into <samp>Strings/*</samp> assets, and the data assets use [[Modding:Tokenizable strings|tokenizable strings]] to get text.
 +
* <samp>Data/Movies</samp> is now a list instead of a dictionary. The order determines the order movies are shown within a season. Content packs can edit them the same way as before.
 +
</dd>
 +
</dl>
 +
 
 +
For example, this content pack adds a new 'Pufferchick II' movie which plays in winter every third year:
 
{{#tag:syntaxhighlight|<nowiki>
 
{{#tag:syntaxhighlight|<nowiki>
 
{
 
{
Line 6,349: Line 6,392:  
             "Target": "Data/Movies",
 
             "Target": "Data/Movies",
 
             "Entries": {
 
             "Entries": {
                 "Example.ModId_PufferchickII": {
+
                 "{{ModId}}_PufferchickII": {
                     "Id": "Example.ModId_PufferchickII", // must specify ID again when creating a new entry
+
                     "Id": "{{ModId}}_PufferchickII", // must specify ID again when creating a new entry
 +
 
 +
                    "Seasons": [ "winter" ],
 +
                    "YearModulus": 3,
 +
                    "YearRemainder": 0,
    
                     "Title": "Pufferchick II", // display text should usually use {{i18n}} for translations in actual usage
 
                     "Title": "Pufferchick II", // display text should usually use {{i18n}} for translations in actual usage
translators
8,445

edits

Navigation menu