XML:AISA: Difference between revisions
Paradox-01 (talk | contribs) m (Blanked the page) |
Paradox-01 (talk | contribs) ("page will not be moved if there is already a page at the new title, unless it is empty" - it is empty but still couldn't move; copying now by hand ...) |
||
Line 1: | Line 1: | ||
==XML== | |||
{{Template:XMLModdingHints}} | |||
{| style="margin-left:auto; margin-right:auto;" | |||
| The xml code on this page is based on onisplit '''v0.9.61.0''' | |||
|} | |||
'''general information''' | |||
* AISAlevel'''''N'''''_scripts.oni is level specific. (It can be found in edition/GameDataFolder/level'''''N'''''_... ) | |||
* AISA is still used for a few cutscene characters, even though [[OBD_talk:BINA/OBJC/CHAR#XML|BINACJBOCharacters]] has made it redundant. | |||
'''XML structure''' | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Oni> | |||
<AISA id="0"> | |||
<Characters> | |||
'''''[...]''''' | |||
</Characters> | |||
</AISA> | |||
</Oni> | |||
'''''[...]''''' means at least one character. Paste all character data into there (this includes '''<font color="#0A0"><AISACharacter></font>''' and '''<font color="#0A0"></AISACharacter></font>''' tag). | |||
'''example''' | |||
'''<font color="#0A0"><AISACharacter></font>''' | |||
<Name></Name> | |||
<ScriptId>1000</ScriptId> | |||
<FlagId>100</FlagId> | |||
<Flags></Flags> | |||
<Team>Konoko</Team> | |||
<Class>ONCCgriffin_generic</Class> | |||
<Scripts> | |||
<Spawn></Spawn> | |||
<Die></Die> | |||
<Combat></Combat> | |||
<Alarm></Alarm> | |||
<Hurt></Hurt> | |||
<Defeated></Defeated> | |||
<OutOfAmmo></OutOfAmmo> | |||
<NoPath></NoPath> | |||
</Scripts> | |||
<WeaponClass></WeaponClass> | |||
<Ammo>0</Ammo> | |||
'''<font color="#0A0"></AISACharacter></font>''' | |||
{| class="wikitable" width="100%" | |||
!width=150px| XML tag | |||
!width=120px| content type | |||
! description | |||
|- | |||
|valign=top| <?xml version="1.0" encoding="utf-8"?> | |||
|valign=top| string | |||
| There's no reason to change this. | |||
|- | |||
|valign=top| <Oni> | |||
|valign=top| - | |||
| | |||
|- | |||
|valign=top| <AISA id="0"> | |||
|valign=top| integer | |||
| instance id, don't change it | |||
|- | |||
|valign=top| <Characters> | |||
|valign=top| - | |||
| | |||
|- | |||
|valign=top| <AISACharacter> | |||
|valign=top| - | |||
| start tag of a character data | |||
|- | |||
|valign=top| <Name> | |||
|valign=top| char[32] | |||
| name of AISA character | |||
|- | |||
|valign=top| <ScriptId> | |||
|valign=top| integer | |||
| ID of the character, which you can spawn with the script command chr_create. | |||
;Player character | |||
If the Id is 0, the character is spawned as a player character, stealing controls (but not focus) from the current player. Focus is transferred as well if the old player is deleted ''immediately before'' the new one is created. | |||
;Automatic naming | |||
If the name field is left blank, the engine will generate an automatic name "ai_#", where # is the runtime ID of the character (first empty slot in memory at the time of the spawning). The ID is not zero-padded: "ai_0, "ai_1", ... | |||
|- | |||
|valign=top| <FlagId> | |||
|valign=top| integer | |||
| flag where character is spawned; must be a valid flag ID (from the BINACJBOFlag collection) | |||
In the level Atmospheric Conversion Center (exterior) Bungie used [[OBD_talk:FILM|FILM]] files to teleport AI Konoko and Griffin. | |||
;Missing [[OBD_talk:BINA/OBJC/FLAG|FLAG]] issue | |||
If the flag ID requested by chr_create is obsolete or otherwise unavailable, chr_create will fail with a message to the console. | |||
|- | |||
|valign=top| <Flags> | |||
|valign=top| flag | |||
| these flags can be also found via ''onisplit -help enums'' | |||
: AI | |||
: AutoFreeze | |||
: Neutral | |||
: TurnGuard | |||
|- | |||
|valign=top| <Team> | |||
|valign=top| flag | |||
| these flags can be also found via ''onisplit -help enums'' | |||
: Konoko | |||
: TCTF | |||
: Syndicate | |||
: Neutral | |||
: SecurityGuard | |||
: RogueKonoko | |||
: Switzerland | |||
: SyndicateAccessory | |||
|- | |||
|valign=top| <Class> | |||
|valign=top| link | |||
| must be a valid ONCC; replaced with first available ONCC if missing | |||
: ONCC''name'' (without file suffix .oni) | |||
;Missing [[OBD_talk:ONCC|ONCC]] issue | |||
Missing ONCCs are resolved by picking the first available ONCC. If the eventually used ONCC is invalid (e.g., if it has a missing TRAC or if its ONCV is missing from ONVL), Oni will crash. This applies to [[OBD_talk:BINA/OBJC/CHAR#XML|CHAR]] a.k.a. ai2_spawn, AISA a.k.a. chr_create, and ai2_chump (hardcoded to spawn ONCCstriker_easy_1). | |||
|- | |||
|valign=top| <Scripts> | |||
|valign=top| char[32] | |||
| BSL functions | |||
: <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) | |||
;Inventory and script events. | |||
Since nearly all the inventory fields are ignored, AISA characters can't be created with inventory items, and so the "out of ammo" script function is irrelevant. The inventory can still be set with scripting (items that the character can use, not what they drop when killed). The "no path" function doesn't seem to work, neither does it seem to work for [[OBD_talk:BINA/OBJC/CHAR#XML|CHAR]]. | |||
|- | |||
|valign=top| <WeaponClass> | |||
|valign=top| link | |||
| ONWC''name'' (without file suffix .oni) | |||
Original weapon classes: | |||
: ONWCw1_tap (TCTF pistol) | |||
: ONWCw2_sap (Syndicate uzi) | |||
: ONWCw3_phr (plasma rifle) | |||
: ONWCw4_psm (phase stream projector) | |||
: ONWCw5_sbg (super ball gun) | |||
: ONWCw6_vdg (shocker) | |||
: ONWCw7_scc (scram cannon (mini-rockets)) | |||
: ONWCw8_mbo (mercury bow) | |||
: ONWCw9_scr (screamer gun) | |||
: ONWCw10_sni (Mukade's firework) | |||
: ONWCw11_ba1 (Barabas' gun) | |||
: ONWCw12_ba2 (-) | |||
|- | |||
|valign=top| <Ammo> | |||
|valign=top| integer | |||
| percentage; 0 - empty, 100 - fully loaded ? | |||
|} |
Revision as of 12:36, 4 November 2012
XML
The xml code on this page is based on onisplit v0.9.61.0 |
general information
- AISAlevelN_scripts.oni is level specific. (It can be found in edition/GameDataFolder/levelN_... )
- AISA is still used for a few cutscene characters, even though BINACJBOCharacters has made it redundant.
XML structure
<?xml version="1.0" encoding="utf-8"?> <Oni> <AISA id="0"> <Characters> [...] </Characters> </AISA> </Oni>
[...] means at least one character. Paste all character data into there (this includes <AISACharacter> and </AISACharacter> tag).
example
<AISACharacter> <Name></Name> <ScriptId>1000</ScriptId> <FlagId>100</FlagId> <Flags></Flags> <Team>Konoko</Team> <Class>ONCCgriffin_generic</Class> <Scripts> <Spawn></Spawn> <Die></Die> <Combat></Combat> <Alarm></Alarm> <Hurt></Hurt> <Defeated></Defeated> <OutOfAmmo></OutOfAmmo> <NoPath></NoPath> </Scripts> <WeaponClass></WeaponClass> <Ammo>0</Ammo> </AISACharacter>
XML tag | content type | description |
---|---|---|
<?xml version="1.0" encoding="utf-8"?> | string | There's no reason to change this. |
<Oni> | - | |
<AISA id="0"> | integer | instance id, don't change it |
<Characters> | - | |
<AISACharacter> | - | start tag of a character data |
<Name> | char[32] | name of AISA character |
<ScriptId> | integer | ID of the character, which you can spawn with the script command chr_create.
If the Id is 0, the character is spawned as a player character, stealing controls (but not focus) from the current player. Focus is transferred as well if the old player is deleted immediately before the new one is created.
If the name field is left blank, the engine will generate an automatic name "ai_#", where # is the runtime ID of the character (first empty slot in memory at the time of the spawning). The ID is not zero-padded: "ai_0, "ai_1", ... |
<FlagId> | integer | flag where character is spawned; must be a valid flag ID (from the BINACJBOFlag collection)
In the level Atmospheric Conversion Center (exterior) Bungie used FILM files to teleport AI Konoko and Griffin.
If the flag ID requested by chr_create is obsolete or otherwise unavailable, chr_create will fail with a message to the console. |
<Flags> | flag | these flags can be also found via onisplit -help enums
|
<Team> | flag | these flags can be also found via onisplit -help enums
|
<Class> | link | must be a valid ONCC; replaced with first available ONCC if missing
Missing ONCCs are resolved by picking the first available ONCC. If the eventually used ONCC is invalid (e.g., if it has a missing TRAC or if its ONCV is missing from ONVL), Oni will crash. This applies to CHAR a.k.a. ai2_spawn, AISA a.k.a. chr_create, and ai2_chump (hardcoded to spawn ONCCstriker_easy_1). |
<Scripts> | char[32] | BSL functions
Since nearly all the inventory fields are ignored, AISA characters can't be created with inventory items, and so the "out of ammo" script function is irrelevant. The inventory can still be set with scripting (items that the character can use, not what they drop when killed). The "no path" function doesn't seem to work, neither does it seem to work for CHAR. |
<WeaponClass> | link | ONWCname (without file suffix .oni)
Original weapon classes:
|
<Ammo> | integer | percentage; 0 - empty, 100 - fully loaded ? |