Import level feature?
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Import level feature?
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?
- sucinum
- Pal Master
- Posts: 872
- Joined: Wed Apr 18, 2001 1:00 am
- Location: Karlsruhe, Germany
- Contact:
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..
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..
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.
- sucinum
- Pal Master
- Posts: 872
- Joined: Wed Apr 18, 2001 1:00 am
- Location: Karlsruhe, Germany
- Contact:
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...
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...
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
That is almost right. But even within a level there are relative andnew whole level which is empty before, then it doesn't mind, if it's absolute or relative,
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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!
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
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.
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.