Control weather

More
2 years 1 month ago #5688 by WhiskyTest
WhiskyTest replied the topic: Control weather
Yep its working, this is the run-down:

Weather is one of four settings:
SKY_CLOUDLESS 0
SKY_CLOUDY 1
SKY_RAINING 2
SKY_LIGHTNING 3

If you cast control weather 'better' it will shift the weather one place less, making it better.
It also adds 1d6 to the change value, which when positive makes the natural weather shift towards better weather.

Control weather 'worse' just does the opposite.

Plenty of room to expand on it, like: making more powerful mages able to specify exactly what weather they want; having it shift more than one place; making it affect the pressure values; or having the spell only affect the change value which means it would take longer to have an effect

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #5689 by Kyle
Kyle replied the topic: Control weather
Might be better to have a more complicated control weather spell if weather had more of an effect on the game.

Maybe the move cost between rooms could be dependant on the weather.

Example, travelling through mountains at night in the rain is harder so costs more move than say during cloudy day.

Could make travelling long distances much easier with a cleric controlling the weather.

Might be too specific for a codebase though, more of an idea of where someone could go with it on their own MUD.

Please Log in or Create an account to join the conversation.

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 years 1 month ago - 2 years 1 month ago #5715 by JTP
JTP replied the topic: Control weather
Ok i tried it out..

first try with cast 'control weather'
i got msg to use worse or better. check.

I cast 'control weather' worse several times...i got the msg the weather darkens every time. My test char in another room also got the msg the weater darkens. So far so good.
A few minutes later the sun went down and the night begun. The weather didnt get worse at all ??


BUT then i tried cast 'control weather'
WITHOUT worse or better and then suddently i could cast it, Again the weather darkens ????

Seems that after you cast 'control weather' worse...NeXT time you only need to type cast 'control weather'
then if i try cast 'control weather' better, Again NeXT time i only need to type cast 'control weather'
and it still gets better.

After a few the weather gets better, then it started raining.



Seems it might need a Little TLC
Last Edit: 2 years 1 month ago by JTP.

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #5717 by WhiskyTest
WhiskyTest replied the topic: Control weather
That sounds like a side effect of using the global variable cast_arg2. Whoever casts a spell sets the value for cast_arg2, so when the next character comes along and doesn't supply an argument it just looks at cast_arg2 and uses its current (last) value.

As for the weather changing I'm not sure what you are expecting - there isn't much in tbamud stock code that describes what the weather is doing other than when the mud time increases another hour - that's from weather_and_time()
You can check the weather manually by typing the command 'weather'

Also the weather only has a range of 0-4, it can't get 'worse' than four

If you wanted to flesh it out more then I'd start with having more weather messages in-game; maybe even increasing the different types of weather eg: light rain, heavy rain, raining toads etc..; adding a weather description to the room display; decreasing the delay between weather message updates; that kind of thing

Please Log in or Create an account to join the conversation.

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
2 years 1 month ago - 2 years 1 month ago #5719 by JTP
JTP replied the topic: Control weather
Yea arg2 must be working like that, because i tried making the test char into a cleric and did a cast 'control weather'
And it made it do the same outcome as the previous players cast of better.

But well i didnt expect it to rain after doing a few better casts.

But just wanted to let you know about my findings, but atleast it now does more then the spell ever has.
Last Edit: 2 years 1 month ago by JTP.

Please Log in or Create an account to join the conversation.

Time to create page: 1.097 seconds