Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Mon Dec 30, 2024 8:50 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: CMud Auto-Mapper Error
PostPosted: Sun Sep 08, 2019 6:03 pm 
Offline
Mortal

Joined: Fri Jun 07, 2013 7:11 pm
Posts: 1068
Location: Probably Camping Losache
SK Character: Arkex, Chronis, Azoreth, Kyln
Does anyone use automapper in SK?
I’m trying to map a area. And if I try to enter an area that is a “door” or “portal” I’m getting an error stating “SQL Error: PRIMARY KEY must be unique.”
Any advice would be appreciated.


Top
 Profile  
Reply with quote  
 Post subject: Re: CMud Auto-Mapper Error
PostPosted: Sun Sep 08, 2019 6:18 pm 
Offline
Mortal

Joined: Tue Apr 08, 2003 5:55 pm
Posts: 249
Location: CA
I dont use CMud but I can guess what that error is.

Portals and doors are not added into CMud as a valid direction so its not treating it like a unique entry. So its probably trying to add it in as an existing duplicate entry with an existing PRIMARY KEY. My guess is that, CMud only maps nw, n, ne, e, se, s, sw, w.

The easiest way to solve this is to debug the mapper code and output some sample data to see what it is actually feeding into your database. And if its the not a valid direction entry, you have to manually code in "portal" or "doors" as a valid entry. Though I'm not sure how you would put a portal on a map since it leads you to another place.

So you are left with the question... what constitutes a room that needs to be mapped?
- A location that can be mapped
- Has exists
- Has a description
- Takes up a square of space on the map

Based off this definition, a portal does not constitute mappable location. How I would approach this... is by creating an abstract class called location(if it hasn't been created) and create portals/doors as a placeholder that connect two places but dont have an existing location.


Top
 Profile  
Reply with quote  
 Post subject: Re: CMud Auto-Mapper Error
PostPosted: Mon Sep 09, 2019 2:40 am 
Offline
Mortal Philanthropist

Joined: Sun Feb 08, 2004 1:41 pm
Posts: 1085
Location: Hugging a tree
SK Character: Imolth
Never quite managed to make the mapper work properly. Mainly because in SK you can have paths that should not be and that confuses the builder.
eg you can go ne, se, sw, nw and not be at the place where you started.


Top
 Profile  
Reply with quote  
 Post subject: Re: CMud Auto-Mapper Error
PostPosted: Mon Sep 09, 2019 6:14 am 
Offline
Mortal

Joined: Fri Jun 07, 2013 7:11 pm
Posts: 1068
Location: Probably Camping Losache
SK Character: Arkex, Chronis, Azoreth, Kyln
So the sql error was kinda weird. But restarting the client fixed it. Now I’m trying to get bast the inaccurate room layout. I’m developing a system for it. But I think the trick is manually connecting the rooms where this happens. A lot of editing.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 14 guests


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

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group