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
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Aug 09, 2014 9:13 pm   

Working with #PATHHIGH
 
Anyone know of a way to clear path highlights so I'm only seeing the speedwalk? Apparently #PATHHIGH doesn't clear old highlights, so frequent use will eventually cause my entire map to highlight.
_________________
EDIT: I didn't like my old signature
Reply with quote
Tarn
GURU


Joined: 10 Oct 2000
Posts: 867
Location: USA

PostPosted: Mon Aug 11, 2014 5:52 am   Re: Working with #PATHHIGH
 
MattLofton wrote:
Anyone know of a way to clear path highlights so I'm only seeing the speedwalk? Apparently #PATHHIGH doesn't clear old highlights, so frequent use will eventually cause my entire map to highlight.


I haven't used PATHHIGH.

However, CMud switched the mapper over to sqlite (ref http://forums.zuggsoft.com/forums/viewtopic.php?t=36748), which has a command line utility available and free ($, source code, public domain).

Do you have a sample map? We should be able to set up a query to clear whatever flag it uses.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Aug 12, 2014 3:05 am   
 
I doubt that flag would be stored in the database, just in memory. Besides, modifying the database while it's in use doesn't work anyway.
Reply with quote
Tarn
GURU


Joined: 10 Oct 2000
Posts: 867
Location: USA

PostPosted: Tue Aug 12, 2014 10:36 am   
 
Daern wrote:
I doubt that flag would be stored in the database, just in memory. Besides, modifying the database while it's in use doesn't work anyway.


I was expecting to make the edit when CMUD was closed. Because I don't use the mapper much, it hadn't occurred to me that the highlighting might not be persistent between sessions (only stored in memory).

Anyway, I took a look at the table structure of the mdb file and got a real eyeful- nothing by the name highlight, but there are a few places to store flags and formatting.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 19, 2014 4:16 am   
 
Bah, the solution is relatively simple...

Code:

<alias name="testalias" id="954">
  <value>testlist = %map.getselection
#print "item count = "@testlist.count
#loop 0,(@testlist.count - 1) {
  #print %i" - "@testlist.Item(%i).id
}
#call %map.unselectall</value>
</alias>


but it's completely shut down by a major bug that apparently has no workaround. The bug is that the unselectall method leaves the last room highlighted, and there's no functionality to select/deselect specific rooms.

EDIT: progress! The object documentation isn't as completely cross-referenced as it should be, but there's a Selected property that we are told we can change (reference: zmudroom object from the zmapper.hlp helpfile). Now to work out the actual syntax for that...
_________________
EDIT: I didn't like my old signature
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Sep 02, 2014 8:49 pm   
 
Actually, you can modify the map database on the fly. If you modify the Object table and you want to see the reflected changes (i.e. the rooms) then you simply reload it. If the data can be viewed via a function then you needn't reload it since the fetch is dynamic.
_________________
Sic itur ad astra.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Sep 03, 2014 12:49 am   
 
That doesn't apply in this case, since the highlighting isn't stored in the map. I did find a solution, but it's quite unreliable and dependant on where you last clicked in the mapper so sometimes it works and sometimes it doesn't and still other times it works incorrectly.
_________________
EDIT: I didn't like my old signature
Reply with quote
Jim Vance
Beginner


Joined: 07 Dec 2006
Posts: 16

PostPosted: Sat Jan 31, 2015 9:42 am   
 
I apologize that this is a half-necro response, but I did come up with a fix that worked for me. Matt's script didn't work for me because it asked for a Zmapper function call, and I don't have the program.

The "Highlight Room" command on the Mapper's Room menu (accessed by right-clicking on a room in the Automapper) acts as a selector, effectively de-selecting all other rooms.

In order to make it work, I had to add the menu option to one of the Mapper's available menus; in this case, I chose Actions. Then I created the following bit of code and added it to a macro:

Code:
#MENU {Mapper|Actions|Highlight path}


I also found that when added to a customized "walk" script (not the #WALK command) that used #PATHHIGH, the path would be highlighted and then removed at the end of the walk. I scrounged around looking for the corresponding ID for this command so that it could be used with #CMD, but I had no luck finding it. If anyone might know it, then it would be useful due to its efficiency at producing the desired effect.

I hope this helps.

Jim
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