It's raining - making weather mods work

One of the things that I really like to do is include things like rain and stuff like that in my game. At the moment though I am having trouble getting these three extensions to work together, even though they are supposed to:

Weather by Ish McGravin. Atmospheric Effects by Mikael Segercrantz. Weather Effects by Mikael Segercrantz.

Atmospheric Effects appears to be the main problem, I tried to run Weather Effects with the example scene copy-pasted into my test window on its own with all the tabs on the tables redone but I get this error:

Does anyone know if they are still compatible or is is something I did?

It looks to me as though Atmospheric Effects just isn’t compatible with the latest version of Inform as written. The version numbers suggest it was last updated in '08, and it says “Upgraded for 5T18” which suggests it isn’t updated for the latest version (which is 6G60).

But I think this should be pretty simple to fix on your own (though I’m not going to test it, so you’ll have to try it). The culprit is a line in the middle of a block that begins “repeat with n running from 1 to count:” in which the author wrote “change n to count.” That’s now outlawed; as the error message says, changing the counter of the repeat loop by hand in the middle of the loop could lead to chaos. But it seems as though what the author wanted to do was just end the loop, and there’s a special command for that (see section 11.12 of the documentation): “break.”

So you can go into Atmospheric Effects, find this block in Section 7(a)1:

if shw is 1: clean regions; let count be the number of located regions; repeat with n running from 1 to count: let the final region be the smallest unshown region; if the final region is not the empty region: display messages of the final region; change isshown of the final region to already shown; otherwise: change n to count.

and change the last line to “break.” I think that’ll solve this error and produce the desired behavior.

(Unfortunately, the “change” syntax that this extension uses all over the place is deprecated – see section 8.1 of the manual – which means that the next time Inform updates the extension is almost certain to break in a way that will require lots of tedious editing to get it running again. But if you want to use it you can always hold off on updating Inform. Or go through and change “change foo to bar” to “now foo is bar” wherever you see it.)

Thanks for your help, it works now and I have updated the whole module plus Weather Effects by fixing all the ‘change’ lines as I definitely want them to be compatible with later versions of Inform. Didn’t take too long with the ‘find’ command.

Would there be any way to get the guys who look after the extensions to replace these files with this fixed versions so nobody else has any trouble? These seem like some great addons that we shouldn’t let got to waste.

I also ran into this issue, thanks for posting… was it ever added to an updated extension?