XML:BINA/OBJC/PATR: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
(+ temp + cat)
mNo edit summary
Line 126: Line 126:
| <Points>
| <Points>
| -
| -
| Holds actual patrol content, a path can have at most 64 points.
| Holds actual content. A path can have at most 64 points.
|-
|-
| <MoveToFlag FlagId="..." />
| <MoveToFlag FlagId="..." />
Line 145: Line 145:
|-
|-
| <LookAtPoint X="..." Y="..." Z="..." />
| <LookAtPoint X="..." Y="..." Z="..." />
| float x3 ?
| float x3
|
|
|-
|-
Line 182: Line 182:
|-
|-
| <MoveThroughFlag FlagId="..." Distance="..." />
| <MoveThroughFlag FlagId="..." Distance="..." />
| integer, float ?
| integer, float
|
|
|-
|-
|valign=top| <MoveThroughPoint X="..." Y="..." Z="..." Distance="..." />
|valign=top| <MoveThroughPoint X="..." Y="..." Z="..." Distance="..." />
| float x4 ?
| float x4
|
|
|-
|-
Line 202: Line 202:
|-
|-
| <MoveNearFlag FlagId="..." Distance="..." />
| <MoveNearFlag FlagId="..." Distance="..." />
|  integer, float ?
|  integer, float
|
|
|-
|-
| <Scan Frames="..." Rotation="..." />
| <Scan Frames="..." Rotation="..." />
| integer, float ?
| integer, float
|
|
|-
|-
Line 214: Line 214:
|-
|-
| <MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." />
| <MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." />
| integer x2, float ?
| integer x2, float
|
|
|-
|-
Line 232: Line 232:
|-
|-
| <FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." />
| <FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." />
| integer x2, float ?
| integer x2, float
|
|
|}
|}


{{XML}}
{{XML}}

Revision as of 16:58, 10 November 2012

PATR : Patrol Path collection
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

AKEV << Other file types >> CONS

TMBD << Other BINA >> ONIE

PART << Other OBJC >> PWRU

switch to OBD page


general information

  • The xml code on this page is based on onisplit v0.9.61.0
  • BINACJBOPatrol Path.oni is level specific. (It can be found in edition/GameDataFolder/levelXX_... )
  • A path can have at most 64 points.
  • if an update is needed extract this file


Corrupting BSL code in patrolscripts
I suspect that instantly played BSL code breaks patrol paths.
example:
patrolscript0001 contains a sleep command and patrolscript0002 will be played.
But if you remove the sleep command the patrol path will break.
(This was tested in level 1 SP1 with A_t48 and his patrol_48.) --paradox-01 (talk) 17:47, 10 November 2012 (CET)


XML code - patrolscript points:

<Points>
   <ScriptId ScriptId="1" />
   <ScriptId ScriptId="2" />
   <ScriptId ScriptId="3" />
</Points>

BSL code:

func patrolscript0001
{
	dmsg "1"
	chr_animate 0 KONOKOpowerup
	sleep 1
}
func patrolscript0002
{
	dmsg "2"
}
func patrolscript0003
{
	dmsg "3"
}


BSL support

  • ai2_showpaths = 1
  • ai2_dopath ai_name path_name


file 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>


XML tag content type description
<PATR Id="..."> integer Id doesn't matter
<Flags> flag whatever this is good for ...
<Position> float x3 x y z position, useless here
<Rotation> float x3 x y z rotation, useless here
<Name> string for BSL command "ai2_dopath"
<PatrolId> integer used in BINA/OBJC/CHAR
<ReturnToNearest> flag
1 (Yes)
0 (No)
<Points> - Holds actual content. A path can have at most 64 points.
<MoveToFlag FlagId="..." /> integer
<Stop /> -
<Pause Frames="..." /> integer
<LookAtFlag FlagId="..." /> integer
<LookAtPoint X="..." Y="..." Z="..." /> float x3
<MoveAndFaceFlag FlagId="..." /> integer
<Loop>...</Loop> Patrol path tags can be enclosed by that loop tag.
<MovementMode Mode="..." /> flag
ByAlertLevel
Stop
Crouch
Creep
WalkNoAim
Walk
RunNoAim
Run
<MoveToPoint X="..." Y="..." Z="..." /> float x3 ?
<LockFacing Facing="..." /> flag
Forward
Backward
Left
Right
Stopped
<MoveThroughFlag FlagId="..." Distance="..." /> integer, float
<MoveThroughPoint X="..." Y="..." Z="..." Distance="..." /> float x4
<StopLooking /> -
<FreeFacing /> -
<GlanceAtFlagFor FlagId="..." Frames="..." /> integer x2
<MoveNearFlag FlagId="..." Distance="..." /> integer, float
<Scan Frames="..." Rotation="..." /> integer, float
<StopScanning /> -
<MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." /> integer x2, float
<CallScript ScriptId="..." /> integer Calls a BSL function by Id. For example if Id is 1 then BSL function is named "patrolscript0001"
<ForkScript ScriptId="..." /> integer Forks a BSL function by Id. For example if Id is 2 then BSL function is named "patrolscript0002"
<IgnorePlayer Value="..." /> flag
No
Yes
<FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." /> integer x2, float