XML:BINA/OBJC/PATR: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 15: Line 15:


  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni Version="0.9.30.0">
  <Oni>
     <ObjectCollection>
     <Objects>
             '''''[...]'''''
             '''''[...]'''''
     </ObjectCollection>
     </Objects>
  </Oni>
  </Oni>


 
'''''[...]''''' means at least one patrol block. Paste all a patrol data into there (this includes <PATR Id="..."> and </PATR> tag).
'''''[...]''''' means at least one patrol block. Paste all a patrol data into there (this includes <Object ...> and </Object> tag).




'''example'''
'''example'''


         <Object Id="8283" Type="PATR">
         <PATR Id="8283">
             <Header>
             <Header>
                 <Flags>0</Flags>
                 <Flags></Flags>
                 <Position>-408.598755 60.1162872 -1402.20361</Position>
                 <Position>-408.598755 60.1162872 -1402.20361</Position>
                 <Rotation>0 0 0</Rotation>
                 <Rotation>0 0 0</Rotation>
Line 52: Line 51:
                 </Points>
                 </Points>
             </OSD>
             </OSD>
         </Object>
         </PATR>
 


* table content compatible with onisplit 0.9.61.0
* if an update is needed extract '''[http://paradox.oni2.net/OniGalore/BINACJBOPatrol%20Path.oni this]''' file


'''tags'''
{{Table}}
* <Flags> .. unknown -- appears to be always 0
!XML tag
* <Position> .. needed ?
!flags / values
* <Rotation> .. needed ?
!description
* <Name> .. for BSL command "ai2_dopath"
|-
* <PatrolId> .. used in [[OBD:BINA/OBJC/CHAR|BINA/OBJC/CHAR]]
|<PATR Id="...">
* <ReturnToNearest> .. 1 and 0 possible
|positive integer
* <Points> .. holds actual patrol content
|actually the Id doesn't matter in collections
:: <MoveToFlag FlagId="..." />
|-
:: <Stop /> (never used in Oni)
|<Flags>
:: <Pause Frames="..." />
|
:: <LookAtFlag FlagId="..." />
|should be unimportant
:: <LookAtPoint X="..." Y="..." Z="..." /> (never used in Oni)
|-
:: <MoveAndFaceFlag FlagId="..." />
|<Position>
:: <Loop>...</Loop>
|
:: <MovementMode Mode="Walk" />
|should be unimportant
:: <MovementMode Mode="Creep" />
|-
:: <MovementMode Mode="WalkNoAim" />
|<Rotation>
:: <MovementMode Mode="ByAlertLevel" />
|
:: <MovementMode Mode="RunNoAim" />
|should be unimportant
:: <MovementMode Mode="Run" />
|-
:: <MoveToPoint X="..." Y="..." Z="..." /> (never used in Oni)
|<Name>
:: <LockFacing Facing="..." /> (not used in Oni)
|string
:: <MoveThroughFlag FlagId="..." Distance="..." />
|for BSL command "ai2_dopath"
:: <MoveThroughPoint X="..." Y="..." Z="..." Distance="..." /> (not used in Oni)
|-
:: <StopLooking />
|<PatrolId>
:: <FreeFacing />
|positive integer
:: <GlanceAtFlagFor FlagId="..." Frames="..." />
|used in [[OBD:BINA/OBJC/CHAR|BINA/OBJC/CHAR]]
:: <MoveNearFlag FlagId="..." Distance="..." />
|-
:: <LookFor Frames="..." Rotation="..." />
|valign=top|<ReturnToNearest>
:: <Unknown18 />
|
:: <MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." />
:1
:: <Unknown20 Frames="..." />
:0
:: <ScriptId ScriptId="..." />
|valign=top|1 = Yes; 0 = No
:: <IgnorePlayer Value="No" /> <IgnorePlayer Value="Yes" />
|-
:: <FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." />
|<Points>
|
|holds actual patrol content
|-
|<MoveToFlag FlagId="..." />
|positive integer
|
|-
|<Stop />
|
|
|-
|<Pause Frames="..." />
|positive integer
|
|-
|<LookAtFlag FlagId="..." />
|positive integer
|
|-
|<LookAtPoint X="..." Y="..." Z="..." />
|integer
|
|-
|<MoveAndFaceFlag FlagId="..." />
|positive integer
|
|-
|<Loop>...</Loop>
|
|Patrol path tags can be enclosed by that loop tag.
|-
|valign=top|<MovementMode Mode="..." />
|
:ByAlertLevel
:Stop
:Crouch
:Creep
:WalkNoAim
:Walk
:RunNoAim
:Run
|
|-
|<MoveToPoint X="..." Y="..." Z="..." />
|integer
|
|-
|valign=top|<LockFacing Facing="..." />
|
:Forward
:Backward
:Left
:Right
:Stopped
|
|-
|<MoveThroughFlag FlagId="..." Distance="..." />
|positive integer
|
|-
|valign=top|<MoveThroughPoint X="..." Y="..." Z="..." Distance="..." />
|X, Y, Z = positive integer; Distance = integer
|
|-
|<StopLooking />
|
|
|-
|<FreeFacing />
|
|
|-
|<GlanceAtFlagFor FlagId="..." Frames="..." />
|positive integer
|
|-
|<MoveNearFlag FlagId="..." Distance="..." />
|
|
|-
|<Scan Frames="..." Rotation="..." />
|
|
|-
|<StopScanning />
|
|
|-
|<MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." />
|
|
|-
|valign=top|<CallScript ScriptId="..." />
|
|Calls a BSL function by Id. For example if Id is 1 then BSL function is named "patrolscript0001"
|-
|valign=top|<ForkScript ScriptId="..." />
|
|Forks a BSL function by Id. For example if Id is 2 then BSL function is named "patrolscript0002"
|-
|valign=top|<IgnorePlayer Value="..." />
|
:No
:Yes
|
|-
|<FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." />
|
|
|}

Revision as of 11:52, 10 September 2011

BINA/OBCJ/PATR: patrol paths

Template:XMLModdingHints

general information

  • BINACJBOPatrol Path.oni is level specific. (It can be found in edition/GameDataFolder/levelXX_... )


BSL support

  • ai2_showpaths = 1
  • ai2_dopath ai_name path_name


XML structure

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Objects>
           [...]
   </Objects>
</Oni>

[...] means at least one patrol block. Paste all a patrol data into there (this includes <PATR Id="..."> and </PATR> tag).


example

       <PATR Id="8283">
           <Header>
               <Flags></Flags>
               <Position>-408.598755 60.1162872 -1402.20361</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Name>patrol_32</Name>
               <PatrolId>32</PatrolId>
               <ReturnToNearest>1</ReturnToNearest>
               <Points>
                   <IgnorePlayer Value="Yes" />
                   <MovementMode Mode="Run" />
                   <MoveToFlag FlagId="545" />
                   <Loop>
                       <MoveToFlagLookAndWait Frames="120" FlagId="545" Rotation="5" />
                       <IgnorePlayer Value="No" />
                       <MoveThroughFlag FlagId="145" Distance="0" />
                       <MovementMode Mode="ByAlertLevel" />
                       <MoveToFlagLookAndWait Frames="300" FlagId="144" Rotation="60" />
                       <MoveThroughFlag FlagId="145" Distance="0" />
                       <MoveToFlagLookAndWait Frames="300" FlagId="146" Rotation="90" />
                   </Loop>
               </Points>
           </OSD>
       </PATR>


  • table content compatible with onisplit 0.9.61.0
  • if an update is needed extract this file
XML tag flags / values description
<PATR Id="..."> positive integer actually the Id doesn't matter in collections
<Flags> should be unimportant
<Position> should be unimportant
<Rotation> should be unimportant
<Name> string for BSL command "ai2_dopath"
<PatrolId> positive integer used in BINA/OBJC/CHAR
<ReturnToNearest>
1
0
1 = Yes; 0 = No
<Points> holds actual patrol content
<MoveToFlag FlagId="..." /> positive integer
<Stop />
<Pause Frames="..." /> positive integer
<LookAtFlag FlagId="..." /> positive integer
<LookAtPoint X="..." Y="..." Z="..." /> integer
<MoveAndFaceFlag FlagId="..." /> positive integer
<Loop>...</Loop> Patrol path tags can be enclosed by that loop tag.
<MovementMode Mode="..." />
ByAlertLevel
Stop
Crouch
Creep
WalkNoAim
Walk
RunNoAim
Run
<MoveToPoint X="..." Y="..." Z="..." /> integer
<LockFacing Facing="..." />
Forward
Backward
Left
Right
Stopped
<MoveThroughFlag FlagId="..." Distance="..." /> positive integer
<MoveThroughPoint X="..." Y="..." Z="..." Distance="..." /> X, Y, Z = positive integer; Distance = integer
<StopLooking />
<FreeFacing />
<GlanceAtFlagFor FlagId="..." Frames="..." /> positive integer
<MoveNearFlag FlagId="..." Distance="..." />
<Scan Frames="..." Rotation="..." />
<StopScanning />
<MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." />
<CallScript ScriptId="..." /> Calls a BSL function by Id. For example if Id is 1 then BSL function is named "patrolscript0001"
<ForkScript ScriptId="..." /> Forks a BSL function by Id. For example if Id is 2 then BSL function is named "patrolscript0002"
<IgnorePlayer Value="..." />
No
Yes
<FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." />