Level XML generator

Windows and Linux editor of PoP1 (for DOS and SNES) and PoP2 (for DOS).
Post Reply
lvcabral
Vizier
Vizier
Posts: 115
Joined: March 11th, 2016, 10:34 pm

Level XML generator

Post by lvcabral »

Norbert,

I just implemented the support on my Roku port for the Apoplexy XML format so the users can download mods and play.

I was thinking that would be great to have a simpler tool, with that part of Apoplexy code, that just read LEVEL.DAT and generate the XML's, to avoid the manual process of renaming, copying, executing etc. You could even implement that online to allow people to download the xml instead of the dat files.

The Apoplexy code is open ? Can I have access to it ?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Level XML generator

Post by Norbert »

lvcabral wrote:support on my Roku port for the Apoplexy XML format
Nice.

Yes, the apoplexy.c file inside the package contains the source code.
Note that apoplexy uses PR to export and import level files.

Maybe one day PR will be able to export LEVELS.DAT to XML files.
lvcabral wrote:to avoid the manual process of renaming, copying, executing etc
You are aware that "apoplexy -x" exports all levels to the program's xml/ directory, right?
lvcabral
Vizier
Vizier
Posts: 115
Joined: March 11th, 2016, 10:34 pm

Re: Level XML generator

Post by lvcabral »

Norbert wrote:
lvcabral wrote:support on my Roku port for the Apoplexy XML format
Nice.

Yes, the apoplexy.c file inside the package contains the source code.
Note that apoplexy uses PR to export and import level files.

Maybe one day PR will be able to export LEVELS.DAT to XML files.
That's what I'm talking about!
Norbert wrote:
lvcabral wrote:to avoid the manual process of renaming, copying, executing etc
You are aware that "apoplexy -x" exports all levels to the program's xml/ directory, right?
Yes, I'm using this, but I need to get file by file replace inside a folder and run apoplexy.

A simpler tool would be better to do in batch.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Level XML generator

Post by Norbert »

What's your current setup, the relevant directories and file names for both packages?
What you describe ("file by file", "renaming, copying, executing, etc.") should be doable with a .BAT batch file.
Note also that there is a PoP1 XML standard that includes default names for the XML levels (on page 3).
lvcabral
Vizier
Vizier
Posts: 115
Joined: March 11th, 2016, 10:34 pm

Re: Level XML generator

Post by lvcabral »

Thanks again Norbert.

I'm already following the standard, I'm currently testing 3 mods: "The Great Escape", 'New 13 Levels" and "SNES-PC-set".
I found several small bugs in my port, because I was using a "perfect" levelset, with these mods, things like events pointing to walls crashed my code.
I'm also detecting some small things that my port is not behaving as expected by the mods, in particular with Guards.

I asked about the source code, I just never saw the apoplexy.c in the folder :) assumed the package was only the binaries.

Interesting how the 9 rooms mode can make so easy some of the more "mazy" custom levelsets.

Will make a video as soon as I finish version 12.
lvcabral
Vizier
Vizier
Posts: 115
Joined: March 11th, 2016, 10:34 pm

Re: Level XML generator

Post by lvcabral »

Another question, the the mod "SNES-PC-Set"" the level 12b guard is the "fatguard" instead of jaffar (that only shows in level 13), why the guard type is not an attribute of "guard" tag ? If this customization is possible inside Apoplexy we should support it on the XML standard, don't you think?
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Level XML generator

Post by David »

lvcabral wrote:why the guard type is not an attribute of "guard" tag ?
Maybe because it's not in LEVELS.DAT?
lvcabral
Vizier
Vizier
Posts: 115
Joined: March 11th, 2016, 10:34 pm

Re: Level XML generator

Post by lvcabral »

David wrote:
lvcabral wrote:why the guard type is not an attribute of "guard" tag ?
Maybe because it's not in LEVELS.DAT?
OK I understand this is just a dump of levels.dat, so maybe we should create another file with the other mod changes. I will see what I can do.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Level XML generator

Post by Norbert »

lvcabral wrote:
David wrote:
lvcabral wrote:why the guard type is not an attribute of "guard" tag ?
Maybe because it's not in LEVELS.DAT?
OK I understand this is just a dump of levels.dat, so maybe we should create another file with the other mod changes. I will see what I can do.
It might be a good idea to start a broader discussion about this in the "Prince of Persia 1 XML Format" thread. I briefly touched the subject of PRINCE.EXE modifications in a post there. It would be nice if we can expand the PoP1 XML Format document to include information about an additional XML file that includes information about PRINCE.EXE. That we standardize what CusPop, SDLPoP, the Roku port and other software use.
Post Reply