List of Lua functions for SR4

Would it be possible to get a list of Lua functions and their parameters for Saints Row IV like the "scripts actions" list included in the "Saints Row tools pre-alpha incomplete.zip" download for Saints Row The Third?

The thing that's driving this particular request is that I just tried to port my Working Elevators mod from SR3 to SR4, and it appears that the "teleport_to_object()" function parameters have changed. Here's the function's definition from the documentation for SR3:
Code:
teleport_to_object(char_name, object_name[, exit_vehicle[, reset_camera_orient[, offset_x[, offset_y[, offset_z[, heading_offset]]]]]])

Specifically, the "heading_offset" parameter no-longer seems to work as documented in SR4. I tried changing the offset and it seems to have no affect on the player's orientation.

A full list would probably be useful for many mods. Thank you!
 
Last edited:
Would it be possible to get a list of Lua functions and their parameters for Saints Row IV like the "scripts actions" list included in the "Saints Row tools pre-alpha incomplete.zip" download for Saints Row The Third?

The thing that's driving this particular request is that I just tried to port my Working Elevators mod from SR3 to SR4, and it appears that the "teleport_to_object()" function parameters have changed. Here's the function's definition from the documentation for SR3:
Code:
teleport_to_object(char_name, object_name[, exit_vehicle[, reset_camera_orient[, offset_x[, offset_y[, offset_z[, heading_offset]]]]]])

Specifically, the "heading_offset" parameter no-longer seems to work as documented in SR4. I tried changing the offset and it seems to have no affect on the player's orientation.

A full list would probably be useful for many mods. Thank you!
I'm not sure who made that list or how, but I'll see what we can do. I would think the vast majority of the functions are the same. In the mean time your function signature changed to this:
Code:
teleport_to_object(string char_name, string object_name, bool exit_vehicle, bool reset_camera_orient, float offset_x, float offset_y, float offset_z, bool offset_in_local_space, float heading_offset, bool force_to_navmesh, string navmesh_hint_object, bool check_for_obstacles, bool stick_to_ground)

As before everything after the object name is optional.
 
I'm not sure who made that list or how, but I'll see what we can do. I would think the vast majority of the functions are the same. In the mean time your function signature changed to this ...
Thank you so much for the information! That's exactly what I needed, and it should allow me to port my elevator mod to Saints Row IV now. It will also allow me to help out Fan of Saints with some added teleports he needs. As far as the whole list, I just thought it could be useful to modders here if such a list was available, but I don't need the whole list right now. Thanks again!
 
Hey Knobby, I found this function in 'm22_1.lua' file:
Code:
enable_ascii_mode(true, true, true, 4, 0.4, 0.002)
Could you explain what those parameters stand for? I tried changing them and I see changes but I have no idea what I'm actually doing. :P
Code:
enable_ascii_mode(bool enable = true, bool hires = true, bool attenuation_spheres = false, int colors_per_channel = 4, float gray_threshold = 0.4, float black_threshold = 0.02, int fade_in_time = 0)
Looks like all of the parameters are optional. Default values included.
 
Back
Top