XML:BINA/OBJC/NEUT: Difference between revisions
m (on further thought, we should be consistent in directing modders to the AE .dats) |
(Documenting NEUT fields while fixing Samer's Jamie ^_^) |
||
Line 100: | Line 100: | ||
|valign=top| flag | |valign=top| flag | ||
| | | | ||
*None | |||
*Locked | |||
*PlacedInGame | |||
*Temporary | |||
*Gunk | |||
|- | |- | ||
| <Position> | | <Position> | ||
Line 120: | Line 120: | ||
| <Name> | | <Name> | ||
| char[32] | | char[32] | ||
| | | A name of the NEUT profile. Used by a [[BSL]] command '''ai2_neutralbehavior''' | ||
|- | |- | ||
| <NeutralId> | | <NeutralId> | ||
Line 129: | Line 129: | ||
|valign=top| flag | |valign=top| flag | ||
| | | | ||
*'''None''' - no flags utilized | |||
*'''NoResume''' - if the conversation is interrupted, NEUT behavior terminates. Conversation cannot be reinitaitated. | |||
*'''NoResumeAfterGive''' - interrupted conversation can be reinitiated, but only if so far no executed dialog line had the flag "GiveItems", otherwise NEUT behavior terminates.<BR>Also, if some dialog line is interrupted AFTER the dialog line with "GiveItems" flag, then the sound file of the interrupted dialog line is fully played (is not stopped by the conversation interruption). Maybe a bug? | |||
*'''Uninterruptible''' - probably should disable player's option to interrupt the conversation by some offensive action (punch, kick), but tests are negative. Maybe defunct? | |||
|- | |- | ||
| <Ranges> | | <Ranges> | ||
Line 140: | Line 140: | ||
| <Trigger> | | <Trigger> | ||
| float | | float | ||
| | | A distance between the AI2 character and the player character when the NEUT behavior mechanics kick in.<BR> | ||
Outside of this distance, NEUT behavior of the given AI2 character does not execute. | |||
|- | |- | ||
| <Talk> | | <Talk> | ||
| float | | float | ||
| | | | ||
A threshold distance for approaching the player character: | |||
*If '''"distance to player" > "Talk range"''' then NEUT driven AI2 character keeps approaching the player character. | |||
*If '''"distance to player" =< "Talk range"''' then NEUT driven AI2 character stands still, attempts to rotate in order to keep looking at the player character and keeps repeating the TRAM animType=230 (0xE6, Hail) + Speech "Trigger" (see tag below) in a 5 second interval. | |||
*If '''"distance to player" =< "Talk range"''' AND also '''"distance to player" =< 35 game world units''' (empiric obesrvation), then the conversation can be triggered by facing the NEUT driven AI2 character and pressing the action key. | |||
|- | |- | ||
| <Follow> | | <Follow> | ||
| float | | float | ||
| | | | ||
An allowed "travel distance" for the NEUT driven AI2 character, starting from the moment player entered the '''Trigger range'''.<BR>NEUT driven AI2 character is allowed to translocate only this specified distance from its pre-trigger location before it gives up on chasing the player character.<BR> | |||
When '''Follow distance''' is depleted, NEUT behavior for given AI2 character is terminated and control over AI2 character is handed to some other AI2 system (for example the Patrol Path system).<BR>Of course if the player character again enters the '''Trigger range''', then NEUT mechanics kick in again (with fresh Follow distance to deplete). | |||
|- | |- | ||
| <Enemy> | | <Enemy> | ||
| float | | float | ||
| | | | ||
A range in which NEUT driven AI2 character will react on present enemies, even those which are behind its back. Who is considered "enemy" is defined according to Oni team affiliations.<BR> | |||
*If some enemy is present within the '''Enemy range''' prior to the conversation, then conversation cannot be triggered till the enemy is either outside of '''Enemy range''' or neutralized. | |||
*If some enemy gets inside the '''Enemy range''' while the conversation is running, then the conversation is stopped and the '''Speech Enemy''' (see tag below) is played. | |||
The further reaction of the NEUT driven AI2 character on enemy differs acording to [[CHAR]] setup - it can start cowering in fear (NonCombatant flag is set) or go attack the enemy (default setup). | |||
|- | |- | ||
| <Speech> | | <Speech> | ||
Line 160: | Line 172: | ||
|valign=top| <Trigger> | |valign=top| <Trigger> | ||
|valign=top| char[32] | |valign=top| char[32] | ||
|valign=top| | |valign=top| Speech sound for hailing the player. | ||
If '''"distance to player" =< "Talk range"''' then NEUT driven AI2 character stands still, attempts to rotate in order to keep looking at the player character and keeps repeating the TRAM animType=230 (0xE6, Hail) + this '''Speech "Trigger"''' in a 5 second interval.<BR> | |||
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix) | |||
examples of such OSBD amb files: | examples of such OSBD amb files: | ||
: civfem_trigger | : civfem_trigger | ||
Line 170: | Line 184: | ||
|valign=top| <Abort> | |valign=top| <Abort> | ||
|valign=top| char[32] | |valign=top| char[32] | ||
|valign=top| <font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix) | |valign=top| Speech sound for the player interruption of the conversation.<BR> | ||
This sound is played when the player aborts the conversation by preforming some offensive action (punch, kick) in the middle of the conversation.<BR> | |||
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix) | |||
examples of such OSBD amb files: | examples of such OSBD amb files: | ||
: civfem_abort | : civfem_abort | ||
Line 180: | Line 196: | ||
|valign=top| <Enemy> | |valign=top| <Enemy> | ||
|valign=top| char[32] | |valign=top| char[32] | ||
|valign=top| | |valign=top| Speech sound for conversation interruption because of some enemy is present within the '''Enemy range'''.<BR> | ||
This sound is played if some enemy gets inside the '''Enemy range''' in the middle of the conversation.<BR> | |||
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix) | |||
examples of such OSBD amb files: | examples of such OSBD amb files: | ||
: civfem_enemy | : civfem_enemy | ||
Line 194: | Line 212: | ||
| <AfterTalk> | | <AfterTalk> | ||
| char[32] | | char[32] | ||
| name of BSL function | | A name of a BSL function. The function will will be executed after the conversation is finished.<BR> | ||
The function in BSL has an optional parameter ('''string''' type) - name of the NEUT driven AI2 character. | |||
|- | |- | ||
| <Rewards> | | <Rewards> | ||
Line 202: | Line 221: | ||
| <WeaponClass> | | <WeaponClass> | ||
| char[32] | | char[32] | ||
| | | Any weapon, filename without prefix ONWC and suffix .oni; for example "w6_vdg" | ||
|- | |- | ||
| <Ammo> | | <Ammo> | ||
| integer | | integer | ||
| | | Number of ammo clips. | ||
|- | |- | ||
| <EnergyCell> | | <EnergyCell> | ||
| integer | | integer | ||
| | | Number of energy cells. | ||
|- | |- | ||
| <Hypo> | | <Hypo> | ||
| integer | | integer | ||
| | | Number of hypo sprays. | ||
|- | |- | ||
|valign=top| <Other> | |valign=top| <Other> | ||
|valign=top| flag | |valign=top| flag | ||
|valign=top| | |valign=top| Combinations of flags are possible. Flags: | ||
*Shield | |||
*Invisibility | |||
*LSI | |||
|- | |- | ||
| <DialogLines> | | <DialogLines> | ||
Line 233: | Line 252: | ||
|valign=top| <Flags> | |valign=top| <Flags> | ||
|valign=top| flag | |valign=top| flag | ||
| | | Combinations of flags are possible. Flags: | ||
*'''None''' - no special flags. | |||
*'''IsPlayer''' - reverses roles of Anim and OtherAnim - now Anim is applied on the player character and OtherAnim is applied on the NEUT driven AI2 character. | |||
*'''GiveItems''' - will make conversation participants play respective give and take animations AND will add item(s) to the player character's inventory. This exchange cannot be interrupted by player's input. | |||
*'''AnimOnce''' - NEUT driven AI2 character will play its prescribed animType only once during the dialog line. | |||
*'''OtherAnimOnce''' - player character will play its prescribed animType only once during the dialog line. | |||
|- | |- | ||
|valign=top| [[XML:StNA#animation_types|<Anim>]] | |valign=top| [[XML:StNA#animation_types|<Anim>]] | ||
|valign=top| integer | |valign=top| integer | ||
| | | AnimType ID of the TRAM applied on NEUT driven AI2 character during this dialog line.<BR>Any TRAM which has animState="Standing" and is present in a NEUT driven AI2 character's [[TRAC]] should be valid. | ||
: 0 (None) | : 0 (None) | ||
: 200 (Act_No) | : 200 (Act_No) | ||
Line 252: | Line 271: | ||
| [[XML:StNA#animation_types|<OtherAnim>]] | | [[XML:StNA#animation_types|<OtherAnim>]] | ||
| integer | | integer | ||
| | | AnimType ID of the TRAM applied on the player character during this dialog line.<BR>Any TRAM which has animState="Standing" and is present in the player character's [[TRAC]] should be valid. | ||
|- | |- | ||
|valign=top| <SpeechName> | |valign=top| <SpeechName> | ||
|valign=top| char[32] | |valign=top| char[32] | ||
| <font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix) | |The actual sound played during the dialog line. Length of this sound file defines length of the dialog line. | ||
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix) | |||
for example: | for example: | ||
: talking | : talking |
Revision as of 18:38, 24 January 2014
NEUT : Neutral behavior collection | ||
---|---|---|
XML
AKEV << Other file types >> CONS TMBD << Other BINA >> ONIE MELE << Other OBJC >> PART |
general information
- The xml code on this page is based on onisplit v0.9.61.0
- BINACJBONeutral.oni is level specific. (It can be found in AE/AEInstaller/vanilla/levelX_Final.dat)
- Press control to talk with a character (if possible). The interaction depends on what id that character has.
file structure
<?xml version="1.0" encoding="utf-8"?> <Oni> <Objects> [...] </Objects> </Oni>
[...] means at least one neutral behavior block. Paste all a behavior data into there (this includes <NEUT Id="..."> and </NEUT> tag).
example
<NEUT Id="1853"> <Header> <Flags></Flags> <Position>146.41217 -48.8205528 1027.55249</Position> <Rotation>0 0 0</Rotation> </Header> <OSD> <Name>Give VDG Pistol (CivFem)</Name> <NeutralId>2</NeutralId> <Flags>NoResumeAfterGive</Flags> <Ranges> <Trigger>100</Trigger> <Talk>40</Talk> <Follow>200</Follow> <Enemy>70</Enemy> </Ranges> <Speech> <Trigger>civfem_trigger</Trigger> <Abort>civfem_abort</Abort> <Enemy>civfem_enemy</Enemy> </Speech> <Script> <AfterTalk></AfterTalk> </Script> <Rewards> <WeaponClass>w6_vdg</WeaponClass> <Ammo>0</Ammo> <EnergyCell>0</EnergyCell> <Hypo>0</Hypo> <Other></Other> </Rewards> <DialogLines> <DialogLine> <Flags></Flags> <Anim>0</Anim> <OtherAnim>0</OtherAnim> <SpeechName>civfem_gift_weapon</SpeechName> </DialogLine> <DialogLine> <Flags>GiveItems</Flags> <Anim>202</Anim> <OtherAnim>0</OtherAnim> <SpeechName></SpeechName> </DialogLine> </DialogLines> </OSD> </NEUT>
tags
XML tag | content type | description |
---|---|---|
<?xml version="1.0" encoding="utf-8"?> | flag, float | Don't change this. |
<Oni> | - | |
<ObjectCollection> | - | |
<NEUT Id="1853"> | integer | Id doesn't matter here. |
<Header> | - | |
<Flags> | flag |
|
<Position> | float x3 | x y z position, useless here |
<Rotation> | float x3 | x y z rotation, useless here |
<OSD> | - | |
<Name> | char[32] | A name of the NEUT profile. Used by a BSL command ai2_neutralbehavior |
<NeutralId> | integer | used by BINA/OBJC/CHAR and BINA/CJBO/MELE |
<Flags> | flag |
|
<Ranges> | - | |
<Trigger> | float | A distance between the AI2 character and the player character when the NEUT behavior mechanics kick in. Outside of this distance, NEUT behavior of the given AI2 character does not execute. |
<Talk> | float |
A threshold distance for approaching the player character:
|
<Follow> | float |
An allowed "travel distance" for the NEUT driven AI2 character, starting from the moment player entered the Trigger range. |
<Enemy> | float |
A range in which NEUT driven AI2 character will react on present enemies, even those which are behind its back. Who is considered "enemy" is defined according to Oni team affiliations.
The further reaction of the NEUT driven AI2 character on enemy differs acording to CHAR setup - it can start cowering in fear (NonCombatant flag is set) or go attack the enemy (default setup). |
<Speech> | - | |
<Trigger> | char[32] | Speech sound for hailing the player.
If "distance to player" =< "Talk range" then NEUT driven AI2 character stands still, attempts to rotate in order to keep looking at the player character and keeps repeating the TRAM animType=230 (0xE6, Hail) + this Speech "Trigger" in a 5 second interval.
|
<Abort> | char[32] | Speech sound for the player interruption of the conversation. This sound is played when the player aborts the conversation by preforming some offensive action (punch, kick) in the middle of the conversation.
|
<Enemy> | char[32] | Speech sound for conversation interruption because of some enemy is present within the Enemy range. This sound is played if some enemy gets inside the Enemy range in the middle of the conversation.
|
<Script> | - | |
<AfterTalk> | char[32] | A name of a BSL function. The function will will be executed after the conversation is finished. The function in BSL has an optional parameter (string type) - name of the NEUT driven AI2 character. |
<Rewards> | - | You can get rewards for saving people. A reward can be a weapon, ammo, cells, hypos, shield, phase cloak, and LSI. |
<WeaponClass> | char[32] | Any weapon, filename without prefix ONWC and suffix .oni; for example "w6_vdg" |
<Ammo> | integer | Number of ammo clips. |
<EnergyCell> | integer | Number of energy cells. |
<Hypo> | integer | Number of hypo sprays. |
<Other> | flag | Combinations of flags are possible. Flags:
|
<DialogLines> | - | |
<DialogLine> | - | There can be multiple dialog lines. |
<Flags> | flag | Combinations of flags are possible. Flags:
|
<Anim> | integer | AnimType ID of the TRAM applied on NEUT driven AI2 character during this dialog line. Any TRAM which has animState="Standing" and is present in a NEUT driven AI2 character's TRAC should be valid.
|
<OtherAnim> | integer | AnimType ID of the TRAM applied on the player character during this dialog line. Any TRAM which has animState="Standing" and is present in the player character's TRAC should be valid. |
<SpeechName> | char[32] | The actual sound played during the dialog line. Length of this sound file defines length of the dialog line.
OSBDfile.amb.oni (without file pre-/suffix) for example:
|