|
melodyb Beginner
Joined: 28 Oct 2008 Posts: 18
|
Posted: Fri Jul 06, 2012 8:00 pm
Adding zones and locations from another map. |
I have found an old file that has areas mapped which I would like to import into my current map. Is there a way of importing a zone at a time? (I don't want all of them as I have more up-to-date maps for some zones.)
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Fri Jul 06, 2012 8:05 pm |
no, there is no method for combining maps at this time, however, you can manually update rooms by visiting each room, turning mapping on and using the #LOOK command
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
melodyb Beginner
Joined: 28 Oct 2008 Posts: 18
|
Posted: Fri Jul 06, 2012 8:10 pm |
ok thanks
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Jul 06, 2012 9:11 pm |
It CAN be done, but it's hellaciously advanced. It's far faster and easier just to remap the area, puzzles and deathtraps and all.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
melodyb Beginner
Joined: 28 Oct 2008 Posts: 18
|
Posted: Sat Jul 07, 2012 11:23 am |
hellaciously advanced? Probably beyond me then :)
Looks like I have to remap. I wondered if you could open the database and add records to it that way? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sat Jul 07, 2012 2:46 pm |
Yes, you can, and that is probably the method Matt was speaking of. But Matt is right that it is hellaciously advanced. The map database is composed of a dozen interlinked table, including some columns with non-obvious codes. Making sure you copy all the rows into all the tables which are necessary to describe a zone is tricky. And since the tables are interlinked, they depend heavily on the primary key indexes. When adding a new zone, you will probably need to change the primary key id value for each row, to differentiate from existing data, and you will have to propagate that new id to every other table which is depending on it. And if the map is old, there are a few columns which have changed slightly over the years--though Zugg deliberately avoided major changes to existing data to maintain as much backward compatibility as possible. He was very foresighted and made the table structure extremely flexible from the beginning. But that adds to the complexity and interlinking of tables.
I've played a bit with the raw tables a few times, creating some custom room types and exit types. But I cringe a bit at the thought of importing a zone. You really have to be careful playing with the raw tables. It is really, seriously, done at your own risk. You can easily ruin ruin things. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Jul 07, 2012 11:48 pm |
I originally was thinking the direct SQL connection approach like Rahab elaborated on, but that's a no-good solution in the first place because new rooms you add that way don't show up in the mapper window until you reload the session (or somehow reload the mapfile). Trying to make changes of this sort via #SQL will work for the insertion, but since they are not reflected in the in-memory database you might end up with your changes overwritten or an AV might happen when the mapper attempts to access one of the records in that series.
A comparatively easier (but still much more advanced than simply remapping) method would be to use #SQL to read in your mapfile and then use the mapper commands/functions like #MAKEROOM to first create the room and then fill in appropriate details. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sun Jul 08, 2012 3:28 am |
Well, you don't need to do it in CMUD either. If you manage to write SQL to merge maps, you could run it from any sqlite browser with CMUD closed, and you won't have that issue.
|
|
|
|
|
|