PDA

View Full Version : "De-parsing" an adventure module



primarch
July 22nd, 2010, 23:29
Hi!

I'm proficient using the 4e parser to make my own modules, but I like learning from other module makers so see how they format and index things.

My question is, is it possible to take a fully done module and revert the parsing process to get the component txt files in order to view, edit and then re-parse?

It's much easier to edit a shared module if you can revert it to its component parts than one from scratch.

Is it possible?

Primarch

Sorontar
July 22nd, 2010, 23:46
Okay sorry if I've misunderstood what you are asking but change the file from a .mod to a .zip and unzip. You will then be able to see all the files that made the module.

Tenian
July 23rd, 2010, 02:16
DrZeuss made a module decompiler. I'm not sure it will function with some of the newer options but it did work pre-PHB3

primarch
July 23rd, 2010, 04:04
Okay sorry if I've misunderstood what you are asking but change the file from a .mod to a .zip and unzip. You will then be able to see all the files that made the module.

Hi!

Its something different from that. What you mention will show me the xml files and the jpegs that for a module. As Tenian mentions I'm looking for a module de-compiler.

What I want to do is revert a module into its original text files that cover things like powers, race class etc. In other words the text files you make with the proper syntax that are the files that the parser uses to make the module, thus "de-parsing".

I'll check out DrZuess's decompiler and see how that goes.

Thanks!

Primarch

Zeus
July 23rd, 2010, 11:56
Yes, Tenian's right my decompiler will do just this, turn a modules db.xml, client.xml or common.xml file back into 4EParser native text source files. You can then load these back into the 4EParser to re-parse back into a module again.

I wrote the tool as a backup mechanism in case original mod source files were ever lost or misplaced. As Tenian also correctly states it should work with the following exceptions:

- its been about 6-9 months since I updated it, therefore newer modules produced with the latest version of the Parser might cause errors
- if I recall the tool doesn't handle adventure class personalities very well
- reference links won't work - you will need to manually edit these
- won't run under Windows 7 (problem with permissions as the app uses a small scratch area in the programs directory).

I do plan to update all my tools including this one over the next few weeks when real life stops getting in the way.

I'll post updates here at the FG forums so stay tuned.

Sorontar
July 23rd, 2010, 12:49
Its something different from that. What you mention will show me the xml files and the jpegs that for a module. As Tenian mentions I'm looking for a module de-compiler.

Things are much clearer now than last night, having checked the mark up is lost. Hope DrZ's miraculous whatchamabob works for you :)

primarch
July 23rd, 2010, 15:19
Things are much clearer now than last night, having checked the mark up is lost. Hope DrZ's miraculous whatchamabob works for you :)

Hi!

DrZuess's tool is indeed what I was looking for, although I'm in no rush and I'll wait until its updated.

Thanks!

Primarch

primarch
July 23rd, 2010, 15:20
Yes, Tenian's right my decompiler will do just this, turn a modules db.xml, client.xml or common.xml file back into 4EParser native text source files. You can then load these back into the 4EParser to re-parse back into a module again.

I wrote the tool as a backup mechanism in case original mod source files were ever lost or misplaced. As Tenian also correctly states it should work with the following exceptions:

- its been about 6-9 months since I updated it, therefore newer modules produced with the latest version of the Parser might cause errors
- if I recall the tool doesn't handle adventure class personalities very well
- reference links won't work - you will need to manually edit these
- won't run under Windows 7 (problem with permissions as the app uses a small scratch area in the programs directory).

I do plan to update all my tools including this one over the next few weeks when real life stops getting in the way.

I'll post updates here at the FG forums so stay tuned.

Hi!

I use a lot of you tools! :D

Thanks for providing them!

Primarch

Zulithe
July 23rd, 2010, 17:09
I've also found the .mod decompiler useful. Thank you! I hope you will get around to updating it, particularly so us Windows 7 users can run it better.

I have only tested it under Windows 7. While it did mostly work when I ran it as admin, it left some weird characters (i think mis-deparsed commas? sorry I don't have the files around atm to look) in the output. If you ever get around to updating it, might be something to keep an eye out for...

Thanks again

Griogre
July 26th, 2010, 06:53
The most common blown character in the translation is the slanted apostrophe (’) instead of the straight one ('). While FG will handle the slanted apostrophe (through I think it doesn't look very good in the default FG font) this character is not part of the iso-8859-1 encoding which the first line of FG's xml files say they conform to.

Because FG doesn't actually do anything with its xml files other than use them as data holders this doesn't normally matter. However if you load the XML file into an editor that actually "helps" you by making sure your characters are valid per the xml first line declaration, those editors with change invalid characters like the slant apostrophe to a valid character, often a ? character.

If your library modules have a lot of ?'s in the middle of words, you can fix like 85% of the ? characters in your modules if you will mass find and replace ’ for ' in the text files before you parse them. As mass find and replace opperations on large files is always a risky operation you should always back up a file the file before you do the operation - though changing an apostrophe for another is about as safe as it gets.