Skip to content

Commit

Permalink
Implement breaks in song progress bar wip (mostly done) (#913)
Browse files Browse the repository at this point in the history
* Update dx_hud_ui_funcs.dta

* guitar tracker hooked up checkpoint

* oops lol

* hook up other instruments

* use end of song, track break after last note

* handle when no breaks are found properly

* better start

* track only local player online, add vocal bar

* auto pick local tracked progress, add inst icon

* fix when in autopl

* disable harms for now
  • Loading branch information
jnackmclain authored Nov 5, 2024
1 parent 8c2e267 commit 18c273f
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 25 deletions.
3 changes: 2 additions & 1 deletion _ark/config/midi_parsers.dta
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,8 @@
$banddirector}
{$banddirector
set_end
{beat_to_seconds $mp.start}}})}
{beat_to_seconds $mp.start}}
{set $dx_end_of_song $mp.start}})}
{new
MidiParser
trainer_events_pro_drums
Expand Down
2 changes: 2 additions & 0 deletions _ark/dx/locale/dx_locale_updates.dta
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
(inst_icon_bass "<alt>B</alt>")
(inst_icon_drum "<alt>D</alt>")
(inst_icon_keys "<alt>K</alt>")
(inst_icon_vocals "<alt>V</alt>")
(inst_icon_harm "<alt>3</alt>")
(inst_icon_real_guitar "<alt>g</alt>")
(inst_icon_real_bass "<alt>b</alt>")
(inst_icon_real_drum "<alt>d</alt>")
Expand Down
8 changes: 6 additions & 2 deletions _ark/dx/track/countdown/dx_countdown_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@
{beatmatch foreach_active_player $player
{if {== {{$player get_user} get_slot_num} $dx_current_checked_slot}
{if {{$player get_user} is_local}
{$player set_auto_play TRUE}
{if {! {modifier_mgr is_modifier_active mod_auto_play}}
{$player set_auto_play TRUE}
}
}
}
}
Expand Down Expand Up @@ -461,7 +463,9 @@
{beatmatch foreach_active_player $player
{if {== {{$player get_user} get_slot_num} $dx_current_checked_slot}
{if {{$player get_user} is_local}
{$player set_auto_play FALSE}
{if {! {modifier_mgr is_modifier_active mod_auto_play}}
{$player set_auto_play FALSE}
}
}
}
}
Expand Down
255 changes: 235 additions & 20 deletions _ark/dx/track/hud_ui/dx_hud_ui_funcs.dta

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions _ark/dx/track/track/dx_track_panel_handles.dta
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
{dx_song_progress_label dx_song_progress_label_back TRUE}
{dx_song_progress_label dx_song_progress_label_needle TRUE}
{dx_song_progress_label dx_song_progress_label TRUE}
{dx_get_this_countdown_array}
{dx_song_progress_instrument_label dx_song_progress_instrument_label TRUE}
{dx_game_hud_label dx_hud_label_band_streak $dx_hud_band_streak_text_size $dx_hud_band_streak_text_font $dx_hud_band_streak_text_alignment $dx_hud_band_streak_text_kerning $dx_hud_band_streak_text_x $dx_hud_band_streak_text_z $dx_hud_band_streak_text_y $dx_hud_band_streak_text_r $dx_hud_band_streak_text_g $dx_hud_band_streak_text_b TRUE}
{beatmatch foreach_active_player $player
{unless {== {$player instrument} vocals}
Expand Down Expand Up @@ -147,6 +149,7 @@
{dx_dim_remote_players}
{dx_track_panel_extended_ui}
{dx_mtv_time_remaining_handler}
{dx_new_set_song_progress_backer $dx_song_progress_bar}
{if {! {modifier_mgr is_modifier_active mod_brutalmode}} ;brutal mode relies on crowd meter accuracy
{if {== $dx_crowd_meter_state dx_disabled} {adjust_crowd_rating 1}} ;max out crowd meter when it's disabled for crowd audio
}
Expand Down
2 changes: 1 addition & 1 deletion _ark/dx/track/track_ui/dx_track_overdrive_ui_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{if $dx_mtvup
{set_this {find_obj DX_GEMTRACKDIR band_power_meter}}
{set $curr_ms {beatmatch get_song_ms}}
{set $total_ms {int {* {+ {beat_to_seconds $dx_final_note} 1} 1000}}}
{set $total_ms {int {* {+ {beat_to_seconds $dx_end_of_song} 1} 1000}}}
{set $percent_complete {/ $curr_ms $total_ms}}
{tour_meter_wipe.anim set_frame 0}
;{tour_meter_wipe.anim set_frame $percent_complete}
Expand Down
2 changes: 1 addition & 1 deletion _ark/dx/track/track_ui/dx_track_ui_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{set_this {find_obj DX_GEMTRACKDIR band_power_meter}}
{tour_configure_challenge.anim set_frame 1}
{set $curr_ms {beatmatch get_song_ms}} ;current time in ms
{set $total_ms {int {* {+ {beat_to_seconds $dx_final_note} 1} 1000}}} ;grab current song length in ms
{set $total_ms {int {* {+ {beat_to_seconds $dx_end_of_song} 1} 1000}}} ;grab current song length in ms
{set $percent_complete {/ $curr_ms $total_ms}}
{tour_meter_wipe.anim set_frame 0} ;disabled for now
;{tour_meter_wipe.anim set_frame $percent_complete}
Expand Down

0 comments on commit 18c273f

Please sign in to comment.