I was actually reading some of the posts you've made in the questions thread a few weeks ago and wondering if you had made any progress on it. I'm very intrigued by the results so far. Very impressed by the video.
Originally Posted by
Miffylin
support for objects and custom levels would be something very cool to have (i.e. getting the information on Python side). I do not know if Toribash supports getting information of such objects, and even after that it needs to be planned out how to share the information with Python. Changing mod is easy enough, but there is no point in that if we can't "see" the level.
Luckily, it does. For some reason, these functions are simply not documented (probably because the documentation hasn't been updated in a hot minute). Here are some world-object-specific functions that'll help:
get_obj_angular_vel
get_obj_bounce
get_obj_flag
get_obj_linear_vel
get_obj_mass
get_obj_pos
get_obj_rot
get_obj_sides
get_obj_vis
For the record, iterating over a table referenced by _G will give you this list of all functions, strings, and tables, including ones not listed where you'd expect them:
booleans:
startup
functions:
add_hook
add_trail_particle
assert
call_hook
callstr
chat_input_activate
chat_input_clear
chat_input_deactivate
chat_input_is_active
close_menu
collectgarbage
disable_camera_movement
disable_player_select
disable_sound
dismember_joint
dofile
draw_box
draw_box_m
draw_boxed_text
draw_capsule
draw_capsule_m
draw_centered_text
draw_chat_input
draw_chat_message
draw_chat_messages
draw_disk
draw_disk_3d
draw_ground_impact
draw_line
draw_line_3d
draw_quad
draw_right_text
draw_sphere
draw_sphere_m
draw_text
draw_text_3d
draw_tori
draw_triangle
echo
echof
edit_game
enable_camera_movement
enable_sound
end_tutorial
error
export_mod
fracture_joint
freeze_game
gcinfo
get_active_bloods
get_beginner
get_bet_info
get_blood_age
get_blood_pos
get_blood_radius
get_blood_vel
get_body_angular_vel
get_body_info
get_body_linear_vel
get_body_on_frame_info
get_body_screen_pos
get_bout_info
get_bouts
get_camera_info
get_chat_type
get_color_info
get_compact_chat_lines
get_cur_chat_lines
get_customs
get_downloads
get_errno
get_files
get_full_mode_chat_lines
get_game_rules
get_ghost
get_grip_info
get_grip_lock
get_head_info
get_joint_color
get_joint_dismember
get_joint_fracture
get_joint_info
get_joint_on_frame_info
get_joint_pos
get_joint_pos2
get_joint_radius
get_joint_screen_pos
get_master
get_num_blood_particles
get_obj_angular_vel
get_obj_bounce
get_obj_flag
get_obj_linear_vel
get_obj_mass
get_obj_pos
get_obj_rot
get_obj_sides
get_obj_vis
get_option
get_payment_mode
get_player_info
get_purchase_done
get_replay_speed
get_rpg_info
get_score
get_screen_pos
get_shift_key_state
get_spectator_info
get_spectators
get_string_length
get_total_chat_lines
get_turn_frame
get_volume
get_window_size
get_world_state
getfenv
getmetatable
indicate_joint
init_mod_world
ipairs
is_game_frozen
is_steam_logon
load
load_player
load_texture
loadfile
loadstring
module
newproxy
next
open_menu
open_upmenu
open_url
pairs
pcall
print
printl
rawequal
rawget
rawset
read_replay
remove_hook
remove_hooks
require
reset_camera
reset_hair
reset_server
rewind_replay
run_cmd
run_frames
run_tutorial
screenshot
select
select_player
set
set_blood_color
set_body_color
set_body_force
set_body_pos
set_body_rotation
set_body_sides
set_body_texture
set_body_torque
set_camera_angle
set_camera_lookat
set_camera_mode
set_camera_pos
set_camera_range
set_color
set_decal
set_default_rules
set_dq
set_event_hook
set_fov
set_gameover_timelimit
set_ghost
set_ghost_color
set_gradient_color
set_gradient_primary_color
set_gradient_secondary_color
set_grip_info
set_ground_impact_color
set_hair_color
set_hair_settings
set_joint_color
set_joint_force_color
set_joint_pos
set_joint_radius
set_joint_relax_color
set_joint_state
set_obj_bounce
set_obj_color
set_obj_flag
set_obj_force
set_obj_mass
set_obj_pos
set_obj_rot
set_obj_sides
set_obj_vis
set_option
set_payment_mode
set_player_relax
set_replay_speed
set_rpg
set_score
set_selected_joint_force_color
set_selected_joint_relax_color
set_separate_trail_color
set_separate_trail_color_2
set_timex_color
set_torishop
set_torso_color
set_trail_color
set_volume
setfenv
setmetatable
start_new_game
start_torishop_camera
step_game
step_to_end
superoldsecretopen
tbdata
tonumber
tostring
type
unfreeze_game
uninit_torishop
unload_texture
unpack
xpcall
strings:
ARG1
TORIBASH_VERSION
_VERSION
tables:
BODYPARTS
FONTS
JOINTS
JOINT_STATE
MSGTYPE
_G
coroutine
io
math
os
package
string
table
I would love to contribute to this project if I had the time, otherwise I look forward to seeing it improve. Please keep us updated!
Last edited by box; Aug 2, 2018 at 08:18 AM.