Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Fri Oct 25, 2013 12:51 pm   

Cmud mapper
 
Hello,
i got like 200+ zones mapped, and would like to know how to force cmud
to open right map of zone i just entered.

Zone: Name of zone
Room: Name of room

I enter zone so i got Zone name and room name and need cmud to open
right map...

In PvP situation going through all zones is just too slow.

Is there any way to do it?


and another question:

I got 3 databases with maps and need merge all of them, how to do it?

and another problem:
Printing...
Printed map not showing colors of rooms i putted on map.
When i print map it just print level i am in, if zone got a lot of levels it going be totaly unconfortable to go through it.
Somehow need make all map on same level when printed.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 26, 2013 7:52 pm   
 
1)This is the intended function of the #FIND command. #FIND is dependant on your mapper configuration, so if it doesn't perfectly configure using the autoconfigure wizard you will need to use #TAG to compensate. Beyond this, you will need to post specifics. Most MUDs are going to limit themselves to 1 standard room format, but it's not mandatory. BatMud, for example, has three basic room formats (overworld, subarea with no map, and subarea with map).

2)The way CMud (and, starting sometime in version 6 of ZMud) stores mapdata makes the entire map essentially one giant zone. There is no functionality in CMud to import/export rooms by zone, and while there is a very, very old pre-V3 utility for this purpose (Charbal's ZoneCopy utility) it is in no way compatible with the CMud map structure any longer. I do not know of any similar script currently available, but it's not going to be a trivial matter.

3)How directions are mapped can be changed, but it's not built-in to CMud and thus any changes made have to be done external to the mapper module (ie, via SQL or ZMapper). As such, any changes made will not show up until you reload your mapfile (which is more commonly done at session opening rather than via the File|Open... mapper menu). You will need to edit the Dx, Dy, and Dz columns in the DirTbl table. Keep in mind that CMud's mapping logic does collision detection to see if your exit ends up leading to an existing room, so if you move the draw numbers to somewhere beyond the first ring of adjacent rooms you could end up having your up/down rooms connect to those existing rooms rather than creating new ones (there's no way to account for this, as the logic is not expressed in the mapfile data).

This should be the only change necessary, though you may wish to go further and make a new exit type with a different image. This can only be done via ZMapper, however.
_________________
EDIT: I didn't like my old signature
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Thu Oct 31, 2013 1:25 pm   
 
Hey,
thanx for answer.

I play Duris, so i got similar maps probably like Batmud:
three basic room formats (overworld, subarea with no map, and subarea with map).

I can't somehow configure mapper for area with map.
which looks like this, it cant catch room name. there is no description,and there is exits.

Code:
      MMMMMM    M+M       
    MMMMMMM MMMM++MMM     
   MMMMMMM M++MM+++MMM   
  MMMMMM   M++MM+++   +   
 ^MMMMMM  MM+MMM++++++M+ 
 MMMMMMM  +++MM^+MMM+++M 
 MMMMMMM  MMMMMM++++++++ 
 MMMMMMM   M@+MM+++   ++ 
 ^MMMMMM   MM++M+++MMM++ 
 ^^^^^MMM   MMMM+++M MM+ 
 ^MM^MMMMM     M+++M  M+ 
  M^^MMMMMM     M+MM     
   ^MMMMMMMM     MMM     
    ^MMMMMMMMMMM M++M     
      MMMMMMMMMM MM     
The Great Foyer of Alatorin
Obvious exits: -North -East -South
A strong shield dwarf common man walks through Alatorin, curiously eyeing the surroundings.
< 1133h/1133H 175v/175V Pos: standing >
 


And this is normal zone rooms:
Code:

The Entry to Alatorin
   This massive entryway stands in an arch in the shape of a dwarven
warrior wielding a sword and carrying a massive shield.  This marks
the entry point to the great shield dwarf city Alatorin.  Built into
the mountain itself, this forge stronghold serves as one of the grand
dwarf settlements in all of Duris.
Obvious exits: -East -West
A giant statue of a dwarf bearing a sword and shield straddles the entry arch. (magic)
An entry guard of Alatorin stands here, eyeing the thoroughfare.
An entry guard of Alatorin stands here, eyeing the thoroughfare.
An entry guard of Alatorin stands here, eyeing the thoroughfare.
An entry guard of Alatorin stands here, eyeing the thoroughfare.
< 1133h/1133H 175v/175V Pos: standing >


So i will have like 2 configuration, will need juggle with configurations each time?

And please tell me how to make cmud to find zone i am in right now.
or i have to just spam #find command, is there other way?

And found out another problem i cant pass.
When i map zone and enter portal
>enter portal

very often it creates new room, but marker of current location dissapear.
So i just move in zone i enter portal and my marker dissapear, when i try relocate or trying use find command
sometimes it finds sometimes not.

I checked all rooms exits and connection with follow direction and it works. There is no empty or wrong connected exits.
All should be fine, but marker of location disappear and when i enter created portal.
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Tue Nov 05, 2013 8:54 pm   
 
Hello,
could someone help me wiht configuring mapper with example above? with map.

and another problem:

dissapearing marker after enter pool:

when debuging i found:
0.0006 | DurisHom |enter pool
0.0021 | i DurisHom >enter pool<CR><LF>
0.0217 | m DurisHom | Event "onRoomWalk" raised : (%1="0", %2="", %3="", %4="")
0.0032 | d DurisHom |[1] DurisHome Comline : stopped
0.0009 | k DurisHom |Loc "hort" changed from "41943" to "25827"
0.0674 | m DurisHom |Event "onZoneEnter" raised : (%1="0", %2="120", %3="", %4="")

Room 25827 is diffrent from room in mapper it should be 25762.

So in mapper i got 25762 and in debug it showing 25827?

where i can change this destination room, because from mapper level i can not.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Nov 06, 2013 3:11 am   
 
Configuration:

#trigger "tRoomInfo" {^([%w%s])$} {
//this is the room name line, initialize needed variables
Name = %1
Description = ""
Exits = ""
}
#condition {^(*)$} {
#if (%begins(%1,"Obvious exits: ")) {
//this is the exits line, set this trigger to the prompt state
Exits = %remove("Obvious exits: ",%1)
#state tRoomInfo 2
} {
//this is a description line, reset to this state
Description = %additem(%1,Description)
#state tRoomInfo 1
}
} {WithinLines|param=1}
#condition {^< %dh/%dH %dv/%dV Pos: %w > } {
//this is the prompt line, tag the appropriate variables for the mapper
#tag name @name
#if (@Description) {#tag desc %replace(@Description,"|",%cr)} {#tag desc " "}
#tag exit @exits
#tag prompt
} {nocr|prompt}

This will work for both types of examples you have given but it won't do anything for the map. There may also be things you didn't have in your examples that cause this trigger to not match, it's up to you to find them and insert them into the pattern.
_________________
EDIT: I didn't like my old signature
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Wed Nov 06, 2013 3:00 pm   
 
MattLofton wrote:


#trigger "tRoomInfo" {^([%w%s])$} {
.


With this it cant match any room name,

changed to ^([%w-%s])$

and pattern matched to room name.

But still somehow it does nothing.

But from your code i see how it should work.

So going to try to do it.
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Wed Nov 06, 2013 6:25 pm   
 
Ok forgot i gagging MSP so room looks like this:

without map:


<map>
Zone: The Town of Moregeeth.
Room: At the Entrance to a Dark Cave
</map>

<map>
Zone: The Town of Moregeeth.
Room: At the Entrance to a Dark Cave
</map>
At the Entrance to a Dark Cave
There is a large cave here, a gapping maw in the earth. A multitude of
small rounded rocks on the floor of the cave tells a tale of a river that must
have once flowed here. The hard rock has yielded to centuries of eroding by
the water, leaving this passage into the earth. The passageway is lost in
darkness to the south.

Obvious exits: -East -South
A vampire bat hangs here waiting for its next meal.
A vampire bat hangs here waiting for its next meal.
A vampire bat hangs here waiting for its next meal.
A vampire bat hangs here waiting for its next meal.
An overgrown Goblin scuffles at the dirt

<prompt>
< 1134h/1134H 175v/175V Pos: standing >
<>
</prompt>


and with map:

[code]
<map>
*****..^..**+
*M****..^M.***+**
*****M..MMM.***+**
*******.MMM..*****
*****M..^MM^^******
M*****..^M^^.*M**+*
M*****.^MMM^*****+** *
*****M.^MM^@++++++*****
*****.^^MMM^^.*M*******
*****.^^MMM^^.*M.*****.
* **.M^^MMM^^^^***.*.^
* **..M^^MMMM^^^*.**^
***M..^^MMMMM^^^^^
*M.^...MMMMMMMMM
**.M^.M^^^^^M

</map>
A Gravel Path Next to the Bog
Obvious exits: -North -East -South -West

<prompt>
< 1134h/1134H 175v/175V Pos: standing >
<>
</prompt>

From first case without map
i need Room Name/Room Description/Exits

From second case with map
i need Room Name/Exits

Trying use your version and doesnt work somehow...
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Thu Nov 07, 2013 1:01 pm   
 
What trigger works with next line?

#triger on </maps> -> but start to work with next line...
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Thu Nov 07, 2013 5:03 pm   
 
i did something like this:
Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger name="zonemap" param="1" priority="4610" copy="yes">
    <pattern>^$</pattern>
    <value>#NOMAP
Exits = ""
Name = ""
Description = ""</value>
    <trigger type="Within Lines" param="1">
      <pattern>^(*)</pattern>
      <value>#tag name %1</value>
    </trigger>
    <trigger type="Loop Lines" param="99">
      <pattern>^(*)</pattern>
      <value>say %1
#IF (%begins(%1,"Obvious exits: ")) {Exits = %remove("Obvious exits: ",%1);#if (@Description) {#tag desc %replace(@Description,"|",%cr)} {#tag desc " "};#tag exit @Exits;#STATE zonemap 0} {Description = %additem(%1,Description)}</value>
    </trigger>
  </trigger>
</cmud>


it seems working.
But got another question.

If there is in description important line, is there posibility that i can change color of mapped square depends on this line.

Example:
there is like:
This area seems to be exceptionally narrow!

i want make trigger to make border of this mapped square black.

Can i do something like this with zscripts or Lua or something else?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Thu Nov 07, 2013 5:31 pm   
 
You can set the color of the room with %roomcol, I don't believe there's a way to set border colors besides in the room preferences window though.
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Thu Nov 07, 2013 5:44 pm   
 
And found problem, since i again turn on gaging and capturing depends on msp tags, it started putted me to name of room:
cmud line:
0.0003 | Capture text ON or OFF
how to make cmud ignore lines not from mud.
Reply with quote
klerindias
Novice


Joined: 23 Jan 2010
Posts: 37

PostPosted: Thu Nov 07, 2013 8:53 pm   
 
Ok solved this problem with cmud messages capture, i just turn off cmud messages.
Options->General->Scripting->unmark Show information messages.

Still dont know how to make ignore this messages...

And still problem if anyone know, how to color borders of squares, any command, fuction?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net