XML:PSpc: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (xml update)
m (oops, forgot WPge)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=PSpc: part specification=
{{XML_File_Header | prev=PNTA | type=PSpc | next=PSpL | name=Part Specification}}


{{Template:XMLModdingHints}}
==General information==
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''.
* This resource uses the concept of the [[wp:9-slice scaling|nine-slice GUI]] to construct [[IGPG]]s (in-game pages), which are used by [[XML:DPge|DPge]], [[XML:HPge|HPge]], [[XML:IPge|IPge]], [[XML:OPge|OPge]], [[XML:WPge|WPge]] and [[XML:TxtC|TxtC]].
* You could attempt to simulate image alignment by using the image you want displayed as a corner, then supplying a transparent texture for the other components.
* Please note that animated TXMPs doesn't work in a PSpc.


'''general information'''
==XML structure==
 
{|border=1 cellspacing=0 cellpadding=2 style="border-style:solid; border-collapse:collapse; empty-cells:show; background-color:#f9f9f9;"
This file handles TXMP (images) in IGPG (in-game page) which is used by [[OBD_talk:OPge|OPge]], [[OBD_talk:TxtC|TxtC]] and maybe a few other.
|width=20px align=center|1
 
|width=20px align=center|4
You could also try to emulate image align that way. (The image would be a corner and the rest would be a transparent, stretched pixel line.)
|width=20px align=center|7
 
Limitation: please note that an animated TXMP doesn't work in PSpc.
 
 
'''XML structure'''
 
{|border=0 cellspacing=20 cellpadding=0 align=right
|WIDTH=200px|
 
{|BORDER=1 CELLSPACING=0 CELLPADDING=2 STYLE="border-style:solid; border-collapse:collapse; empty-cells:show; background-color:#f9f9f9;"
|WIDTH=20px ALIGN=center|1
|WIDTH=20px ALIGN=center|4
|WIDTH=20px ALIGN=center|7
|-
|-
|ALIGN=center|2
|align=center|2
|ALIGN=center|5
|align=center|5
|ALIGN=center|8
|align=center|8
|-
|-
|ALIGN=center|3
|align=center|3
|ALIGN=center|6
|align=center|6
|ALIGN=center|9
|align=center|9
|}
|}


There are 9 <PSpcPoint> tags under <TopLeft> and nine <PSpcPoint>s under <RightBottom>. The ''n''th <PSpcPoint> tag under <TopLeft> and the ''n''th <PSpcPoint> under <RightBottom> belong together; the entries under <TopLeft> and <RightBottom> comprise pairs of points which define a single tile out of nine (this is a bit confusing, but the XML simply reflects how Oni stores them). The order of the tiles is top to bottom, left to right.


There are 9 <TopLeft> and <RightBottom> tags, first of each belong together as well as all other seconds, thirds, up to ninths; but the order goes from top to bottom (so the upper parts are 1, 4, and 7).
|}
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 55: Line 45:
  </Oni>
  </Oni>


==Example==
TXMPh_19 is the only image appearing in TxtClevel_19a, but a PSpc divides it into 3 parts in order to stretch it across the top of the page. Each part is framed by the pixel coordinates in the XML below. As always with nine-slice tiling, the corners do not stretch, and the border tiles and the center tile do. Note that only parts 1, 4, and 7 are used in the following PSpc.


'''positions on example'''
{| border=0 cellspacing=20 cellpadding=0
 
|[[Image:PSpc_original.png|thumb|TXMPh_19]]
TXMPh_19 is the only image of TxtClevel_19a but Oni divide it into 9 parts. Each part is framed by pixel coordinates from <nowiki>[Left|Top]</nowiki> to <nowiki>[Right|Bottom]</nowiki>.
[[Image:PSpc_color_indicated.png|thumb|Color-coded version: the bluish half is tile 1, the single line of pixels in the center is tile 4 (this gets stretched horizontally), and the orange half is tile 7.]]
 
| align=center |
The corners are fixed while boarders become stretched. Used parts in following example are 1, 4, and 7.
Coordinates of 1: {0, 0} to {64, 32}<br>
 
Coordinates of 4: {64, 0} to {64, 32}<br>
{| border=0 cellspacing=20 cellpadding=0 align=right
Coordinates of 7: {65, 0} to {128, 32}<br>
which produces:
|
|
http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/PSpc_original.png
[[Image:PSpc_parts_ingame.png|right|thumb]]
|}


'''TXMPh_19'''
http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/PSpc_color_indicated.png
Green left part is 1.<br>
Yellow middle pixel line is 4.<br>
Orange right part is 7.<br>
(The yellow line becomes stretched.)
Coordinates of 1: <nowiki>[0|0]</nowiki> to <nowiki>[64|32]</nowiki><br>
Coordinates of 4: <nowiki>[64|0]</nowiki> to <nowiki>[64|32]</nowiki><br>
Coordinates of 7: <nowiki>[65|0]</nowiki> to <nowiki>[128|32]</nowiki>
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/parts_ingame.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/parts_ingame_preview.png]
|}
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 164: Line 142:
     </PSpc>
     </PSpc>
  </Oni>
  </Oni>
{{XML}}

Latest revision as of 14:12, 6 December 2023

PSpc : Part Specification
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

PNTA << Other file types >> PSpL

switch to OBD page

General information

  • The XML on this page is compatible with OniSplit v0.9.61.0.
  • This resource uses the concept of the nine-slice GUI to construct IGPGs (in-game pages), which are used by DPge, HPge, IPge, OPge, WPge and TxtC.
  • You could attempt to simulate image alignment by using the image you want displayed as a corner, then supplying a transparent texture for the other components.
  • Please note that animated TXMPs doesn't work in a PSpc.

XML structure

1 4 7
2 5 8
3 6 9

There are 9 <PSpcPoint> tags under <TopLeft> and nine <PSpcPoint>s under <RightBottom>. The nth <PSpcPoint> tag under <TopLeft> and the nth <PSpcPoint> under <RightBottom> belong together; the entries under <TopLeft> and <RightBottom> comprise pairs of points which define a single tile out of nine (this is a bit confusing, but the XML simply reflects how Oni stores them). The order of the tiles is top to bottom, left to right.

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <PSpc id="0">
       <TopLeft>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           [...]
       </TopLeft>
       <RightBottom>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           [...]
       </RightBottom>
       <Texture>TXMP...</Texture>
   </PSpc>
</Oni>

Example

TXMPh_19 is the only image appearing in TxtClevel_19a, but a PSpc divides it into 3 parts in order to stretch it across the top of the page. Each part is framed by the pixel coordinates in the XML below. As always with nine-slice tiling, the corners do not stretch, and the border tiles and the center tile do. Note that only parts 1, 4, and 7 are used in the following PSpc.

TXMPh_19
Color-coded version: the bluish half is tile 1, the single line of pixels in the center is tile 4 (this gets stretched horizontally), and the orange half is tile 7.

Coordinates of 1: {0, 0} to {64, 32}
Coordinates of 4: {64, 0} to {64, 32}
Coordinates of 7: {65, 0} to {128, 32}
which produces:

PSpc parts ingame.png
<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <PSpc id="0">
       <LeftTop>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>64</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>65</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
       </LeftTop>
       <RightBottom>
           <PSpcPoint>
               <X>64</X>
               <Y>32</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>64</X>
               <Y>32</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>128</X>
               <Y>32</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
           <PSpcPoint>
               <X>0</X>
               <Y>0</Y>
           </PSpcPoint>
       </RightBottom>
       <Texture>TXMPh_19</Texture>
   </PSpc>
</Oni>