XML:TXMP: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(→‎TXMP subtypes: swapping was for PPC Macs)
mNo edit summary
Line 78: Line 78:
: AnimUseLocalTime (to export an animated texture convert the oni file to xml)
: AnimUseLocalTime (to export an animated texture convert the oni file to xml)
<!-- HasEnvMap (used via tag, not flag) -->
<!-- HasEnvMap (used via tag, not flag) -->
: AdditiveBlend (makes black texture parts transparent in-game)
: AdditiveBlend (makes black texture parts transparent in-game, usually set for animated textures)
: AnimBackToBack
: AnimBackToBack
: AnimRandom
: AnimRandom
<!-- SwapBytes (automatically added in v0.9.56.0 and above, flag don't becomes exported) -->
<!-- SwapBytes (automatically added in v0.9.56.0 and above, flag doesn't become exported) -->
: AnimIgnoreGlobalTime
: AnimIgnoreGlobalTime
: ShieldEffect
: ShieldEffect

Revision as of 14:13, 22 August 2016

TXMP : Texture Map
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

TXMB << Other file types >> TxtC

switch to OBD page

general notes

  • The xml code on this page was tested with onisplit v0.9.61.0
  • Textures' x and y (pixel) dimension must be power of two: 512, 256, 128, 64, etc.
    • Hight and width don't need to be equal, e.g. you can use 128x256.
  • The camera can look at 2049 transparent textures at once, one more and Oni crashes.


TXMP subtypes

standard texture animated texture reflective texture
<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Texture>
       <Flags>...</Flags>
       <Format>...</Format>
       <Image>...</Image>
   </Texture>
</Oni>
<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Texture>
       <Flags>...</Flags>
       <Format>...</Format>
       <Speed>...</Speed>
       <Image>...</Image>
       <Image>...</Image>
   </Texture>
</Oni>
<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Texture>
       <Flags>...</Flags>
       <Format>...</Format>
       <EnvMap>...</EnvMap>
       <Image>...</Image>
   </Texture>
</Oni>


XML tag content type description
<?xml version="1.0" encoding="utf-8"?> float, flag Don't change this.
<Oni> -
<Texture> -
<Flags> flag ShieldEffect, InvisibilityEffect and DaodanEffect are special flags, they can only be used for TXMPshield, TXMPinvis and TXMPDAODAN_SHIELD. The usage of these textures is hardcoded.
Caution with transparent textures.
None
HasMipMaps
DisableUWrap
DisableVWrap
Unknown0010
AnimUseLocalTime (to export an animated texture convert the oni file to xml)
AdditiveBlend (makes black texture parts transparent in-game, usually set for animated textures)
AnimBackToBack
AnimRandom
AnimIgnoreGlobalTime
ShieldEffect
InvisibilityEffect
DaodanEffect
<Format> flag ARGB formats are used for reflective textures. (A - Alpha; R - Red; G - Green; B - Blue)

ARGB8888 can be used only if you use an updated engine (which comes with AE). (Oni running on a modern Intel Mac uses the same texture format as Windows Oni, but users of older PowerPC Macs will need to swap the color channels of a texture or else it will appear inverted.)

XML flags command line flags
up to onisplit v0.9.52.0 for higher versions up to onisplit v0.9.52.0 for higher versions
RGB888 BGR bgr32 bgr
ARGB8888 RGBA bgra32 rgba
RGB555 BGR555 bgr555
ARGB5551 BGRA5551 bgra5551
ARGB4444 BGRA4444 bgra4444
DXT1 dxt1
<Speed> integer This tag is used if xml file is meant to create an animated texture. In that case you use multiple <Image> tags.
<EnvMap> link TXMPname (file suffix .oni/.xml not allowed)

This tag is used if xml file is meant to create an reflective texture. File suffixes like .tga or .oni is not used in the EnvMap link.

<Image> link Choose between tga/png/dds.
TXMPname.tga
TXMPname.png
TXMPname.dds