19,584
edits
No edit summary |
(noted that wp_hypostrength definitely doesn't do anything) |
||
(6 intermediate revisions by 2 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 191: | 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 259: | 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 480: | 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 565: | 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 645: | 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 733: | 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 766: | 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 | ||
Line 779: | Line 741: | ||
[[Category:BSL docs]] | [[Category:BSL docs]] | ||