XML:TxtC
TxtC : Text Console | ||
---|---|---|
XML
TXMP << Other file types >> WMCL |
General notes
- The XML on this page is compatible with OniSplit v0.9.61.0.
- 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".
- TxtCs are normally level-specific (levelx_Final), but could be made global (level0_Final).
- "TxtC" should really have been "CPge", for consistency with DPge, HPge, IPge, OPge and WPge, but hey, we didn't name it.
BSL support
- console_activate console_id:int
- console_deactivate console_id:int
- console_reset console_id:int (resets a console to initial state)
- text_console name:string
Two example functions:
### Called up by a console func void console_jump(string ai_name) { text_console level_1g console_reset 18 } ### Pops up onscreen when Konoko performs her first punch func just_show_me_a_page { chr_wait_animation 0 KONCOMcomb_p text_console level_1f }
XML structure
Think of "instances" (#N) as file sections, they go from 1 to N. 0 is the header.
- Every TxtC 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.
The following IDs are taken from "TxtClevel_1f.xml" as an example:
- #0 (TxtC instance) links to #1 (IGPA instance)
- #1 (IGPA instance) links from #2 up to #4 (IGPG instances, in this case 3 pages)
- #2 (IGPG instance) links to #32 (IGSA instances)
- #3 (IGPG instance) links to #20 (IGSA instances)
- #4 (IGPG instance) links to #6 (IGSA instances)
- #5 corresponds to the TSFFTahoma placeholder
- #6 (IGSA instance) links from #7 up to #19 (IGSt instances)
- #20 (IGSA instance) links from #21 up to #31 (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 re-indexes the instances when packing. The TSFFTahoma placeholder doesn't need to be present in your file.
XML tags and options
TxtC instance tags
- <Pages> (link to IGPA instance)
IGPA instance tags
- <Pages> (every link represents a page)
- <Link> (links to an IGPG instance)
IGPG instance tags
- <Font> (defines the font in case it isn't defined in the IGSt instance)
- <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> (not used by TxtC)
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 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 #46). You can use
>
to produce>
and<
to produce<
.)
- <Family>
Example
<?xml version="1.0" encoding="utf-8"?> <Oni> <TxtC id="0"> <Pages>#1</Pages> </TxtC> <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 a non-animated TXMP or a PSpc.)
<Text2> cannot be used for TxtC because there isn't a note/hint field.
<IGPG id="2"> <Font> <Family>TSFFTahoma</Family> <Style>Bold</Style> <Color>116 208 255</Color> <Size>10</Size> <Flags>Family Style Color Size</Flags> </Font> <Image>TXMPlevel31_modders</Image> <Text1>#3</Text1> <Text2></Text2> </IGPG>
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"> <Strings> <Link>#4</Link> <Link>#5</Link> <Link>#6</Link> </Strings> </IGSA> <IGSt id="4"> <Font> <Family></Family> <Style>Bold</Style> <Color>116 208 255</Color> <Size>12</Size> <Flags>Style Color Size</Flags> </Font> <Text>Here's a blue 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>150 150 150</Color> <Size>8</Size> <Flags>Color Size</Flags> </Font> <Text>And this is white, smaller text.</Text> </IGSt> </Oni>