SOM file
From Wiki
Line 6: | Line 6: | ||
==Anatomy== | ==Anatomy== | ||
When a new Sword of Moonlight project is made by [[SOM_MAIN]] a '''SOM file''' is created inside the project [[Wikipedia:File directory|folder]]. You can open this file up with any [[Wikipedia:Text editor|Text editor]]. The first line of the newly created file will name the folder it was created in. The second line is a single 0. | When a new Sword of Moonlight project is made by [[SOM_MAIN]] a '''SOM file''' is created inside the project [[Wikipedia:File directory|folder]]. You can open this file up with any [[Wikipedia:Text editor|Text editor]]. The first line of the newly created file will name the folder it was created in. The second line is a single 0. | ||
+ | |||
In 2013, as part of the [[SomEx]] project effort to extend Sword of Moonlight's tools to be able to work out of more than one data folder—not unlike the [[som_db]] game testing program—it was concluded that the SOM file should be able to define some [[Wikipedia:environment variable|environment variable]]s for the project. The following variables were initially decided upon: | In 2013, as part of the [[SomEx]] project effort to extend Sword of Moonlight's tools to be able to work out of more than one data folder—not unlike the [[som_db]] game testing program—it was concluded that the SOM file should be able to define some [[Wikipedia:environment variable|environment variable]]s for the project. The following variables were initially decided upon: | ||
Line 31: | Line 32: | ||
|Ex.ini||specifies a list of Ex.ini configuration files. | |Ex.ini||specifies a list of Ex.ini configuration files. | ||
|} | |} | ||
+ | |||
Each variable is written on its own line, including an equal sign, and the text value to be assigned to the variable to the right of the equal sign. All written on a single line, not unlike an [[Wikipedia:INI file|INI file]]. Like so: | Each variable is written on its own line, including an equal sign, and the text value to be assigned to the variable to the right of the equal sign. All written on a single line, not unlike an [[Wikipedia:INI file|INI file]]. Like so: | ||
TRIAL=00 | TRIAL=00 | ||
+ | |||
As with an [[Wikipedia:batch file|MS-DOS batch file]], variables should be able to be substituted inside of other variables by surrounding them by percent signs. Like so: | As with an [[Wikipedia:batch file|MS-DOS batch file]], variables should be able to be substituted inside of other variables by surrounding them by percent signs. Like so: | ||
DATA=%USERPROFILE%\data; %DATA% | DATA=%USERPROFILE%\data; %DATA% | ||
+ | |||
However, this is where the similarity to MS-DOS batch files end. | However, this is where the similarity to MS-DOS batch files end. | ||
Line 45: | Line 49: | ||
;This is a comment demonstrating comments | ;This is a comment demonstrating comments | ||
+ | |||
<fieldset><legend> | <fieldset><legend> | ||
===Sets=== | ===Sets=== | ||
− | </legend> | + | </legend>A nonstandard extension allows lines beginning with + or - or | include individual profiles (eg. [[PRF]] and [[PRT file]]s) and or sets of profiles. Like so: |
− | A nonstandard extension allows lines beginning with + or - or | include individual profiles (eg. [[PRF]] and [[PRT file]]s) and or sets of profiles. Like so: | ||
;include short swords found within the Cemetery | ;include short swords found within the Cemetery |
Revision as of 04:54, 21 August 2013
A SOM file is recognized by it's .som filename extension. It is the most iconic of files related to Sword of Moonlight: King's Field Making Tool owing it's initials to Sword of Moonlight itself.
History
SOM originated as a two line text file associated with a Sword of Moonlight project folder. The programs SOM_MAIN and SOM_RUN prompt the user to open the SOM file in order to work with a project. Beyond its obvious utility as a media file. since 2013 software that extends Sword of Moonlight had begun to prescribe additional meaning to the file's text, and a day may yet come when a Sword of Moonlight game may be rolled up into a single compressed SOM file that could be as ubiquitous as MP3s.
Anatomy
When a new Sword of Moonlight project is made by SOM_MAIN a SOM file is created inside the project folder. You can open this file up with any Text editor. The first line of the newly created file will name the folder it was created in. The second line is a single 0.
In 2013, as part of the SomEx project effort to extend Sword of Moonlight's tools to be able to work out of more than one data folder—not unlike the som_db game testing program—it was concluded that the SOM file should be able to define some environment variables for the project. The following variables were initially decided upon:
Environment Variable | Overview
Main article: /list of environment variables
|
---|---|
GAME | equivalent to the first line of the classical SOM file. |
DISC | equivalent to the second line of the classical SOM file. |
CD | changes directories in cases where the SOM file is located outside of its game's folder. |
DATA | specifies multiple data folders. |
USER | Data is looked for first in USER/data, then CD/data, and only then DATA. |
TRIAL | specifies the name of a map file where a new game takes place. Ostensibly for testing purposes. |
SCRIPT | specifies either a .mo Gettext file or a folder housing a lang and or font folder. |
FONT | specifies a list of font files and or font folders. |
Ex.ini | specifies a list of Ex.ini configuration files. |
Each variable is written on its own line, including an equal sign, and the text value to be assigned to the variable to the right of the equal sign. All written on a single line, not unlike an INI file. Like so:
TRIAL=00
As with an MS-DOS batch file, variables should be able to be substituted inside of other variables by surrounding them by percent signs. Like so:
DATA=%USERPROFILE%\data; %DATA%
However, this is where the similarity to MS-DOS batch files end.
Lines beginning with semicolons are ignored like so:
;This is a comment demonstrating comments