forked from themrdemonized/xray-monolith
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlua_help_ex.script
More file actions
541 lines (470 loc) · 21.2 KB
/
lua_help_ex.script
File metadata and controls
541 lines (470 loc) · 21.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
-- Additional exports from Modded Exes: https://github.com/themrdemonized/xray-monolith
--[[
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
telekinetic_objects_include_corpses [0; 1] // Enable the ability for poltergeists and burers to throw corpses
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
new_zoom_delta_algorithm [0; 1] // New zoom delta algorithm
demo_record_return_ctrl_inputs // Launch (from console or scripts) `demo_record` but propagate ESC and TAB keypresses back to launcher entity (game or scripts)
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
mouse_sens_vertical [0.1; 3] // Vertical mouse sensitivity factor. The number is a multiplicative factor to overall mouse sensitivity, default 1
string_table_error_msg // Print xml translation errors
monster_stuck_fix // Enables fix of stuck monsters at the fps cost
freeze_time [0,1] // Freezes the alife but leaves the sounds playing at the time of the freeze, e.g. soundtrack, looped_fx. No new sounds will be played by the ailife, since it is frozen. You can however, after this point, play new sounds from scripts.
allow_outfit_control_inertion_factor
allow_weapon_control_inertion_factor // Weapon and outfit control_inertion_factor can affect mouse sens
render_short_tracers // Tracers will be capped to their minimum length instead of not rendering
fix_avelocity_spread // Fixes moving the camera around not worsening accuracy
apply_pdm_to_ads // Enables PDM (handling) values to be applied properly during ADS
smooth_ads_transition // Smoothly applies the ADS accuracy bonus instead of only being applied when fully ADS
allow_silencer_hide_tracer // Controls wether or not silencers can hide tracers at all
viewport_near [0.0, 1.0] // Adjust the camera near value
print_bone_warnings // Print warnings when using bone_position and bone_direction functions and encounter invalid bones
poltergeist_spawn_corpse_on_death // Poltergeists spawn corpses on death
}
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
table get_string_table() // Returns all translated strings in [string id] = string text 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)
}
// UI hud
// get_hud():GetWindow()
get_hud() {
CUIWindow GetWindow()
}
// 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)
table map_get_object_spots_by_id(u16 id) // Returns array of tables
// {
spot_type: string, icon ID from map_spots XML
text: string, text when spot is hovered
// }
add_bullet(Fvector pos, Fvector dir, float speed, float power, float impulse, u16 sender, ALife::EHitType hit_type, float max_dist, LPCSTR ammo_sect, float air_resistance)
add_bullet(table t)
// Supported parameters and example:
// local t = {
// pos = device().cam_pos,
// dir = device().cam_dir,
// speed = 10,
// power = 1,
// impulse = 1,
// sender = AC_ID,
// senderweapon = db.actor:active_item():id(), // Defaults to what's set for sender if not specified
// hit_type = 1,
// max_dist = 100,
// ammo_sect = "ammo_5.56x45_fmj",
// air_resistance = 0.2,
// }
// level.add_bullet(t)
}
// 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)
function update_weight()
function get_total_weight_force_update()
function get_talking_npc()
function set_actor_position(vector pos, bool bskip_collision_correct, bool bkeep_speed)
function set_movement_speed(vector)
// 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)
function set_enable_movement_collision(bool)
function character_dialogs()
// 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)
// Torch
function update_torch()
}
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)
//Scope UI
//Returns table containing this data
{
name - name of scope_texture weapon currently uses
uiWindow - CUIWindow instance of scope UI
statics - array of CUIStatic that CUIWindow scope UI instance uses
}
table get_scope_ui()
function set_scope_ui(string)
// Get and set the zoom_rotate_time (time in seconds to fully ADS) field for a given weapon
function GetZoomRotateTime()
function SetZoomRotateTime(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),
}
--]]