Jump to content

XML:OPge: Difference between revisions

m
copy-edit
m (ignore this)
m (copy-edit)
Line 1: Line 1:
{{XML_File_Header | type=OPge | prev=ONWC | next=OSBD | name=Objective Page }}
{{XML_File_Header | type=OPge | prev=ONWC | next=OSBD | name=Objective Page}}


===general notes===
==General notes==
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''.
* '''OPge*.oni''' are level specific. (They can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat)
* '''OPge*.oni''' files are level-specific (they can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat).
* Objective pages can be called via BSL command "objective_set ''page_number''" or "objective_set ''page_number'' silent".
* Objective pages can be called via the BSL command "objective_set ''page_number''" or "objective_set ''page_number'' silent".


 
==XML structure==
===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").
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 15: 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.
 
:Take care of the structure and the cake is yours.


:Be mindful of the structure and it's a piece of cake.


example on "OPgelevel_21.xml":
Example from "OPgelevel_21.xml":


: #0  (OPge instance) links to #1 (IGPA instance)
: #0  (OPge instance) links to #1 (IGPA instance)
Line 30: 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===
Line 69: Line 66:
:: <Color>
:: <Color>
:: <Size>
:: <Size>
:: <Flags> (Every IGSt can use 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..)
:: <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> (contains the actual text but can also create a bare paragraph (see example at instance #5))
:: <Text> (Contains the actual text, but can also create a bare paragraph (see example at instance #5))
 


===example===
===Example===
[[Image:XML_OPge_modded.jpg|400px|right|thumb]]
[[Image:XML_OPge_modded.jpg|400px|right|thumb]]


Line 92: Line 88:
     </IGPA>
     </IGPA>


You can display a little image if you use the image tag in the IGPG instance. (Either non-animated TXMP or [[XML:PSpc|PSpc]].)
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 -- see screenshot ("page 1B - hint text").
<Text2> is used for the hint field see screenshot ("page 1B - hint text").


     <IGPG id="2">
     <IGPG id="2">
Line 109: Line 105:
     </IGPG>
     </IGPG>


Instance #5 has a space between the text tags (<Text> </Text>) to produce a new paragraph. The import ignores that so far but you can fix it by writing "<Text xml:space="preserve"> </Text>".
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">
     <IGSA id="3">