Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Share your scripts and packages with other Mudlet users.
Post Reply
dubst3pp4
Posts: 5
Joined: Mon Mar 19, 2018 2:19 pm

Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Post by dubst3pp4 » Mon Mar 19, 2018 2:25 pm

Hello,
I'm new to MUDs and thus new to Mudlet. I'm in search of a mapper script for the german Avalon MUD, which is avalon(dot)mud(dot)de.
I couldn't find one, and it is hard to search for any, as there is an english MUD with the same name (avalon-rpg(dot)com).

Any hints? Many thanks in advance!
Marc

Jor'Mox
Posts: 1091
Joined: Wed Apr 03, 2013 2:19 am

Re: Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Post by Jor'Mox » Wed Mar 21, 2018 7:27 pm

There is a generic mapping script that could be adapted to work with your game of choice, but it would take a bit of work, as I don't know german. If you are a bit patient though, I could walk you through the necessary changes and such to get it working.

dubst3pp4
Posts: 5
Joined: Mon Mar 19, 2018 2:19 pm

Re: Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Post by dubst3pp4 » Sat Mar 24, 2018 3:12 pm

Thank you Jor'Mox,
I've already seen your script and I'm also capable to adapt it - but I think what I need is the general information about how mapping is done in mudlet.
As far as I understand, the direction to where you go is simply recognized by the user input and the exits of a room are recognized by parsing the text?
Until now I have only played that one MUD, so I have basically no experience with other MUDs.

Best regards,
Marc

Jor'Mox
Posts: 1091
Joined: Wed Apr 03, 2013 2:19 am

Re: Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Post by Jor'Mox » Sat Mar 24, 2018 4:02 pm

As far as that goes, the direction is gathered from user input, but that is translated in the script from words into the appropriate inputs for the mapper. Assuming you are using German rather than English, you would need to change the relevant bits in the script so it recognizes what you are using for directions. If you look at around line 180 in the script, you will notice a number of different tables with directions in them, and those need to be translated.

Exits and room names are recognized from parsing the game text, as you suggest, and the script takes care of all the hard work involved once appropriate triggers are created to capture and pass along those pieces of information to it. At a minimum, you need to have triggers to do four things: capture the room exits and store them in map.prompt.exits, capture the room name and store it in map.prompt.room, detect when a room is seen and raise the onNewRoom event, and detect when a prompt is seen and raise the onPrompt event. There are a few other events that are useful when it comes to making the mapper act in a more robust manner, and they are explained in the block of help text at the beginning of the script. There are also obviously a number of commands used to interact with the script, and they are also explained in the help text.

If you need any help getting things set up, or run into any problems, just let me know, and I am always willing to lend a hand.

User avatar
SlySven
Posts: 903
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Post by SlySven » Sun Mar 25, 2018 6:44 pm

One thing to be aware of is that the "speedwalk" function - that calculates a route from the current map room (the red highlighted one) to a room that is double-clicked on in the 2D mapper (and possibly single or double in the 3D one I cannot remember which right now) puts the exit directions into the global speedWalkDir table currently uses the hard-coded values of:
  • "n" - north
  • "ne" - north-east
  • "e" - east
  • "se" - south-east
  • "s" - south
  • "sw" - south-west
  • "w" - west
  • "nw" - north-west
  • "up"
  • "down"
  • "in"
  • "out"
Special exits are returned exactly as they are stored. By the time we get Mudlet 4.0.0 out it will be possible to specify those strings (and they will have sensible defaults for) other Languages. In the mean-time the code you will need to write to use those directions in order to do a speed-walk (the default is an dummy, empty function which you will need to replace to actually do anything if that functionality is required) - and currently, to support other languages, those fixed strings will also have to be translated...

Jor'Mox
Posts: 1091
Joined: Wed Apr 03, 2013 2:19 am

Re: Mapper Script for avalon(dot)mud(dot)de (German Avalon)

Post by Jor'Mox » Sun Mar 25, 2018 9:03 pm

Good point. For reference, the script has a doSpeedWalk function that is essentially right at the very bottom (starts on line 1067). As movement can sometimes require special handling, the included function just concatenates the directions and displays them, requiring modifications be made to really walk from point A to point B, so performing this sort of translation in that function should be pretty straightforward.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest