OBD talk:BINA/OBJC/CHAR: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 188: Line 188:




{{Table}}
{| class="wikitable" width="100%"
!XML tag
!width=200px| XML tag
!description
!width=200px| content type
!value type / flags plus description
! description
|-
|-
|<?xml version="1.0" encoding="utf-8"?>
|valign=top| <?xml version="1.0" encoding="utf-8"?>
|
|valign=top| string
|
| There's no reason to change this.
|-
|-
|valign=top|<Oni>
|valign=top| <Oni>
|In old versions <Oni Version="..."><br>(If onisplit.exe was newer than the extracted file then the file couldn't be converted back to *.oni)
|valign=top| -
|
|
|-
|-
|valign=top|<Objects>
|valign=top| <Objects>
|
|valign=top| -
|
|
|-
|-
|valign=top|<CHAR Id="3860">
|valign=top| <CHAR Id="3860">
|Id doesn't matter.
|valign=top| integer
|
| Id doesn't matter.
|-
|-
|<Header>
| <Header>
|
|valign=top| -
|
|
|-
|-
|<Flags>
|valign=top| <Flags>
|unknown; usually empty
|valign=top| -
|
| unknown; usually empty
|-
|-
|<Position>
|valign=top| <Position>
|character is spawned at this xyz-position
|valign=top| float x3
|
| character is spawned at this xyz-position
|-
|-
|<Rotation>
|valign=top| <Rotation>
|character is spawned with this rotation
|valign=top| float x3
|
| character is spawned with this rotation
|-
|-
|<OSD>
|valign=top| <OSD>
|
|valign=top| -
|
|
|-
|-
|valign=top|<Flags>
|valign=top| <Flags>
|valign=top|determines some special properties
|valign=top| flag
|
| determines some special properties
: IsPlayer (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 (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)
: RandomCostume (flag belongs to [[OBD_talk:ONCV|ONCV]])
: RandomCostume (flag belongs to [[OBD_talk:ONCV|ONCV]])
Line 246: Line 246:
: NoAutoDrop (doesn't drop "used" shield, "used" invisibility and LSI when killed)
: NoAutoDrop (doesn't drop "used" shield, "used" invisibility and LSI when killed)
|-
|-
|valign=top|<Class>
|valign=top| <Class>
|valign=top|ONCC name without file pre- and suffix. Interesting for BSL command "chr_set_class"
|valign=top| link
|weapon class (without ONWC and oni), original weapon classes:
| ONCC name without file pre- and suffix. Character can change appearance with "chr_set_class".
:w1_tap
:w2_sap
:w3_phr
:w4_psm
:w5_sbg
:w6_vdg
:w7_scc
:w8_mbo
:w9_scr
:w10_sni
:w11_ba1
:w12_ba2
|-
|-
|<Name>
|valign=top| <Name>
|used by various BSL commands
|valign=top| string
|
| used by BSL commands
|-
|-
|valign=top|<Weapon>
|valign=top| <Weapon>
|character is spawned with weapon specified in here; weapon looked up by name (makes also custom weapons available)
|valign=top| link
| Character is spawned with weapon specified in here. The weapon becomes looked up by its file name.
 
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 (shocker)
: w7_scc (scram cannon (mini-rockets))
: w8_mbo (mercury bow)
: w9_scr (mini-rockets)
: w10_sni (Mukade's firework)
: w11_ba1 (Barabas' gun)
: w12_ba2 (-)
|
|
|-
|-
|valign=top|<Scripts>
|valign=top| <Scripts>
|valign=top|independent from BSL main function
|valign=top| string
|
| BSL function
: <Spawn> (called when character is spawned)
: <Spawn> (called when character is spawned)
: <Die> (called when character dies (health reaches 0); can work multiple times)
: <Die> (called when character dies (health reaches 0); can work multiple times)
Line 282: Line 285:
: <font style="color:#777"><NoPath> (should be called when a character has trouble pathfinding, but isn't</font>)
: <font style="color:#777"><NoPath> (should be called when a character has trouble pathfinding, but isn't</font>)
|-
|-
|valign=top|<AdditionalHealth>
|valign=top| <AdditionalHealth>
|''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)
|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)
|-
|-
|<Job>
|valign=top| <Job>
|
|valign=top| -
|
|
|-
|-
|valign=top|<Type>
|valign=top| <Type>
|
|valign=top| flag
|
|
: None
: None
Line 304: Line 307:
: Panic (not tested)
: Panic (not tested)
|-
|-
|valign=top|[[OBD_talk:BINA/OBJC/PATR|<PatrolPathId>]]
|valign=top| [[OBD_talk:BINA/OBJC/PATR|<PatrolPathId>]]
|
|valign=top| integer
|
|
|-
|-
|valign=top|<Behaviors>
|valign=top| <Behaviors>
|specified by IDs linking to melee, combat and neutral profile collection file
|valign=top| -
|
| specified by IDs linking to melee, combat and neutral profile collection file
|-
|-
|valign=top|[[OBD_talk:BINA/OBJC/CMBT|<CombatId>]]
|valign=top| [[OBD_talk:BINA/OBJC/CMBT|<CombatId>]]
|
|valign=top| flag
|
|
: 0 (Stand_and_Fire)
: 0 (Stand_and_Fire)
Line 336: Line 339:
: 17 (Average_striker; new profile for AE)
: 17 (Average_striker; new profile for AE)
|-
|-
|<MeleeId>
|valign=top| <MeleeId>
|[[OBD:BINA/OBJC/MELE#All_profiles_sorted_by_ID|here are all melee IDs sorted by ID]]
|valign=top| flag
|
| [[OBD:BINA/OBJC/MELE#All_profiles_sorted_by_ID|here are all melee IDs sorted by ID]]
|-
|-
|<NeutralId>
|valign=top| <NeutralId>
|valign=top| flag
|[[OBD:BINA/OBJC/NEUT|...]] (no overview so far)
|[[OBD:BINA/OBJC/NEUT|...]] (no overview so far)
|
|-
|-
|<Inventory>
|valign=top| <Inventory>
|
|valign=top| -
|
|
|-
|-
|valign=top|<Ammo>
|valign=top| <Ammo>
|valign=top| integer
|
|
|
: <Use> (Player becomes spawned with ammo clips, here you set the amount.)
:<Use> (characters can uses such items by given amount; AI cannot use hypos)
: <Drop> (AI drop these items when defeated.)
:<Drop> (AI characters drops such items when defeated)
|-
|-
|valign=top|<EnergyCell>
|valign=top| <EnergyCell>
|valign=top| integer
|
|
|
: <Use>
:<Use>
: <Drop>
:<Drop>
|-
|-
|valign=top|<Hypo>
|valign=top| <Hypo>
|
|valign=top| integer
|
|  
:<Use>
: <Use>
:<Drop>
: <Drop> (AI cannot use hypos.)
|-
|-
|valign=top|<Shield>
|valign=top| <Shield>
|valign=top| integer
|
|
|
: <Use>
:<Use>
: <Drop>
:<Drop>
|-
|-
|valign=top|<Invisibility>
|valign=top| <Invisibility>
|valign=top| integer
|
|
|
: <Use>
:<Use>
: <Drop>
:<Drop>
|-
|-
|valign=top|<Team>
|valign=top| <Team>
|
|valign=top| flag
|
|
: Konoko
: Konoko
Line 390: Line 393:
: SyndicateAccessory
: SyndicateAccessory
|-
|-
|valign=top|<AmmoPercentage>
|valign=top| <AmmoPercentage>
|ammo in weapon, percent value: 0 - 100, ''overload'' not tested
|valign=top| integer
|
| ammo in weapon, percent value: 0 - 100, ''overload'' not tested
|-
|-
|valign=top|<Alert>
|valign=top| <Alert>
|[[CHAR#Less_basic_setup_-_Inventory.2C_team.2C_jobs.2C_alert.2Fpursuit|HERE]] are information about "Alert" and "Pursuit".
|valign=top| -
|flags:
| [[CHAR#Less_basic_setup_-_Inventory.2C_team.2C_jobs.2C_alert.2Fpursuit|HERE]] are information about "Alert" and "Pursuit".
:Lull
: Lull
:Low
: Low
:Medium
: Medium
:High
: High
:Combat
: Combat
|-
|-
|valign=top|<Initial>
|valign=top| <Initial>
|valign=top|initial alert level
|valign=top| flag
|
| initial alert level, see <Alert> for all flags
|-
|-
|valign=top|<Minimal>
|valign=top| <Minimal>
|valign=top|minimal alert level
|valign=top| flag
|
| minimal alert level, see <Alert> for all flags
|-
|-
|valign=top|<JobStarting>
|valign=top| <JobStarting>
|valign=top|alert level when starting a job
|valign=top| flag
|
| alert level when starting a job, see <Alert> for all flags
|-
|-
|valign=top|<Investigating>
|valign=top| <Investigating>
|valign=top|alert level when investigating
|valign=top| flag
|
| alert level when investigating, see <Alert> for all flags
|-
|-
|valign=top|<AlarmGroups>
|valign=top| <AlarmGroups>
|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. If Ns bit = TRUE then a bot gets highest alert level by a console command ai2_tripalarm(N)
|
: <AlarmGroups>VAR</AlarmGroups>
: <AlarmGroups>VAR</AlarmGroups>
: VAR = 2^N1 + 2^N2 + 2^N3 etc.
:: VAR = 2^N1 + 2^N2 + 2^N3 etc.
|-
|-
|valign=top|<Pursuit>
|valign=top| <Pursuit>
|valign=top| -
|
|
|flags:
: None
: None
: Forget
: Forget
Line 437: Line 440:
: Glanc
: Glanc
|-
|-
|valign=top|<nowiki><StrongUnseen></nowiki>
|valign=top| <nowiki><StrongUnseen></nowiki>
|usually ''Look''
|valign=top| flag
|
| usually ''Look'', see <Pursuit> for all flags
|-
|-
|valign=top|<WeakUnseen>
|valign=top| <WeakUnseen>
|usually ''Forget''
|valign=top| flag
|
| usually ''Forget'', see <Pursuit> for all flags
|-
|-
|valign=top|<StrongSeen>
|valign=top| <StrongSeen>
|usually ''Look''
|valign=top| flag
|
| usually ''Look'', see <Pursuit> for all flags
|-
|-
|valign=top|<WeakSeen>
|valign=top| <WeakSeen>
|usually ''Look''
|valign=top| flag
|
| usually ''Look'', see <Pursuit> for all flags
|-
|-
|valign=top|<Lost>
|valign=top| <Lost>
|valign=top|usually ''ReturnToJob''
|valign=top| flag
|flags:
| usually ''ReturnToJob''
: ReturnToJob
: ReturnToJob
: KeepLooking
: KeepLooking
: FindAlarm
: FindAlarm
|}
|}

Revision as of 19:06, 31 October 2012

Talk

Ok, I'm going to ask a few dumb questions

  • How are these teams treated: SecurityGuard, Switzerland, Who are there friends and enemies?
  • How is SyndicateAccessory different from Syndicate?
  • Is it possible to add BGI as another team?
  • Can the properties of a team be changed? ie: defining its friends and enemies

EdT 23:55, 30 August 2008 (CEST)

From what I remember, from testing with KvW:

Team 1: SecurityGaurd+TCTF+Konoko

Team 2: Syndicate+SyndicateAccessory

Team 3: RougeKonoko

Others: Neutral, Swiss

All 3 teams will fight against any other teams. I'm not sure on the "Others", you will have to test them out. As long as you don't have TCTF vs Syndicate vs Konoko vs BGI (4 way battling!), you should be fine. Even then, you may be able to get the Neutral or Swiss team to fight against the other 3, but I guaruntee nothing. I don't know any way to add or change teams, short of engine hacking.

Gumby 04:52, 31 August 2008 (CEST)

Here's the pseudocode of the function that decides who is friend/enemey. Friend/Foe have the obvious meaning and PotentialFoe means that the AI will act as a foe only if it is attacked.

 FriendOrFoe AI2rTeam_FriendOrFoe(Team t1, Team t2)
   if (LastManStanding)
       return Foe;
   else if (t1 = t2) or (t1 = Switzerland) or (t2 = Switzerland)
       return Friend;
   else if (t1 = Konoko)
       if (t2 = TCTF)
           return Friend;
       else if (t1 = Syndicate)
           return Foe;
       else
           return PotentialFoe;
   else if (t1 = TCTF)
       if (t2 = Konoko)
           return Friend;
       else if (t2 = Syndicate) or (t2 = RogueKonoko)
           return Foe;
       else
           return PotentialFoe;
   else if (t1 = Syndicate)
       if (t2 = SyndicateAccessory)
           return Friend;
       else
           return Foe;
   else if (t1 = Neutral)
       return PotentialFoe;
   else if (t1 = SecurityGuard)
       if (t2 = Syndicate) or (t2 = RogueKonoko)
           return Foe;
       else 
           return PotentialFoe;
   else if (t1 = RogueKonoko)
       if (t2 = Syndicate) or (t2 = TCTF)
           return Foe;
       else
           return PotentialFoe;
   else if (t1 = SyndicateAccessory)
       if (t2 = Syndicate)
           return Friend;
       else
           return PotentialFoe;

Neo

So, the difference between Switzerland and Neutral is that Switzerland will not attack you even if you attack them, but Neutral will retaliate. --Iritscen 15:08, 31 August 2008 (CEST)

O_o I guess the SecurityGaurds aren't neccessarily aligned with anyone...interesting.

Gumby 16:39, 31 August 2008 (CEST)

So which team should BGI be assigned? EdT

RougeKonoko or Neutral in the beginning, depending on how you want the interactions to be, but for the later levels, I'm not quite sure. It depends on who is in the level and the situation. Maybe SecurityGuard. (Actually, that would probably work)

Gumby 18:39, 31 August 2008 (CEST)



XML

Template:XMLModdingHints

The xml code on this page is based on onisplit v0.9.61.0


general information

  • BINACJBOCharacter.oni is level specific. (It can be found in edition/GameDataFolder/levelXX_... )
  • An alternative is AISA.
  • All original characters can be seen HERE. (The lists include used ONCC, character's BSL name, health, team and BSL function.)


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"?> string There's no reason to change this.
<Oni> -
<Objects> -
<CHAR Id="3860"> integer Id doesn't matter.
<Header> -
<Flags> - unknown; usually empty
<Position> float x3 character is spawned at this xyz-position
<Rotation> float x3 character is spawned with this rotation
<OSD> -
<Flags> flag determines some special properties
IsPlayer (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)
RandomCostume (flag belongs to ONCV)
NotInitiallyPresent
NonCombatant
CanSpawnMultiple (needs WasSpawned)
WasSpwaned (...)
Unkillable (character won't loss more life points if it reaches 1, same as BSL command "chr_unkillable")
InfiniteAmmo (Raiden: "You got enough ?" Snake points to his head. "Infinite ammo...")
Omniscient (?; tested ideas: doesn't unlock moves for player)
HasLSI (this character drops an level specific item like truck keys in level 19)
Boss (used for boss mode fights. makes the AI ignore this character unless there is nobody else around)
UpgradeDifficulty (spawns a stronger enemy if you play on medium or hard)
NoAutoDrop (doesn't drop "used" shield, "used" invisibility and LSI when killed)
<Class> link ONCC name without file pre- and suffix. Character can change appearance with "chr_set_class".
<Name> string used by BSL commands
<Weapon> link Character is spawned with weapon specified in here. The weapon becomes looked up by its file name.

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 (shocker)
w7_scc (scram cannon (mini-rockets))
w8_mbo (mercury bow)
w9_scr (mini-rockets)
w10_sni (Mukade's firework)
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 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)
<Job> -
<Type> flag
None
Idle
Guard (never used in Oni)
Patrol
Teambattle (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 becomes spawned with ammo clips, here you set the amount.)
<Drop> (AI drop these items when defeated.)
<EnergyCell> integer
<Use>
<Drop>
<Hypo> integer
<Use>
<Drop> (AI cannot use hypos.)
<Shield> integer
<Use>
<Drop>
<Invisibility> integer
<Use>
<Drop>
<Team> flag
Konoko
TCTF
Syndicate
Neutral
SecurityGuard
RogueKonoko
Switzlerland (is melee-immune)
SyndicateAccessory
<AmmoPercentage> integer ammo in weapon, percent value: 0 - 100, overload not tested
<Alert> - HERE are information about "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. If Ns bit = TRUE then a bot gets highest alert level by a console command ai2_tripalarm(N)
<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