XML:PSpc: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (Iritscen moved page OBD talk:PSpc to XML:PSpc without leaving a redirect)
(+ temp + cat)
Line 1: Line 1:
=PSpc: part specification=
{{XML_File_Header | type=PSpc | prev=OSBD | next=PSpL | name=Part Specification }}
{{Template:XMLModdingHints}}
{| border=0 cellspacing=20 cellpadding=0 align=center
| The xml code on this page is compatible with onisplit '''v0.9.61.0'''
|}


 
===general information===
'''general information'''
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* 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.
* This file handles TXMP (images) in IGPG (in-game page) which is used by [[XML:OPge|OPge]], [[XML:TxtC|TxtC]] and maybe a few other.
* 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.)
* 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.)
* Limitation: please note that an animated TXMP doesn't work in PSpc.
* Limitation: please note that an animated TXMP doesn't work in PSpc.




'''XML structure'''
===XML structure===
 
{|border=0 cellspacing=20 cellpadding=0 style="float:right"
{|border=0 cellspacing=20 cellpadding=0 align=right
|WIDTH=200px|
|WIDTH=200px|


Line 56: Line 51:




'''positions on example'''
===positions on example===
 
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>.
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>.


The corners are fixed while boarders become stretched. Used parts in following example are 1, 4, and 7.
The corners are fixed while boarders become stretched. Used parts in following example are 1, 4, and 7.


{| border=0 cellspacing=20 cellpadding=0 align=right
{| border=0 cellspacing=20 cellpadding=0 style="float:right"
|
|
http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/PSpc_original.png
http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/PSpc_original.png
Line 164: Line 158:
     </PSpc>
     </PSpc>
  </Oni>
  </Oni>
{{XML}}

Revision as of 17:14, 8 November 2012

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

OSBD << Other file types >> PSpL

switch to OBD page

general information

  • The xml code on this page is compatible with onisplit v0.9.61.0
  • This file handles TXMP (images) in IGPG (in-game page) which is used by OPge, TxtC and maybe a few other.
  • 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.)
  • Limitation: please note that an animated TXMP doesn't work in PSpc.


XML structure

1 4 7
2 5 8
3 6 9


There are 9 <PSpcPoint> tags under <TopLeft> and <RightBottom>. The first <PSpcPoint> tag of <TopLeft> and <RightBottom> belong together - as well as all other second, third, etc. <PSpcPoint> tags belong together. But the order goes from top to bottom (so the upper parts are 1, 4, and 7).

<?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>


positions on example

TXMPh_19 is the only image of TxtClevel_19a but Oni divide it into 9 parts. Each part is framed by pixel coordinates from [Left|Top] to [Right|Bottom].

The corners are fixed while boarders become stretched. Used parts in following example are 1, 4, and 7.

PSpc_original.png

TXMPh_19

PSpc_color_indicated.png

Green left part is 1.
Yellow middle pixel line is 4.
Orange right part is 7.
(The yellow line becomes stretched.)

Coordinates of 1: [0|0] to [64|32]
Coordinates of 4: [64|0] to [64|32]
Coordinates of 7: [65|0] to [128|32]


parts_ingame_preview.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>