XML:BINA/OBJC/NEUT: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
m (on further thought, we should be consistent in directing modders to the AE .dats)
m (link fixes)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{XML_OBJC_Header | type=NEUT | prev=MELE | next=PART | name=Neutral behavior collection }}
{{XML_OBJC_Header | prev=MELE | type=NEUT | next=PART | name=Neutral}}


__TOC__
__TOC__


==General information==
* The XML on this page is based on OniSplit '''v0.9.61.0'''.
* BINACJBONeutral is level-specific (level''x''_Final.dat).
* Press the action key to talk with a character (if possible). The interaction depends on what ID that character has.


===general information===
==File structure==
* 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/level'''X'''_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"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 18: Line 16:
  </Oni>
  </Oni>


'''''[...]''''' means at least one neutral behavior block. Paste all a behavior data into there (this includes <NEUT Id="..."> and </NEUT> tag).
'''''[...]''''' means at least one neutral behavior block. Paste all your behavior data into there (this includes the <NEUT Id="..."> and </NEUT> tag).
 
'''example'''


'''Example'''
         <NEUT Id="1853">
         <NEUT Id="1853">
             <Header>
             <Header>
Line 70: Line 67:
         </NEUT>
         </NEUT>


 
==Tags==
===tags===
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!width=150px| XML tag
!width=150px| XML tag
!width=120px| content type
!width=120px| Content type
! description
! Description
|-
| <?xml version="1.0" encoding="utf-8"?>
| flag, float
| Don't change this.
|-
|valign=top| <Oni>
| -
|
|-
|-
|valign=top| <ObjectCollection>
|valign=top| <ObjectCollection>
Line 91: Line 79:
|valign=top| <NEUT Id="1853">
|valign=top| <NEUT Id="1853">
| integer
| integer
| Id doesn't matter here.
| The ID here doesn't matter.
|-
|-
| <Header>
| <Header>
Line 100: Line 88:
|valign=top| flag
|valign=top| flag
|
|
: None
*None
: Locked
*Locked
: PlacedInGame
*PlacedInGame
: Temporary
*Temporary
: Gunk
*Gunk
|-
|-
| <Position>
| <Position>
| float x3
| float x3
| x y z position, useless here
| XYZ position, unused
|-
|-
| <Rotation>
| <Rotation>
| float x3
| float x3
| x y z rotation, useless here
| XYZ rotation, unused
|-
|-
| <OSD>
| <OSD>
Line 120: Line 108:
| <Name>
| <Name>
| char[32]
| char[32]
| set a name here to remember later what this behavior does
| The name of the NEUT profile. Used by [[BSL]] command '''ai2_neutralbehavior'''.
|-
|-
| <NeutralId>
| <NeutralId>
| integer
| integer
| used by [[XML:BINA/OBJC/CHAR|BINA/OBJC/CHAR]] and [[XML:BINA/OBJC/MELE|BINA/CJBO/MELE]]
| Used by [[XML:BINA/OBJC/CHAR|BINA/OBJC/CHAR]] and [[XML:BINA/OBJC/MELE|BINA/OBJC/MELE]].
|-
|-
|valign=top| <Flags>
|valign=top| <Flags>
|valign=top| flag  
|valign=top| flag  
|
|
: None
*'''None''' - No flags utilized
: NoResume
*'''NoResume''' - If the conversation is interrupted, NEUT behavior terminates. Conversation cannot be re-initiated.
: NoResumeAfterGive
*'''NoResumeAfterGive''' - Interrupted conversation can be re-initiated, as long as we have not reached a line of dialogue which had the flag "GiveItems". Also, if a line of dialogue is interrupted AFTER the line with the "GiveItems" flag, then the sound file of the interrupted dialogue line is fully played (is not stopped by the conversation interruption). Maybe a bug?
: Uninterruptible
*'''Uninterruptible''' - Running, crouching or jumping will not be able to interrupt the conversation; only attacking the NPC will.
|-
|-
| <Ranges>
| <Ranges>
Line 140: Line 128:
| <Trigger>
| <Trigger>
| float
| float
| second larges range, e.g. 100
| The distance between the AI and the player character when the NEUT behavior mechanics kick in.
|-
|-
| <Talk>
| <Talk>
| float
| float
| shortest range, e.g. 40
|
A threshold distance for approaching the player character:
*If '''"distance to player" > "Talk range"''' then the NEUT-driven AI keeps approaching the player character.
*If  '''"distance to player" <= "Talk range"''' then the NEUT-driven AI stands still, rotates in order to keep looking at the player, and keeps repeating the "Hail" anim type and playing the <Trigger> speech line (see below) at a 5 second interval.
*If  '''"distance to player" <= "Talk range"''' AND '''"distance to player" <= 35 game world units''' (based on observation), then the conversation can be triggered by facing the NEUT-driven AI and pressing the action key.
|-
|-
| <Follow>
| <Follow>
| float
| float
| larges range, e.g. 200
|  
An "allowed travel" distance for the NEUT-driven AI, starting from the moment the player entered the <Trigger> range (see above). The NEUT-driven AI is allowed to travel only this far from its pre-trigger location before it gives up on chasing the player character. When the <Follow> distance is expended, the NEUT behavior for the given character is terminated and control over the character is handed to some other AI2 system (for example the Patrol Path system). Of course if the player again enters the <Trigger> range, the NEUT mechanics kick in again (with a reset <Follow> distance to expend).
|-
|-
| <Enemy>
| <Enemy>
| float
| float
| third larges range, e.g. 70
|  
The range within which the NEUT-driven AI will react to the presence of enemies (even those behind its back!). Who is considered an "enemy" is defined according to Oni's team affiliations.<BR>
*If an enemy is within the <Enemy> range prior to the conversation, then the conversation cannot begin till the enemy is either outside of that range or neutralized.
*If an enemy gets inside the <Enemy> range while the conversation is occurring, the conversation is stopped and the <Enemy> speech sound (see below) is played.
 
The further reaction of the NEUT-driven AI to the enemy depends on their [[CHAR]] settings — it can start cowering in fear (NonCombatant flag is set) or go attack the enemy (default setup).
|-
|-
| <Speech>
| <Speech>
Line 160: Line 158:
|valign=top| <Trigger>
|valign=top| <Trigger>
|valign=top| char[32]
|valign=top| char[32]
|valign=top| The actual talk. <font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix)
|valign=top| Speech sound for hailing the player. If  '''"distance to player" <= "Talk range"''' then the NEUT-driven AI stands still, rotates in order to keep looking at the player, and keeps repeating the Hail anim type and playing the speech sound specified in this <Trigger> tag at a 5 second interval.
examples of such OSBD amb files:
 
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix)
 
Examples of such OSBD .amb files:
: civfem_trigger
: civfem_trigger
: hey_konoko
: hey_konoko
Line 170: Line 171:
|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 when player interrupts the conversation. This sound is played when the player aborts the conversation by performing some offensive action such as a punch/kick or by breaking away in the middle of the conversation with a movement.
examples of such OSBD amb files:
 
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix)
 
Examples of such OSBD .amb files:
: civfem_abort
: civfem_abort
: see_you_later
: see_you_later
Line 180: Line 184:
|valign=top| <Enemy>
|valign=top| <Enemy>
|valign=top| char[32]
|valign=top| char[32]
|valign=top| You will be notified about enemies by the person you are talking to. <font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix)
|valign=top| Speech sound to play when conversation is interrupted due to an enemy entering the <Enemy> range.
examples of such OSBD amb files:
 
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix)
 
Examples of such OSBD .amb files:
: civfem_enemy
: civfem_enemy
: what_the
: what_the
Line 194: Line 201:
| <AfterTalk>
| <AfterTalk>
| char[32]
| char[32]
| name of BSL function (that will be executed after the talk), e.g. set_objective_3
| A name of a BSL function. The function will will be executed after the conversation is finished. The function in BSL can have an optional parameter of type ''string'' which receives the name of the NEUT-driven AI.
|-
|-
| <Rewards>
| <Rewards>
| -
| -
| You can get rewards for saving people. A reward can be a weapon, ammo, cells, hypos, shield, phase cloak, and LSI.
| You can get rewards for saving people. A reward can be a weapon, ballistic ammo, energy cells, hypos, a shield, a phase cloak, or an [[LSI]].
|-
|-
| <WeaponClass>
| <WeaponClass>
| char[32]
| char[32]
| any weapon, file name without prefix ONWC and suffix .oni; for exampel "w6_vdg"
| Any weapon. Filename without prefix ONWC and suffix .oni, for example "w6_vdg".
|-
|-
| <Ammo>
| <Ammo>
| integer
| integer
| number of ammo clips
| Number of ammo clips.
|-
|-
| <EnergyCell>
| <EnergyCell>
| integer
| integer
| number of energy cells
| Number of energy cells.
|-
|-
| <Hypo>
| <Hypo>
| integer
| integer
| number of hypo sprays
| Number of hypo sprays.
|-
|-
|valign=top| <Other>
|valign=top| <Other>
|valign=top| flag
|valign=top| flag
|valign=top| combination possible
|valign=top| These flags can be combined:
: Shield
*Shield
: Invisibility
*Invisibility
: LSI
*LSI
|-
|-
| <DialogLines>
| <DialogLines>
Line 229: Line 236:
| <DialogLine>
| <DialogLine>
| -
| -
| There can be multiple dialog lines.
| There can be multiple dialogue lines.
|-
|-
|valign=top| <Flags>
|valign=top| <Flags>
|valign=top| flag
|valign=top| flag
|
| These flag can be combined:
: None
*'''None''' - No special flags.
: IsPlayer
*'''IsPlayer''' - Reverses the subjects of Anim and OtherAnim — now Anim is applied to the player character and OtherAnim is applied to the NEUT-driven AI.
: GiveItems
*'''GiveItems''' - Will make the conversation participants play their respective give and take animations AND will add item(s) to the player's inventory. This exchange cannot be interrupted by player's input.
: AnimOnce
*'''AnimOnce''' - NEUT-driven AIs will play their prescribed anim type only once during the dialogue line.
: OtherAnimOnce
*'''OtherAnimOnce''' - player character will play its prescribed anim type only once during the dialogue line.
|-
|-
|valign=top| [[XML:StNA#animation_types|<Anim>]]
|valign=top| [[XML:StNA#Animation_types|<Anim>]]
|valign=top| integer
|valign=top| integer
| any standing anim should be valid
| The anim type ID of the TRAM applied to the NEUT-driven AI during this dialogue line. Any TRAM which has the anim state "Standing" and is present in a NEUT-driven AI's [[TRAC]] should be valid.
: 0 (None)
: 0 (None)
: 200 (Act_No)
: 200 (Act_No)
Line 250: Line 257:
: 204 (Act_Shout)
: 204 (Act_Shout)
|-
|-
| [[XML:StNA#animation_types|<OtherAnim>]]
| [[XML:StNA#Animation_types|<OtherAnim>]]
| integer
| integer
|
| Anim type ID of the TRAM applied to the player character during this dialogue line. Any TRAM which has the anim state "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 dialogue line. The length of this sound file determines the length of the dialogue line's effect in-game.
for example:
 
<font style="color:#777777">OSBD</font>file<font style="color:#777777">.amb.oni</font> (without file pre-/suffix)
 
For example:
: talking
: talking
: civfem_gift_weapon
: civfem_gift_weapon

Latest revision as of 12:23, 5 April 2021

NEUT : Neutral
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

MELE << Other OBJC >> PART

switch to OBD page

General information

  • The XML on this page is based on OniSplit v0.9.61.0.
  • BINACJBONeutral is level-specific (levelx_Final.dat).
  • Press the action key 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 your behavior data into there (this includes the <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
<ObjectCollection> -
<NEUT Id="1853"> integer The ID here doesn't matter.
<Header> -
<Flags> flag
  • None
  • Locked
  • PlacedInGame
  • Temporary
  • Gunk
<Position> float x3 XYZ position, unused
<Rotation> float x3 XYZ rotation, unused
<OSD> -
<Name> char[32] The name of the NEUT profile. Used by BSL command ai2_neutralbehavior.
<NeutralId> integer Used by BINA/OBJC/CHAR and BINA/OBJC/MELE.
<Flags> flag
  • None - No flags utilized
  • NoResume - If the conversation is interrupted, NEUT behavior terminates. Conversation cannot be re-initiated.
  • NoResumeAfterGive - Interrupted conversation can be re-initiated, as long as we have not reached a line of dialogue which had the flag "GiveItems". Also, if a line of dialogue is interrupted AFTER the line with the "GiveItems" flag, then the sound file of the interrupted dialogue line is fully played (is not stopped by the conversation interruption). Maybe a bug?
  • Uninterruptible - Running, crouching or jumping will not be able to interrupt the conversation; only attacking the NPC will.
<Ranges> -
<Trigger> float The distance between the AI and the player character when the NEUT behavior mechanics kick in.
<Talk> float

A threshold distance for approaching the player character:

  • If "distance to player" > "Talk range" then the NEUT-driven AI keeps approaching the player character.
  • If "distance to player" <= "Talk range" then the NEUT-driven AI stands still, rotates in order to keep looking at the player, and keeps repeating the "Hail" anim type and playing the <Trigger> speech line (see below) at a 5 second interval.
  • If "distance to player" <= "Talk range" AND "distance to player" <= 35 game world units (based on observation), then the conversation can be triggered by facing the NEUT-driven AI and pressing the action key.
<Follow> float

An "allowed travel" distance for the NEUT-driven AI, starting from the moment the player entered the <Trigger> range (see above). The NEUT-driven AI is allowed to travel only this far from its pre-trigger location before it gives up on chasing the player character. When the <Follow> distance is expended, the NEUT behavior for the given character is terminated and control over the character is handed to some other AI2 system (for example the Patrol Path system). Of course if the player again enters the <Trigger> range, the NEUT mechanics kick in again (with a reset <Follow> distance to expend).

<Enemy> float

The range within which the NEUT-driven AI will react to the presence of enemies (even those behind its back!). Who is considered an "enemy" is defined according to Oni's team affiliations.

  • If an enemy is within the <Enemy> range prior to the conversation, then the conversation cannot begin till the enemy is either outside of that range or neutralized.
  • If an enemy gets inside the <Enemy> range while the conversation is occurring, the conversation is stopped and the <Enemy> speech sound (see below) is played.

The further reaction of the NEUT-driven AI to the enemy depends on their CHAR settings — 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 the NEUT-driven AI stands still, rotates in order to keep looking at the player, and keeps repeating the Hail anim type and playing the speech sound specified in this <Trigger> tag at a 5 second interval.

OSBDfile.amb.oni (without file pre-/suffix)

Examples of such OSBD .amb files:

civfem_trigger
hey_konoko
civmale1_trigger
civmale2_trigger
civmale3_trigger
<Abort> char[32] Speech sound for when player interrupts the conversation. This sound is played when the player aborts the conversation by performing some offensive action such as a punch/kick or by breaking away in the middle of the conversation with a movement.

OSBDfile.amb.oni (without file pre-/suffix)

Examples of such OSBD .amb files:

civfem_abort
see_you_later
civmale1_abort
civmale2_abort
civmale3_abort
<Enemy> char[32] Speech sound to play when conversation is interrupted due to an enemy entering the <Enemy> range.

OSBDfile.amb.oni (without file pre-/suffix)

Examples of such OSBD .amb files:

civfem_enemy
what_the
civmale1_enemy
civmale2_enemy
civmale3_enemy
<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 can have an optional parameter of type string which receives the name of the NEUT-driven AI.
<Rewards> - You can get rewards for saving people. A reward can be a weapon, ballistic ammo, energy cells, hypos, a shield, a phase cloak, or an 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 These flags can be combined:
  • Shield
  • Invisibility
  • LSI
<DialogLines> -
<DialogLine> - There can be multiple dialogue lines.
<Flags> flag These flag can be combined:
  • None - No special flags.
  • IsPlayer - Reverses the subjects of Anim and OtherAnim — now Anim is applied to the player character and OtherAnim is applied to the NEUT-driven AI.
  • GiveItems - Will make the conversation participants play their respective give and take animations AND will add item(s) to the player's inventory. This exchange cannot be interrupted by player's input.
  • AnimOnce - NEUT-driven AIs will play their prescribed anim type only once during the dialogue line.
  • OtherAnimOnce - player character will play its prescribed anim type only once during the dialogue line.
<Anim> integer The anim type ID of the TRAM applied to the NEUT-driven AI during this dialogue line. Any TRAM which has the anim state "Standing" and is present in a NEUT-driven AI's TRAC should be valid.
0 (None)
200 (Act_No)
201 (Act_Yes)
202 (Act_Talk)
203 (Act_Shrug)
204 (Act_Shout)
<OtherAnim> integer Anim type ID of the TRAM applied to the player character during this dialogue line. Any TRAM which has the anim state "Standing" and is present in the player character's TRAC should be valid.
<SpeechName> char[32] The actual sound played during the dialogue line. The length of this sound file determines the length of the dialogue line's effect in-game.

OSBDfile.amb.oni (without file pre-/suffix)

For example:

talking
civfem_gift_weapon
civfem_gift_hypo
civfem_gift_force_field
civmale1_gift_weaponS
civmale2_gift_weapon
civmale1_gift_ammo
civmale2_gift_ammo
civmale3_gift_ammo
civmale1_gift_hypoS
civmale2_gift_hypo
civmale3_gift_hypo
civmale1_gift_force_field
civmale2_gift_force_field
civmale3_gift_force_field
c03_12_06civ1
c03_12_07civ1
c03_12_08tctffag1
c03_12_09tctffag2