OBD:AISA: Difference between revisions

m
...
No edit summary
m (...)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{OBD_File_Header | type=ASIA | prev=AGQR | next=AITR | name=AI Character Setup Array | family=Level | align=center}}
{{OBD_File_Header | type=AISA | prev=AGQR | next=AITR | name=AI Character Setup Array | family=Level | onistuff=aisa | align=center}}
:
 
{{OBD_File_Image | image=aisa_a.gif}}
 
:
[[image:aisa_a.gif]]
 
 
{{Table}}
{{Table}}
{{OBD_Table_Header}}
{{OBDth}}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x000 | res_id  |FF0000| 01 9C 02 00 | 668 | 00668-level3_scripts.AISA }}
| 0x000 || file id || BGCOLOR="#FF0000" | 01 9C 02 00 || 668 || ALIGN=LEFT | 00668-level3_scripts.AISA
{{OBDtr | 0x004 | lev_id  |FFFF00| 01 00 00 06 | 3   | level 3 }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x008 | char[22] |00FF00|       | dead | padding }}
| 0x004 || level id || BGCOLOR="#FFFF00" | 01 00 00 06 || 3 || ALIGN=LEFT | level 3
{{OBDtr | 0x01E | uint16    |00FFFF| 0D 00       | 13   | array size }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtrBK}}
| 0x008 || unused (22) || BGCOLOR="#00FF00" |   || dead || ALIGN=LEFT | not used; you can set all to whatever you want
{{OBDtr2| 0x000 | char[32] |FFC8C8| unused            | name of AISA character }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x020 | uint16    |FFFFC8| 00 00       | 0   | ID of the character, which you can spawn with the script command [[chr_create]] }}
| 0x01E || short || BGCOLOR="#00FFFF" | 0D 00 || 13 || ALIGN=LEFT | 13 packages follow (one package is edged in black)
{{OBDtr | 0x022 | int16    |C8FFC8| 00 00       | 0   | flag where character is spawned; must be a valid flag ID (from the [[OBD:BINA/OBJC/FLAG|BINACJBOFlag]] collection) }}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
{{OBDtr | 0x024 | uint16    |C8FFFF| 00 00       | 0   | flags; ignored }}
| COLSPAN=5 | <FONT SIZE=2 COLOR="#FFFFFF">Below follows the first package.</FONT>
{{OBDtr | 0x026 | uint16    |FFC8FF| 00 00       | 0   | team ID (see [[CHAR]] for possible values) }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x028 | link     |FFC800| 01 DF 03 00 | 991 | link to [[OBD:ONCC|00991-ONCCkonoko_generic]]; must be a valid ONCC; replaced with first available ONCC if missing }}
| 0x000 || string (32) || BGCOLOR="#FFC8C8" COLSPAN=2 | not used || ALIGN=LEFT | unknown; always zero; maybe space for notes
{{OBDtr2| 0x02C | char[32] |C87C64| unused            | variable, which is affected on game events; ignored  }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x04C | uint32    |C800C8| 00 00 00 00 | 0   | script flags; ignored  }}
| 0x020 || short || BGCOLOR="#FFFFC8" | 00 00 || 0 || ALIGN=LEFT | ID of the character, which you can spawn with the script command "chr_create"
{{OBDtr2| 0x050 | char[32] |B0C3D4| intro             | script event called when character is created; see [[CHAR]] }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr2| 0x070 | char[32] |E7CEA5| unused            | script event called when the character dies; see [[CHAR]]... }}
| 0x022 || short || BGCOLOR="#C8FFC8" | 00 00 || 0 || ALIGN=LEFT | flag ID, where Oni spawns the character (works only, if the flag exits; look to [[OBD:Flag.BINA | Flag.BINA]] for a flag list)<BR>(Thanks to geyser who figured that out.)
{{OBDtr2| 0x090 | char[32] |FFDDDD| unused            | script event called when the character first notices an enemy }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr2| 0x0B0 | char[32] |64AAAA| unused            | script event called when the character is alarmed (group event)}}
| 0x024 || short || BGCOLOR="#C8FFFF" | 00 00 || 0 || ALIGN=LEFT | unknown
{{OBDtr2| 0x0D0 | char[32] |EBEBEB| unused            | script event called when the character is hurt for the first time }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr2| 0x0F0 | char[32] |8C8CCC| unused            | script event called when the health of the character reaches 1 for the first time }}
| 0x026 || short || BGCOLOR="#FFC8FF" | 00 00 || 0 || ALIGN=LEFT | unknown
{{OBDtr2| 0x110 | char[32] |FF00C8| unused            | script event called when the character uses up its initial ammo clips or cells }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr2| 0x130 | char[32] |F0F096| unused            | script event supposed to be called when the character can't pathfind }}
| 0x028 || dat link || BGCOLOR="#FFC800" | 01&nbsp;DF&nbsp;03&nbsp;00 || 991 || ALIGN=LEFT | link to 00991-konoko_generic.[[OBD:ONCC | ONCC]]
{{OBDtr | 0x150 | link     |00C864| 00 00 00 00 |unused| link to an [[OBD:ONWC|ONWC]] file }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x154 | uint16    |00C8FF| 00 00       | 0   | weapon ammo (in %?) }}
| 0x02C || long || BGCOLOR="#C800C8" | 00 00 00 00 || 0 || ALIGN=LEFT | unknown; always zero
{{OBDtr | 0x156 | uint16    |C80040| FF FF       | -1   | number of ammo(?) to drop; ignored  }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x158 | uint16    |FFCD96| 00 00      | 0    | number of clips to drop; ignored  }}
| 0x030 || string (32) || BGCOLOR="#C87C64" COLSPAN=2 | not used || ALIGN=LEFT | unknown; never used in Oni
{{OBDtr | 0x15A | uint16    |FFCD96| 00 00       | 0    | number of hypos to drop; ignored  }}
|- ALIGN=CENTER VALIGN=TOP
{{OBDtr | 0x15C | uint16    |C8C864| 00 00      | 0    | number of cells to drop; ignored  }}
| 0x050 || string (32) || BGCOLOR="#B0C3D4" COLSPAN=2 | <TT>intro</TT> || ALIGN=LEFT | name of the function, which is called up when Oni spawns the character
{{OBDtr | 0x15E | char[2] |C8C864| 00 00         | 0   | padding }}
|- ALIGN=CENTER VALIGN=TOP
| 0x070 || string (32) || BGCOLOR="#E7CEA5" COLSPAN=2 | not used || ALIGN=LEFT | name of the function, which is called up when the character dies
|- ALIGN=CENTER VALIGN=TOP
| 0x090 || string (32) || BGCOLOR="#FFDDDD" COLSPAN=2 | not used || ALIGN=LEFT | name of the function, which is called up when the character notices the player<BR>(Thanks to Loser who figured that out.)
|- ALIGN=CENTER VALIGN=TOP
| 0x0B0 || string (32) || BGCOLOR="#64AAAA" COLSPAN=2 | not used || ALIGN=LEFT | unknown; never used in Oni
|- ALIGN=CENTER VALIGN=TOP
| 0x0D0 || string (32) || BGCOLOR="#EBEBEB" COLSPAN=2 | not used || ALIGN=LEFT | name of the function, which is called up when someone hits the character the first time
|- ALIGN=CENTER VALIGN=TOP
| 0x0F0 || string (32) || BGCOLOR="#8C8CCC" COLSPAN=2 | not used || ALIGN=LEFT | name of the function, which is called up when the health of the character is equal 1
|- ALIGN=CENTER VALIGN=TOP
| 0x110 || string (32) || BGCOLOR="#FF00C8" COLSPAN=2 | not used || ALIGN=LEFT | name of the function, which is called up when the character reloads its weapon with its last ammo/cell; works only, if the character has some ammo/cells when Oni spawns it<BR>(Thanks to Loser who figured that out.)
|- ALIGN=CENTER VALIGN=TOP
| 0x130 || string (32) || BGCOLOR="#F0F096" COLSPAN=2 | not used || ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP
| 0x150 || dat link || BGCOLOR="#00C864" | 00 00 00 00 || not used || ALIGN=LEFT | link to an [[OBD:ONWC | ONWC]] file
|- ALIGN=CENTER VALIGN=TOP
| 0x154 || short || BGCOLOR="#00C8FF" | 00 00 || 0 || ALIGN=LEFT | unknown
|- ALIGN=CENTER VALIGN=TOP
| 0x156 || short || BGCOLOR="#C80040" | FF FF || -1 || ALIGN=LEFT | unknown; always the same
|- ALIGN=CENTER VALIGN=TOP
| 0x158 || long || BGCOLOR="#FFCD96" | 00 00 00 00 || 0 || ALIGN=LEFT | unknown; always zero
|- ALIGN=CENTER VALIGN=TOP
| 0x15C || long || BGCOLOR="#C8C864" | 00 00 00 00 || 0 || ALIGN=LEFT | unknown; always zero
|}
|}
:
;Player character
----
:If the index 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
{{OBD_File_Footer | type=ASIA | prev=AGQR | next=AITR | name=AI Character Setup Array}}
: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", ...
:
;Missing [[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.
;Missing [[ONCC]] issue
:Missing ONCCs are resolved by picking the first available ONCC (in ASCII order, i.e., '''SH_generic''' comes before '''barabus'''). In Vanilla Oni this only happens once (for AISA): "lab" scripts use <tt>chr_create 1004</tt> in the bomber cutscene (for the cop who talks to Konoko on the radio): the missing ONCC TCL_2 is luckily resolved as the close-enough TCTF_lite_1. In the [[Anniversary Edition]], the custom ONCC Cop_generic was added to take care of this situation (both to prevent the Vanilla "lab" logic from resolving to '''CopfemA1''' and to give some screen time to TRBSTCL_2, which is present in Vanilla Oni, but somehow doesn't have a matching 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; in Vanilla Oni there are three levels where ai2_chump's ONCC is resolved due to a missing striker_easy_1: to CopfemA1 in '''state''' and '''tctf_II''', and to TCTF_swat_blackops_1 in '''compound'''; in '''neuro''' the full set of Strikers is available, as well as comguys, the mad bomber, and Muro).
;Missing [[ONWC]] issue
:Some of the vanilla AISA entries contain a link to an invalid (obsolete) ONWC: two Strikers in '''tctf''' (in the cutscene where Barabas kidnaps Shinatama) have a link to ONWCp_rifle; there are eleven more AISA characters (not used in Vanilla scripts) who have links to ONWCautopistol, ONWCsmg, ONWCp_rifle and ONWCp_stream. The engine resolves such bad links by not giving any weapon to the character. (There are no valid ONWC links in Vanilla AISA, but providing a valid link in a modified AISA shows that the weapon field is interpreted by the engine, unlike other inventory fields which are ignored.)
;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 [[CHAR]].
 
 
{{OBD_File_Footer | type=AISA | prev=AGQR | next=AITR | name=AI Character Setup Array | family=Level}}
 
{{OBD}}
279

edits