Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : Decompressing holds to XML (How do you do it?)
New Topic New Poll Post Reply
Poster Message
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Decompressing holds to XML (0)  
I know that this has (in a way) been asked before in
http://www.drod.net/forum/viewtopic.php?TopicID=396
but that thread didn't really give the answer I was looking for.

HOW do you decompress the ZLib-compressed .hold-file to XML? I looked at the source code, and it seemed to me that there is some kind of command line interface for decompressing (and compressing, etc.) but where and how do you access this? I was unable to compile the source for it (although I didn't really know what I was doing, I was just guessing what to do and hoping it would eventually work (I don't really know any C, and the only compiler I've got is the one that came with my Linux distro)). When that failed, I tried making a Java-program that would decompress the .hold-file using the ZLib "library" that is included in the Java API 1.4.2. The program would have worked, but the .hold file was of an "unknown compression format" (DataFormatException was thrown). Does anyone know if it is possible to decompress it with Java? (that is: did I do something wrong or is the ZLib included in the API of a different version and thus incompatible with the hold-files?).

Is there perhaps an already existing compiled utility (a Linux/Windows executable) that someone can attach?

Or, you could just attach the first level of Dugan's in XML...

[Edited by Stefan on 08-23-2004 at 07:11 AM GMT]

[Edited by Stefan on 08-23-2004 at 09:43 PM GMT]

____________________________
0.099³
08-23-2004 at 08:11 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: Decompressing holds to XML (0)  
Hey, Stefan!

I want to answer this question, but I don't like the idea of everyone looking through private hold files for kicks. It's kind of nice that currently authors can specify editing privileges in a way where you need to beat your way through before you can see what's in the hold. I don't want to explain an easy circumvention of that.

But if we keep this as a programming problem, instead of supplying an "easy hack" then we're okay. The code you need to focus on is in PrintUncompress() found in DRODUtil.cpp of the "DRODUtil" project. The code will all build under GCC, if you can get that installed. It might take some work to either get DRODUtil to build or to copy the relevant code into a new project, but either should be feasible, and a number of knowledgable people are hanging around who could answer questions.

And yes, I can just give you the XML file to level 1 of KDD, but tell me what you're doing first, because it will be a little trouble, and I want to make sure this is a sensible way to proceed towards your goal--whatever it is.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
08-29-2004 at 01:50 AM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: Decompressing holds to XML (+1)  
Oh also, not to be overstifling, but I would appreciate if anyone knowledgable of the sort of hacks I'm talking about would try to keep them off the forum. We aim to promote the best possible DROD experience here, and certain shortcuts and exploits are better left unexplained or at least published off in some l33t little nook of the internet. It's not too hard to figure out, but I'd like it to be a little bit hard. Ironically, this post will probably motivate some curious types to go stepping down that dark path.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
08-29-2004 at 01:56 AM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Re: Decompressing holds to XML (+1)  
ErikH2000 wrote:
I want to answer this question, but I don't like the idea of everyone looking through private hold files for kicks. It's kind of nice that currently authors can specify editing privileges in a way where you need to beat your way through before you can see what's in the hold. I don't want to explain an easy circumvention of that.
Understandable; I wouldn't want anyone snooping around either. I didn't think of that when asking.
But if we keep this as a programming problem, instead of supplying an "easy hack" then we're okay. The code you need to focus on is in PrintUncompress() found in DRODUtil.cpp of the "DRODUtil" project. The code will all build under GCC, if you can get that installed. It might take some work to either get DRODUtil to build or to copy the relevant code into a new project, but either should be feasible, and a number of knowledgable people are hanging around who could answer questions.
I've been trying to compile DRODUtil (under Linux), but it always gives the error
In file included from ../../BackEndLib/Types.h:30,
from ../../BackEndLib/Assert.cpp:34:
../../BackEndLib/Wchar.h:51: error: 'char_traits' was not declared in this scope
../../BackEndLib/Wchar.h:51: error: template argument 2 is invalid
and a lot of other errors after that. I've tried updating and installing all the dependencies, but I'm not sure if I've done everything right. As I said before, I don't know any C or anything about its structure, so it's a bit difficult to do anything when I'm only able to guess what to do.

And yes, I can just give you the XML file to level 1 of KDD, but tell me what you're doing first, because it will be a little trouble, and I want to make sure this is a sensible way to proceed towards your goal--whatever it is.
The reason why I want to look at the XML-file is that I want to make an enforced challenge to a puzzle in Dugan's Level 1. As the roaches in the room in question (6N2W) seems to be placed in a non-trivial order, I have to look at the .hold-file to get it exactly the way I want it. Copying the area from the room won't work, as the roaches in my puzzle doesn't have the same starting positions as in the original.

____________________________
0.099³
09-13-2004 at 10:07 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: Decompressing holds to XML (+1)  
Stefan wrote:
and a lot of other errors after that. I've tried updating and installing all the dependencies, but I'm not sure if I've done everything right. As I said before, I don't know any C or anything about its structure, so it's a bit difficult to do anything when I'm only able to guess what to do.
Ah, you are missing this one weirdo file that we got permission to use from uh... was it GLIB? ...some GPL'd project. Anyhow, we have permission to use it, but I don't know what troubles there would be about publicly distributing it and don't want to think about it too hard. E-mail me erikh at caravelgames dot net, and I'll send you a copy.
The reason why I want to look at the XML-file is that I want to make an enforced challenge to a puzzle in Dugan's Level 1. As the roaches in the room in question (6N2W) seems to be placed in a non-trivial order, I have to look at the .hold-file to get it exactly the way I want it. Copying the area from the room won't work, as the roaches in my puzzle doesn't have the same starting positions as in the original.
Ugh, puzzles that require precise roach-ordering--not my favorite thing. Oh well, e-mail me and I'll send you the XML for level 1.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
09-15-2004 at 10:48 PM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Re: Decompressing holds to XML (0)  
ErikH2000 wrote:
Ugh, puzzles that require precise roach-ordering--not my favorite thing. Oh well, e-mail me and I'll send you the XML for level 1.
Well, it doesn't actually require precise roach-ordering (it's working fine as it is now), but then it wouldn't REALLY be an enforced challenge of the original puzzle, would it? (I'm kind of a perfectionist :))

____________________________
0.099³
09-15-2004 at 11:53 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Decompressing holds to XML (0)  
Stefan wrote:
In file included from ../../BackEndLib/Types.h:30,
from ../../BackEndLib/Assert.cpp:34:
../../BackEndLib/Wchar.h:51: error: 'char_traits' was not declared in this scope
../../BackEndLib/Wchar.h:51: error: template argument 2 is invalid
This is caused by some incompability with GCC 3.4. I've commited a fix to CVS, but it probably won't be available at anonymous CVS until tomorrow.

- Gerry
09-22-2004 at 10:50 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Re: Decompressing holds to XML (0)  
Ok, now at least that works, but when it starts compiling Checkpoint.cpp it complains about some missing files. Some can be found in the DRODLib1.5 directory, but Checkpoint.h is nowhere to be found.

Anyway, I got what I needed from Erik, so I don't have to get this thing compiled anymore (although it would be fun get it compiled).

____________________________
0.099³
09-23-2004 at 01:25 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Decompressing holds to XML (0)  
Stefan wrote:
Ok, now at least that works, but when it starts compiling Checkpoint.cpp it complains about some missing files. Some can be found in the DRODLib1.5 directory, but Checkpoint.h is nowhere to be found.
Hmm...Checkpoint.cpp? I don't remember us having a Checkpoint.cpp... Maybe if that file is removed, then it would compile. (Sorry for jumping in at this point in the conversation. If I'm talking nonsense, then you can just ignore me.)

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
09-23-2004 at 04:35 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Re: Decompressing holds to XML (0)  
mrimer wrote:
Hmm...Checkpoint.cpp? I don't remember us having a Checkpoint.cpp... Maybe if that file is removed, then it would compile. (Sorry for jumping in at this point in the conversation. If I'm talking nonsense, then you can just ignore me.)
That worked and now I have drodutil compiled (it took a while to get it to run (it didn't find the libraries at first), but after some experimenting it worked (not that I actually needed it anymore)). Thanks for the help!

I tried to compile drod as well (just for fun, I don't need it compiled), but there were some similar errors (some files missing). Boy that CVS-tree seems to be messed up! Files missing and "extra" files that makes the compiler unhappy... :no



____________________________
0.099³
09-25-2004 at 02:38 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Decompressing holds to XML (0)  
Stefan wrote:
I tried to compile drod as well (just for fun, I don't need it compiled), but there were some similar errors (some files missing). Boy that CVS-tree seems to be messed up! Files missing and "extra" files that makes the compiler unhappy... :no
That's strange. It works fine here... Is this a clean cvs checkout ? Could you list the errors you are getting ?

- Gerry
10-01-2004 at 03:19 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged

File: output.zip (4.8 KB)
Downloaded 47 times.
License: Other
From: Unspecified
icon Re: Decompressing holds to XML (0)  
That's strange. It works fine here... Is this a clean cvs checkout ? Could you list the errors you are getting ?
If I use a freshly downloaded (1.10.2004) CVS-tree and try to compile drodutil without making any changes to anything, I get the output in output1. If I delete (or move) the file Checkpoint.cpp and run another make I get output2. Now, if I try to compile drod I get output3, and when I then try to compile drodutil again, I get output4 (success).

I've tried removing Buttonwidget.cpp to get drod compiled and that gives output5. Removing DialogWidget.cpp gives output6. After that I stopped trying.

Hmmm... Come to think of it, I don't think I ever downloaded and installed any of the run-time requirements listed in the Config-file as they were (supposedly) included in the binary distribution... (although I haven't found the file SDL_ttf.h (or any other of the missing files)) That may explain the errors in output3, output5 and output6... (and thus the whole problem (except for Checkpoint.cpp)))


____________________________
0.099³
10-07-2004 at 12:11 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Decompressing holds to XML (+1)  
Stefan wrote:
Hmmm... Come to think of it, I don't think I ever downloaded and installed any of the run-time requirements listed in the Config-file as they were (supposedly) included in the binary distribution... (although I haven't found the file SDL_ttf.h (or any other of the missing files)) That may explain the errors in output3, output5 and output6... (and thus the whole problem (except for Checkpoint.cpp)))
Yes, you must have all these libs in order to successfully compile DROD.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
10-07-2004 at 01:44 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
patmo98
Level: Delver
Rank Points: 39
Registered: 03-14-2003
IP: Logged
icon Re: Decompressing holds to XML (+1)  
Stefan wrote:
Hmmm... Come to think of it, I don't think I ever downloaded and installed any of the run-time requirements listed in the Config-file as they were (supposedly) included in the binary distribution... (although I haven't found the file SDL_ttf.h (or any other of the missing files)) That may explain the errors in output3, output5 and output6... (and thus the whole problem (except for Checkpoint.cpp)))

Make sure you are using the new build instructions at the bottem of this page. Don't make the mistake I made and use the instructions under "DROD 1.5 Archive". Use the instructions under "Getting Started".

You need to compile the following:
MetaKit, Expat, and Zlib to get DRODUtil working.

To get DROD working you also need to compile SDL and SDL_ttf. You also need to download the FMOD Programmers API. This product in to avalble as source.

Then you need to set your library and header paths to include the above. Note: (I am not a C programmer. I just read the instructions, and after many hours I finally compiled DRODUtil. I never managed to compile DROD.exe). If you want more details I'll tell you what the packages do.
10-07-2004 at 05:02 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Re: Decompressing holds to XML (0)  
I have a working DRODUtil (have had one for some time now), and I've read the instructions, but I've been trying to compile DROD just to help the developers (it's always good to have it tested on several machines). I don't really have any interest in getting DROD compiled (I tried it just for fun); my main priority at the time was to get DRODUtil up and working. I needed the XML-version of KDD:L1:6N2W to finally be able to release my hold.

I may or may not continue to try to compile DROD (after all I have no real use of a self-compiled version). Right now I've got a lot of things to do, so I don't really have the time.

____________________________
0.099³
10-07-2004 at 05:35 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : Decompressing holds to XML (How do you do it?)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.