XML:PSpc: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (xml update)
Line 35: Line 35:
|}
|}
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.28.0">
  <Oni>
     <Instance id="0" type="PSpc" name="...">
     <PSpc id="0">
         '''<TopLeft>'''
         '''<TopLeft>'''
             <PSpcPoint>
             <PSpcPoint>
                 <Left>...</Left>
                 <X>0</X>
                 <Top>...</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             ''[...]''
             ''[...]''
Line 46: Line 46:
         '''<RightBottom>'''
         '''<RightBottom>'''
             <PSpcPoint>
             <PSpcPoint>
                 <Right>...</Right>
                 <X>0</X>
                 <Bottom>...</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             ''[...]''
             ''[...]''
         </RightBottom>
         </RightBottom>
         '''<Texture>TXMP...</Texture>'''
         '''<Texture>TXMP...</Texture>'''
     </Instance>
     </PSpc>
  </Oni>
  </Oni>


Line 58: Line 58:
'''positions on example'''
'''positions on example'''


The image TXMPh_19 is the only one 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.
Line 83: Line 83:
|}
|}
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.28.0">
  <Oni>
     <Instance id="0" type="PSpc" name="level_19_part">
     <PSpc id="0">
         <TopLeft>
         <LeftTop>
             <PSpcPoint>
             <PSpcPoint>
                 '''<Left>0</Left>'''
                 '''<X>0</X>'''
                 '''<Top>0</Top>'''
                 '''<Y>0</Y>'''
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Left>0</Left>
                 <X>0</X>
                 <Top>0</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Left>0</Left>
                 <X>0</X>
                 <Top>0</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 '''<Left>64</Left>'''
                 '''<X>64</X>'''
                 '''<Top>0</Top>'''
                 '''<Y>0</Y>'''
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Left>0</Left>
                 <X>0</X>
                 <Top>0</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Left>0</Left>
                 <X>0</X>
                 <Top>0</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 '''<Left>65</Left>'''
                 '''<X>65</X>'''
                 '''<Top>0</Top>'''
                 '''<Y>0</Y>'''
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Left>0</Left>
                 <X>0</X>
                 <Top>0</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Left>0</Left>
                 <X>0</X>
                 <Top>0</Top>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
         </TopLeft>
         </LeftTop>
         <RightBottom>
         <RightBottom>
             <PSpcPoint>
             <PSpcPoint>
                 '''<Right>64</Right>'''
                 '''<X>64</X>'''
                 '''<Bottom>32</Bottom>'''
                 '''<Y>32</Y>'''
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Right>0</Right>
                 <X>0</X>
                 <Bottom>0</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Right>0</Right>
                 <X>0</X>
                 <Bottom>0</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 '''<Right>64</Right>'''
                 '''<X>64</X>'''
                 '''<Bottom>32</Bottom>'''
                 '''<Y>32</Y>'''
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Right>0</Right>
                 <X>0</X>
                 <Bottom>0</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Right>0</Right>
                 <X>0</X>
                 <Bottom>0</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 '''<Right>128</Right>'''
                 '''<X>128</X>'''
                 '''<Bottom>32</Bottom>'''
                 '''<Y>32</Y>'''
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Right>0</Right>
                 <X>0</X>
                 <Bottom>0</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
             <PSpcPoint>
             <PSpcPoint>
                 <Right>0</Right>
                 <X>0</X>
                 <Bottom>0</Bottom>
                 <Y>0</Y>
             </PSpcPoint>
             </PSpcPoint>
         </RightBottom>
         </RightBottom>
         '''<Texture>TXMPh_19</Texture>'''
         '''<Texture>TXMPh_19</Texture>'''
     </Instance>
     </PSpc>
  </Oni>
  </Oni>

Revision as of 20:57, 12 January 2012

PSpc: part specification

Template:XMLModdingHints

general information

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