|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Sep 11, 2010 3:22 am
[3.26 Pro] Mapper Comments for this version |
This is the first version that the mapper has worked well with GMCP for me.
I noticed a few things while trying it out:
1) I hate having to have it in map mode to automatically mark it as having the GMCP from the server:
1a) When I set it to map mode even though I #tag a room name as it should be (remove 'road' etc), it takes the gmcp name directly and creates a new room instead of just moving me into the correct room. So if my intent is to move around the map getting the correct numbers, this is made impossible because it starts creating rooms all over the place instead of moving me into the already existent rooms. If the room name on my map isn't exactly what it is from gmcp it creates a new room when it shouldn't.
1b) I recall you saying you are going to give us a method of marking the vnum as server based, but I see no other method beyond moving around in map mode and physically checking the box myself. Where's the programming option to accomplish this? I'd like to have a function able to set and check whether this is set.
2) When it creates a new room it puts garbage from gmcp into the UserStr field. I can't figure out how to keep it from grabbing garbage from gmcp and putting it into this field. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Sep 11, 2010 3:32 am |
1) Sorry, but that won't change. Nothing on the map ever changes in Follow mode...Follow is like Read Only. Always been that way, always will be that way.
1a) In 3.26, to change the GMCP tag you need to make your GMCP trigger a "Trigger on Prompt" and then change the value stored in the %gmcp.room.info.name field. This allows you to change the data before CMUD calls the Tag command. In 3.26, CMUD is creating the room via GMCP *before* your "Trigger on Newline" GMCP triggers are executed (so you can use %room functions to alter the room).
So, your other alternative is to use a normal "Trigger on Newline" GMCP trigger and then set the new room name via the %roomname function. I decided this would be more obvious to people than using #TAG. When using GMCP you should not have *any* #TAG commands anymore.
1b) You can always set the vnum of a room in a script using the %roomnum function. The "Real vNum" flag that determines if the room's vnum was set via GMCP is not yet available via scripting. But I'm not really sure what you are after here and not really seeing why having this flag would be useful.
2) It shouldn't be garbage. It is storing the gmcp.room.info.details into it. This field is set on IRE, but not on Aardwolf. According to the IRE docs:
Quote: |
string holding further information about a room separated by commas - shop,bank,... |
So you might want to look at the GMCP message data in the Script Debugger window to see exactly what the MUD is sending for that. |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Sep 11, 2010 3:47 am |
1) That's what I expected, and precisely why I want a function to mark the room vnum "MUD Room Number" via programming. I don't know how you can say you don't see why this would be useful. If I don't want to walk around in map mode all the time then my alternative is to mark it "MUD Room Number" myself. I can see why you wouldn't need this if you either had an up-to-date map already or walk around in map mode. But since I don't plan on walking around in map mode, this is my best means of updating my map.
1a) I'll try this.
1b) As above, if the reasons still aren't clear to you I'll try explaining it again.
2) If the room actually has something like shop or bank, then sure, it works fine. The issue is when it sends nothing in that field the following gets put there: [""]. Only about 3% of the rooms have something like shop or bank. The rest of the rooms send nothing and instead of leaving it blank it puts [""]. |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Sep 11, 2010 4:05 pm |
1a) Your suggestion to mark it as prompt worked fine:
#call %regex( %gmcp.Room.Info.name, "(?:Flying above |In the trees above )?(.+?)(?: \(road\))?$", RoomName)
%gmcp.Room.Info.name = @RoomName
The two items that are still a concern are:
1b) I still need a way to mark the rooms "MUD Room Number" myself. I'm never going to walk around in map mode due to the risk it will corrupt my map. I'd like to only update this one item, and I don't want to risk it updating things I don't want or creating duplicate rooms I then need to correct.
2) The UserStr = [""] is most likely a bug. Since I can see it works properly when there is data sent, I assume the bug is related to how it handles the absence of data. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Sep 11, 2010 5:16 pm |
Quote: |
this is my best means of updating my map |
OK, I can understand that. You want to create a GMCP trigger that will update the room number when just in follow mode via a script? I'll try to add something for this to the next update.
2) Yep, if the MUD is sending [""] then that's a bug. Although it's a bug in CMUD if CMUD is storing garbage data for this. Is this on IRE or Aardwolf? |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Sep 11, 2010 7:28 pm |
Zugg wrote: |
Quote: |
this is my best means of updating my map |
OK, I can understand that. You want to create a GMCP trigger that will update the room number when just in follow mode via a script? I'll try to add something for this to the next update.
|
Yes, that's it exactly. I'll use my scripts to make sure all is matched up correctly and then I'll switch it into map mode for an instant to make the update then back to follow-mode.
Zugg wrote: |
Quote: |
this is my best means of updating my map |
2) Yep, if the MUD is sending [""] then that's a bug. Although it's a bug in CMUD if CMUD is storing garbage data for this. Is this on IRE or Aardwolf? |
IRE (Achaea). Here's two examples of details being sent. The item 'harbour' is being applied just fine when sent. However when it's empty it puts [""].
Quote: |
"details": [ "" ]
Room.Info { "num": 3414, "name": "A rocky beach in a cove", "area": "the Eastern Wilderness", "environment": "Beach", "coords": "29,-3,5,0", "map": "www.achaea.com/irex/maps/clientmap.php?map=29&building=0&level=0 8 0", "details": [ "" ], "exits": { "e": 3413, "s": 3416, "sw": 3415 } }
"details": [ "harbour" ]
Room.Info { "num": 3415, "name": "A rocky beach in a cove", "area": "the Eastern Wilderness", "environment": "Beach", "coords": "29,-4,4,0", "map": "www.achaea.com/irex/maps/clientmap.php?map=29&building=0&level=0 7 1", "details": [ "harbour" ], "exits": { "ne": 3414, "se": 3416 } }
|
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Sep 11, 2010 8:33 pm |
Actually why is it even storing ["harbour"] and not just harbour in the roomflags? This string is useful if you want to color rooms through code. But you have to parse via %json(%roomflags) to match against a string, such as
Code: |
#if (%json(%roomflags) == "bank") {#call %roomcol(,gold)} |
If you don't, then roomflags is still "["harbour"]". But then you said we should never have to use %json anywhere so I don't know. Once again I guess I could use %literal(["harbour"]) to match but I am still having to call an extra function either way. |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Sep 11, 2010 9:13 pm |
I've always had a hard time fitting the data I want to store into the preset room fields. The things I like to store are zonename, environment type, and special room type. I ended up doing it in these fields:
Room Description = Special Room type (bank, shop, etc)
Room Notes = ZoneName|Environment Type
Ideally I'd like to store whatever I wanted into a customizable field like a db object. Then I could just customize a field and name it what I wanted instead of needing to crowbar them into the pre-defined fields. |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sun Sep 12, 2010 4:29 am |
I also store the environ data in the room note field. I just concat Environment: to the front of it so it is obvious what it means. I think it would be nice if CMUD had a field in the properties for everything sent via GMCP. If some MUD doesn't want to send it, then oh well that field will just be blank.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sun Sep 12, 2010 4:30 pm |
You could do this yourself by storing the %json(%gmcp.data) string into the %roomnotes field.
|
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sun Sep 12, 2010 5:42 pm |
Is it also possible to slim it down to only the fields I want? Also, can this only be done with json or can it be just a plain db variable?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Sep 13, 2010 6:04 pm |
You can always create your own plain db variable. I suggested using %json to convert the db variable to a string value that can be stored in one of the mapper fields. You can use %json to convert the db variable to a string, then when reading the data you can also use %json to convert the string back to a db variable. The advantage of using %json to serialize the db variable compared to just writing the @var string value is that %json will handle nested values better.
|
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Mon Sep 13, 2010 8:59 pm |
I'll give your suggestion a try.
One other item that occurred to me is that I'll need to write a script to put all the correct values for UserStr into that field. I have these values for each room, but they are in the notes field right now. Currently I don't believe there is a function to change the UserStr field. Can you add a function to change the UserStr field so that I can create a script to update all these values into the UserStr field? |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Tue Sep 14, 2010 2:00 am |
Yes I mentioned it above. It is %roomflags.
|
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Tue Sep 14, 2010 7:50 am |
Ah, I somehow missed that. Thanks.
|
|
|
|
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Fri Oct 08, 2010 6:08 pm |
I would also like a way to change the "MUD Room Number" flag for rooms using script. Then I would be able to use this flag and the nice togglable colour that goes with it for other purposes (my MUD doesn't use room numbers).
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 08, 2010 6:59 pm |
That would be the virtual room number. Check the %roomnum() function.
|
|
|
|
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Fri Oct 08, 2010 8:07 pm |
Umm, no... I don't want to change the number itself, but the recently added "MUD Room Number" flag which has a checkbox in the room properties window.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 08, 2010 8:23 pm |
Um, why not just use %roomcol()?
|
|
|
|
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Fri Oct 08, 2010 9:10 pm |
Because that permanently changes the colour of a room. The flag would let me use a different colour as a quickly-togglable "highlight".
I just found in the changelog
Quote: |
Added bit 4 of the %roomload flags to be the "Real vNum" flag |
and this works fine, so, nevermind. |
|
|
|
|
|