|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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. |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: 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*
|
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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. |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Fri Nov 02, 2007 10:16 am |
Note that I said "unlocked" and not "undocked", Zugg.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Nov 02, 2007 6:11 pm |
Heh...that's what I get for doing forum posts late at night
|
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: 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?
Anyway, share you knowledge, this will benefit us all. |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: 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.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
|
|