1// Example IDL file for our monster's schema. 2 3namespace jmonster; 4 5enum JColor:byte { Red = 0, Green, Blue = 2 } 6 7union JEquipment { JWeapon } // Optionally add more tables. 8 9struct JVec3 { 10 x:float; 11 y:float; 12 z:float; 13} 14 15table JMonster { 16 pos:JVec3; 17 mana:short = 150; 18 hp:short = 100; 19 name:string; 20 friendly:bool = false (deprecated); 21 inventory:[ubyte]; 22 color:JColor = Blue; 23 weapons:[JWeapon]; 24 equipped:JEquipment; 25 path:[JVec3]; 26} 27 28table JWeapon { 29 name:string; 30 damage:short; 31} 32 33table JAllMonsters { 34 monsters: [JMonster]; 35} 36 37root_type JAllMonsters; 38