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
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Thu Nov 01, 2007 6:28 am   

Modifying the room properties via script.
 
I have not been able to get %roomflags(), %roomdesc(), %roomcost(), or %roomnote() to modify the room properties. I haven't tried the other functions (with the exception of %roomlink(), which has worked) so I don't know whether they work or not. I tried the script in both zMUD and cMUD. The result was zilch. They do, however, retreive information from the room properties. I am wondering if someone can tell me what I am doing wrong or is this was something put into the documentation but never implemented.

A sample script would be:

Code:
#VAR flags ""
#LOOP %numparam() {#ADDITEM flags %param(%i)}
#CALL %roomflags(%roomvnum(),@flags)

Now, so that this is out of the way, flags is a string list, but I could have easily just done one item (e.g. #CALL %roomflags(%roomvnum(),"prison")), and that doesn't work either. Also, the use of %roomvnum() is optional, I added it because I thought maybe the problem was that it did need a room number.
I tried it with the mapping mode both set and reset, and as expected, that didn't make any difference either.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Nov 02, 2007 2:40 am   
 
Are you in mapping (i.e. explore) mode in the mapper? Is the map unlocked? Both have to be true for these functions to actually modify the map. (This caught me out in zMUD, I remember.) The documentation should really mention something about this... (and it currently does not AFAIK) *poke Zugg or Fang or someone*
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Fri Nov 02, 2007 3:10 am   
 
I was mistaken about the functions not working in mapping (explore mode). I re-ran my script last night in that mode and it worked. Thanks for the reply, and yes, the documentation should be updated to reflect this requirement, simply because to set this properties manually, one need not be in explore mode. In fact, AFAIK, the only property that requires explore mode when manipulated manually is the link property.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Nov 02, 2007 5:44 am   
 
The problem with needing the mapper to be docked is also fixed in the Beta versions of CMUD. I use %roomcol all the time with the mapper docked.

And yes, many of the properties cannot be set even with the UI when you are in follow mode. For example, open the room properties and go to the Exits tab and you'll see everything disabled when in Follow mode. The properties that allow editing (such as color) are exceptions to this rule.

So, in general, you always need to be in Map mode to make any changes to the map. Follow mode is supposed to be read only so that you can freely use the map without fear of accidentally changing it.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Nov 02, 2007 10:16 am   
 
Note that I said "unlocked" and not "undocked", Zugg. Wink
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Nov 02, 2007 6:11 pm   
 
Heh...that's what I get for doing forum posts late at night Wink
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Fri Nov 02, 2007 6:58 pm   
 
Seb wrote:
Are you in mapping (i.e. explore) mode in the mapper? Is the map unlocked? Both have to be true for these functions to actually modify the map. (This caught me out in zMUD, I remember.) The documentation should really mention something about this... (and it currently does not AFAIK) *poke Zugg or Fang or someone*

Btw, you may add your comments to any online article, how about poking yourself? Laughing
Anyway, share you knowledge, this will benefit us all.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Nov 02, 2007 11:09 pm   
 
Well I can't actually edit them, only add comments like everyone else. And it's a bit of a waste of effort for me to add a comment to all the mapper functions and then for someone else to have to integrate my comments with the articles.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Nov 03, 2007 4:51 am   
 
I dunno, it helps us know which articles to change. I certainly find it helpful. If you happen to be on an article you think needs something adding, just add a comment while you're there.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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