Shattered Kingdoms https://shatteredkingdoms.org/forums/ |
|
CMud Auto-Mapper Error https://shatteredkingdoms.org/forums/viewtopic.php?f=26&t=26674 |
Page 1 of 1 |
Author: | Trosis [ Sun Sep 08, 2019 6:03 pm ] |
Post subject: | CMud Auto-Mapper Error |
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. |
Author: | BAI7l7 [ Sun Sep 08, 2019 6:18 pm ] |
Post subject: | Re: CMud Auto-Mapper Error |
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. |
Author: | Morovik [ Mon Sep 09, 2019 2:40 am ] |
Post subject: | Re: CMud Auto-Mapper Error |
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. |
Author: | Trosis [ Mon Sep 09, 2019 6:14 am ] |
Post subject: | Re: CMud Auto-Mapper Error |
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. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |