Jump to content

OBD:ONCC: Difference between revisions

59 bytes added ,  8 October 2010
removing some BS that had been bugging me for a while ^_^
No edit summary
(removing some BS that had been bugging me for a while ^_^)
Line 335: Line 335:
|}
|}


 
{|align=right
|[[File:ONCC_body_size_factor-original.jpg|120px]]
|-
|[[File:ONCC_body_size_factor-spawn_order_change.jpg|120px]]
|}
;Body size factor
;Body size factor
The body size of a model will be scaled uniformly by a random coefficient that falls in the range defined with 0xC60 and 0xC64. This is apparently a provision for increasing the variety of appearances in classes like TCTF soldiers; unique characters like Konoko get a range of 1.0 to 1.0. The basis or seed for the randomness is apparently the time and/or order of spawning of that character, and therefore the "random" size of the character can be reproduced consistently as long as the execution of the code is the same each time. To illustrate, find the following code in IGMD/manplant/manplant_cutscene.bsl:
:The geometry specified in a character's [[TRBS]] (Totoro body set) can be multiplied by a scale factor. For example, the '''minime''' and '''behemoth''' [[cheats]] set that factor to 0.25 or 1.8, and back to 1. The size can be used for specific purposes (mini-Strikers, Mutant Muro, giant Shinatama), or it can be used to add generic variety to Oni's characters, as a complement to "character variants" ([[ONCV]]).
<gallery align="right">
:The floats at 0xC60 and 0xC64 define a range in which Oni can pick a random body size factor (if the two values are identical, then the body size factor is effectively fixed instead of random). [[Konoko]], [[Shinatama]] (both regular and zombified), [[Griffin]] (both variants) and [[Muro]] all have a fixed body size of 1. Mini-Strikers have 0.5 and giant Shinatama has 7 (yes, [[seven]]).
File:ONCC_body_size_factor-original.jpg|Sample 1
:Everybody else (including [[Barabas]], [[Mukade]] and [[Kerr]]) has a random body size within 5% of 1 (i.e., the floats at 0xC60 and 0xC64 are 0.95 and 1.05). Mutant Muro is a bit odd because his "minimum" body size 1.75 and the "maximum" is 1.74 (the difference is barely noticeable anyway). In the [[Anniversary Edition]], some characters have altered factors (e.g., [[Shinatama Too]]).
File:ONCC_body_size_factor-spawn_order_change.jpg|Sample 2
:The random value is different every time the [[ONCC]] is looked up (e.g., when a character is spawned or shapeshifted) and is not reproducible. Here is a simple script for {{C|6}} a.k.a. [[IGMD/tctf]] (remove all [[BSL]] files and leave only the one below):
File:ONCC_body_size_factor-sleep_insertion.jpg|Sample 3
func main {
</gallery>
  ai2_allpassive 1
<tt>#Outside shot of cops walking in
  ai2_spawn a_v3
 
  ai2_spawn Lv_40
ai2_spawn Recep
  ai2_spawn lobby_victim05
 
  chr_location 1 -1255 -1.5 50
ai2_spawn partner_cop_1
  chr_location 2 -1255 -1.5 60
 
  chr_location 3 -1255 -1.5 70
ai2_spawn partner_cop_2</tt>
  chr_location 4 -1255 -1.5 80
 
  ai2_lookatme
When you play the opening cutscene for Chapter 2, Agent Thorson should appear as he does in the first pic in the table to the right. Change the code to:
}
 
<tt>#Outside shot of cops walking in
 
ai2_spawn partner_cop_1
 
ai2_spawn partner_cop_2
 
ai2_spawn Recep</tt>
 
and he'll appear as in the middle pic. Look out, he's a giant! Even the receptionist is bigger! Change the code to:
 
<tt>#Outside shot of cops walking in
 
ai2_spawn Recep
 
sleep 15
 
ai2_spawn partner_cop_1
 
ai2_spawn partner_cop_2</tt>


and you'll also get a deluxe-sized Thorson (right pic), though not as big as before. In complex scripts, body size quickly becomes truly random-seeming, but as you can see, in situations where the spawn function is called near the beginning of the code, before there is an opportunity for too much forking and branching, the results are quite reproducible.


;TRSC bitset
;TRSC bitset
:determines whether character is left-hander or right-hander (weapon is attached to left or right fist bone) Must be consistent with TRSC or glitches appear. Possibilities are:
:determines whether character is left-hander or right-hander (weapon is attached to left or right fist bone) Must be consistent with [[TRSC]] or glitches appear. Possibilities are:
:NONE - Character is right-hander with both pistols and rifles
:NONE - Character is right-hander with both pistols and rifles
:0x01 - Character is left-hander with both pistols and rifles
:0x01 - Character is left-hander with both pistols and rifles