19,584
edits
m (okay, s10k, happy? ;-)) |
(noted that wp_hypostrength definitely doesn't do anything) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
To learn how to declare and use variables, read the BSL manual's [[BSL:Manual#Variables|Variables]] section. This page documents Oni's built-in (or "native") scripting variables. The other half of the available scripting commands are in [[BSL:Functions]]. | |||
The | |||
==Legend== | |||
;Color | ;Color | ||
:White: available | :White: available in all versions | ||
:Blue: command only exists in Mac Intel build | :Blue: command only exists in Mac Intel build | ||
:Green: command only exists in Windows build | :Green: command only exists in Windows build | ||
;Default value | ;Default value | ||
:'''# !!!''': reset | :'''[#] !!!''': reset to this number on level-load | ||
:'''! | :'''$ !!!''': set based on [[persist.dat]] at game/level-load | ||
;Works | ;Works | ||
:"OK": both platforms can use this command | :"OK": both platforms can use this command | ||
Line 57: | Line 18: | ||
:"NO": command is proven not to work | :"NO": command is proven not to work | ||
==Built-in variables== | |||
{|border=1 cellspacing=0 cellpadding=2 | {|border=1 cellspacing=0 cellpadding=2 | ||
!Type!!Name!!Default value!!Comment!!Works | !Type!!Name!!Default value!!Comment!!Works | ||
Line 133: | Line 95: | ||
|- | |- | ||
|bool||[[ai2_showlinetochar]]||0 | |bool||[[ai2_showlinetochar]]||0 | ||
|"draws a line from the player to every AI"||OK | |"draws a line from the player to every AI"<br>(to be precise, it draws a line from the player to every spawned AI character, be it via [[ai2_spawn]] or via [[chr_create]]) | ||
<ul> | |||
<li><span style="color: Green">green</span> line: AI character is active and drawn</li> | |||
<li><span style="color: Blue">blue</span> line: AI character is active, but not drawn</li> | |||
<li><span style="color: Red">red</span> line: AI character is inactive</li> | |||
</ul> | |||
Related BSL functions: [[chr_draw_all_characters]], [[chr_lock_active]], [[chr_unlock_active]]<br> | |||
Related BSL variables: [[chr_all_active]] | |||
||OK | |||
|- | |- | ||
|bool||[[ai2_showlocalmelee]]||0 | |bool||[[ai2_showlocalmelee]]||0 | ||
Line 183: | Line 153: | ||
|"makes the laser pointer hit all objects"<br>(determines whether the gun's aiming laser stops at quads marked with non-object-collision)||bgcolor=#ccccff|OK-M | |"makes the laser pointer hit all objects"<br>(determines whether the gun's aiming laser stops at quads marked with non-object-collision)||bgcolor=#ccccff|OK-M | ||
|- | |- | ||
|bool||[[am_invert]]||'''! | |bool||[[am_invert]]||'''$ !!!''' | ||
|"inverts aiming" This is set from [[persist.dat]] at game load (in the absence of '''persist.dat''' the default is 0). | |"inverts aiming" This is set from [[persist.dat]] at game load (in the absence of '''persist.dat''' the default is 0). | ||
:The value 0 means normal aiming (mouse up to look up). The value 1 means inverted aiming (mouse down to look up). | :The value 0 means normal aiming (mouse up to look up). The value 1 means inverted aiming (mouse down to look up). Unlike the backwards "Invert Mouse" checkbox on the Options screen (fixed in the [[AE]]), this variable does not work the opposite of how you would expect. | ||
|OK | |OK | ||
|- | |- | ||
|bool||[[am_show_axes]]||0 | |bool||[[am_show_axes]]||0 | ||
|"shows world axes" | |"shows world axes" | ||
:This attaches a giant 3D axis to Konoko which claims to show the direction of positive x, y, and z in the world coordinate system, however it is '''wrong'''. Oni uses a Y-up coordinate system; do not let the | :This attaches a giant 3D axis to Konoko which claims to show the direction of positive x, y, and z in the world coordinate system, however it is '''wrong'''. Oni uses a ''Y-up coordinate system''; do not let the world axis model showing Z-up mislead you. | ||
|bgcolor=#ccccff|OK-M | |bgcolor=#ccccff|OK-M | ||
|- | |- | ||
Line 251: | Line 221: | ||
|- | |- | ||
|bool||[[chr_debug_characters]]||0 | |bool||[[chr_debug_characters]]||0 | ||
|"enables debugging information for characters"||OK | |"enables debugging information for characters"<br>(shows currently playing animation)||OK | ||
|- | |- | ||
|bool||[[chr_debug_collision]]||0 | |bool||[[chr_debug_collision]]||0 | ||
Line 311: | Line 281: | ||
|- | |- | ||
|bool||[[chr_mini_me]]||0 | |bool||[[chr_mini_me]]||0 | ||
|"decreases the size of the main character"<br>(custom size | |"decreases the size of the main character"<br>(Actually, this command allows the character to be made smaller <u>or</u> larger. The custom size is set by '''chr_mini_me_amount''' below.)||OK | ||
|- | |- | ||
|float||[[chr_mini_me_amount]]||0.5 | |float||[[chr_mini_me_amount]]||0.5 | ||
|"controls the size of the main character"<br>(effective only if '''chr_mini_me''' is enabled)<br>'' | |"controls the size of the main character"<br>(effective only if '''chr_mini_me''' is enabled)<br>''"1" represents "100% of normal size", so numbers between 0 and 1 scale the character down, and numbers above one scale the character up. If you supply "0", the character becomes invisible. If "-1", the character walks on the underside of the floor. With a very low number like -1000, the character will still walk below the floor but will be enormous (they will not be visible, however, as long as the camera remains above the floor); they will also lose collision with other characters, and sounds made by the character will not be heard.''||OK | ||
|- | |- | ||
|bool||[[chr_pin_character]]||0 | |bool||[[chr_pin_character]]||0 | ||
Line 472: | Line 442: | ||
|"specifies the distance from the camera that flag names no longer draw"<br>(probably needs show_flags)||?? | |"specifies the distance from the camera that flag names no longer draw"<br>(probably needs show_flags)||?? | ||
|- | |- | ||
|int32||[[flag_new_id]]||'''! | |int32||[[flag_new_id]]||'''$ !!!''' | ||
|"specifies the id for a new flag"<br>(equal to the last flag added at level load)||?? | |"specifies the id for a new flag"<br>(equal to the last flag added at level load)||?? | ||
|- | |- | ||
Line 557: | Line 527: | ||
|- | |- | ||
|bool||[[laser_alpha]]||0 | |bool||[[laser_alpha]]||0 | ||
|WTF? lasers are always transparent||?? | |WTF? lasers are always transparent (As I can see in SRC, this variable changes laser texture from '''non-transparent''' BGR555 <u>with</u> AdditiveBlend parameter to '''transparent''' ABGR4444 <u>without</u> AdditiveBlend.)||?? | ||
|-bgcolor="lime" | |-bgcolor="lime" | ||
|bool||[[li_center_cursor]]||1 | |bool||[[li_center_cursor]]||1 | ||
Line 637: | Line 607: | ||
|"factor" (for current ONWC; needs recoil_edit)||OK | |"factor" (for current ONWC; needs recoil_edit)||OK | ||
|- | |- | ||
|int32||[[save_point]]||'''! | |int32||[[save_point]]||'''$ !!!''' | ||
|which save point we are on||OK | |"which save point we are on"<br>(gets the current save point, which is set by Oni based on the player's choice of Save Point on the Load Game screen)||OK | ||
|- | |- | ||
|int32||[[saved_film_character_offset]]||1 | |int32||[[saved_film_character_offset]]||1 | ||
Line 725: | Line 695: | ||
|- | |- | ||
|bool||[[sync_debug]]||0 | |bool||[[sync_debug]]||0 | ||
|"enables sync debugging"|| | |"enables sync debugging"<br>(prints a message to screen with how many frames were dropped during a cutscene; see function <tt>cutscene_sync</tt>)||NO | ||
|- | |- | ||
|float||[[target_max_distance]]||75000. | |float||[[target_max_distance]]||75000. | ||
Line 758: | Line 728: | ||
|- | |- | ||
|int32||[[wp_hypostrength]]||25 | |int32||[[wp_hypostrength]]||25 | ||
|"sets strength of hypo spray"<br> | |"sets strength of hypo spray"<br>(development relic; changes variable which is unused)||NO | ||
|- | |- | ||
|bool||[[wp_kickable]]||0 | |bool||[[wp_kickable]]||0 |