Page 1 of 1
Import level feature?
Posted: Thu Dec 23, 2004 12:44 am
by PaulH
I have quite a few 'dungeon projects' lurking around my hard drive, and wondered whether it would be possible to export a level(s) to a different dungeon.dat, similar to the existing 'level swap' feature?
Posted: Thu Dec 23, 2004 1:19 am
by sucinum
i would kill for that, because it would allow to make a nice database for common things like shops, randomizers oder some smaller traps and riddles. we could c/p all to a seperate dungeon and comment it via scrolls or floor texts. we could even add some stairs/teleportals and stuff, so all is viewable from game's perspective.
this would allow people like me to concentrate on design, but still have complicated stuff in their dungeons

i can remember vaguely to have once asked for this, but was answered that it isn't doable. but maybe my memory tricks me or time has changed..

Posted: Thu Dec 23, 2004 2:59 am
by Paul Stevens
There are so many questions that would need answering.
The very first question - Can ****ALL**** references to cells be either
relative or absolute? For example, you export an area from x=0 to x=10
and y=0 to y=10. Cell (3,3) has a pressure-pad that opens a door at
(4,4). When someone imports the same area to x=20,y=20 what should the
pressure pad (now at 23,23) reference? A relative reference would reference
24,24 and an absolute would reference 4,4.
What to do if the exporting dungeon has SquarePads as floor decorations
but is imported to a dungeon level that does not support that graphic?
What if the exported area uses a DSA?
I think there are going to be a lot of such problems and that the
feature will be less useful than you think.
Now if I could get everyone who wants such a feature to sign an
agreement that would allow me to take the simplest option for
such cases (usually this will be a warning that it is not possible or
that you must fix certain things manually) then I would be willing
to try making it possible. Perhaps I could plant text in any cell that
has problems. Something like this:
**IMPORT WARNING** This cell contains a DSA. You must edit it
to reference the correct code
Then you could search for the "**IMPORT WARNING**, fix the problem,
and delete the text.
Posted: Thu Dec 23, 2004 5:48 am
by sucinum
if it is possible to copy only a whole level and paste it only as a new whole level which is empty before, then it doesn't mind, if it's absolute or relative, because the coordinates won't change (only the depth will, which should be relative then). of course, you can't copy multi-level-riddles with that, but maybe it could even be possible to c/p several levels as a whole. if there are pits and stairs which will lead to nowhere after copying, one can still fix this manually. if something targets anything else outside of the copied level(s), it should not be copied, because it is most probably useless in the new context - and even if it is useful, it's only a small amout of work instead of rebuilding a whole level again. maybe only the target can be deleted (or be set to 1/1) and it could throw out a warning like "illegal target set to 1/1 - correct it or delete the pad".
your suggestion is fair and if there are some things too complicated to be copied correctly, no problem. but better wait for someone with more technical understanding and/or more concrete plans to c/p something before starting...

Posted: Thu Dec 23, 2004 5:20 pm
by Paul Stevens
new whole level which is empty before, then it doesn't mind, if it's absolute or relative,
That is almost right. But even within a level there are relative and
absolute coordinates because of the level offsets. The top left corner
can be at 10,12 for example and might be different on the import dungeon.
I want to export/import to/from ASCII. So that you can export a rectangular
portion of a level, edit it with a text editor (deleting pieces if, for example, you
want a non-rectangular area), then import the entire file at a given coordinate.
I want the coordinates within the ASCII file to be either relative to the
level's upper left corner or relative to the cell being imported. I think I will
differentiate by using plus and minus signs in the coordinates. Like "(+2,-0)".
You ould then change them to the next level of 'absolutness' by deleting
the signs. Like : "(2,0)". References to other levels would be "cell relative"
like this "-1(+0,+0)" to teleport one level straight up. And level references
would be flagged as suspicious.
Posted: Fri Dec 24, 2004 4:10 pm
by PaulH
Can I assume that you are implementing this idea Paul?
Posted: Fri Dec 24, 2004 4:54 pm
by Paul Stevens
Yes. But it is a lot of code and very tedious. Not too exciting.
So don't look for it tomorrow. You will see it in its infancy
in all the future versions of CSBuild. I am not turning it off.
It will work but be incomplete for a long time.
Posted: Mon Jan 03, 2005 10:32 pm
by PaulH
How's this going Paul? I was thinking of some of the other possibilities, like adding CSB onto the end of DM (maybe we could transport the characters through after fusion), then we could have competitions for the WHOLE game using the same character(s). Antman and myself could form a tag-team, finish both dungeons in less than 40 mins combined!
Posted: Tue Jan 04, 2005 12:05 am
by Paul Stevens
It is going. But, as I said before, it is long and tedious. I can export/import
empty maps at the moment.
Posted: Sun Feb 06, 2005 8:58 pm
by PaulH
Just wondered if you could give us an update please Paul. I have two seperate dungeons that I would like to splice: if the idea is not going to work or is really that bad then I'll just manually transfer the data; this will save us both a lot of time, especially you!!!
Posted: Mon Feb 07, 2005 5:50 am
by Paul Stevens
Well, I have not done any work on it recently. It is no fun whatsoever.
I suspect it will work eventually. But it will probably be a year. I will
do a bit here and there now and then.
Perhaps I should work on particularly needed parts first. If it could do Actuators
in a month would that be helpful? Having someone who needs it and uses it
and reports problems would make it a bit more fun. Otherwise it is lonely work.