Jump to content

OBD:AISA: Difference between revisions

1,304 bytes added ,  27 July 2020
filling in some facts about missing ONCCs and ONWCs
mNo edit summary
(filling in some facts about missing ONCCs and ONWCs)
Line 44: Line 44:
:If the flag ID requested by [[chr_create]] is obsolete or otherwise unavailable, chr_create will fail with a message to the console.
: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 [[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 [[CHAR]] a.k.a. [[ai2_spawn]], [[AISA]] a.k.a. [[chr_create]], and [[ai2_chump]] (hardcoded to spawn ONCCstriker_easy_1).
: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: "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 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 wehre Barabas kidnaps Shinatama) have a link to ONWCp_rifle; eleven more AISA characters (not used in Vanilla scripts) have links to ONWCautopistol, ONWCsmg, ONWCp_rifle and ONWCp_stream. The engine resolves such bad links by not giving any weapon to the character.
;Inventory and script events.
;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]].
: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]].