PRO file

From Wiki

Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
==Backward compatibility==
 
==Backward compatibility==
 
{{anchor|Backwards compatibility}}
 
{{anchor|Backwards compatibility}}
For purposes of playing a game a PR2 file and PRO file are identical; except that the game playing software must be able to find the file with a different file extension. Worst case scenario a project/game only has five or so PR2/PRO files, so renaming them would not be difficult.
+
For purposes of playing a game a PR2 file and PRO file are identical; except that the game playing software must be able to find the file with a different file extension. Worst case scenario a project/game only has five or so PR2/PRO files, so renaming them is not so difficult.
  
A classical PR2 file is basically a file that contains many PRF file records back to back. That is, each record is an exact copy of its PRF file. A Pro file differs in that the description field of each record gets replaced with the originating PRF's [[Wikipedia:UTF-8|UTF-8]] encoded filename up to 30 bytes worth of code-points. The converted field may also be padded with [[Wikipedia:Space_(punctuation)|spaces]] ( ) in order to mark them as converted as part of a multiple pass PR2 to PRO conversion process.{{dagger}}
+
A classical PR2 file is basically a file that contains many PRF file records back-to-back. That is, each record is an exact copy of its PRF file. A Pro file differs in that the description field of each record gets replaced with the originating PRF's [[Wikipedia:UTF-8|UTF-8]] encoded filename up to 30 bytes worth of code-points. The converted field may also be marked by padding it with [[Wikipedia:Space_(punctuation)|spaces]] ( ) as part of a multiple-pass PR2-to-PRO conversion/verification process.{{dagger}}
  
 
{{dagger|This marking technique is imperfect since a description can use all 30 bytes, fooling the detector. But it should prove easy enough to fix these unlikely cases by hand if ever necessary.}}
 
{{dagger|This marking technique is imperfect since a description can use all 30 bytes, fooling the detector. But it should prove easy enough to fix these unlikely cases by hand if ever necessary.}}

Latest revision as of 10:33, 6 March 2014

A PRO file is a Sword of Moonlight binary file recognized by its .pro (more often .PRO) filename extension. The name "pro", pronounced like the word pro, is not an acronym; it refers to the Sword of Moonlight profiles (eg. PRF and PRT) that are encapsulated by the "PRO-files" themselves.

History[edit]

Pro files were not part of Sword of Moonlight 2000, or Som2k. They were invented later to replace PR2 files. The rationale for this was both practical and esthetic. Practically it needed to be easy to verify that the PR2 file had been replaced; esthetically PRO-file has a nice ring to it, as does ProEdit.

Pro's killer application is to decouple PR2 files from the textual description fields of the PRF profiles. Decoupling permits the textual descriptions to be changed without warning and or localized without corrupting the project configuration. In short it's essential to making Sword of Moonlight a collaborative and accessible platform (and a wonder PR2 files don't work this way to begin with.)

And one more benefit that isn't obvious: is Pro files work even when two or more PRF files are described identically, since they do not require symmetry between descriptions. Which might not sound all that intuitive or even useful until you think about it: in the real world two descriptions are bound to be identical eventually, be it intentionally or accidentally, and when that time comes, no-one wants it to be a showstopper—and lest you forget, "a picture is worth a thousand words!" (as are balloon-tips.)

Backward compatibility[edit]

For purposes of playing a game a PR2 file and PRO file are identical; except that the game playing software must be able to find the file with a different file extension. Worst case scenario a project/game only has five or so PR2/PRO files, so renaming them is not so difficult.

A classical PR2 file is basically a file that contains many PRF file records back-to-back. That is, each record is an exact copy of its PRF file. A Pro file differs in that the description field of each record gets replaced with the originating PRF's UTF-8 encoded filename up to 30 bytes worth of code-points. The converted field may also be marked by padding it with spaces ( ) as part of a multiple-pass PR2-to-PRO conversion/verification process.+

+This marking technique is imperfect since a description can use all 30 bytes, fooling the detector. But it should prove easy enough to fix these unlikely cases by hand if ever necessary.

Tip: when SOM_PRM converts your old project's PR2 files to PRO files it must match the descriptions in the PR2 files to the descriptions in your project spaces' PRF files. The descriptions it finds will depend on your localization settings, eg. language pack. You may need to change localizations and rerun SOM_PRM until it is able to complete the conversion process for all of the records therein. It will most likely make a new partial PR2/PRO file with a PR~ extension until the conversion is a complete success or you give up on full conversion—which itself is not such a big deal, as the records are easy enough to repair by hand with SOM_PRM.