Diferenças entre edições de "Modificações:Dados climáticos"

Fonte: Stardew Valley Wiki
Saltar para a navegação Saltar para a pesquisa
(Tradução continuada, textos de diálogo ainda carecem de tradução)
Linha 226: Linha 226:
 
| Por condições:
 
| Por condições:
 
# Se primavera: "Partially cloudy with a light breeze. Expect lots of pollen!"
 
# Se primavera: "Partially cloudy with a light breeze. Expect lots of pollen!"
# Se não outono: "It's going to snow all day. Make sure you bundle up, folks!" e o seu padrão é: "It's going to be cloudy, with gusts of wind throught the day."
+
# Se não é outono: "It's going to snow all day. Make sure you bundle up, folks!" e o seu padrão é: "It's going to be cloudy, with gusts of wind throught the day."
 
# Se tempestade: "Looks like a storm is approaching. Thunder and lightning is expected."
 
# Se tempestade: "Looks like a storm is approaching. Thunder and lightning is expected."
 
# Se festival, o jogo tenta ler as informações do festival. Se ele falhar, a seguinte mensagem será mostrada "Um... that's odd. My information sheet just says 'null'. This is embarrassing..." Se ele tiver sucesso ele falará quando e onde é o festival.
 
# Se festival, o jogo tenta ler as informações do festival. Se ele falhar, a seguinte mensagem será mostrada "Um... that's odd. My information sheet just says 'null'. This is embarrassing..." Se ele tiver sucesso ele falará quando e onde é o festival.
Linha 235: Linha 235:
 
|}
 
|}
  
'''Note:''' the TV will not necessarily be accurate for any other day than non festival days, the first of the month and the 3rd of spring, which are force-set by the <tt>Game1::newDayAfterFade</tt> method. Farmhands (and not host players) may not even get that accuracy for the first of the month and 3rd of spring.
+
'''Nota:''' A TV não será necessariamente precisa para qualquer outro dia que não seja dias de festival, o primeiro dia do mês e o terceiro dia da primavera, que são definidos à força pelo método <tt>Game1::newDayAfterFade</tt>. Ajudantes de fazenda(e jogadores que não são o host) podem até mesmo não conseguir essa precisão no primeiro dia do mês ou no terceiro dia da primavera.
  
'''Note 2:''' The Night Market is not considered a festival for the purposes of weather.
+
'''Nota 2:''' O Mercado Noturno não é considerado um festival quando se trata do clima.
  
===Weather Icon===
+
===Ícone do Clima===
The weather icon is set in <tt>Game1::updateWeatherIcon</tt>, which sets an index in <tt>LooseSprite/Cursors.xnb</tt>:
+
O ícone do clima é definido em <tt>Game1::updateWeatherIcon</tt>, que define um index em <tt>LooseSprite/Cursors.xnb</tt>:
  
# If snowing: 7.
+
# Se nevando: 7.
# If sunny: 2.
+
# Se ensolarado: 2.
# If wedding: 0.
+
# Se casamento: 0.
# If festival: 1.
+
# Se festival: 1.
# If raining: 4.
+
# Se chovendo: 4.
# If stormy: 5.
+
# Se tempestade: 5.
# If spring: debris weather is 3.
+
# Se primavera: clima com detritos é is 3.
# If summer: unset (defaults to sunny).
+
# Se verão: não definido (torna ao padrão que é ensolarado).
# If fall: 6.
+
# Se outono: 6.
# If winter: 7 (same as snowing).
+
# Se inverno: 7 (o mesmo que nevando).
  
===Rain Totem===
+
===Totem de Chuva===
The rain totem (item #681) and is controlled by <tt>Object::rainTotem</tt>, which is invoked by <tt>Object::performUseAction</tt>. If tomorrow is a festival day, the item is used up but nothing happens. Otherwise, it uses up the item and sets the weather for tomorrow to <tt>weather_rain</tt> and displays the message.
+
O totem de chuva(item #681) é controlado pelo <tt>Object::rainTotem</tt>, que é invocado pelo <tt>Object::performUseAction</tt>. Se amanhã é um dia de festival, o item é usado mas nada acontece. Caso contrário, um item é usado e define o clima de amanhã para <tt>weather_rain</tt> e mostra uma mensagem.
  
==Weather probability by type==
+
==Probabilidade de clima por tipo==
This section explains the probability of each weather type. This only applies on dates with no [[#Forced weather|forced weather]].
+
Essa seção explica a probabilidade de cada tipo de clima. Isso somente se aplica à datas que não tenham [[#Clima_fixo|clima fixo]].
  
===Sunny===
+
===Ensolarado===
Sunny weather covers weather variables 0, 4, and 6.
+
O clima ensolarado cobre as variáveis de clima 0,4 e 6.
  
 
* Spring: there's an 18.3% base chance of rain (81.7% chance remaining for other weathers). If it doesn't rain, there's an 80% chance to remain sunny (except on spring 3, which will always be rainy). That means that in spring there's a 66.4% chance of sunny weather.
 
* Spring: there's an 18.3% base chance of rain (81.7% chance remaining for other weathers). If it doesn't rain, there's an 80% chance to remain sunny (except on spring 3, which will always be rainy). That means that in spring there's a 66.4% chance of sunny weather.

Revisão das 19h30min de 17 de dezembro de 2019

Índice

Robin building.png
“Ainda tenho muito trabalho a fazer”
— Robin

Tradução incompleta

Este artigo ou seção não foi completamente traduzido para o português. Você está convidado a ajudar na sua construção editando-o
Última edição por CodingBeats em 2019-12-17 19:30:18.

Esta página documenta como é gerado o clima dentro do jogo.

Dados

O clima é controlado integralmente pelo campo Game1::weatherForTomorrow. Os possível valores são:

valor constante clima
0 weather_sunny Ensolarado
1 weather_rain Chovendo
2 weather_debris Ventando
3 weather_lightning Tempestade
4 weather_festival Festival
5 weather_snow Neve
6 weather_wedding Casamento

Algoritmo

Clima fixo

Certas datas possuem sempre o mesmo clima:

data clima sobrescrito por
primavera 1 weather_sunny newday e tv
primevera 2 (ano 1) weather_sunny newday
primavera 3 (ano 1) weather_rain newday
primavera 4 (ano 1) weather_sunny newday
primavera 13 weather_festival newday
primavera 24 weather_festival newday
verão 1 weather_sunny newday e tv
verão 11 weather_festival newday
verão 13 weather_lightning newday
verão 26 weather_lightning newday
verão 28 weather_festival newday
outono 1 weather_sunny newday e tv
outono 16 weather_festival newday
outono 27 weather_festival newday
inverno 1 weather_sunny newday e tv
inverno 8 weather_festival newday
inverno 14 weather_sunny newday
inverno 15 weather_sunny newday
inverno 16 weather_sunny newday
inverno 25 weather_festival newday

Geração do clima

O clima em Stardew Valley é definido dentro da função Game1::newDayAfterFade() (após o código de mudança de dia, mas antes do evento do SMAPI SaveEvents.BeforeSave).

O jogo segue estes passos para decidir que clima e detritos serão definidos para o dia seguinte:

  1. Verifique o clima fixo.
  2. Se hoje é um festival, define o clima como weather_festival.
  3. Se hoje é um casamento, define o clima como weather_wedding.
  4. Define Game1::wasRainingYesterday com base em se havia chuva ou tempestade.
  5. Redefine todos os sinalizadores de tempo e os coloca no seguinte padrão:
    1. Se vai haver chuva ou tempestade, ajusta o sinal de chuva para true;
    2. Se vai haver uma tempestade, ajusta o sinal de tempestade para true;
    3. Se o tempo é (ensolarado, detritos) ou (festival, nevando, casamento), limpa todos os sinalizadores;
    4. Se estiver nevando, define nevando para true;
    5. Em seguida, define a música com base nisto;
    6. Limpa a matriz meteorológica de detritos e os sinalizadores;
    7. Se o pólen não for nulo, limpa sua visibilidade;
    8. Se o casamento é detrito, popula o array de detritos;
  6. Se não está chovendo e a chance de chover amanhã é menor que 0,1, o jogo tentará criar um dia com pólen.
  7. O jogo então calcula a chance de chuva para amanhã. Ele segue o seguinte algoritmo:
    1. Checa se é verão:
      1. Se não é verão, checa se é inverno:
        1. Se não é inverno, a chance de chuva é de 0,183;
        2. Senão, é 0,63;
      2. Se é verão, o jogo usa o seguinte: Checa se é o dia 1;
        1. Se não é, a chance é de 0,12 + Game1::dayOfMonth * 3/1000;
        2. Se é, a chance é 0. O que.. é meio redundante, já que os dias de clima fixo já cuidam disso;
  8. Checa se um número randômico é menor do que as chances. Se sim, o jogo segue o seguinte algoritmo:
    1. Define Game1::weatherForTomorrow para weather_rain;
    2. Se:
      1. É verão e o número randômico é menor que 0,85;
      2. Ou se não é inverno e se o número randômico é menor que 0,25 E o dia do mês é maior que 2 e mais do que 27 dias já foram jogados;
      3. Define Game1::weatherForTomorrow para weather_lightning
    3. Se e inverno:
      1. Define Game1::weatherForTomorrow para weather_snow
  9. Senão, se o número for maior que a chance de chover:
    1. Se você jogou menos que 3 dias:
    2. Ou, se:
      1. Não é primavera ou um número randômico é igual ou maior a 0,2 (então 80%) e é primavera;
      2. E não é outono ou um número randômico é maior ou igual a 0,6 (então 40%) e é outono;
      3. Ou, se é um dia de casamento hoje:
        1. Define Game1::weatherForTomorrow para weather_sunny se verdadeiro;
        2. Define Game1::weatherForTomorrow para weather_debris se falso;
    3. Checa se amanhã e um festival e define o clima para weather_festival se verdadeiro;
    4. Novamente força o terceiro dia a ser weather_rain;

Nesse ponto, a função principal do jogo termina a definição do clima.

Previsão do tempo

A TV checa o clima, mas vai ocasionalmente defini-lo em certos dias. Isso e mostrado na seguinte tabela.

A TV define o clima nos dias:

data clima
primavera 1 weather_sunny¹
primavera 3 weather_rainy¹
verão1 weather_sunny¹
outono 1 weather_sunny¹
inverno 1 weather_sunny¹

¹ Também definido (e portanto sobrescrito) pelo método Game1::newDayAfterFade().

A TV irá checar o clima e mostrará a seguinte mensagem:

clima menssagem
ensolarado ou casamento 50% de chance cada:
  • "It's going to be clear and sunny all day."
  • "It's going to be a beautiful, sunny day tommorow!"
chuva "It's going to rain all day tomorrow"
deritos Por condições:
  1. Se primavera: "Partially cloudy with a light breeze. Expect lots of pollen!"
  2. Se não é outono: "It's going to snow all day. Make sure you bundle up, folks!" e o seu padrão é: "It's going to be cloudy, with gusts of wind throught the day."
  3. Se tempestade: "Looks like a storm is approaching. Thunder and lightning is expected."
  4. Se festival, o jogo tenta ler as informações do festival. Se ele falhar, a seguinte mensagem será mostrada "Um... that's odd. My information sheet just says 'null'. This is embarrassing..." Se ele tiver sucesso ele falará quando e onde é o festival.
  5. Se nevar, tem 50% de chance entre dois possíveis diálogos: "Expect a few inches of snow tomorrow" ou "Bundle up, folks. It's going to snow tomorrow!"
qualquer outro Retorna uma string vazia (nunca deve acontecer).

Nota: A TV não será necessariamente precisa para qualquer outro dia que não seja dias de festival, o primeiro dia do mês e o terceiro dia da primavera, que são definidos à força pelo método Game1::newDayAfterFade. Ajudantes de fazenda(e jogadores que não são o host) podem até mesmo não conseguir essa precisão no primeiro dia do mês ou no terceiro dia da primavera.

Nota 2: O Mercado Noturno não é considerado um festival quando se trata do clima.

Ícone do Clima

O ícone do clima é definido em Game1::updateWeatherIcon, que define um index em LooseSprite/Cursors.xnb:

  1. Se nevando: 7.
  2. Se ensolarado: 2.
  3. Se casamento: 0.
  4. Se festival: 1.
  5. Se chovendo: 4.
  6. Se tempestade: 5.
  7. Se primavera: clima com detritos é is 3.
  8. Se verão: não definido (torna ao padrão que é ensolarado).
  9. Se outono: 6.
  10. Se inverno: 7 (o mesmo que nevando).

Totem de Chuva

O totem de chuva(item #681) é controlado pelo Object::rainTotem, que é invocado pelo Object::performUseAction. Se amanhã é um dia de festival, o item é usado mas nada acontece. Caso contrário, um item é usado e define o clima de amanhã para weather_rain e mostra uma mensagem.

Probabilidade de clima por tipo

Essa seção explica a probabilidade de cada tipo de clima. Isso somente se aplica à datas que não tenham clima fixo.

Ensolarado

O clima ensolarado cobre as variáveis de clima 0,4 e 6.

  • Spring: there's an 18.3% base chance of rain (81.7% chance remaining for other weathers). If it doesn't rain, there's an 80% chance to remain sunny (except on spring 3, which will always be rainy). That means that in spring there's a 66.4% chance of sunny weather.
  • Summer: The chance of sunny weather diminishes steadily per day from 86% on summer 1 to 79.9% on summer 28. The precise chance is 1 - [13% + (.3 * day of the month)] per day, with a 0% chance on day 1.
  • Fall: identical to spring, but no forced weather.
  • Winter: there's a 63% chance of precipitation, so only a 37% chance of sunny weather.

Rainy

  • Spring: there's an 18.3% base chance of rain. If it rains, there's a 25% chance of storms except in year 1. So the rain odds in Spring is a flat 18.3% in year 1, and 13.725% in year 2 or later. It will always rain on spring 3 (year 1).
  • Summer: the chance of rainy weather increases steadily per day from 14% on summer 2 to 21.1% on Summer 27. There's an 85% chance that rain becomes storms. So you have a scale of [13% + (.3 * day of the month)] * .85 to determine your chances of rainfall.
  • Fall: same as spring, except fall in year 1 can be stormy so it's a flat 13.725% chance.
  • Winter: never rains.

Debris

Debris weather covers weather variable 2.

  • Spring: there's a 20% chance of this after rain, so approximately 16.6% chance of debris weather.
  • Summer: no debris weather.
  • Fall: there's a 60% chance for this after rain, so approximately 49.8% chance of debris weather.
  • Winter: no debris weather.

Stormy

Stormy weather covers weather variable 3.

  • Spring: 4.57% chance of storms.
  • Summer: variable chance of storms; starts at 11.9% and increases to 17.9%.
  • Fall: 4.57% chance of storms.
  • Winter: no stormy weather.

Snowy

In winter, there's a 63% chance of snow. No other season has snow.

Salvar arquivos

O arquivo salvo é um instantâneo do dia às 06h00 da manhã seguinte. O campo WeatherForTommorow foi usado para calcular o tempo, mas alterá-lo não tem efeito sobre o tempo, uma vez que os sinalizadores de tempo já foram definidos por este ponto. Para alterar o clima, você precisa definir uma dessas combinações de sinalizadores:

weather isRaining isDebrisWeather isLightning isSnowing
Ensolarado
Chuvoso
Tempestade
Detritos
Nevasca
festival
Casamento

Note: changing isDebrisWeather during an active game will not create the array. You'll need to call Game1::populateDebrisWeatherArray to get the debris populated. Correspondingly, if you're removing the debris weather flag, remember to call Game1::debrisWeather::Clear.

Notes/FAQ

  • A TV pode ser consertada substituindo-a - ou apenas usando o Entoroax's Framework.
  • Você pode definir neve e detritos a qualquer momento, o jogo simplesmente não vai.
  • Você não pode colocar detritos e chover ao mesmo tempo.