|
verbiage Newbie
Joined: 24 Jun 2010 Posts: 8
|
Posted: Thu Jun 24, 2010 6:18 pm
[cmud 3.2 beta] Map Room Scripts and upgrading map files from zmud 7.21 |
I have a 60,000 + room map that works very well in zmud 7.21, but trying to get it to work in cmud has been a nightmare. I was hoping the beta version would improve things, but not really.
I can load up my settings in cmud just fine. I open the automapper and load my previous .mdb file. cmud converts it and loads it. This part works.
I have the following issues:
1) room scripts. They are not converted into the RoomXXX object in the package editor, nor do I see them if I go to a room and right click->properties->scripts (and then edit scripts button to open the package editor). If I call #SHOW %roomcom() while in the room with the script, it echoes properly. If I open up the database .dbm file, the values are there in the object table under the script column. How can I convert the map so that room scripts are properly added to the package editor?
2) In the database, the scripts are prepended with one or both words "All", "Walk", and a funny char between them and between them and any script. After converting to cmud sometimes I walk into a room and it sends the command Walk to the mud. I assume those are keywords that have to do with onwalk, onwalkend or something like that. What are those commands, how do they work, and how do I maintain consistency in getting them converted into cmud package scripts?
3) I have a status window that contains %roomvnum, %roomid, and %roomcom. vnum and id work fine, although they are very delayed from how they used to work in zmud. (ie, they take 3-4 seconds to update after I walk into a room whereas zmud was almost instant) roomcom however, does not work at all. If I stand in a room and use #show %roomcom it works, but it will never show up on in the statuswindow. Why not?
Oh, and I'm using the latest beta |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Jun 25, 2010 1:07 am |
First, please note that version 3.2 is not the same as 3.20. This is the twentieth subversion of version 3.
Room scripts are done completely differently in version 3.xx. This is one of the major changes in the beta version, which was a complete rewrite of the mapper code. I'm pretty sure there is no way to automatically convert the old scripts to the new format. If I'm correct, you will have to rewrite them, using new class enable scripts and RoomXXX features. As I recally, the new room script method is so completely different that you can't simply copy the code into an room class enable script, and the new method allows such vastly greater flexibility that you probably wouldnt want to.
What database are you talking about? Are you talking about the raw dbm file? It's generally a bad idea to go poking around in there. It is really really easy to break the intricate interactions that make the mapper work.
The reason %roomcom doesn't work is because that was for the old room scripts. %roomcom was supposed to display or change the room script as stored in the map database. Room scripts are no longer stored in the map database. Since room scripts are done in a completely different way now, there's no point to having %roomcom work in the status window. The fact that it still shows anything when used on the command line is merely a leftover of the old code. The code you see in %roomcom is useless, except possibly as a pointer to what you might want to do with your new room script. |
|
|
|
verbiage Newbie
Joined: 24 Jun 2010 Posts: 8
|
Posted: Fri Jun 25, 2010 12:36 pm |
Thanks for the response. That is very bad news. On that side note, 3.2 is indeed the same as 3.20. The second version would be 3.02. I manage software releases on a daily basis, this is how software versioning works. That aside...
While I believe you, it also seems unbelievable that room scripts would have to be converted by hand. Would a "conversion" program exist that didn't convert room scripts? It seems rather trivial. Oh and I should have noted that a few times, in some of the new room classes, they HAVE been converted. There will be an OnRoomEnter object under the Room class folder with the script in it. But only sometimes. I have thousands of room scripts, doing that conversion by hand would literally take weeks. It also seems like it would be possible to write a script do it in cmud itself? Something like
loop numrooms()
If roomcol(room) is not empty then
Room+roomvnum() = roomcol()
It's the last line I'm not sure about....how to programmatically access the new RoomXXX classes and stuff data in them and read it out of them. I'm assuming the XXX is the vnum of the room.
In my experience with the zmud mapper, if you can't edit the database files directly to clean them up once in awhile you'll have poor success keeping a 60k room map with 10k scripts working properly over time. |
|
|
|
verbiage Newbie
Joined: 24 Jun 2010 Posts: 8
|
Posted: Sat Jun 26, 2010 6:00 am |
So I tried importing in various different ways, and I get different results. If I use the standalone map converter to convert my mdb file to dbm, then open it with cmud it imports quite differently than if I just open the mdb file directly in cmud and let cmud do the conversion. The differences are:
Cmud conversion: No RoomXX keys are created under the map object, unless you right click->properties of a room and edit scripts. There are no events created.
Standalone map conversion: Lots of RoomXX keys are created, and under some of them there are onRoomWalk events than contain the room script. However, not all rooms show up with room key, only some do. Of the ones that show up, only some have events associated with them. Any room key that doesn't show up will have a room key created upon viewing that room's properties and clicking edit scripts.
Why do only a few hundred of the 60k rooms show up? How do I get all the room keys and events to be created on a conversion, rather than just a small subset? The conversion obviously has the ability to convert room scripts into Events. Are they all converted and I'm just not displaying them properly in the Cmud package editor?
In addition, the conversion also seems to put the room script in the wrong room key and only imports part of the scripts, not all of it. In the zmud map I have a script that looks like:
Roomvnum = 4000
Walk Script:
Room Script:
Code: |
#TRIGGER {^You dance around} {#Nomap;#Nodir}
#TRIGGER {^You jump sideways} {#TE 3783}
#VAR runme {slide right;slide left}
|
After this is imported into cmud via the standalone conversion tool:
I have a room on the map where under properties it says Key: Room4000
Under scripts for that room it is blank.
In the package Room4000 does not exist
I have a Room1200 with an onRoomWalk Event containing "look over counter" - even the scripts that did convert got put under the wrong RoomKey.
When I click on "edit scripts for this room" a new Roomkey of 4000 is created.
The script under the Room Script tab is nowhere to be found, although it's still in the sql db of course, as we discussed above.
#show %roomcom will echo the Room Script code but not Walk Code, although both are still in the script field in the ObjTbl of th dbm file
#show roomvnum shows 4000
#show roomnum shows 4000
#show roomkkey shows 4000
Changing the roommode to 0 or 1 makes no difference.
If someone could help me out, preferably by thinking of ways I can grab the room script from the database, and create new correct room keys, and create new onRoomWalk Events associated with that key, I would *greatly* appreciate it!
btw, dunno if it matters but I lost my old account info, so I made a new account. I've been using zmud since version 3.x back in the 90s. |
|
|
|
verbiage Newbie
Joined: 24 Jun 2010 Posts: 8
|
Posted: Sat Jun 26, 2010 6:51 am |
I found this comment in the cmud 3.05 Beta release notes:
Each class folder can now have an Enable and Disable script that is executed when the class is enabled or disabled. The old script for a room has been copied into the Enable script for the corresponding RoomXXX class folder. Each class folder also has a Keyword value. This can be used to enable/disable multiple classes that share the same keyword. For example, when the mapper moves into Room 123, it enables any class folder with the keyword of "Room123". When you enter Zone 3, the mapper will enable any class with the keyword of "Zone3". The #T+ and #T- commands now accept a setting type of "key" to enable/disable keyword classes.
This means that the scripts are supposed to be copied. What can I do to narrow down the bug? I'm willing to help. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Jun 26, 2010 8:36 pm |
Oops, I replied to this issue in your other thread ;)
Yes, your Room Script *should* have been copied to the "OnEnable" script for the RoomXXX class folder. If this did not happen and you have an old *.MDB file that does not convert the scripts when loaded into 3.x, then email me your old *.MDB map database and tell me which room is not importing the scripts.
Since CMUD 3.x is designed to import maps from CMUD 2.x and not necessarily zMUD directly, it's possible there is something wrong with your zMUD map file that is causing the problem. But if you can reproduce it, it's definitely something I'm willing to look into more when I get done with the TeSSH release and get back to working on mapper issues.
Also, the Map Convertor program (the latest version) shares the exact same code with the map conversion within CMUD 3.x, so if you find something that doesn't work the same between them, let me know. But both are just doing a "raw" database conversion and don't know any details about the map structure itself. So when using the external Map Convertor program, it can ONLY convert the MAP and will NOT convert the scripts. You MUST use CMUD itself to convert the map to also get the scripts converted and saved to your session *.PKG file.
This makes sense if you think about it. Only CMUD knows about your session *.PKG package file. The Map Converter program just knows about the map database and nothing else. So there is no way for the Map Converter to save your scripts to your package file. |
|
|
|
verbiage Newbie
Joined: 24 Jun 2010 Posts: 8
|
Posted: Sun Jun 27, 2010 11:08 am |
I'll run some baseline tests by wiping all cmud settings and importing the map multiple times. I'm going from Zmud 7.21 to Cmud 3.2 Beta. I can certainly go zmud 7.21 -> Cmud 2.x public -> cmud 3.2 Beta if you think that would work better.
I'll try:
zmud 7.21 -> cmud 3.2 Beta
zmud 7.21 -> standalone repair -> cmud 3.2 beta
zmud 7.21 -> standalone conversion -> cmud 3.2 beta
zmud 7.21 -> standalone repair -> standalone conversion -> cmud 3.2 beta
Then maybe add a zmud 2.x in the middle somewhere and see what that gets me.
The DB was 50MB but it zips up to 5, so I'll mail it on over to you, as well.
Thanks Zugg |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sun Jun 27, 2010 3:28 pm |
Just remember that when you use the "standalone" program, it won't convert any of your scripts, as I mentioned above.
|
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Fri Dec 15, 2023 11:19 pm |
@verbiage, did you ever manage to sort out your issue with Room Scripts? I have the same problem as you had:
All my converted Room Scripts in my package for CMUD have:
and then an RS symbol before the old script, so when I enter one of these rooms is sends the script to the MUD prefixed by 'All'!
I have recently used the Map Converter as I wanted to use zMapper, but I guess these scripts in CMUD were created when I moved to CMUD 2.x and then migrated to CMUD 3.x, so should have been converted OK...
In my case, I had essentially disabled all my scripts (back in my zMUD days) by prefixing them with an empty alias and now suddenly they're getting in the way! |
|
|
|
|
|
|
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
|
|