XML:OPge: Difference between revisions
Jump to navigation
Jump to search
Paradox-01 (talk | contribs) (quite similiar to txtc) |
m (link fix) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== | {{XML_File_Header | prev=ONWC | type=OPge | next=PNTA | name=Objective Page}} | ||
==General notes== | |||
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''. | |||
* '''OPge*.oni''' files are level-specific (they can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat). | |||
* Objective pages can be called via the BSL command "objective_set ''page_number''" or "objective_set ''page_number'' silent". | |||
==XML structure== | |||
Think of "instances" (#N) as file sections | Think of "instances" (#N) as file sections; they go from 1 to N. 0 is the header (it defines the file type, here "OPge"). | ||
: Every OPge contains one instance of type IGPA. | : Every OPge contains one instance of type IGPA. | ||
Line 14: | Line 14: | ||
: Every IGSA contains a number of instances of type IGSt. | : Every IGSA contains a number of instances of type IGSt. | ||
: IGPA means a page array (think of it as a little book) | : IGPA means a page array (think of it as a little book). | ||
: IGPG means a page | : IGPG means a page. | ||
: IGSA means a (text) string array | : IGSA means a (text) string array. | ||
: IGSt means a (text) string | : IGSt means a (text) string. | ||
: | :Be mindful of the structure and it's a piece of cake. | ||
Example from "OPgelevel_21.xml": | |||
: #0 (OPge instance) links to #1 (IGPA instance) | : #0 (OPge instance) links to #1 (IGPA instance) | ||
Line 29: | Line 28: | ||
: #3 (IGSA instance) links from #4 up to #6 (IGSt instances) | : #3 (IGSA instance) links from #4 up to #6 (IGSt instances) | ||
: #7 (IGSA instance) links to #8 (IGSt instance) | : #7 (IGSA instance) links to #8 (IGSt instance) | ||
===XML tags and options=== | ===XML tags and options=== | ||
'''OPge instance tags''' | '''OPge instance tags''' | ||
: <LevelNumber> (the page won't show up if this tag has the wrong number) | : <LevelNumber> (the page won't show up if this tag has the wrong number) | ||
: <Pages> ( | : <Pages> (link to IGPA instance) | ||
'''IGPA instance tags''' | '''IGPA instance tags''' | ||
: <Pages> | : <Pages> (every link represents a page, be aware of it for BSL command "objective_set") | ||
:: <Link> (links to an IGPG instance) | :: <Link> (links to an IGPG instance) | ||
Line 48: | Line 46: | ||
::: '''Bold''' | ::: '''Bold''' | ||
::: ''Italic'' | ::: ''Italic'' | ||
:: <Color> ([[wikipedia:RGB_color_model# | :: <Color> ([[wikipedia:RGB_color_model#Numeric_representations|RGB]] range, e.g. <Color>255 0 77</Color>) | ||
:: <Size> (10 and 12 are usually used) | :: <Size> (10 and 12 are usually used) | ||
: <Image> (links to a TXMP or PSpc file) | : <Image> (links to a TXMP or PSpc file) | ||
Line 68: | Line 66: | ||
:: <Color> | :: <Color> | ||
:: <Size> | :: <Size> | ||
:: <Flags> (Every IGSt can | :: <Flags> (Every IGSt can have its own properties. The <Flag> tag let you enable these. Add "Size" when you want to get a new font size, add "Color" when you want to get a new font color, etc.) | ||
::: <font style="color:#777">Family</font> | ::: <font style="color:#777">Family</font> | ||
::: Style | ::: Style | ||
::: Color | ::: Color | ||
::: Size | ::: Size | ||
:: <Text> ( | :: <Text> (Contains the actual text, but can also create a bare paragraph (see example at instance #5)) | ||
=== | ===Example=== | ||
[[Image:XML_OPge_modded.jpg|400px|right|thumb]] | |||
| | |||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni | <Oni> | ||
< | <OPge id="0"> | ||
<LevelNumber>21</LevelNumber> | <LevelNumber>21</LevelNumber> | ||
<Pages>#1</Pages> | <Pages>#1</Pages> | ||
</ | </OPge> | ||
< | <IGPA id="1"> | ||
<Pages> | <Pages> | ||
<Link>#2</Link> | <Link>#2</Link> | ||
</Pages> | </Pages> | ||
</ | </IGPA> | ||
You can display a | You can display a small image if you use the <Image> tag in the IGPG instance. (Either non-animated TXMP or [[XML:PSpc|PSpc]].) | ||
<Text2> is used for the hint field | <Text2> is used for the hint field — see screenshot ("page 1B - hint text"). | ||
< | <IGPG id="2"> | ||
<nowiki><Font></nowiki> | <nowiki><Font></nowiki> | ||
<Family></Family> | <Family></Family> | ||
Line 108: | Line 103: | ||
<Text1>#3</Text1> | <Text1>#3</Text1> | ||
<Text2>#7</Text2> | <Text2>#7</Text2> | ||
</ | </IGPG> | ||
Instance | Instance #5 has a space between the text tags (<Text> </Text>) to produce a new paragraph. OniSplit's import ignores that currently, but you can fix it by writing "<Text xml:space="preserve"> </Text>". | ||
< | <IGSA id="3"> | ||
<Strings> | <Strings> | ||
<Link>#4</Link> | <Link>#4</Link> | ||
Line 118: | Line 113: | ||
<Link>#6</Link> | <Link>#6</Link> | ||
</Strings> | </Strings> | ||
</ | </IGSA> | ||
< | <IGSt id="4"> | ||
<nowiki><Font></nowiki> | <nowiki><Font></nowiki> | ||
<Family></Family> | <Family></Family> | ||
Line 128: | Line 123: | ||
<nowiki></Font></nowiki> | <nowiki></Font></nowiki> | ||
<Text>page 1A - caption</Text> | <Text>page 1A - caption</Text> | ||
</ | </IGSt> | ||
< | <IGSt id="5"> | ||
<nowiki><Font></nowiki> | <nowiki><Font></nowiki> | ||
<Family></Family> | <Family></Family> | ||
Line 138: | Line 133: | ||
<nowiki></Font></nowiki> | <nowiki></Font></nowiki> | ||
<Text xml:space="preserve"> </Text> | <Text xml:space="preserve"> </Text> | ||
</ | </IGSt> | ||
< | <IGSt id="6"> | ||
<nowiki><Font></nowiki> | <nowiki><Font></nowiki> | ||
<Family></Family> | <Family></Family> | ||
Line 148: | Line 143: | ||
<nowiki></Font></nowiki> | <nowiki></Font></nowiki> | ||
<Text>page 1A - text</Text> | <Text>page 1A - text</Text> | ||
</ | </IGSt> | ||
< | <IGSA id="7"> | ||
<Strings> | <Strings> | ||
<Link>#8</Link> | <Link>#8</Link> | ||
</Strings> | </Strings> | ||
</ | </IGSA> | ||
< | <IGSt id="8"> | ||
<nowiki><Font></nowiki> | <nowiki><Font></nowiki> | ||
<Family></Family> | <Family></Family> | ||
Line 163: | Line 158: | ||
<nowiki></Font></nowiki> | <nowiki></Font></nowiki> | ||
<Text>page 1B - hint text</Text> | <Text>page 1B - hint text</Text> | ||
</ | </IGSt> | ||
</Oni> | </Oni> | ||
{{XML}} |
Latest revision as of 14:43, 31 March 2021
OPge : Objective Page | ||
---|---|---|
XML
ONWC << Other file types >> PNTA |
General notes
- The XML on this page is compatible with OniSplit v0.9.61.0.
- OPge*.oni files are level-specific (they can be found in AE/AEInstaller/vanilla/levelX_Final.dat).
- Objective pages can be called via the BSL command "objective_set page_number" or "objective_set page_number silent".
XML structure
Think of "instances" (#N) as file sections; they go from 1 to N. 0 is the header (it defines the file type, here "OPge").
- Every OPge contains one instance of type IGPA.
- Every IGPA contains a number of instances of type IGPG.
- Every IGPG contains a number of instances of type IGSA.
- Every IGSA contains a number of instances of type IGSt.
- IGPA means a page array (think of it as a little book).
- IGPG means a page.
- IGSA means a (text) string array.
- IGSt means a (text) string.
- Be mindful of the structure and it's a piece of cake.
Example from "OPgelevel_21.xml":
- #0 (OPge instance) links to #1 (IGPA instance)
- #1 (IGPA instance) links to #2 (IGPG instance)
- #2 (IGPG instance) links to #3 and #7 (IGSA instances)
- #3 (IGSA instance) links from #4 up to #6 (IGSt instances)
- #7 (IGSA instance) links to #8 (IGSt instance)
XML tags and options
OPge instance tags
- <LevelNumber> (the page won't show up if this tag has the wrong number)
- <Pages> (link to IGPA instance)
IGPA instance tags
- <Pages> (every link represents a page, be aware of it for BSL command "objective_set")
- <Link> (links to an IGPG instance)
IGPG instance tags
- <Font> (defines the font in case it isn't defined in the IGSt instance; the style is bold by default)
- <Family>
- TSFFTahoma
- <Style>
- Normal
- Bold
- Italic
- <Color> (RGB range, e.g. <Color>255 0 77</Color>)
- <Size> (10 and 12 are usually used)
- <Family>
- <Image> (links to a TXMP or PSpc file)
- <Text1> (links to an IGSA instance)
- <Text2> (links to an IGSA instance (hint field))
IGSA instance tags
- <Strings>
- <Link> (links to an IGSt instance)
IGSt instance tags
- <Font>
- <Family>
- TSFFTahoma
- <Style>
- Normal
- Bold
- Italic
- <Color>
- <Size>
- <Flags> (Every IGSt can have its own properties. The <Flag> tag let you enable these. Add "Size" when you want to get a new font size, add "Color" when you want to get a new font color, etc.)
- Family
- Style
- Color
- Size
- <Text> (Contains the actual text, but can also create a bare paragraph (see example at instance #5))
- <Family>
Example
<?xml version="1.0" encoding="utf-8"?> <Oni> <OPge id="0"> <LevelNumber>21</LevelNumber> <Pages>#1</Pages> </OPge> <IGPA id="1"> <Pages> <Link>#2</Link> </Pages> </IGPA>
You can display a small image if you use the <Image> tag in the IGPG instance. (Either non-animated TXMP or PSpc.)
<Text2> is used for the hint field — see screenshot ("page 1B - hint text").
<IGPG id="2"> <Font> <Family></Family> <Style>Normal</Style> <Color>0 0 0 0</Color> <Size>0</Size> <Flags></Flags> </Font> <Image>TXMPmc_big_ware_room</Image> <Text1>#3</Text1> <Text2>#7</Text2> </IGPG>
Instance #5 has a space between the text tags (<Text> </Text>) to produce a new paragraph. OniSplit's import ignores that currently, but you can fix it by writing "<Text xml:space="preserve"> </Text>".
<IGSA id="3"> <Strings> <Link>#4</Link> <Link>#5</Link> <Link>#6</Link> </Strings> </IGSA> <IGSt id="4"> <Font> <Family></Family> <Style>Normal</Style> <Color>191 0 0</Color> <Size>0</Size> <Flags>Color</Flags> </Font> <Text>page 1A - caption</Text> </IGSt> <IGSt id="5"> <Font> <Family></Family> <Style>Normal</Style> <Color>0 0 0 0</Color> <Size>0</Size> <Flags></Flags> </Font> <Text xml:space="preserve"> </Text> </IGSt> <IGSt id="6"> <Font> <Family></Family> <Style>Normal</Style> <Color>0 0 0 0</Color> <Size>0</Size> <Flags>Style</Flags> </Font> <Text>page 1A - text</Text> </IGSt> <IGSA id="7"> <Strings> <Link>#8</Link> </Strings> </IGSA> <IGSt id="8"> <Font> <Family></Family> <Style>Normal</Style> <Color>0 0 0 0</Color> <Size>0</Size> <Flags>Style</Flags> </Font> <Text>page 1B - hint text</Text> </IGSt> </Oni>