Weather Forcast Macro

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
Gluzzer
Kobold
Posts: 1
Joined: Sun Feb 09, 2014 3:35 am

Re: Weather Forcast Macro

Post by Gluzzer »

As I could not find a way to update my original post here is the current changes to this macro.

I was finding that with the current roll of 1d3-1 sever weather was a common thing. I have then changed this to be 1d6 and then 1=No Change 2-5=Moderate weather 6=Sever Weather.

This seems to have evened out the weather a bit more.

Here is the current macro code.

Code: Select all

/self Weather Forcast
<br>
<br>
<!--

Rolling to see if weather will change
[WeatherChange=1d6]
<br>
{WeatherChange}
<br>
Weather Times
[ChangeTimer=1d4]
[Duration=2d12]

Rolling to see what the weather will change to
[NewWeather=if(WeatherChange==0, 1, 0)]
[NewWeather=if(WeatherChange>=1)&&(WeatherChange<=5), 2, "'"+NewWeather+"'")]
[NewWeather=if(WeatherChange==6, 3, "'"+NewWeather+"'")]

[RollWeather=if(NewWeather==1, 0, 0)]
[RollWeather=if(NewWeather==2, 1d20-2, "'"+RollWeather+"'")]
[RollWeather=if(NewWeather==3, 1d20+10, "'"+RollWeather+"'")]


[NewWeatherType=' ']
[NewWeatherType=if(RollWeather==0, "'"+"The weather shows no signs of changing."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather > 0)&&(RollWeather < 6), "'"+"The Weather Forecast is calling for Clear Skies."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather>=6)&&(RollWeather<=9), "'"+"The Weather Forecast is calling a 10% chance of precipitation."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if((RollWeather>=10)&&(RollWeather<=12), "'"+"The Weather Forecast is calling a 25% chance of precipitation."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if((RollWeather>=13)&&(RollWeather<=14), "'"+"The Weather Forecast is calling a 50% chance of precipitation."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if((RollWeather>=15)&&(RollWeather<=16), "'"+"The Weather Forecast is calling a 75% chance of precipitation."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if(RollWeather==17, "'"+"The Weather Forecast is calling a Heat wave."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if(RollWeather==18, "'"+"The Weather Forecast is calling a Cold snap."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if(RollWeather==19, "'"+"The Weather Forecast is calling a Heavy Snow/Rain Storm or Sandstorm."+"'", "'"+NewWeatherType+"'")] 
[NewWeatherType=if(RollWeather>=20, "'"+"The Weather Forecast is calling a Thunderstorm/Blizzard/Sandstorm."+"'", "'"+NewWeatherType+"'")] 


Confirm Percentage
[ConfirmPercent=1d100]

 -->
{NewWeatherType} 
<br>
It will probably stay this way for {Duration} hours.
<br>
Confirm for Weather: {ConfirmPercent}% 
<br>
Attachments
WeatherForecast-v2.mtmacro
(1.24 KiB) Downloaded 85 times

User avatar
Sereptus
Giant
Posts: 123
Joined: Tue Jun 07, 2011 12:08 pm
Location: Canada

Re: Weather Forcast Macro

Post by Sereptus »

THIS DOES NOT WORK
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Weather Forcast Macro

Post by Full Bleed »

Sereptus wrote:THIS DOES NOT WORK
This isn't the way I'd write this macro... but the problem is that it's missing a parenthesis on line 17.

Here is the fix:

Code: Select all

/self Weather Forcast
<br>
<br>
<!--

Rolling to see if weather will change
[WeatherChange=1d6]
<br>
{WeatherChange}
<br>
Weather Times
[ChangeTimer=1d4]
[Duration=2d12]

Rolling to see what the weather will change to
[NewWeather=if(WeatherChange==0, 1, 0)]
[NewWeather=if((WeatherChange>=1)&&(WeatherChange<=5), 2, "'"+NewWeather+"'")]
[NewWeather=if(WeatherChange==6, 3, "'"+NewWeather+"'")]

[RollWeather=if(NewWeather==1, 0, 0)]
[RollWeather=if(NewWeather==2, 1d20-2, "'"+RollWeather+"'")]
[RollWeather=if(NewWeather==3, 1d20+10, "'"+RollWeather+"'")]


[NewWeatherType=' ']
[NewWeatherType=if(RollWeather==0, "'"+"The weather shows no signs of changing."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather > 0)&&(RollWeather < 6), "'"+"The Weather Forecast is calling for Clear Skies."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather>=6)&&(RollWeather<=9), "'"+"The Weather Forecast is calling a 10% chance of precipitation."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather>=10)&&(RollWeather<=12), "'"+"The Weather Forecast is calling a 25% chance of precipitation."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather>=13)&&(RollWeather<=14), "'"+"The Weather Forecast is calling a 50% chance of precipitation."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if((RollWeather>=15)&&(RollWeather<=16), "'"+"The Weather Forecast is calling a 75% chance of precipitation."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if(RollWeather==17, "'"+"The Weather Forecast is calling a Heat wave."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if(RollWeather==18, "'"+"The Weather Forecast is calling a Cold snap."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if(RollWeather==19, "'"+"The Weather Forecast is calling a Heavy Snow/Rain Storm or Sandstorm."+"'", "'"+NewWeatherType+"'")]
[NewWeatherType=if(RollWeather>=20, "'"+"The Weather Forecast is calling a Thunderstorm/Blizzard/Sandstorm."+"'", "'"+NewWeatherType+"'")]


Confirm Percentage
[ConfirmPercent=1d100]

 -->
{NewWeatherType}
<br>
It will probably stay this way for {Duration} hours.
<br>
Confirm for Weather: {ConfirmPercent}%
<br>
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
Sereptus
Giant
Posts: 123
Joined: Tue Jun 07, 2011 12:08 pm
Location: Canada

Re: Weather Forcast Macro

Post by Sereptus »

Good catch Full Bleed, I'm going to add a pop-up for climate or season, eg. temperate, summer, winter, jungle etc. That should keep me busy for a while.
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!

Post Reply

Return to “User Creations”