XML:BINA/OBJC/CHAR: Difference between revisions

From OniGalore
< XML:BINA‎ | OBJC
Jump to navigation Jump to search
mNo edit summary
m (copy edit; hopefully I did not screw up the description of AlarmGroups, as I'm not sure I understand it)
Line 1: Line 1:
{{XML_OBJC_Header | type=CHAR | prev=WEAP | next=CMBT | name=Character }}
{{XML_OBJC_Header | type=CHAR | prev=WEAP | next=CMBT | name=Character }}


'''general information'''
==General information==
* The xml code on this page is based on onisplit '''v0.9.61.0'''
* The XML code on this page is based on OniSplit '''v0.9.61.0'''
* '''BINACJBOCharacter.oni''' is level specific. (It can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat)
* '''BINACJBOCharacter.oni''' is level specific (it can be found in AE/AEInstaller/vanilla/level'''X'''_Final.dat).
* An alternative is [[XML:AISA|AISA]].
* An alternative method for creating characters is [[XML:AISA|AISA]].
* All original characters can be seen [http://ssg.oni2.net/subfold/charas/charas.htm HERE.] (The lists include used ONCC, character's BSL name, health, team and BSL function.)
* All original characters can be seen [http://ssg.oni2.net/subfold/charas/charas.htm HERE]. (The lists include the ONCC name, character's BSL name, health, team and attached BSL event function names.)




Line 113: Line 113:
|valign=top| <CHAR Id="3860">
|valign=top| <CHAR Id="3860">
|valign=top| integer
|valign=top| integer
| Id doesn't matter. --  For [[XML:ONLV|level import]] use <CHAR>.
| ID doesn't matter. --  For [[XML:ONLV|level import]] use <CHAR>.
|-
|-
| <Header>
| <Header>
Line 125: Line 125:
|valign=top| <Position>
|valign=top| <Position>
|valign=top| float x3
|valign=top| float x3
| character is spawned at this xyz-position
| character is spawned at this XYZ position
|-
|-
|valign=top| <Rotation>
|valign=top| <Rotation>
|valign=top| float x3
|valign=top| float x3
| character is spawned with this xyz-rotation, only y is useful
| character is spawned with this XYZ rotation; only Y (facing) is useful
|-
|-
|valign=top| <OSD>
|valign=top| <OSD>
Line 138: Line 138:
|valign=top| flag
|valign=top| flag
| determines some special properties
| determines some special properties
: IsPlayer (1) (if you have two of them then delete one and spawn the other one at same time, if not made simultaneously camera glitch can appear)
: IsPlayer (1) (if you have two of them, and delete one and then spawn the other, if not done simultaneously a camera glitch can appear)
: RandomCostume (2) (flag belongs to [[XML:ONCV|ONCV]])
: RandomCostume (2) (flag belongs to [[XML:ONCV|ONCV]])
: NotInitiallyPresent (4)
: NotInitiallyPresent (4)
Line 144: Line 144:
: CanSpawnMultiple (16) (needs WasSpawned)
: CanSpawnMultiple (16) (needs WasSpawned)
: WasSpawned (32) (...)
: WasSpawned (32) (...)
: Unkillable (64) (character won't loss more life points if it reaches 1, same as BSL command "chr_unkillable")
: Unkillable (64) (character won't lose more HP if it reaches 1; same as BSL command "chr_unkillable")
: InfiniteAmmo (128) (Raiden: "You got enough ?" Snake points to his head. "Infinite ammo...")
: InfiniteAmmo (128) (Raiden: "You got enough?" Snake points to his head. "Infinite ammo...")
: Omniscient (256) (useless?; tested ideas: doesn't unlock moves for player)
: Omniscient (256) (AI will not forget having seen an enemy)
: HasLSI (512) (this character drops an level specific item like truck keys in [[CHAPTER_14_._DAWN_OF_THE_CHRYSALIS|level 19]])
: HasLSI (512) (this character drops a [[LSI|level specific item]])
: Boss (1024) (used for boss mode fights. makes the AI ignore this character unless there is nobody else around)
: Boss (1024) (makes the AI prefer to attack the player; used for Muro in final battle if Griffin's group is present)
: UpgradeDifficulty (2048) (spawns a stronger enemy if you play on medium or hard)
: UpgradeDifficulty (2048) (spawns a stronger enemy if you play on Normal or Hard)
: NoAutoDrop (4096) (doesn't drop "used" shield, "used" invisibility and LSI when killed)
: NoAutoDrop (4096) (doesn't drop "used" shield, "used" invisibility and LSI when killed)


'''After onisplit v0.9.54.0, merged integer flags can appear.'''
'''After OniSplit v0.9.54.0, merged integer flags can appear.''' Let's say you encounter a 6180: then it's actually 4096 + 2048 + 32 + 4.
 
Let's say you encounter a 6180, then it's actually 4096 + 2048 + 32 + 4.
|-
|-
|valign=top| <Class>
|valign=top| <Class>
|valign=top| char[64]
|valign=top| char[64]
| ONCC file name without file pre- and suffix. Character can change appearance with "chr_set_class".
| ONCC file name without file prefix and suffix. Character can change appearance with "chr_set_class".
|-
|-
|valign=top| <Name>
|valign=top| <Name>
Line 166: Line 164:
|valign=top| <Weapon>
|valign=top| <Weapon>
|valign=top| char[64]
|valign=top| char[64]
| ONWC file name without file pre- and suffix. The character is spawned with that weapon.  
| ONWC file name without file prefix and suffix. The character is spawned with that weapon.  


Original weapon classes:
Original weapon classes:
Line 174: Line 172:
: w4_psm (phase stream projector)
: w4_psm (phase stream projector)
: w5_sbg (super ball gun)
: w5_sbg (super ball gun)
: w6_vdg (shocker)
: w6_vdg (van de graaff pistol)
: w7_scc (scram cannon (mini-rockets))
: w7_scc (scram cannon (mini-rockets))
: w8_mbo (mercury bow)
: w8_mbo (mercury bow)
: w9_scr (screamer gun)
: w9_scr (screamer gun)
: w10_sni (Mukade's firework)
: w10_sni (Mukade's fireball)
: w11_ba1 (Barabas' gun)
: w11_ba1 (Barabas' gun)
: w12_ba2 (-)
: w12_ba2 (-)
Line 196: Line 194:
|valign=top| <AdditionalHealth>
|valign=top| <AdditionalHealth>
|valign=top| integer
|valign=top| integer
| ''main'' health is stored in ONCC, "additional health" will be added to that ''main'' health; also negative value possible here (which would then reduce main health)
| ''Base'' health is stored in ONCC; AdditionalHealth will be added to that base health; a negative value is allowed here, which would reduce base health
|-
|-
|valign=top| <Job>
|valign=top| <Job>
Line 209: Line 207:
: <font color="#777">Guard (never used in Oni)</font>
: <font color="#777">Guard (never used in Oni)</font>
: Patrol
: Patrol
: <font color="#777">Teambattle (never used in Oni)</font>
: <font color="#777">Team Battle (never used in Oni)</font>
: Combat (not tested)
: Combat (not tested)
: Melee (not tested)
: Melee (not tested)
Line 263: Line 261:
|valign=top| integer
|valign=top| integer
|
|
: <Use> (Player becomes spawned with ammo clips, here you set the amount.)
: <Use> (Player is spawned with this many ammo clips.)
: <Drop> (AI drop these items when defeated.)
: <Drop> (AI drops these items when defeated.)
|-
|-
|valign=top| <EnergyCell>
|valign=top| <EnergyCell>
Line 333: Line 331:
|valign=top| <AlarmGroups>
|valign=top| <AlarmGroups>
|valign=top| integer
|valign=top| integer
|It's a bitset32 converted to int32. If Ns bit = TRUE then a bot gets highest alert level by a console command ai2_tripalarm(N)
|It's a bitset32 converted to int32. For any bit ("N") that is 1, the scripting command "ai2_tripalarm N" is called, alerting the AI with that scripting ID
: <AlarmGroups>VAR</AlarmGroups>
: <AlarmGroups>VAR</AlarmGroups>
:: VAR = 2^N1 + 2^N2 + 2^N3 etc.
:: VAR = 2^N1 + 2^N2 + 2^N3 etc.

Revision as of 22:24, 17 March 2014

CHAR : Character
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

WEAP << Other OBJC >> CMBT

switch to OBD page

General information

  • The XML code on this page is based on OniSplit v0.9.61.0
  • BINACJBOCharacter.oni is level specific (it can be found in AE/AEInstaller/vanilla/levelX_Final.dat).
  • An alternative method for creating characters is AISA.
  • All original characters can be seen HERE. (The lists include the ONCC name, character's BSL name, health, team and attached BSL event function names.)


XML structure

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

[...] means at least one character. Paste all character data into there (this includes <CHAR Id="..."> and </CHAR> tag).

example

       <CHAR Id="3860">
           <Header>
               <Flags></Flags>
               <Position>-543.22 159 -630.0954</Position>
               <Rotation>0 180 0</Rotation>
           </Header>
           <OSD>
               <Flags>NotInitiallyPresent</Flags>
               <Class>konoko_generic</Class>
               <Name>konoko</Name>
               <Weapon>w1_tap</Weapon>
               <Scripts>
                   <Spawn></Spawn>
                   <Die>you_lose</Die>
                   <Combat></Combat>
                   <Alarm></Alarm>
                   <Hurt></Hurt>
                   <Defeated></Defeated>
                   <OutOfAmmo></OutOfAmmo>
                   <NoPath></NoPath>
               </Scripts>
               <AdditionalHealth>0</AdditionalHealth>
               <Job>
                   <Type>None</Type>
                   <PatrolPathId>0</PatrolPathId>
               </Job>
               <Behaviors>
                   <CombatId>0</CombatId>
                   <MeleeId>0</MeleeId>
                   <NeutralId>0</NeutralId>
               </Behaviors>
               <Inventory>
                   <Ammo>
                       <Use>3</Use>
                       <Drop>0</Drop>
                   </Ammo>
                   <EnergyCell>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </EnergyCell>
                   <Hypo>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Hypo>
                   <Shield>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Shield>
                   <Invisibility>
                       <Use>0</Use>
                       <Drop>0</Drop>
                   </Invisibility>
               </Inventory>
               <Team>Konoko</Team>
               <AmmoPercentage>100</AmmoPercentage>
               <Alert>
                   <Initial>Lull</Initial>
                   <Minimal>Lull</Minimal>
                   <JobStart>Low</JobStart>
                   <Investigate>Medium</Investigate>
               </Alert>
               <AlarmGroups>0</AlarmGroups>
               <Pursuit>
                   <StrongUnseen>Look</StrongUnseen>
                   <WeakUnseen>Forget</WeakUnseen>
                   <StrongSeen>Look</StrongSeen>
                   <WeakSeen>Look</WeakSeen>
                   <Lost>ReturnToJob</Lost>
               </Pursuit>
           </OSD>
       </CHAR>


XML tag content type description
<?xml version="1.0" encoding="utf-8"?> float, flag There's no reason to change this.
<Oni> -
<Objects> -
<CHAR Id="3860"> integer ID doesn't matter. -- For level import use <CHAR>.
<Header> -
<Flags> - unknown; usually empty
<Position> float x3 character is spawned at this XYZ position
<Rotation> float x3 character is spawned with this XYZ rotation; only Y (facing) is useful
<OSD> -
<Flags> flag determines some special properties
IsPlayer (1) (if you have two of them, and delete one and then spawn the other, if not done simultaneously a camera glitch can appear)
RandomCostume (2) (flag belongs to ONCV)
NotInitiallyPresent (4)
NonCombatant (8)
CanSpawnMultiple (16) (needs WasSpawned)
WasSpawned (32) (...)
Unkillable (64) (character won't lose more HP if it reaches 1; same as BSL command "chr_unkillable")
InfiniteAmmo (128) (Raiden: "You got enough?" Snake points to his head. "Infinite ammo...")
Omniscient (256) (AI will not forget having seen an enemy)
HasLSI (512) (this character drops a level specific item)
Boss (1024) (makes the AI prefer to attack the player; used for Muro in final battle if Griffin's group is present)
UpgradeDifficulty (2048) (spawns a stronger enemy if you play on Normal or Hard)
NoAutoDrop (4096) (doesn't drop "used" shield, "used" invisibility and LSI when killed)

After OniSplit v0.9.54.0, merged integer flags can appear. Let's say you encounter a 6180: then it's actually 4096 + 2048 + 32 + 4.

<Class> char[64] ONCC file name without file prefix and suffix. Character can change appearance with "chr_set_class".
<Name> char[32] used by BSL commands
<Weapon> char[64] ONWC file name without file prefix and suffix. The character is spawned with that weapon.

Original weapon classes:

w1_tap (TCTF pistol)
w2_sap (Syndicate uzi)
w3_phr (plasma rifle)
w4_psm (phase stream projector)
w5_sbg (super ball gun)
w6_vdg (van de graaff pistol)
w7_scc (scram cannon (mini-rockets))
w8_mbo (mercury bow)
w9_scr (screamer gun)
w10_sni (Mukade's fireball)
w11_ba1 (Barabas' gun)
w12_ba2 (-)
<Scripts> string BSL function
<Spawn> (called when character is spawned)
<Die> (called when character dies (health reaches 0); can work multiple times)
<Combat> (called when character notices an enemy; works only once)
<Alarm> (called when character is alarmed)
<Hurt> (called when character is hurt for the first time; works only once)
<Defeated> (called when character is "defeated" (health reaches 1); works only once)
<OutOfAmmo> (called when character runs out of ammo (reloads a weapon with the last clip/cell); works only once, and the character must have the ammo at spawn-time)
<NoPath> (should be called when a character has trouble pathfinding, but isn't)
<AdditionalHealth> integer Base health is stored in ONCC; AdditionalHealth will be added to that base health; a negative value is allowed here, which would reduce base health
<Job> -
<Type> flag
None
Idle
Guard (never used in Oni)
Patrol
Team Battle (never used in Oni)
Combat (not tested)
Melee (not tested)
Alarm (not tested)
Neutral (not tested)
Panic (not tested)
<PatrolPathId> integer
<Behaviors> - specified by IDs linking to melee, combat and neutral profile collection file
<CombatId> flag
0 (Stand_and_Fire)
1 (Murder)
2 (Shoot_And_Fight)
3 (Take_my_Big_Black_Stuff)
4 (Assault)
5 (Civilian)
6 (Pursuit)
7 (Group_battle)
8 (Watchman)
9 (Barabbas_TCTF)
10 (COMGUY)
11 (SuperNinja)
12 (Griffin)
13 (Mutant_Muro)
14 (Alarm Guard)
15 (Non-Combatant)
16 (Griffin_Final)
207 (Sniper)
208 (Sniper For Joe)
17 (Average_striker; new profile for AE)
<MeleeId> flag here are all melee IDs sorted by ID
<NeutralId> flag ... (no overview so far)
<Inventory> -
<Ammo> integer
<Use> (Player is spawned with this many ammo clips.)
<Drop> (AI drops these items when defeated.)
<EnergyCell> integer
<Use>
<Drop>
<Hypo> integer
<Use> (AI cannot use hypos.)
<Drop>
<Shield> integer
<Use>
<Drop>
<Invisibility> integer
<Use>
<Drop>
<Team> flag
Konoko
TCTF
Syndicate
Neutral
SecurityGuard
RogueKonoko
Switzerland (is melee-immune)
SyndicateAccessory
<AmmoPercentage> integer ammo in weapon, percent value: 0 - 100, overload not tested
<Alert> - HERE you get some helpful information on how to use "Alert" and "Pursuit".
Lull
Low
Medium
High
Combat
<Initial> flag initial alert level, see <Alert> for all flags
<Minimal> flag minimal alert level, see <Alert> for all flags
<JobStarting> flag alert level when starting a job, see <Alert> for all flags
<Investigating> flag alert level when investigating, see <Alert> for all flags
<AlarmGroups> integer It's a bitset32 converted to int32. For any bit ("N") that is 1, the scripting command "ai2_tripalarm N" is called, alerting the AI with that scripting ID
<AlarmGroups>VAR</AlarmGroups>
VAR = 2^N1 + 2^N2 + 2^N3 etc.
<Pursuit> -
None
Forget
GoTo
Wait
Look
Move
Hunt
Glanc
<StrongUnseen> flag usually Look, see <Pursuit> for all flags
<WeakUnseen> flag usually Forget, see <Pursuit> for all flags
<StrongSeen> flag usually Look, see <Pursuit> for all flags
<WeakSeen> flag usually Look, see <Pursuit> for all flags
<Lost> flag usually ReturnToJob
ReturnToJob
KeepLooking
FindAlarm