Jump to content

XML:TxtC: Difference between revisions

103 bytes removed ,  31 March 2021
m
copy-edit
m (link fix)
m (copy-edit)
Line 1: Line 1:
{{XML_File_Header | prev=TXMP | type=TxtC | next=WMCL | name=Text Console}}
{{XML_File_Header | prev=TXMP | type=TxtC | next=WMCL | name=Text Console}}


===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'''.
* Console text pages can be called via BSL command "text_console". In fact they don't need a console, you can call up a page in any function you like.
* Console text pages don't need a console to display them; they can be called up at any time with the BSL command "text_console".
* TxtC's are normally level specific (levelX_...), but could be made global (level0_...).
* TxtCs are normally level-specific (level''x''_Final), but could be made global (level0_Final).
* TxtC should really have been called CPge, for uniformity with DPge, HPge, IPge, OPge and WPge, but we didn't name it.
* "TxtC" should really have been "CPge", for consistency with DPge, HPge, IPge, OPge and WPge, but hey, we didn't name it.


===BSL support===
==BSL support==
: <font style="color:#777">console_activate ''console_id:int''
: <font style="color:#777">console_activate ''console_id:int''
: console_deactivate ''console_id:int''
: console_deactivate ''console_id:int''
Line 13: Line 13:
: text_console ''name:string''
: text_console ''name:string''


Two example functions:


two example functions
  ### Called up by a console
 
  ### called up by a console
  func void console_jump(string ai_name)
  func void console_jump(string ai_name)
  {
  {
Line 23: Line 22:
  }
  }
   
   
  ### called up by a random function, pops up when player performs Konoko's first punch
  ### Pops up onscreen when Konoko performs her first punch
  func just_show_me_a_page
  func just_show_me_a_page
  {
  {
Line 30: Line 29:
  }
  }


 
==XML structure==
===XML structure===
Think of "instances" (#N) as file sections, they go from 1 to N. 0 is the header.
 
Think of "instances" (#N) as file sections, they go from 1 to N. 0 is the header: always "TxtC".


: Every TxtC contains one instance of type IGPA.
: Every TxtC contains one instance of type IGPA.
Line 45: Line 42:
: 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.


[[Image:XML_TxtC.jpg|thumb|300px]]
[[Image:XML_TxtC.jpg|thumb|300px]]


'''The following IDs are taken from "TxtClevel_1f.xml" and serve as an example:'''
'''The following IDs are taken from "TxtClevel_1f.xml" as an example:'''


: #0 (TxtC instance) links to #1 (IGPA instance)
: #0 (TxtC instance) links to #1 (IGPA instance)
: #1 (IGPA instance) links from #2 up to #4 (IGPG instances, here we have 3 pages as you see)
: #1 (IGPA instance) links from #2 up to #4 (IGPG instances, in this case 3 pages)
: #2 (IGPG instance) links to #32 (IGSA instances)
: #2 (IGPG instance) links to #32 (IGSA instances)
: #3 (IGPG instance) links to #20 (IGSA instances)
: #3 (IGPG instance) links to #20 (IGSA instances)
: #4 (IGPG instance) links to #6 (IGSA instances)
: #4 (IGPG instance) links to #6 (IGSA instances)
: #5 corresponds to the TSFFTahoma placeholder
: #5 corresponds to the TSFFTahoma placeholder
: #6 (IGSA instance) links from #7 up to #19 (IGSt Instances)
: #6 (IGSA instance) links from #7 up to #19 (IGSt instances)
: #20 (IGSA instance) links from #21 up to #31 (IGSt Instances)
: #20 (IGSA instance) links from #21 up to #31 (IGSt instances)
: #32 (IGSA instance) links from #33 up to #43 (IGSt Instances)
: #32 (IGSA instance) links from #33 up to #43 (IGSt instances)


If you modify or create a new file you can use #5 for anything you like because OniSplit reindexes the instances when packing. The TSFFTahoma placeholder doesn't need to be present in your file.
If you modify or create a new file, you can use #5 for anything you like because OniSplit re-indexes the instances when packing. The TSFFTahoma placeholder doesn't need to be present in your file.


 
==XML tags and options==
===XML tags and options===
'''TxtC instance tags'''
'''TxtC instance tags'''
: <Pages> (link to IGPA instance)
: <Pages> (link to IGPA instance)
Line 100: Line 96:
:: <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 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
Line 107: Line 103:
:: <Text> (Contains the actual text but can also create a bare paragraph (see example at instance #46). You can use <code>&amp;gt;</code> to produce <code>&gt;</code> and <code>&amp;lt;</code> to produce <code>&lt;</code>.)
:: <Text> (Contains the actual text but can also create a bare paragraph (see example at instance #46). You can use <code>&amp;gt;</code> to produce <code>&gt;</code> and <code>&amp;lt;</code> to produce <code>&lt;</code>.)


 
==Example==
===example===
[[Image:XML_TxtC_modders.jpg|thumb|200px]]
[[Image:XML_TxtC_modders.jpg|thumb|200px]]


Line 122: Line 117:
     </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 a non-animated TXMP or a [[XML:PSpc|PSpc]].)


<Text2> cannot be used for TxtC because there isn't a note/hint field.
<Text2> cannot be used for TxtC because there isn't a note/hint field.
Line 139: Line 134:
     </IGPG>
     </IGPG>


Instance number 5 has a space between the text tags (<Text> </Text>) to produce a new paragraph. A single space isn't valid unless you add a special attribute to the text tag like that "<Text xml:space="preserve"> </Text>".
Instance number 5 has a space between the text tags (<Text> </Text>) to produce a new paragraph. The space won't be preserved unless you add a special attribute to the text tag: "<Text xml:space="preserve"> </Text>".


     <IGSA id='''"3"'''>
     <IGSA id='''"3"'''>
Line 156: Line 151:
             <Flags>Style Color Size</Flags>
             <Flags>Style Color Size</Flags>
         <nowiki></Font></nowiki>
         <nowiki></Font></nowiki>
         <Text>That's a blue caption.</Text>
         <Text>Here's a blue caption.</Text>
     </IGSt>
     </IGSt>
     <IGSt id='''"5"'''>
     <IGSt id='''"5"'''>
Line 176: Line 171:
             <Flags>Color Size</Flags>
             <Flags>Color Size</Flags>
         <nowiki></Font></nowiki>
         <nowiki></Font></nowiki>
         <Text>And that's a white, smaller text.</Text>
         <Text>And this is white, smaller text.</Text>
     </IGSt>
     </IGSt>
  </Oni>
  </Oni>


{{XML}}
{{XML}}