8,018
edits
m (Iritscen moved page OBD talk:BINA/OBJC/PATR to XML:BINA/OBJC/PATR without leaving a redirect) |
Paradox-01 (talk | contribs) (+ temp + cat) |
||
Line 1: | Line 1: | ||
= | {{XML_OBJC_Header | type=PATR | prev=PART | next=PWRU | name=Patrol Path collection }} | ||
''' | ===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/level''XX''_... ) | * '''BINACJBOPatrol Path.oni''' is level specific. (It can be found in edition/GameDataFolder/level''XX''_... ) | ||
* A path can have at most 64 points. | |||
* if an update is needed extract '''[http://paradox.oni2.net/OniGalore/BINACJBOPatrol%20Path.oni 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.) --[[User:Paradox-01|paradox-01]] ([[User talk: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=== | |||
* <font color="#777777">ai2_showpaths = 1</font> | * <font color="#777777">ai2_showpaths = 1</font> | ||
* ai2_dopath ''ai_name path_name'' | * ai2_dopath ''ai_name path_name'' | ||
===file structure=== | |||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni> | <Oni> | ||
Line 57: | Line 89: | ||
{| class="wikitable" width="100%" | |||
!width=400px| XML tag | |||
!width=100px| content type | |||
! description | |||
!XML tag | |||
! | |||
!description | |||
|- | |- | ||
|<PATR Id="..."> | | <PATR Id="..."> | ||
| | | integer | ||
| | | Id doesn't matter | ||
|- | |- | ||
|<Flags> | | <Flags> | ||
| | | flag | ||
| | | whatever this is good for ... | ||
|- | |- | ||
|<Position> | | <Position> | ||
| | | float x3 | ||
| | | x y z position, useless here | ||
|- | |- | ||
|<Rotation> | | <Rotation> | ||
| | | float x3 | ||
| | | x y z rotation, useless here | ||
|- | |- | ||
|<Name> | | <Name> | ||
|string | | string | ||
|for BSL command "ai2_dopath" | | for BSL command "ai2_dopath" | ||
|- | |- | ||
|<PatrolId> | | <PatrolId> | ||
| | | integer | ||
|used in [[ | | used in [[XML:BINA/OBJC/CHAR|BINA/OBJC/CHAR]] | ||
|- | |- | ||
|valign=top|<ReturnToNearest> | |valign=top| <ReturnToNearest> | ||
|valign=top| flag | |||
| | |||
: 1 (Yes) | |||
|valign=top|1 | : 0 (No) | ||
|- | |- | ||
|<Points> | | <Points> | ||
| | | - | ||
| | | Holds actual patrol content, a path can have at most 64 points. | ||
|- | |- | ||
|<MoveToFlag FlagId="..." /> | | <MoveToFlag FlagId="..." /> | ||
| | | integer | ||
| | | | ||
|- | |- | ||
|<Stop /> | | <Stop /> | ||
| | | - | ||
| | | | ||
|- | |- | ||
|<Pause Frames="..." /> | | <Pause Frames="..." /> | ||
| | | integer | ||
| | | | ||
|- | |- | ||
|<LookAtFlag FlagId="..." /> | | <LookAtFlag FlagId="..." /> | ||
| | | integer | ||
| | | | ||
|- | |- | ||
|<LookAtPoint X="..." Y="..." Z="..." /> | | <LookAtPoint X="..." Y="..." Z="..." /> | ||
| | | float x3 ? | ||
| | | | ||
|- | |- | ||
|<MoveAndFaceFlag FlagId="..." /> | | <MoveAndFaceFlag FlagId="..." /> | ||
| | | integer | ||
| | | | ||
|- | |- | ||
|<Loop>...</Loop> | | <Loop>...</Loop> | ||
| | | | ||
|Patrol path tags can be enclosed by that loop tag. | | Patrol path tags can be enclosed by that loop tag. | ||
|- | |- | ||
|valign=top|<MovementMode Mode="..." /> | |valign=top| <MovementMode Mode="..." /> | ||
| | |valign=top| flag | ||
| | | | ||
: ByAlertLevel | |||
: Stop | |||
: Crouch | |||
: Creep | |||
: WalkNoAim | |||
: Walk | |||
: RunNoAim | |||
: Run | |||
|- | |- | ||
|<MoveToPoint X="..." Y="..." Z="..." /> | | <MoveToPoint X="..." Y="..." Z="..." /> | ||
| | | float x3 ? | ||
| | | | ||
|- | |- | ||
|valign=top|<LockFacing Facing="..." /> | |valign=top| <LockFacing Facing="..." /> | ||
| | |valign=top| flag | ||
| | | | ||
: Forward | |||
: Backward | |||
: Left | |||
: Right | |||
: Stopped | |||
|- | |- | ||
|<MoveThroughFlag FlagId="..." Distance="..." /> | | <MoveThroughFlag FlagId="..." Distance="..." /> | ||
| | | integer, float ? | ||
| | | | ||
|- | |- | ||
|valign=top|<MoveThroughPoint X="..." Y="..." Z="..." Distance="..." /> | |valign=top| <MoveThroughPoint X="..." Y="..." Z="..." Distance="..." /> | ||
| | | float x4 ? | ||
| | | | ||
|- | |- | ||
|<StopLooking /> | | <StopLooking /> | ||
| | | - | ||
| | | | ||
|- | |- | ||
|<FreeFacing /> | | <FreeFacing /> | ||
| | | - | ||
| | | | ||
|- | |- | ||
|<GlanceAtFlagFor FlagId="..." Frames="..." /> | | <GlanceAtFlagFor FlagId="..." Frames="..." /> | ||
| | | integer x2 | ||
| | | | ||
|- | |- | ||
|<MoveNearFlag FlagId="..." Distance="..." /> | | <MoveNearFlag FlagId="..." Distance="..." /> | ||
| | | integer, float ? | ||
| | | | ||
|- | |- | ||
|<Scan Frames="..." Rotation="..." /> | | <Scan Frames="..." Rotation="..." /> | ||
| | | integer, float ? | ||
| | | | ||
|- | |- | ||
|<StopScanning /> | | <StopScanning /> | ||
| | | - | ||
| | | | ||
|- | |- | ||
|<MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." /> | | <MoveToFlagLookAndWait Frames="..." FlagId="..." Rotation="..." /> | ||
| | | integer x2, float ? | ||
| | | | ||
|- | |- | ||
|valign=top|<CallScript ScriptId="..." /> | |valign=top| <CallScript ScriptId="..." /> | ||
| | | integer | ||
|Calls a BSL function by Id. For example if Id is 1 then BSL function is named "patrolscript0001" | |Calls a BSL function by Id. For example if Id is 1 then BSL function is named "patrolscript0001" | ||
|- | |- | ||
|valign=top|<ForkScript ScriptId="..." /> | |valign=top| <ForkScript ScriptId="..." /> | ||
| | | integer | ||
|Forks a BSL function by Id. For example if Id is 2 then BSL function is named "patrolscript0002" | |Forks a BSL function by Id. For example if Id is 2 then BSL function is named "patrolscript0002" | ||
|- | |- | ||
|valign=top|<IgnorePlayer Value="..." /> | |valign=top| <IgnorePlayer Value="..." /> | ||
| | |valign=top| flag | ||
| | | | ||
: No | |||
: Yes | |||
|- | |- | ||
|<FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." /> | | <FaceToFlagAndFire FlagId="..." Frames="..." Spread="..." /> | ||
| | | integer x2, float ? | ||
| | | | ||
|} | |} | ||
{{XML}} |
edits