XML:ONLV: Difference between revisions

2,234 bytes added ,  22 February 2013
more stuff about the Physics.xml
mNo edit summary
(more stuff about the Physics.xml)
Line 136: Line 136:
This file is for objects with "physics". Unlike AKEV core geometry or furniture, those objects can be animated and made hidden via bsl commands and object's script id.
This file is for objects with "physics". Unlike AKEV core geometry or furniture, those objects can be animated and made hidden via bsl commands and object's script id.


For documentation purpose the file here has been trimmed down.
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
     <Physics>
     <Physics>


<!--
         <Object Name="fan1">
         <Object Name="fan1">
             <ScriptId>42</ScriptId>
             <ScriptId>42</ScriptId>
Line 146: Line 148:
             <Rotation>0 0 0</Rotation>
             <Rotation>0 0 0</Rotation>
             <Import Path="objects/fan2.dae" />
             <Import Path="objects/fan2.dae" />
        </Object>
-->
        <Object Name="motorcycle">
            <ScriptId>8</ScriptId>
            <Flags>FaceCollision</Flags>
            <Import Url="motorcycle/export.dae">
                <Animation Name="motorcycle02">
                    <Flags>AutoStart</Flags>
                    <End>880</End>
                </Animation>
                <Animation Name="motorcycle02_stop">
                    <Start>881</Start>
                </Animation>
            </Import>
         </Object>
         </Object>


Line 151: Line 167:
  </Oni>
  </Oni>


In this example OniSplit takes the "export.dae" file, looks what parts it contains and creates geometry files from it.
* M3GMhubs_rear.oni
* M3GMhubs.oni
* M3GMmotocycle.oni
It's a nice feature that hierarchies are supported here.
The motorcycle is made of 3 parts so 3 OBANs will be created up to frame 880. Then OniSplit creates 3 more OBANS starting from frame 881.
The reason for the interruption at frame 880 is probably to give barabas a few more frames of glory in the cutscene.
* OBANmotorcycle0200.oni
* OBANmotorcycle0201.oni
* OBANmotorcycle0202.oni
* OBANmotorcycle02_stop00.oni
* OBANmotorcycle02_stop02.oni
* OBANmotorcycle02_stop02.oni
;Notes about BSL usage:
The bio lab script file use the motorcycle objects and animations like this:
env_show 9 0 # hide solid motorcycle parts (because they get visible at level start)
# in the original game the motorcycle is separated in object 8, 9 and 10
# also the OBAN files have a bit different names
# obj and env objects are totally independent from each other
# so their script ids might not be the same
obj_create 8 10 # create animation-ready non-collision motorcycle parts
env_anim 8 10 # animate those parts (not necessary if OBAN flag is "AutoStart")
# the first animations would loop because of "AutoStart"
# so get the right timing to apply the other animations
# "motorcycle02_stop00" and the others will not loop because they don't have "AutoStart"
env_setanim 8 motorcycle02_stop00 # motorcycle
env_setanim 9 motorcycle02_stop01 # hubs
env_setanim 10 motorcycle02_stop02 # hubs_rear
obj_kill 8 10 # delete animated parts
env_show 9 0 # show solid motorcycle parts




8,452

edits