XML:BINA/OBJC/CMBT: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
(wip)
 
m (todo: pursuit distance + melee override)
Line 17: Line 17:


'''example: Id 0 (Stand_and_Fire)'''
'''example: Id 0 (Stand_and_Fire)'''
{|width=200px border=0 cellspacing=20 cellpadding=0 style="float:right"
|'''combat ranges'''
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/ai2_showcombatranges.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/ai2_showcombatranges_tn.png]
|}
         <CMBT Id="368">
         <CMBT Id="368">
             <Header>
             <Header>
Line 107: Line 113:
| Used by CHAR and ONCC.
| Used by CHAR and ONCC.
|- 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 134:
: 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>]]
| the flags are identical with <LongRange>
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <ShortRange>
| <ShortRange>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| the flags are identical with <LongRange>
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <MediumRetreat>
| <MediumRetreat>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| the flags are identical with <LongRange>
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <LongRetreat>
| <LongRetreat>
| flag
| flag
| see [[#Behaviors|<Behaviors>]]
| the flags are identical with <LongRange>
|- style="background-color:#BBBBFF"
|- style="background-color:#BBBBFF"
| <Combat>
| <Combat>
Line 151: Line 157:
| <MediumRange>
| <MediumRange>
| float
| float
|
| you can make it visible with the script command ai2_showcombatranges = 1
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
|valign="top"| <MeleeOverride>
|valign="top"| <MeleeOverride>
Line 172: Line 178:
| <ShortRange>
| <ShortRange>
| float
| float
|
| you can make it visible with the script command ai2_showcombatranges = 1
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <PursuitDistance>
| <PursuitDistance>
Line 184: Line 190:
| <Hurt>
| <Hurt>
| integer
| integer
|
| frame number (60 frames = 1 second)
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <GunFire>
| <GunFire>
| integer
| integer
|
| frame number
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <Melee>
| <Melee>
| integer
| integer
|
| frame number
|- style="background-color:#DDDDFF"
|- style="background-color:#DDDDFF"
| <Sight>
| <Sight>
| integer
| integer
|
| frame number
|- style="background-color:#BBBBFF"
|- style="background-color:#BBBBFF"
| <Alarm>
| <Alarm>
Line 204: Line 210:
| <SearchDistance>
| <SearchDistance>
| float
| float
|
| Area around AI, where engine checks if there is some [[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 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, AI stops running for the console and attack the enemy (if AI knows about him, of course). Nevertheless AI still keeps in mind that it should run for the console. So when there is no enemy inside this range and fight timer runs out, 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 AI, which is running for the console, remembers someone hurt it. Until this timer runs away, AI doesn't tend to use console. It only stays in fight stance near console, ready to fight. If someone hurts AI which is running for the console, then escapes and then tries to hurt it again while this timer isn't finished yet, AI remembers him and imitatively 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 AI, which is running for the console, is engaged in a fight and enemy manages to disappear (either by phase-cloak or simply by hiding behind some corner), AI tries to chase him or looks for him. Alarm timer specifies how long should AI chase/look for the enemy. For chasing, timer starts when the enemy is outside '''<EnemyAttackDistance>'''. Of course when the enemy escapes even from '''<EnemyIgnoreDistance>''', AI abandons him automatically.
|}
|}


{{XML}}
{{XML}}

Revision as of 12:39, 24 November 2012

CMBT : Combat profiles
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

CONS << Other OBJC >> DOOR

switch to OBD page

general information

  • The xml code on this page is compatible with onisplit v0.9.61.0
  • BINACJBOCombat.oni is global (It's stored in level0_...)


file structure

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <Objects>
   [...]
   </Objects>
</Oni>

[...] stands for a combat profile. You can add new profiles between the <Objects> </Objects> tags.

example: Id 0 (Stand_and_Fire)

combat ranges

ai2_showcombatranges_tn.png

       <CMBT Id="368">
           <Header>
               <Flags></Flags>
               <Position>-223.332321 17.8324356 -116.511253</Position>
               <Rotation>0 0 0</Rotation>
           </Header>
           <OSD>
               <Name>Stand_and_Fire</Name>
               <CombatId>0</CombatId>
               <Behaviors>
                   <LongRange>HoldAndFire</LongRange>
                   <MediumRange>HoldAndFire</MediumRange>
                   <ShortRange>HoldAndFire</ShortRange>
                   <MediumRetreat>HoldAndFire</MediumRetreat>
                   <LongRetreat>HoldAndFire</LongRetreat>
               </Behaviors>
               <Combat>
                   <MediumRange>120</MediumRange>
                   <MeleeOverride>IfPunched</MeleeOverride>
                   <NoGunBehavior>Melee</NoGunBehavior>
                   <ShortRange>40</ShortRange>
                   <PursuitDistance>200</PursuitDistance>
               </Combat>
               <Panic>
                   <Hurt>600</Hurt>
                   <GunFire>900</GunFire>
                   <Melee>600</Melee>
                   <Sight>1200</Sight>
               </Panic>
               <Alarm>
                   <SearchDistance>300</SearchDistance>
                   <EnemyIgnoreDistance>80</EnemyIgnoreDistance>
                   <EnemyAttackDistance>0</EnemyAttackDistance>
                   <DamageThreshold>30</DamageThreshold>
                   <FightTimer>360</FightTimer>
               </Alarm>
           </OSD>
       </CMBT>


tags

XML tag content type description
<?xml version="1.0" encoding="utf-8"?> float, flag Ignore this.
<Oni> -
<Objects> - Encloses the profiles, starting with <CMBT Id="..."> and ending with </CMBT>.
<CMBT Id="..."> integer Ignore this.
<Header> -
<Flags> flag Ignore this.
<Position> float x3 Ignore this.
<Rotation> float x3 Ignore this.
<OSD> -
<Name> char[64] Name of the profile (making it easier to remember what the content does).
<CombatId> integer Used by CHAR and ONCC.
<Behaviors> - Behavior at different ranges.
<LongRange> flag
None
Stare
HoldAndFire
FiringCharge
Melee
BarabasShoot
BarabasAdvance
BarabasMelee
SuperNinjaFireball
SuperNinjaAdvance
SuperNinjaMelee
RunForAlarm
MutantMuroMelee
MuroThunderbolt
<MediumRange> flag the flags are identical with <LongRange>
<ShortRange> flag the flags are identical with <LongRange>
<MediumRetreat> flag the flags are identical with <LongRange>
<LongRetreat> flag the flags are identical with <LongRange>
<Combat> -
<MediumRange> float you can make it visible with the script command ai2_showcombatranges = 1
<MeleeOverride> flag
None
IfPunched
Cancelled
ShortRange
MediumRange
AlwaysMelee
<NoGunBehavior> flag
Melee
Retreat
RunForAlarm
<ShortRange> float you can make it visible with the script command ai2_showcombatranges = 1
<PursuitDistance> float
<Panic> -
<Hurt> integer frame number (60 frames = 1 second)
<GunFire> integer frame number
<Melee> integer frame number
<Sight> integer frame number
<Alarm> -
<SearchDistance> float Area around AI, where engine checks if there is some alarm console.
<EnemyIgnoreDistance> float Enemies which are inside this range are not ignored but AI doesn't attack them.
<EnemyAttackDistance> float This one specifies an "attack range" around an AI running for an alarm. When there is an enemy inside, AI stops running for the console and attack the enemy (if AI knows about him, of course). Nevertheless AI still keeps in mind that it should run for the console. So when there is no enemy inside this range and fight timer runs out, AI resumes running to the specified console.
<DamageThreshold> integer Specifies how long AI, which is running for the console, remembers someone hurt it. Until this timer runs away, AI doesn't tend to use console. It only stays in fight stance near console, ready to fight. If someone hurts AI which is running for the console, then escapes and then tries to hurt it again while this timer isn't finished yet, AI remembers him and imitatively attacks him the moment he steps inside <EnemyAttackDistance>.
<FightTimer> integer

When AI, which is running for the console, is engaged in a fight and enemy manages to disappear (either by phase-cloak or simply by hiding behind some corner), AI tries to chase him or looks for him. Alarm timer specifies how long should AI chase/look for the enemy. For chasing, timer starts when the enemy is outside <EnemyAttackDistance>. Of course when the enemy escapes even from <EnemyIgnoreDistance>, AI abandons him automatically.