XML:Mtrl: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:


{{Template:XMLModdingHints}}
{{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'''
* '''Mtrl*.oni''' files are global. (They can be found in edition/GameDataFolder/level0_...)
* '''Mtrl*.oni''' files are global. (They can be found in edition/GameDataFolder/level0_...)
* They are used by [[OBD_talk:BINA/ONIE|ONIE]], [[OBD_talk:BINA/TMBD|TMBD]] and [[OBD_talk:ONCC#CBPM|CBPM]].
* They are used by [[OBD_talk:BINA/ONIE|ONIE]], [[OBD_talk:BINA/TMBD|TMBD]] and [[OBD_talk:ONCC#CBPM|CBPM]].
* Material is only specified by the file name, for example "Mtrl'''Explosive'''.oni" (That was an experimental material of [[User:Loser|Andrashi]].)
* Material is only specified by the file name, for example "Mtrl'''Armor'''.oni"
* Every material has a parent material to organize effects in ONIE.
* Every material has a parent material (except for "Default") to organize effects in ONIE.
: An example: An effect is looked up from ONIE if a character get hit by a bullet.
:: Let's imagine the hit body part has Armor as material. If there's no effect for Armor then the engine looks for the parent material, here Character. And if Character doesn't match then the effect from Default becomes chosen.




'''XML structure'''
'''XML structure'''


(e.g. file name "MtrlExplosive.xml")
('''e.g.''' file name "Mtrl'''Armor'''.xml")
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.37.0">
  <Oni>
    <Instance id="0" type="Mtrl">
    <Mtrl id="0">
        <ParentMaterial>MtrlGlass</ParentMaterial>
        <ParentMaterial>Mtrl'''Character'''</ParentMaterial>
    </Instance>
    </Mtrl>
  </Oni>
  </Oni>
'''vanilla material tree'''
Default
  |
  +-- Character
  |    |
  |    +-- Armor
  |    +-- Cloth
  |    +-- Flesh
  |    +-- Shield
  |          |
  |          +-- Super_Shield
  | 
  +-- Glass
  |    |
  |    +-- Clear_Glass
  |    +-- Small_Glass
  |    +-- Tinted_Glass
  |    +-- Unbreak_Glass
  |
  +-- Liquid
  +-- Mesh
  +-- Solid
        |
        +-- Carpet
        +-- Hard
        |    |
        |    +-- Metal
        |    |    |
        |    |    +-- Heavy_Metal
        |    |    +-- Light_Metal
        |    |    +-- Resonant_Metal
        |    |
        |    +-- Stone
        |    |    |
        |    |    +-- Asphalt
        |    |    +-- Concrete
        |    |
        |    +-- Stucco
        |
        +-- Loose_Ground
        |    |
        |    +-- Dirt
        |    +-- Snow
        |
        +-- Plastic
        +-- Soft

Revision as of 12:36, 7 April 2012

Mtrl: materials

Template:XMLModdingHints

The xml code on this page is compatible with onisplit v0.9.61.0


general information

  • Mtrl*.oni files are global. (They can be found in edition/GameDataFolder/level0_...)
  • They are used by ONIE, TMBD and CBPM.
  • Material is only specified by the file name, for example "MtrlArmor.oni"
  • Every material has a parent material (except for "Default") to organize effects in ONIE.
An example: An effect is looked up from ONIE if a character get hit by a bullet.
Let's imagine the hit body part has Armor as material. If there's no effect for Armor then the engine looks for the parent material, here Character. And if Character doesn't match then the effect from Default becomes chosen.


XML structure

(e.g. file name "MtrlArmor.xml")

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Mtrl id="0">
       <ParentMaterial>MtrlCharacter</ParentMaterial>
   </Mtrl>
</Oni>


vanilla material tree

Default
 |
 +-- Character
 |     |
 |     +-- Armor
 |     +-- Cloth
 |     +-- Flesh
 |     +-- Shield
 |           |
 |           +-- Super_Shield
 |   
 +-- Glass
 |     |
 |     +-- Clear_Glass
 |     +-- Small_Glass
 |     +-- Tinted_Glass
 |     +-- Unbreak_Glass
 |
 +-- Liquid
 +-- Mesh
 +-- Solid
       |
       +-- Carpet
       +-- Hard
       |     |
       |     +-- Metal
       |     |     |
       |     |     +-- Heavy_Metal
       |     |     +-- Light_Metal
       |     |     +-- Resonant_Metal 
       |     |
       |     +-- Stone
       |     |     |
       |     |     +-- Asphalt
       |     |     +-- Concrete 
       |     | 
       |     +-- Stucco
       |
       +-- Loose_Ground
       |     |
       |     +-- Dirt
       |     +-- Snow
       |
       +-- Plastic
       +-- Soft