I thought I'd share what I've got so far in case anyone else is interested. It's quite fascinating reading through them... or at least I think so.
I've been able to extract every script I've found so far, the only thing lacking in the output is proper display of all the different variable types. Halo has around 50 different types, so far I've only coded in support for the basic few (boolean, short, long, real, etc), the rest are shown as hexvalue:type, e.g. ffff0051:vehicle. The hexvalue is either a tag id, or, as in this example, an index to one of the various reflexives in the scenario. Therefore ffff0051:vehicle means the vehicle referenced in the 0x51st chunk of the vehicles reflexive.
I might get around to supporting most of the types if there is enough interest.
Here is a sample from b40 (AotCR):
Code: Select all
(global boolean global_dialog_on false)
(global boolean global_music_on false)
(global long global_delay_music (* 30:real 300:real))
(global long global_delay_music_alt (* 30:real 300:real))
(global boolean debug true)
(global long default_turret_delay (* 30:real 10:real))
(global long control_turret_delay (* 30:real 10:real))
(global short exterior_player_location 0:short)
(global boolean mission_start false)
(global boolean a1_spawn true)
(global short a1_spawn_counter 0:short)
(global short a1_squad_index 1:short)
// returns unit
(script static player0
(begin
(unit (list_get (players) 0:short))
)
)
// returns short
(script static player_count
(begin
(list_count (players))
)
)
// returns boolean
(script static cinematic_skip_start
(begin
(cinematic_skip_start_internal)
(game_save_totally_unsafe)
(sleep_until (not (game_saving)) 1:short)
(not (game_reverted))
)
)
// returns void
(script static player_effect_vibration
(begin
(player_effect_set_max_translation 0.0075:real 0.0075:real 0.0125:real)
(player_effect_set_max_rotation 0.01:real 0.01:real 0.05:real)
(player_effect_set_max_rumble 0.2:real 0.5:real)
(player_effect_start (real_random_range 0.7:real 0.9:real) 1:real)
)
)
// returns void
(script static cutscene_insertion_a
(begin
(sound_looping_start e55b03e7:looping_sound ffffffff:object 1:real)
(sound_class_set_gain 10365114:string 0.3:real 0:short)
(objects_predict ffff01b9:object_list)
(objects_predict ffff01b6:object_list)
(object_beautify ffff01b6:object true)
(fade_out 0:real 0:real 0:real 0:short)
(switch_bsp 3:short)
(object_teleport (player0) 43:cutscene_flag)
(object_teleport (player1) 42:cutscene_flag)
(cinematic_start)
(show_hud false)
(camera_control true)
(camera_set 7:cutscene_camera_point 0:short)
(fade_in 0:real 0:real 0:real 60:short)
(object_destroy ffff01b6:object)
(object_destroy ffff01b7:object)
(object_destroy ffff01b7:object)
(object_create ffff01b6:object_name)
(object_create ffff01b7:object_name)
(object_create ffff01b8:object_name)
(object_teleport ffff01b6:object 3d:cutscene_flag)
(object_pvs_activate ffff01b6:object)
(camera_set 8:cutscene_camera_point 300:short)
(unit_set_seat ffff01b6:unit 1036526b:string)
(recording_play ffff01b6:unit 17:cutscene_recording)
(sleep 300:short)
(cinematic_set_near_clip_distance 0.01:real)
(camera_set f:cutscene_camera_point 0:short)
(camera_set e:cutscene_camera_point 120:short)
(wake pelican_up:script)
(recording_kill ffff01b6:unit)
(object_teleport ffff01b6:object 45:cutscene_flag)
(custom_animation ffff01b6:unit e55d03e9:animation_graph 10365324:string false)
(sleep 150:short)
(camera_set c:cutscene_camera_point 0:short)
(camera_set d:cutscene_camera_point 120:short)
(sleep 60:short)
(camera_set 29:cutscene_camera_point 60:short)
(sleep (camera_time))
(recording_kill ffff01b6:unit)
(object_destroy ffff01b6:object)
(object_destroy ffff01b7:object)
(object_destroy ffff01b8:object)
)
)
The functions you see such as sleep, or switch_bsp are defined in the xbe, rather than the map. I've attached a list of these along with descriptions of what they do.
As for compiling (recompiling), I don't think it's going to happen any time soon. Arsenic is supposed to have a script compiler in the works and I'm far too lazy to waste time on duplicating the enormous amount of work it'll take to get compiling to work.
I'm open to requests for features, maps to decompile, or whatever. I don't feel like releasing the program or code at the moment though.
Thanks to:
Soldier of Light & the other members of Brok3n Halo who worked on the original Halo 2 scripting tutorial.
Mike (aka xbox7887) for the xbe script list.
Note: The xbe scripts and their descriptions were lifted straight out of the xbe, all the colourful language belongs to Bungie.