-- Additional exports from modded exes: https://github.com/themrdemonized/STALKER-Anomaly-modded-exes --[[ console commands: { snd_doppler_power [0; 5] // Adjust power of doppler effect snd_doppler_smoothing [1; 100] // Adjust smoothness of pitch shifting in doppler effect crash_save [0; 1] // Enable saving game on game crash crash_save_count [0; 20] // Crash saves max number pseudogiant_can_damage_objects_on_stomp [0; 1] // Enable the ability for pseudogiants to damage objects on stomp sds_enable [0; 1] // Enable shader based scopes sds_speed_enable [0; 1] // Enable mouse sensitivity change on zooming sds_zoom_enable [0; 1] // Enable correction of max. zoom with scope_factor, if this option is enabled then max. zoom will be such as prescribed in settings regardless of scope_factor value, if this option is disabled then max. zoom will be sum of value prescribed in settings and the increase that gives scope_factor. new_zoom_enable [0; 1] // Enable alternative zoom control. Minimal zoom is equal to either mechanical zoom or the one prescribed in section min_scope_zoom_factor. The step of zoom adjustment is more precise. zoom_step_count [1.0, 10.0] // Adjust the step of zoom if new_zoom_enable is on demo_record_blocked_input 1 // Start demo_record without move or stop. The console and Esc key are available demo_record_stop // Stop all launched `demo_record` commands demo_set_cam_direction [head, pitch, roll] // Set the direction the camera is facing and its roll. The parameters are in RADIANS, beware first_person_death // Enable First Person Death Camera first_person_death_direction_offset // FPD Camera Direction Offset (in DEGREES) first_person_death_position_offset // FPD Camera Position Offset (x, y, z) first_person_death_position_smoothing // FPD Camera Position Change Smoothing first_person_death_direction_smoothing // FPD Camera Direction Change Smoothing use_english_text_for_missing_translations // Enables using english text if translation is missing pda_map_zoom_in_to_mouse // Enable map zoom in relative to cursor pda_map_zoom_out_to_mouse // Enable map zoom out relative to cursor mouse_wheel_change_weapon // Enable changing weapons with mouse wheel mouse_wheel_invert_zoom // Invert mouse wheel string_table_error_msg // Print xml translation errors monster_stuck_fix // Enables fix of stuck monsters at the fps cost } lua extensions { bit.tobit(int) bit.tohex(int) bit.bnot(int) bit.band(int, int) bit.bor(int, int) bit.bxor(int, int) bit.lshift(int, int) bit.rshift(int, int) bit.rol(int, int) bit.ror(int, int) string.trim(s) string.trim_l(s) string.trim_r(s) string.trim_w(s) table.keys(t) table.values(t) table.size(t) table.random(t) } globals { int get_modded_exes_version() // Returns modded exes version in integer format } namespace alife() { void iterate_objects(function(se_obj)) } namespace game { Fvector2 world2ui(Fvector pos, bool hud = false, bool allow_offscreen = false) function ui2world(Fvector2 pos) -> Fvector result, u16 object_id change_game_news_show_time(CUIWindow* UIWindow, float show_time) update_pda_news_from_uiwindow(CUIWindow* UIWindow) } ini_file() { string get_filename() void dltx_print(string sec = nil, string line = nil) string dltx_get_filename_of_line(string sec, string line) table dltx_get_section(string sec) bool dltx_is_override(string sec, string line) } // Player hud // get_player_hud():set_hands("actor_hud_cs_exo") globals { player_hud* get_player_hud() } player_hud { void set_hands(string section) void reset_hands() } // Debug shapes enum DebugRenderType { line, sphere, box, } namespace debug_render { DBG_ScriptObject* add_object(u16 id, DebugRenderType type) void remove_object(u16 id) DBG_ScriptObject* get_object(u16 id) u32 get_flags() void set_flags(u32 flags) DBG_ScriptSphere* cast_dbg_sphere() DBG_ScriptBox* cast_dbg_box() DBG_ScriptLine* cast_dbg_line() // Common properties fcolor color bool hud bool visible } class DBG_ScriptSphere { Fmatrix matrix } class DBG_ScriptBox { Fmatrix matrix Fvector size } class DBG_ScriptLine { Fvector point_a Fvector point_b } // examples local sphere = debug_render.add_object(1337, DBG_ScriptObject.sphere):cast_dbg_sphere() sphere.visible = true sphere.color = fcolor():set(1,0,0,1) local scale_mat = matrix():identity():scale(0.1,0.1,0.1) local pos_mat = matrix():translate(db.actor:position()) local mat = matrix():mul(pos_mat, scale_mat) sphere.matrix = mat local line = debug_render.add_object(9, DBG_ScriptObject.line):cast_dbg_line() line.point_a = db.actor:position() line.point_b = vector():set(0, 0, 0) local box = debug_render.add_object(12, DBG_ScriptObject.box):cast_dbg_box() box.size = vector():set(0.5,1,0.5) namespace level { float get_music_volume() void set_music_volume(float) // Camera, position is x,y,z vector, direction is head,pitch,roll vector in RADIANS void set_cam_custom_position_direction(Fvector position, Fvector direction, int smoothing, bool hudDraw, bool hudAffect) void set_cam_custom_position_direction(Fvector position, Fvector direction, int smoothing, bool hudDraw) void set_cam_custom_position_direction(Fvector position, Fvector direction, int smoothing) void set_cam_custom_position_direction(Fvector position, Fvector direction) void remove_cam_custom_position_direction() // Get target position and result of crosshair ray_query Fvector get_target_pos() script_rq_result get_target_result() void map_remove_all_object_spots(id) CUIStatic* map_get_object_spot_static(u16 id, LPCSTR spot_type) CUIStatic* map_get_object_minimap_spot_static(u16 id, LPCSTR spot_type) } // obj:get_physics_shell() class PHShell { void apply_torque(float roll, float yaw, float pitch) } class Fvector { function add(float x, float y, float z) function sub(float x, float y, float z) function mul(float x, float y, float z) function div(float x, float y, float z) function distance_to_xz_sqr(Fvector) } class Fmatrix { property i property _14_ property j property _24_ property k property _34_ property c property _44_ matrix() function set(Fmatrix) function set(Fvector, Fvector, Fvector, Fvector) function identity() function mk_xform(quaternion, Fvector) function build_camera_dir(Fvector vFrom, Fvector vView, Fvector vWorldUp) function build_projection(float fov, float aspect, float nearPlane, float farPlane) function mulA_43(Fmatrix A) function mulA_44(Fmatrix A) function mulB_43(Fmatrix B) function mulB_44(Fmatrix B) function mul_43(Fmatrix A, Fmatrix B) function translate(float x, float y, float z) function translate(Fvector) function translate_add(float x, float y, float z) function translate_add(Fvector) function translate_over(float x, float y, float z) function translate_over(Fvector) function mul(Fmatrix, Fmatrix) function mul(Fmatrix, float) function mul(float) function invert() function invert(Fmatrix) function invert_b(Fmatrix) function div(Fmatrix, float) function div(float) function scale(float x, float y, float z) function scale(Fvector) function setHPB(float x, float y, float z) function setHPB(Fvector) function setXYZ(float x, float y, float z) function setXYZ(Fvector) function setXYZi(float x, float y, float z) function setXYZi(Fvector) Fvector getHPB() } class particle_object { function play(bool bHudMode = false) function play_at_pos(Fvector pos, bool bHudMode = false) } class wallmarks_manager { wallmarks_manager() function place (Fvector dir, Fvector start_pos, float trace_dist, float wallmark_size, string section, game_object ignore_obj, float ttl) function place (Fvector dir, Fvector start_pos, float trace_dist, float wallmark_size, string section, game_object ignore_obj, float ttl, bool random_rotation) // User defined rotation in DEGREES function place (Fvector dir, Fvector start_pos, float trace_dist, float wallmark_size, string section, game_object ignore_obj, float ttl, float rotation) function place_skeleton (game_object obj, string section, Fvector start, Fvector dir, float size, float ttl) } class game_object { // Skeletons function bone_direction(string bone_name, bool bHud = false) // Player function get_actor_walk_accel() function set_actor_walk_accel(float) function get_actor_walk_back_coef() function set_actor_walk_back_coef(float) function get_actor_lookout_coef() function set_actor_lookout_coef(float) function set_actor_direction(float yaw, float pitch) function set_actor_direction(float yaw, float pitch, float roll) function set_actor_direction(Fvector HPB) function get_actor_crouch_coef() function set_actor_crouch_coef(float) function get_actor_climb_coef() function set_actor_climb_coef(float) function get_actor_walk_strafe_coef() function set_actor_walk_strafe_coef(float) function get_actor_run_strafe_coef() function set_actor_run_strafe_coef(float) function get_actor_sprint_strafe_coef() function set_actor_sprint_strafe_coef(float) // Stalker NPCs function get_enable_anomalies_pathfinding() function set_enable_anomalies_pathfinding(bool) function get_enable_anomalies_damage() function set_enable_anomalies_damage(bool) function angle() function force_set_angle(Fvector angle, bool bActivate) // Artefact function get_artefact_additional_inventory_weight() function set_artefact_additional_inventory_weight(float) // Bones u16 get_bone_id(string) u16 get_bone_id(string, bool bHud) u16 bone_id(string) // Same as get_bone_id u16 bone_id(string, bool bHud) string bone_name(u16 id) string bone_name(u16 id, bool bHud) Fvector bone_position(u16 id) Fvector bone_position(u16 id, bool bHud) Fvector bone_position(string) Fvector bone_position(string, bool bHud) Fvector bone_direction(u16 id) Fvector bone_direction(u16 id, bool bHud) Fvector bone_direction(string) Fvector bone_direction(string, bool bHud) u16 bone_parent(u16 id) u16 bone_parent(u16 id, bool bHud) u16 bone_parent(string) u16 bone_parent(string, bool bHud) bool bone_visible(u16 id) bool bone_visible(u16 id, bool bHud) bool bone_visible(string) bool bone_visible(string, bool bHud) function set_bone_visible(u16 id, bool bVisibility, bool bRecursive, bool bHud) function set_bone_visible(string bone_name, bool bVisibility, bool bRecursive, bool bHud) } class CArtefact : CGameObject { property m_additional_weight } class CWeapon : CGameObject { // Return RPM in actual RPM value like in configs function RealRPM() function ModeRealRPM() // Setters function SetFireDispersion(float) function SetMisfireStartCondition(float) function SetMisfireEndCondition(float) function SetRPM(float) function SetRealRPM(float) function SetModeRPM(float) function SetModeRealRPM(float) function Set_PDM_Base(float) function Set_Silencer_PDM_Base(float) function Set_Scope_PDM_Base(float) function Set_Launcher_PDM_Base(float) function Set_PDM_BuckShot(float) function Set_PDM_Vel_F(float) function Set_Silencer_PDM_Vel(float) function Set_Scope_PDM_Vel(float) function Set_Launcher_PDM_Vel(float) function Set_PDM_Accel_F(float) function Set_Silencer_PDM_Accel(float) function Set_Scope_PDM_Accel(float) function Set_Launcher_PDM_Accel(float) function Set_PDM_Crouch(float) function Set_PDM_Crouch_NA(float) function SetCrosshairInertion(float) function Set_Silencer_CrosshairInertion(float) function Set_Scope_CrosshairInertion(float) function Set_Launcher_CrosshairInertion(float) function SetFirstBulletDisp(float) function SetHitPower(float) function SetHitPowerCritical(float) function SetHitImpulse(float) function SetFireDistance(float) // World model on stalkers adjustments function Set_mOffset(Fvector position, Fvector orientation) function Set_mStrapOffset(Fvector position, Fvector orientation) function Set_mFirePoint(Fvector position) function Set_mFirePoint2(Fvector position) function Set_mShellPoint(Fvector position) // Cam Recoil // Getters function GetCamRelaxSpeed() function GetCamRelaxSpeed_AI() function GetCamDispersion() function GetCamDispersionInc() function GetCamDispersionFrac() function GetCamMaxAngleVert() function GetCamMaxAngleHorz() function GetCamStepAngleHorz() function GetZoomCamRelaxSpeed() function GetZoomCamRelaxSpeed_AI() function GetZoomCamDispersion() function GetZoomCamDispersionInc() function GetZoomCamDispersionFrac() function GetZoomCamMaxAngleVert() function GetZoomCamMaxAngleHorz() function GetZoomCamStepAngleHorz() // Setters function SetCamRelaxSpeed(float) function SetCamRelaxSpeed_AI(float) function SetCamDispersion(float) function SetCamDispersionInc(float) function SetCamDispersionFrac(float) function SetCamMaxAngleVert(float) function SetCamMaxAngleHorz(float) function SetCamStepAngleHorz(float) function SetZoomCamRelaxSpeed(float) function SetZoomCamRelaxSpeed_AI(float) function SetZoomCamDispersion(float) function SetZoomCamDispersionInc(float) function SetZoomCamDispersionFrac(float) function SetZoomCamMaxAngleVert(float) function SetZoomCamMaxAngleHorz(float) function SetZoomCamStepAngleHorz(float) } enum rq_target { (sum them up to target multiple types) rqtNone = 0, rqtObject = 1, rqtStatic = 2, rqtShape = 4, rqtObstacle = 8, } class ray_pick { ray_pick() ray_pick(Fvector position, Fvector direction, float range, rq_target flags, game_object obj) function set_position(Fvector) function set_direction(Fvector) function set_range(float) function set_flags(rq_target) function set_ignore_object(game_object) function query() function get_result() : rq_result function get_object() : game_object function get_distance() : float function get_element() : int (number of triangle) } class script_rq_result { const object const range const element const material_name const material_flags const material_phfriction const material_phdamping const material_phspring const material_phbounce_start_velocity const material_phbouncing const material_flotation_factor const material_shoot_factor const material_shoot_factor_mp const material_bounce_damage_factor const material_injurious_speed const material_vis_transparency_factor const material_snd_occlusion_factor const material_density_factor } // Available flags, not exported from engine, copy this into your script material_flags = { ["flBreakable"] = bit.lshift(1, 0), ["flBounceable"] = bit.lshift(1, 2), ["flSkidmark"] = bit.lshift(1, 3), ["flBloodmark"] = bit.lshift(1, 4), ["flClimable"] = bit.lshift(1, 5), ["flPassable"] = bit.lshift(1, 7), ["flDynamic"] = bit.lshift(1, 8), ["flLiquid"] = bit.lshift(1, 9), ["flSuppressShadows"] = bit.lshift(1, 10), ["flSuppressWallmarks"] = bit.lshift(1, 11), ["flActorObstacle"] = bit.lshift(1, 12), ["flNoRicoshet"] = bit.lshift(1, 13), ["flInjurious"] = bit.lshift(1, 28), ["flShootable"] = bit.lshift(1, 29), ["flTransparent"] = bit.lshift(1, 30), ["flSlowDown"] = bit.lshift(1, 31), } --]]