Welcome to the Builder Academy

Question Control weather

More
24 Mar 2016 15:18 #5685 by Kyle
Replied by Kyle on topic Control weather
Good point. I just tested and it doesn't check if you are outside either. Note the discrepancy between this and the help files.

I didn't even notice this as I had removed both spells from my MUD. Perhaps the spell is just unfinished, like the call weather spell, or maybe it was just overlooked.

Anyways, it's an easy exercise to make the spell work like its help file (much easier than fixing control weather) or whatever other behaviour you want.

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

More
24 Mar 2016 16:25 - 24 Mar 2016 16:29 #5686 by JTP
Replied by JTP on topic Control weather
But the control weather code now Works, and you can change the weather ?
Last edit: 24 Mar 2016 16:29 by JTP.

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

More
26 Mar 2016 00:48 #5688 by WhiskyTest
Replied by WhiskyTest on 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
26 Mar 2016 02:53 #5689 by Kyle
Replied by Kyle on 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.

More
30 Mar 2016 22:40 - 30 Mar 2016 22:50 #5715 by JTP
Replied by JTP on 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: 30 Mar 2016 22:50 by JTP.

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

More
31 Mar 2016 04:01 #5717 by WhiskyTest
Replied by WhiskyTest on 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.

Time to create page: 0.243 seconds