Page 1 of 1

Level XML generator

Posted: July 1st, 2016, 8:40 pm
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 ?

Re: Level XML generator

Posted: July 1st, 2016, 11:11 pm
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?

Re: Level XML generator

Posted: July 2nd, 2016, 4:29 am
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.

Re: Level XML generator

Posted: July 2nd, 2016, 1:15 pm
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).

Re: Level XML generator

Posted: July 2nd, 2016, 11:11 pm
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.

Re: Level XML generator

Posted: July 3rd, 2016, 12:50 am
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?

Re: Level XML generator

Posted: July 3rd, 2016, 8:23 am
by David
lvcabral wrote:why the guard type is not an attribute of "guard" tag ?
Maybe because it's not in LEVELS.DAT?

Re: Level XML generator

Posted: July 3rd, 2016, 11:07 am
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.

Re: Level XML generator

Posted: July 3rd, 2016, 6:12 pm
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.