View Single Post
Old 10-16-2003, 12:06 PM   #8
erdos
 
Posts: n/a
Seems everyone is replying mostly with things that would fit in better in a thread titled "Elements of style for writing room descriptions" than one titled "Builder's tricks". Before becoming a coder I myself ascended OLC and mastered it and bent it to my will, utterly. Unfortunately, the entirety of my OLC experience is with SMAUG 1.4a codebase, so this may not apply everywhere, but here are some tricks I devised in those days.......

...give mobs fight progs which transcend pulse_violence, so that they go off "in between rounds". This is rather complicated to pull off. It involves having a bunch of utility mobs in a utility room start fighting eachother when the players attack the main mob. These utility mobs are made invincible, but are all given spec_poison. As they poison eachother, the poison echo triggers a prog that causes the main mob to do "fight progs". The reason this works is because spec_functions are called in a different routine than pulse_violence, and so they transcend the combat roudns (thus the reason mobs with spec_functions seem to get extra attacks all the time) [If any old DSFT players are reading this who fought King Gallant... now you know how he did it!]

...give mobs artificial memory by having them drop utility items in a utility room. They can later try picking these back up, and then using ifchecks to see if they have them in their inventory.... in this way, in one of my very first areas I created a village of dwarves who were peaceful by default but all became aggro as soon as you attacked any one of them

...When I was a clan deity on DSFTales, (a good MUD which lacked any coder whatsoever), as a gift I created a locker room for the clan--- without any locker room snippets whatsoever! I kid you not. It is possible to do entirely with stock SMAUG OLC; it involves a tremendously complicated process of invoking containers, mposet'ing their keywords so that, for instance, Joe's container will have "Joe_" as one keyword... then when the player says "unlock", a mobinvis mob tries to unlock "$n_", then invokes a utility item and tries to put it in "$n_", then checks to see if the item is still in inventory... if so, then $n apparently doesn't have a locker, and an echo is sent accordingly. Else, $n evidently DOES have a locker, so take the item back out and purge it and echo to the effect of "your locker swings open". Of course all this must take place in the clan's store room since stock SMAUG only allows 1 saveroom per clan...

A simple but beautiful trick: combine the "eatkey" exit flag and an "unlocks" act prog for some key-destroying fun! "You unlock the door. *Click* Suddenly the key explodes in your hand! That really did HURT!"

Another simple and amusing thing: create a weapon that does, say, 1d200 damage, but at the same time casts 'heal' to recover 100hp... so that, essentially, its damage ranges from 100 to -99 (HEALING 99hp!) [Be warned though, this sword becomes overpowered in nonmagic rooms:(

For pure eye candy: if a mob moves about but is restricted to a reasonably small space, make it sneak but give it entry progs which check where it came from and where it is now and thereby essentially give it its own unique entrance echoes, including direction. ("You feel a certain turbulence in the water. Suddenly a beautiful dragon turtle swims in from the west")

A trick almost certain to be SMAUG only: exploiting SMAUG's ability to have multiple exits in the same direction, go wild with secret hidden keywordless exits in a maze to make "track" go totally bonkers. Mazemastering fun for the whole family!

A more convenient but more restricted trick can be used to give mobs artificial memory, and that is to have them mpmset some useless stat of theirs and then use ifchecks to check what it's set to. Charisma is a good one to use. Remember that mobs with the prototype flag can't mpmset themself so take that off before testing. Anyway, this is most useful for making mobs who rotate their stats around in battle and "remember" what they're currently at. For example, to make a mob who switches from immune cold/suscept fire to immune fire/suscept cold, you'd make the mob start with 15 CHA and immune cold/suscept fire by default; then as a fight prog the mob checks to see if his own CHA is 15. If so, use mpmset to change the immunities and susceptibilities, and change CHA to 16. But else, do the reverse. Remember the "barrier changing" monsters in FFIII? :-)

A neat mob I made on DSFT was a wizard who wore an amulet of eternal life. As long as the amulet remained intact, every round he would heal himself fully with mprestore. In order to kill him, the players had to fight him (and endure his breath attacks!) until the amulet got scrapped.

Well, I could go on like this for a long time, if I had a long time to waste. But you know what they say about giving a man a fish..... Anyway, most building tricks can be done with code much easier and what's more, doing it with code means MUCH more efficient use of resources. For example the mobmemory code I wrote for Aethar was probably 1000+ times more efficient with both RAM and CPU time than dropping utility items in a utility room. If you really want to devise profound building tricks, two things are needed: first, the Muse must bless you with great imagination; and secondly, you must be head builder for years on a MUD which has absolutely no coders.

I was working on an area when Aethar shut its doors, and I propose it as a challenge for those among you who are both builder and coder in one (for this area would require much ingenuity in both areas). The area is in essence the opening scene from the movie "The Two Towers": a long solo fight in free-fall (with specially coded "slowfall" rooms where you fall indefinitely, but with a moment between each room rather than all at once)
  Reply With Quote