Page 1 of 1

A-Red's Advanced Scripting Tutorial

Posted: Fri Jan 25, 2008 4:47 pm
by A-Red
When I help other mapmakers figure out how to script something, the problem always seems to come down to a lack of understanding of three of the most complex map actions in Loathing--The GEOM, the MOMA, and the MUNG. Pretty much all advanced scripting revolves around these three actions or some combination of them. But unfortunately, the Loathing documentation doesn't even give any sense of what these actions are really for, much less explain how to use them effectively, and no scripting tutorial I've read has provided much of an explanation either. So I've written one that does.

You can get it here, or at the Tain if an admin someday discovers it.

Hopefully, this will open all of the remaining doors for intermediate scripters.

A-Red

Posted: Fri Jan 25, 2008 5:48 pm
by Khadrelt
Sweet. Thanks, A-Red!

Re: A-Red's Advanced Scripting Tutorial

Posted: Fri Jan 25, 2008 6:15 pm
by Doobie
A-Red wrote: You can get it here, or at the Tain if an admin someday discovers it.

A-Red
discovered

Posted: Fri Jan 25, 2008 7:56 pm
by A-Red
:D Thanks!

Posted: Sat Jan 26, 2008 6:51 am
by haravikk
It's very well-written A-Red, I can't really say how useful it'll be to newer scripters since I know this stuff already, but it's about as clear I think these actions can possibly be made so well-done.

My only comment on Mungers is that I've seen some of the nasty stuff too, but nowadays the worst that happens is Myth will crash, I haven't seen it since I switched from using my old Performa to play (software rendering only, 133mhz of pure power), running OS 8 or thereabouts. So unless someone is desperately trying to make maps which use MUNGs on a slow machine which only supports software rendering then they're unlikely to see something worse than Myth crashing.

The worst thing about MUNGs when it comes down to it, is that they make a map even more difficult to debug if you find your scripts aren't working as expected. I generally steer away from using them unless I have blocks of actions that need re-used with more than two or three different variations to it, otherwise duplicate actions are generally less painful to get right =)

Posted: Sat Jan 26, 2008 6:59 pm
by gugusm
Nice job A-Red, though I'm pretty sure that you actually can edit Activate on Success, Deactivate on Success etc. by Mung. I used to do it and it's been working fine.

Posted: Sun Jan 27, 2008 10:30 am
by Zeph
I already modified an acitvate on success using a munger

Posted: Sun Jan 27, 2008 11:49 am
by A-Red
All right, my bad. But I know I'm not the only one who has had no success trying to do it. The acti thing, fortunately, is hardly any extra work at all.

Any idea what you might have done that some of us didn't? In what way were you editing it? I think I've only tried Replace.

Posted: Sun Jan 27, 2008 5:15 pm
by gugusm
Replace works good for me. I have no idea why it doesn't for you...