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
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Jul 10, 2020 8:34 pm   

Extra mud directions
 
It's interesting that someone just posted asking about non-standard directions, because I'm trying to solve a problem with non-standard directions too.

My problem is that my mud (Dartmud) has normal directions in most zones, but one zone has hexagonal rooms and directions. It uses n|ne|se|s|sw|nw for directions, but the rooms are placed in a hexagonal fashion. Creating rooms in standard directions will not correctly position the rooms in hexagonal formation. I've directly modified the map database to add a extra set of directions to DirTbl, with appropriate vaues for Dx and Dy. But to get these to work with the automapper, I need to link the new directions to direction variables created with #DIRECTION.

It looks like Cmud uses the DirRef value in DirTbl to link the defined map directions with Cmud Direction variables. But the values in the DirRef column are completely opaque. Down is 100, Up is 117, North is 110, South is 115... There is no clear interpretation of the DirRef values.

Cmud #Direction values have the option of applying several non-standard directions such as North-Up, East-Down, etc. I conclude that these values have corresponding DirRef values which I could appropriate for my hexagonal directions. I've tested and verified that Cmud does pay attention to the Dx, Dy, and Dz values. So I believe I could use the DirRef value for East-Up for my hexagonal-northeast, for example, and the automapper would create rooms in the right places, even though the apparent "direction" in the #Direction variable says East-Up. But I need to figure out what the correct DirRef value is.

Does anyone have an idea what the various DirRef values correspond to, other than the standard directions defined by default? If not, I will have to just test codes until I get something to work.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Jul 11, 2020 12:08 am   
 
Well, I have figured out part of the answer with some testing. The DirRef for East-Up is 103, for North-Up is 105, South-Up is 109, and West-Up is 111. I have not been able to find the DirRef values for East-Down, North-Down, South-Down, or West-Down. But four is enough for my purposes.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Jul 11, 2020 2:41 am   
 
Argh. It looks like DirRef has nothing to do with linking DirTbl to #Direction variables. My guess now is that the linking is based on DirID.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Sat Jul 11, 2020 12:13 pm   
 
I think you can make hexagonal rooms via zMapper.
_________________
Discord: Shalimarwildcat
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sun Jul 19, 2020 3:43 pm   
 
Yes, I made the hexagonal rooms in Zmapper, followed the instructions to convert them to sqlite, and used DB Browser to modify my Dartmud.dbm map database, modifying the DirTbl, the MetaTbl, and some other tables. My problem was that Cmud has internal methods for identifying movement commands like "north", "s", etc., which is tied into its path processes. In order for Cmud to recognize a direction as a map movement command, you need direction variables created with the #DIRECTION command. And these direction variables interact with the sqlite map database in unexpected ways.

I've figured out how it works, and will give as complete an explanation as I can in my next post.
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