XML:DPge: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (and clearing a bit stuff)
 
m (using Image: consistently to make it easier to find all image refs on a page)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==[[OBD:DPge|DPeg]]: diary page==
{{XML_File_Header | prev=DOOR | type=DPge | next=FILM | name=Diary Page}}
===general notes===
 
* See [[XML basic tutorial|HERE]] if you don't know how to convert an oni file into XML and vice versa.
==General notes==
* '''DPge*.oni''' are global. (They can be found in edition/GameDataFolder/level0_...)
* The XML code on this page is based on OniSplit '''v0.9.61.0'''.
* A diary page can be read for first time when player enters the level linked its page by <LevelNumber> tag.
* '''DPge*.oni''' are global (they can be found in AE/AEInstaller/vanilla/level0_Final.dat).
* A diary page can be read for the first time when the player enters the level indicated by the <LevelNumber> tag.
* An IGPA instance here will make Oni crash. But <PageNumber> let you create more diary pages for a day.
* An IGPA instance here will make Oni crash. But <PageNumber> let you create more diary pages for a day.
* The game can load at most 60 DPge instances. 32 DPge instances exist in original game.
* The game can load at most 60 DPge instances. 32 DPge instances exist in the original game.


 
==XML structure==
===XML structure===
Think of "instances" (#N) as file sections: they run from 1 to N. 0 is the header (it defines the file type, here "DPge").
Think of "instances" (#N) as file sections, they go from 1 to N. 0 is the header (it defines the file type, here "DPge").


: Every DPge contains one instance of type IGPG.
: Every DPge contains one instance of type IGPG.
Line 19: Line 19:
: IGSt means a (text) string
: IGSt means a (text) string


 
Example from vanilla file "DPgelev_19_pg_01":
example on original file "DPgelev_19_pg_01":


: #0  (DPge instance) links to #1 (IGPG instance)
: #0  (DPge instance) links to #1 (IGPG instance)
: #1  (IGPG instance) links to #4 and #5 (IGSA instances)
: #1  (IGPG instance) links to #4 and #5 (IGSA instances)
: #2  <font color="#0000CC" title=" #3 exist if IGPG-Text2 is empty, paradox ;) ">(unknown placeholder, only presented in original files) (can be ignored)</font>
: #2  <font color="#0000CC" title=" #3 exist if IGPG-Text2 is empty ">(unknown placeholder, only presented in original files) (can be ignored)</font>
: #3  (unknown placeholder, only presented in original files) (can be ignored)
: #3  (unknown placeholder, only presented in original files) (can be ignored)
: #4  (IGSA instance) links to #7 (IGSt instance)
: #4  (IGSA instance) links to #7 (IGSt instance)
: #5  (IGSA instance) links to #6 (IGSt instance)
: #5  (IGSA instance) links to #6 (IGSt instance)


 
==XML tags and options==
===XML tags and options===
'''WPge instance tags'''
'''WPge instance tags'''
: <LevelNumber> (page can be read for first time when player enters this level)
: <LevelNumber> (page can be read for first time when player enters this level)
Line 36: Line 34:
: <IsLearnedMove>
: <IsLearnedMove>
:: 0 (normal page)
:: 0 (normal page)
:: 1 (Displays message "New combat move learned. (F1)" Can be avoided with BSL command "ui_suppress_prompt = 1")
:: 1 (displays message "New combat move learned. (F1)", which can be avoided with BSL command "ui_suppress_prompt = 1")
: <Page> (link to IGPG instance)
: <Page> (link to IGPG instance)


Line 47: Line 45:
::: '''Bold'''
::: '''Bold'''
::: ''Italic''
::: ''Italic''
:: <Color> ([[wikipedia:RGB_color_model#The_24-bit_RGB_representation|RGB]] range, e.g. <Color>255 0 77</Color>)
:: <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 67: Line 65:
:: <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)
:: <Text> (contains the actual text, but can also create a bare paragraph)
 


===example===
===Example===
{| border=0 cellspacing=20 cellpadding=0 align=right
[[Image:DPge.jpg|thumb]]
|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/DPge.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/DPge_preview.png]
|}


  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.34.0">
  <Oni>
     <Instance id="0" type="DPge">
     <DPge id="0">
         <LevelNumber>19</LevelNumber>
         <LevelNumber>19</LevelNumber>
         <PageNumber>1</PageNumber>
         <PageNumber>1</PageNumber>
         <IsLearnedMove>1</IsLearnedMove>
         <IsLearnedMove>1</IsLearnedMove>
         <Page>#1</Page>
         <Page>#1</Page>
     </Instance>
     </DPge>


You can display a little image if you use the image tag in the IGPG instance. (Either non-animated TXMP or [[PSpc]].)
You can display a small image if you use the image tag in the IGPG instance (either a non-animated TXMP or a [[XML:PSpc|PSpc]]).)=


     <Instance id="1" type="IGPG">
     <IGPG id="1">
         <nowiki><Font></nowiki>
         <nowiki><Font></nowiki>
             <Family>TSFFTahoma</Family>
             <Family>TSFFTahoma</Family>
Line 102: Line 97:
         <Text1>#4</Text1>
         <Text1>#4</Text1>
         <Text2>#5</Text2>
         <Text2>#5</Text2>
     </Instance>
     </IGPG>
     <Instance id="4" type="IGSA">
     <IGSA id="4">
         <Strings>
         <Strings>
             <Link>#7</Link>
             <Link>#7</Link>
         </Strings>
         </Strings>
     </Instance>
     </IGSA>
     <Instance id="5" type="IGSA">
     <IGSA id="5">
         <Strings>
         <Strings>
             <Link>#6</Link>
             <Link>#6</Link>
         </Strings>
         </Strings>
     </Instance>
     </IGSA>


A space between the text tags (<Text> </Text>) can produce a new paragraph. The import ignores that so far but you can fix it by writing "<Text xml:space="preserve"> </Text>". (Not used in this example.)
A space between the text tags (<Text> </Text>) can produce a new paragraph. The import ignores that so far but you can fix it by writing "<Text xml:space="preserve"> </Text>" (not used in this example).


     <Instance id="6" type="IGSt">
     <IGSt id="7">
        <nowiki><Font></nowiki>
            <Family>TSFFTahoma</Family>
            <Style>Bold</Style>
            <Color>191 191 191</Color>
            <Size>10</Size>
            <Flags>Family Style Color Size</Flags>
        <nowiki></Font></nowiki>
        <Text>When standing in front of an armed opponent, press FORWARD + KICK. Disarm your opponent with a kick to the face!!</Text>
    </Instance>
    <Instance id="7" type="IGSt">
         <nowiki><Font></nowiki>
         <nowiki><Font></nowiki>
             <Family></Family>
             <Family></Family>
Line 135: Line 120:
         <nowiki></Font></nowiki>
         <nowiki></Font></nowiki>
         <Text>Stepping Disarm</Text>
         <Text>Stepping Disarm</Text>
     </Instance>
     </IGSt>
    <IGSt id="6">
        <nowiki><Font></nowiki>
            <Family>TSFFTahoma</Family>
            <Style>Bold</Style>
            <Color>191 191 191</Color>
            <Size>10</Size>
            <Flags>Family Style Color Size</Flags>
        <nowiki></Font></nowiki>
        <Text>When standing in front of an armed opponent, press FORWARD + KICK.  Disarm your opponent with a kick to the face!!</Text>
    </IGSt>
  </Oni>
  </Oni>
{{XML}}

Latest revision as of 17:38, 21 February 2022

DPge : Diary Page
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

DOOR << Other file types >> FILM

switch to OBD page

General notes

  • The XML code on this page is based on OniSplit v0.9.61.0.
  • DPge*.oni are global (they can be found in AE/AEInstaller/vanilla/level0_Final.dat).
  • A diary page can be read for the first time when the player enters the level indicated by the <LevelNumber> tag.
  • An IGPA instance here will make Oni crash. But <PageNumber> let you create more diary pages for a day.
  • The game can load at most 60 DPge instances. 32 DPge instances exist in the original game.

XML structure

Think of "instances" (#N) as file sections: they run from 1 to N. 0 is the header (it defines the file type, here "DPge").

Every DPge contains one instance of type IGPG.
Every IGPG contains two instances of type IGSA.
Every IGSA contains a number of instances of type IGSt.
IGPG means a page
IGSA means a (text) string array
IGSt means a (text) string

Example from vanilla file "DPgelev_19_pg_01":

#0 (DPge instance) links to #1 (IGPG instance)
#1 (IGPG instance) links to #4 and #5 (IGSA instances)
#2 (unknown placeholder, only presented in original files) (can be ignored)
#3 (unknown placeholder, only presented in original files) (can be ignored)
#4 (IGSA instance) links to #7 (IGSt instance)
#5 (IGSA instance) links to #6 (IGSt instance)

XML tags and options

WPge instance tags

<LevelNumber> (page can be read for first time when player enters this level)
<PageNumber> (diary page number)
<IsLearnedMove>
0 (normal page)
1 (displays message "New combat move learned. (F1)", which can be avoided with BSL command "ui_suppress_prompt = 1")
<Page> (link to 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)
<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)

Example

DPge.jpg
<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <DPge id="0">
       <LevelNumber>19</LevelNumber>
       <PageNumber>1</PageNumber>
       <IsLearnedMove>1</IsLearnedMove>
       <Page>#1</Page>
   </DPge>

You can display a small image if you use the image tag in the IGPG instance (either a non-animated TXMP or a PSpc).)=

   <IGPG id="1">
       <Font>
           <Family>TSFFTahoma</Family>
           <Style>Bold</Style>
           <Color>255 127 0</Color>
           <Size>12</Size>
           <Flags>Family Style Color Size</Flags>
       </Font>
       <Image>TXMPLevel19move</Image>
       <Text1>#4</Text1>
       <Text2>#5</Text2>
   </IGPG>
   <IGSA id="4">
       <Strings>
           <Link>#7</Link>
       </Strings>
   </IGSA>
   <IGSA id="5">
       <Strings>
           <Link>#6</Link>
       </Strings>
   </IGSA>

A space between the text tags (<Text> </Text>) can produce a new paragraph. The import ignores that so far but you can fix it by writing "<Text xml:space="preserve"> </Text>" (not used in this example).

   <IGSt id="7">
       <Font>
           <Family></Family>
           <Style>Normal</Style>
           <Color>0 0 0 0</Color>
           <Size>0</Size>
           <Flags></Flags>
       </Font>
       <Text>Stepping Disarm</Text>
   </IGSt>
   <IGSt id="6">
       <Font>
           <Family>TSFFTahoma</Family>
           <Style>Bold</Style>
           <Color>191 191 191</Color>
           <Size>10</Size>
           <Flags>Family Style Color Size</Flags>
       </Font>
       <Text>When standing in front of an armed opponent, press FORWARD + KICK.  Disarm your opponent with a kick to the face!!</Text>
   </IGSt>
</Oni>