[old] (mapping script) WoTmud mapper

All and any discussion and development of the Mudlet Mapper.
kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

[old] (mapping script) WoTmud mapper

Post by kakku »

this is the WoTMUD mapper script package i'm using at the moment.
it's loosely based on Omit's and Heiko's mappers. thank you both for giving me something to start with.

it works as follows:
an eventhandler catches all commands that could be moves.
triggers are set up for failure of movement, ex: You are too exhausted.
a chained color-trigger triggers on the room name, which then grabs the room's description and the exits.
this last one starts the main script: onRoomInfo()
this script will check if it the room is already mapped end otherwise will create a new room.
it then also makes additional "fake"-rooms,(in dark purple!) just to make you aware of unvisited rooms.
these fakes will be deleted if you use the exit on which they are connected to.
rooms are saved with roomname and full description combined.
exits are only saved on the room you come from. this is done because of possible one way exits.
So if you want to have a very complete map you will have to use every exit of every room at least once.

there is a whole bunch of alias's with which you can move a single room or even groups of rooms.
and also some aliases and triggers that color rooms.
better check these out so they won't interfere with any other alias's you are using!

some known issues:
- it doesn't work in "brief" mode. it could be done though with some extra scripting.but then only in a fully mapped world. you would need to depend on getExitsFromID alot.
- it grabs the room description but doesn't add an extra space at the end of the line. so grammar is dead.
since i had it like this from the start it would force me to redo all my mapping so far. so i kept it like this.
- it's important to have the "get Room Description"-trigger on top of the list. just to make sure no other triggers change the room's description before grabbing it.
- when you're blinded the map can't help you. nothing implemented for that yet.
- one-way exits ain't visually different than normal connections.
- also i'm still waiting for room userdata to be working so i can store doornames
- it could be that more triggers are needed!
- colors are still to be worked on.
- area's are not used optimally.
- if you come from a dark room into a lighted unmapped room it creates a room at 0,0,0 coords. (around EF..) it's kinda annoying at times.

disclaimers:
-my level of scripting is far from perfect so this is just a rough working version for the time being.
So: do NOT expect everything to work as expected ;P
- As further updates of mudlet will hopefully include changes to some mapper functions, things could be done much better in the future. and it may be that you will have to remap everything by then. (be warned)
- tons of silly echo messages in there too :)

if you have any questions or improvements or comments, please post them here.

any advice on the scripting is very welcome! (probably lots of silly/bad coding in there)

EDIT:
how to get it started is really simple.
OR you change your color settings so that room descriptions are shown in pure white.
OR click on the Triggers, find the "roomdescget" trigger inside the "get Room Description"folder and change the 5th line in the script of that trigger:
if r == 255 and g == 255 and b == 255 then
so that it matches the color you use.

click the map icon in the toolbar, drag it open and then just start moving and whenever a room is detected that is unknown it will create that room. if no echos after the obvious exits appear then make sure the color trigger inside the "get Room Description" folder has the correct color.

all rooms are standard green. except rooms with any kind of "road" word in its room name.
if a new room is made and it turns yellow than that means there is already another room at the same coords. so you would have to move some around.

some basic commands to control the map:
- mm "dir" =move the current room in any direction.examples: "mm n" will move the room 1 north. "mm se" will make it move it to the southeast.
- mri =make room inside. will turn the color of the room to grey. this happens automatically when trying to ride a horse inside a house. There are more alias's or triggers like this.
- mrn = make room normal. will turn the color of the room to standard green.
- collectid =collects all rooms that can be reached through mapped exits starting with the room you are in.
- mfix =adds this room's id to a table so it wont get collected with the collectid command
- colud "true/false" =if set to true collectid will continue collecting when encountering up/down exits. if set to false it will not do that and only collect rooms on the same level.
Attachments
WotMUDmapper01.xml
(91.17 KiB) Downloaded 1110 times
Last edited by kakku on Sun Mar 27, 2011 9:59 pm, edited 4 times in total.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: WoTmud mapper

Post by Vadi »

I think you should explain in detail how would someone get setup with using this. Like after importing, you do that to start mapping, when mapping you want to use this and that. It doesn't seem quite clear from the description to me.

Great to see more scripts for other MUDs though! We need this :D

Filion
Posts: 93
Joined: Sat Mar 26, 2011 4:21 pm

Re: WoTmud mapper

Post by Filion »

i think it reads the room names, and i think it overrides some times different neighbouring rooms with only one (that is waht happened in caemlyn road).

@vadi:it starts mapping automatically.

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: WoTmud mapper

Post by kakku »

edited post.

@fillion, you mean the purple rooms? those are just temporary fake rooms..

Filion
Posts: 93
Joined: Sat Mar 26, 2011 4:21 pm

Re: WoTmud mapper

Post by Filion »

hm while i was on "A wide boulevard" and had all the neighbouring rooms created, moving to a direction that was "a wide boulevard" would just erase that neighbouring room without moving anywhere. therefore when i eventually went to a room which name wasn't "a wide boulevard" it started creating rooms again.

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: WoTmud mapper

Post by kakku »

ok sorry i forgot to mention that the 2nd trigger in the "get Room Description" folder only grabs the room's description if the text is white.
you would have to change your color settings OR change the 5th line in the script of that trigger:
if r == 255 and g == 255 and b == 255 then
so that it matches the color you use.

Filion
Posts: 93
Joined: Sat Mar 26, 2011 4:21 pm

Re: WoTmud mapper

Post by Filion »

for some reason it highlights some specific phrases only (different background color and different frontcolor).

the colors that my rooms by default create are red and not green.


Also, it doesn't start to map from the beggining. by that i mean the first unknown room

EDIT
may i ask where is the function getFgColor?

Edit.2
I made it work, somehow! but for the time being i cannot change the room colors

do we need to install the 'mudlet mapper' csript?

Darmir
Posts: 226
Joined: Sun May 01, 2011 6:51 pm
Contact:

Re: WoTmud mapper

Post by Darmir »

Vadi wrote:I think you should explain in detail how would someone get setup with using this. Like after importing, you do that to start mapping, when mapping you want to use this and that. It doesn't seem quite clear from the description to me.

Great to see more scripts for other MUDs though! We need this :D
I agree with Vadi here. How do you set this up? I can't figure out how to set my location. I imported a map from cmud now I am trying to find the location to get it to work.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: (mapping script) WoTmud mapper

Post by Heiko »

Mudlet-2.0 will contain a generic mapper script with basic features that works on all MUDs. It's commented and can easily be expanded into more complex scripts. Coming soon.

crosspoint
Posts: 1
Joined: Thu Jul 07, 2011 7:26 pm

Re: (mapping script) WoTmud mapper

Post by crosspoint »

Hello there! This is my first entry in these boards just to reply to this announcement: That's absolutely great! I've searched ages for a Free-Software-MUD-client for Linux which can keep up with zMUD or CMUD! I've tried CMUD under Wine but that's a pain in the a**. ;) I think with a good basic mapper script mudlet beats its proprietary rivals! I'm very excited about that! Just wanted to let you know that and keep up the good work! :)

Post Reply