XML:BINA/OBJC/CMBT: Difference between revisions

m
using Image: consistently to make it easier to find all image refs on a page
(wip)
 
m (using Image: consistently to make it easier to find all image refs on a page)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{XML_OBJC_Header | type=CMBT | prev=CONS | next=DOOR | name=Combat profiles }}
{{XML_OBJC_Header | prev=CHAR | type=CMBT | next=CONS | name=Combat}}


===general information===
===General information===
* The xml code on this page is compatible with onisplit v0.9.61.0
* The XML code on this page is compatible with OniSplit v0.9.61.0
* BINACJBOCombat.oni is '''global''' (It's stored in '''level0_'''...)
* BINACJBOCombat.oni is '''global''' (It's stored in '''level0_'''...)


 
===File structure===
===file structure===
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 16: Line 15:
''[...]'' stands for a combat profile. You can add new profiles between the <Objects> </Objects> tags.
''[...]'' stands for a combat profile. You can add new profiles between the <Objects> </Objects> tags.


'''example: Id 0 (Stand_and_Fire)'''
'''example: ID 0 (Stand_and_Fire)'''
 
[[Image:CombatRanges.png|thumb|ai2_showcombatranges = 1]]
 
         <CMBT Id="368">
         <CMBT Id="368">
             <Header>
             <Header>
Line 56: Line 58:
         </CMBT>
         </CMBT>


 
===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"?>
| <?xml version="1.0" encoding="utf-8"?>
Line 103: Line 104:
| Name of the profile (making it easier to remember what the content does).
| Name of the profile (making it easier to remember what the content does).
|- style="background-color:#BBFFBB"
|- style="background-color:#BBFFBB"
| <CombatId>
|valign="top"| <CombatId>
| integer
|valign="top"| integer
| Used by CHAR and ONCC.
| Used by CHAR and ONCC.
: A table of combat IDs can be found '''[[OBD_talk:BINA/OBJC/CMBT|HERE]]'''.
|- style="background-color:#BBBBFF"
|- style="background-color:#BBBBFF"
|valign="top"| <Behaviors> {{Anchor|Behaviors}}
| <Behaviors>
|valign="top"| -
| -
| Flags for the behavior tags.
| Behavior at different ranges.
|- style="background-color:#DDDDFF"
|valign="top"| <LongRange>
|valign="top"| flag
|
: None
: None
: Stare
: Stare
Line 124: Line 130:
: MutantMuroMelee
: MutantMuroMelee
: MuroThunderbolt
: MuroThunderbolt
|- style="background-color:#DDDDFF"
| <LongRange>
| flag
| see [[#Behaviors|<Behaviors>]]
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <MediumRange>
| <MediumRange>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| uses the same flags as <LongRange>
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <ShortRange>
| <ShortRange>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| uses the same flags as <LongRange>
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <MediumRetreat>
| <MediumRetreat>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| uses the same flags as <LongRange>
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <LongRetreat>
| <LongRetreat>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| uses the same flags as <LongRange>
|- style="background-color:#BBBBFF"
|- style="background-color:#BBBBFF"
| <Combat>
| <Combat>
Line 151: Line 153:
| <MediumRange>
| <MediumRange>
| float
| float
|
| you can show the combat ranges on-screen with the scripting command "ai2_showcombatranges = 1"
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
|valign="top"| <MeleeOverride>
|valign="top"| <MeleeOverride>
Line 172: Line 174:
| <ShortRange>
| <ShortRange>
| float
| float
|
| you can show the combat ranges on-screen with the scripting command "ai2_showcombatranges = 1"
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <PursuitDistance>
| <PursuitDistance>
Line 184: Line 186:
| <Hurt>
| <Hurt>
| integer
| integer
|
| number of ticks to panic when hurt (60 ticks = 1 second)
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <GunFire>
| <GunFire>
| integer
| integer
|
| number of ticks to panic when hearing gunfire
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <Melee>
| <Melee>
| integer
| integer
|
| number of ticks to panic when melee occurs nearby
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <Sight>
| <Sight>
| integer
| integer
|
| number of ticks to panic when seeing someone hostile
|- style="background-color:#BBBBFF"
|- style="background-color:#BBBBFF"
| <Alarm>
| <Alarm>
Line 204: Line 206:
| <SearchDistance>
| <SearchDistance>
| float
| float
|
| Maximum distance from AI that search is performed for an [[XML:BINA/OBJC/CONS#Tags|alarm console]].
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <EnemyIgnoreDistance>
| <EnemyIgnoreDistance>
| float
| float
|
| Enemies which are inside this range are not ignored, but the AI doesn't attack them.
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <EnemyAttackDistance>
|valign="top"| <EnemyAttackDistance>
| float
|valign="top"| float
|
| This one specifies an "attack range" around an AI running for an alarm. When there is an enemy inside, the AI stops running for the console and attacks the enemy (if the AI knows about him, of course). Nevertheless the AI still keeps in mind that it should run for the console. So when there is no enemy inside this range and the fight timer runs out, the AI resumes running to the specified console.
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <DamageThreshold>
|valign="top"| <DamageThreshold>
| integer
|valign="top"| integer
|
| Specifies how long the AI, which is running for the console, remembers someone hurt it. Until this timer runs out, the AI doesn't tend to use its desired console; it stays in fight stance near the console, ready to fight. If someone hurts the AI which is running for the console, then escapes and then tries to hurt it again while this timer isn't finished yet, the AI remembers him and immediately attacks him the moment he steps inside '''<EnemyAttackDistance>'''.
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <FightTimer>
|valign="top"| <FightTimer>
| integer
|valign="top"| integer
|
|
When the AI, which is running for the console, is engaged in a fight and the enemy manages to disappear (either by phase cloak or simply by hiding), the AI tries to chase him or looks for him. FightTimer specifies how long should the AI chase/look for the enemy. For chasing, the timer starts when the enemy is outside '''<EnemyAttackDistance>'''. Of course when the enemy escapes even from '''<EnemyIgnoreDistance>''', the AI abandons him automatically.
|}
|}


{{XML}}
{{XML}}
1,985

edits