Zmud Maps & follow the leader

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Zmud Maps & follow the leader

Post by Tarax the Terrible » 15 Mar 2010 13:53

There is a command in zMud that allows you to change your position on the map by one room.
#MOVE

So typing #move east in the command line will move the blue dot on the map one room east.
Same works for all your directions even custom ones like board ship, aft, fore, disembark etc.

I use this to update the map for example if I was blocked by moving east by a guard etc.
So when I try to enter the camp a few north of the crossroads outside Minas Morgul for the first time.
You send the direction west to try and move in and the map blue dot moves west
But you get a message from the mud saying something like
"Are you sure you want to enter the camp, theres nasties in there that might hunt you down" and you
stay where you were until you send west for a second time.

So to keep the map position correct you can use a trigger to move the blue dot back to the correct room.
ie

Code: Select all

#TR {Are you sure you want to enter the camp} {#MOVE east}
Hopefully you get the idea.
Now will go into how to keep the map up to date when you are being led.
This is a little more complicated that the previous example trigger because you will include "Pattern matching" and a "Variable".

Helps to create an alias to set a variable, will call it "teamleader".

Code: Select all

#ALIAS {setleader} {#var teamleader %-1;#say Teamleader now set to @teamleader}
This will create the variable "teamleader" or overwrite it if it already exists.

the @ sign is used before variables when you want to use the value stored in the variable.

the %1 is how to refer to the input you type following an alias.
so if you type <setleader big blue goblin>
big = %1, blue = %2, goblin = %3 each white space creates a new chunk
but if you use a - sign it all goes into one chunk ie %-1 = big blue goblin

This is necessary so the setleader alias you just created should be able to cope with people who have not introduced being your leader.
For now we will assume your friend called skilgannon is leading.

Code: Select all

setleader skilgannon
"Teamleader now set to skilgannon" should appear in blue writing in the zMud window

Now you need to create the trigger to catch the text from the mud when Skilgannon moves and turn it into #MOVE commands to keep your map up to date.

Code: Select all

#TR {^@teamleader leaves (%w).} {#MOVE %1}
Here you are using a trigger to look for the value stored in @teamleader
^ means that that has to be at the start of a line
and using (%w) to store the direction in %1 and also to ignore the . at the end
So to explain further usign "(%w)east." instead would have %1 = to "north" if they left northeast.

Whats that you say, How do you know all this sh1t?!?
It justs comes straight out of the zmud help files.
zmud help topic 'Pattern Matching' wrote: Patterns can contain several special character for wild-card matching.
* match any number of characters or white space
? match a single character
%d match any number of digits (0-9)
%w match any number of alpha characters (a-z) (a word)
%a match any number of alphanumeric characters (a-z,0-9)
%s match any amount of white space (spaces, tabs)
%x match any amount of non-white space
[range] match any amount of characters listed in range
^ force pattern to match starting at the beginning of the line

$ force pattern to match ending at the end of the line
(pattern) save the matched pattern in a parameter %1 though %9
~ quote the next character to prevent it to be interpreted as a wild card.
{val1|val2|val3|...} match any of the specified strings
{^string} do not match the specified string

In specifying a range, you can list specific characters such as [abc] or you can use a range [a-c]. To use a wild card character in the string itself, preceed the special character with the ~ quote character. For example, the pattern ~[test~] will match the string [test] rather than being interpreted as a range wild-card pattern. Note that the quote character can be changed in the Preferences section.

You can also include variables in your pattern, and the name of the variable will be replaced with its value before the pattern match is performed.
So really that is a lot of explanation for something quite simple.
Alias used to set a variable teamleader and a trigger to catch their movement and update the map.

You will need to set teamleader to something nonsense like "666BlakBlam" or disable the trigger when you leave the team or the map will keep following the set leader in the direction they leave even though you will not be.

You will need to take it further to cover all the weird and wacky exit descriptions for Ogres, Mounted, limpers, bow legged etc.
Just make a new trigger for each one you encounter.
Could also expand it to auto set teamleader var when you join a team or team changes leader.
Last edited by Tarax the Terrible on 16 Mar 2010 00:32, edited 3 times in total.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: Zmud Maps & follow the leader

Post by Tarax the Terrible » 15 Mar 2010 13:54

NB the %-1 command is very useful for aliases for storing equipment etc.
#ALIAS {sp1} {put %1 in scrip}
#ALIAS {sp2} {put %-1 in scrip}

<sp1 worn armours> sends "put worn in scrip armours" to the mud, the %2 %3 etc parts not referenced get sent at the end
<sp2 worn armorus> send "put worn armours in scrip" to the mud
note <sp1 'worn armours'> also sends "put worn armours in scrip" to the mud

Not suggesting you create two aliases just illustrating the difference in the workings.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

Makfly
Champion
Posts: 615
Joined: 04 Mar 2010 00:36

Re: Zmud Maps & follow the leader

Post by Makfly » 16 Mar 2010 19:33

I'll admit that I never got the auto-mapper to work in my zMud, but I also kind of didn't try as hard as I possibly could.
So, this thing you're talking about above sounds pretty spiffy, but if you haven't set up the auto-mapper in zMud at all, what do you do?
Is there a tutorial available that you can recommend? (and please don't say RTFM ;)

Can you share .mdb files, and that way basically share zMud maps, or is it not that simple?

/Thanks!
Mortimor Makfly - Gnomish Xeno-Anthropologist

User avatar
petros
Site Admin
Posts: 473
Joined: 03 Mar 2010 07:50

Re: Zmud Maps & follow the leader

Post by petros » 16 Mar 2010 21:18

Earth posted an excellent guide on setting up Automapper in CMUD or zMUD. I've moved it into its own topic because of its usefulness.

Automapper Guide Topic

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: Zmud Maps & follow the leader

Post by Tarax the Terrible » 16 Mar 2010 21:51

petros wrote:Earth posted an excellent guide on setting up Automapper in CMUD or zMUD. I've moved it into its own topic because of its usefulness.

Automapper Guide Topic
Heheh guess who is on the forum from work! Https link :)
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/