Skip to content

Commit

Permalink
Better backup band swapping
Browse files Browse the repository at this point in the history
  • Loading branch information
lunalawl committed Jan 21, 2025
1 parent 8ca3ffd commit 832c9e9
Show file tree
Hide file tree
Showing 10 changed files with 276 additions and 44 deletions.
8 changes: 4 additions & 4 deletions _ark/dx/locale/dx_locale_updates.dta
Original file line number Diff line number Diff line change
Expand Up @@ -1592,10 +1592,10 @@
(vocal_parts_0 "No Vocals")

; Venue options
(os_char_swap_off "Rotate Bandmates: OFF")
(os_char_swap_off_desc "Stay with the same band after every song mid-setlist")
(os_char_swap_on "Rotate Bandmates: ON")
(os_char_swap_on_desc "Get a new band after every song mid-setlist")
(os_random_backup_band_off "Random Backup Band: OFF")
(os_random_backup_band_off_desc "Stay with the same band after every song")
(os_random_backup_band_on "Random Backup Band: ON")
(os_random_backup_band_on_desc "Swap backup band every song unless stand-ins are set")
(os_enablemv_off "Music Videos: OFF")
(os_enablemv_off_desc "Music Video Venues will not appear in rotation")
(os_enablemv_on "Music Videos: ON")
Expand Down
12 changes: 6 additions & 6 deletions _ark/dx/overshell/dx_venue_states.dta
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{push_back $options {if_else $dx_venue_intro os_venue_intro_on os_venue_intro_off}}
{push_back $options {if_else $dx_enable_mv_venues os_enablemv_on os_enablemv_off}}
{push_back $options {if_else $dx_venue_swap os_venue_swap_on os_venue_swap_off}}
{push_back $options {if_else $dx_character_swap os_char_swap_on os_char_swap_off}}
{push_back $options {if_else $dx_random_backup_band os_random_backup_band_on os_random_backup_band_off}}
}
;-----func----------state name---------message
{dx_state_setup dxState_VenueOptions TRUE}
Expand Down Expand Up @@ -67,11 +67,11 @@
DX_VENUE_OPTIONS_DATA
{set $previous_state dxState_VenueOptions}
)
((os_char_swap_on os_char_swap_off)
{set $dx_character_swap {! $dx_character_swap}}
{if_else $dx_character_swap
{set $dx_tracked_changed os_char_swap_on}
{set $dx_tracked_changed os_char_swap_off}
((os_random_backup_band_on os_random_backup_band_off)
{set $dx_random_backup_band {! $dx_random_backup_band}}
{if_else $dx_random_backup_band
{set $dx_tracked_changed os_random_backup_band_on}
{set $dx_tracked_changed os_random_backup_band_off}
}
{dx_state_pos_tracker}
DX_VENUE_OPTIONS_DATA
Expand Down
6 changes: 3 additions & 3 deletions _ark/dx/read_write/dx_reader_macros.dta
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,9 @@
{elem {find $entry dx_venue_swap} 1}
}
}
{if {== {elem $entry 0} {basename dx_character_swap}}
{set $dx_character_swap
{elem {find $entry dx_character_swap} 1}
{if {== {elem $entry 0} {basename dx_random_backup_band}}
{set $dx_random_backup_band
{elem {find $entry dx_random_backup_band} 1}
}
}
{if {== {elem $entry 0} {basename dx_additional_parts}}
Expand Down
2 changes: 1 addition & 1 deletion _ark/dx/read_write/dx_writer_macros.dta
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
{dx_setting_saver dx_settings dx_song_delay $dx_song_delay}
{dx_setting_saver dx_settings dx_venue_intro $dx_venue_intro}
{dx_setting_saver dx_settings dx_venue_swap $dx_venue_swap}
{dx_setting_saver dx_settings dx_character_swap $dx_character_swap}
{dx_setting_saver dx_settings dx_random_backup_band $dx_random_backup_band}
{dx_setting_saver dx_settings dx_additional_parts $dx_additional_parts}
{dx_setting_saver dx_settings dx_motion_blur $dx_motion_blur}
{dx_setting_saver dx_settings dx_camera_shake $dx_camera_shake}
Expand Down
11 changes: 11 additions & 0 deletions _ark/dx/ui/dx_funcs.dta
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
{set $speed {/ $speed 20}}
$speed
}
(func
dx_randomize_backup_band
{if
{&&
{session_mgr is_leader_local}
$dx_random_backup_band
}
{prefab_mgr assign_prefabs_to_slots}
{char_sync update_char_cache}
}
)
{func
dx_texture_corrector
{unless {== $dx_streak_guitar none} {set $dx_streak_guitar_needs_reset TRUE}}
Expand Down
4 changes: 1 addition & 3 deletions _ark/dx/ui/dx_ui_init.dta
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,7 @@ DX_CURRENT_SONG_CLEAR
}
}

{if $dx_event_mode
{set $dx_character_swap TRUE}
}
{set $dx_random_backup_band TRUE}

;set default colors for notes
;5 is overdrive (white)
Expand Down
26 changes: 3 additions & 23 deletions _ark/dx/ui/endgame/dx_endgame_macros.dta
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,6 @@
; }
;}
)
(dx_swap_char_mid_setlist
;{dx_log_writer info {sprint "func: dx_swap_char_mid_setlist"}}
;{dx_log_writer info
; {sprintf "Executed dx_swap_char_mid_setlist - time: %.4fms"
{time
{if
{&&
{||
{! {gamemode in_mode practice}}
{! {gamemode in_mode trainer}}
}
{! {meta_performer is_set_complete}}
{session_mgr is_leader_local} ;set venue only if host of the lobby
$dx_character_swap
}
{prefab_mgr assign_prefabs_to_slots}
{char_sync update_char_cache}
}
}
; }
;}
)
(dx_auto_endgame
;{dx_log_writer info {sprint "func: dx_auto_endgame"}}
;{dx_log_writer info
Expand Down Expand Up @@ -89,7 +67,6 @@
{dx_presence_manager}
{$this dx_auto_endgame}
{$this dx_swap_venue_mid_setlist}
{$this dx_swap_char_mid_setlist}
{dx_countdown_var_reset}
;{if {modifier_mgr is_modifier_active mod_brutalmode}
; {header_song_bg_refract.mat set_color {pack_color 0.85 0.05 0.05}}
Expand All @@ -98,6 +75,9 @@
;}
)
(dx_endgame_exit
{if {meta_performer is_set_complete}
{dx_randomize_backup_band}
}
{if
{exists fc_clip}
{delete fc_clip}}
Expand Down
242 changes: 242 additions & 0 deletions _ark/ui/endgame/lose.dta
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
{new
UIPanel
lose_panel
(file
"lose.milo")
(quit_confirm_screen lose_confirm_quit_screen)
(quit_button '')
(enter
{$this set_focus lose_resume.btn}
{lose_song_data.lbl
set_song_name
{meta_performer song}}
{do
($mp
{beatmatch main_performer})
{lose_progress_data.lbl
set_token_fmt
percent_complete_format
{int
{'*'
{beatmatch get_fraction_completed}
100.0}}}
{song_section.lbl
set
text_token
{beatmatch
get_section_at_ms
{$mp progress_ms}}}}
{do
($has_part FALSE)
($id
{meta_performer song_id})
{user_mgr
foreach_user
$user
{if
{meta_performer
part_plays_in_song
{$user get_track_sym}}
{set $has_part TRUE}}}
{if_else
{&&
{gamemode in_mode qp_coop}
{==
{session num_users}
1}
$has_part
{!
{song_mgr is_demo $id}}}
{$this enable lose_practice.btn}
{$this disable lose_practice.btn}}}
{overshell set_active_status kOvershellInGameShell}
{session
add_sink
$this
(remote_user_left)}
{$this set_up_buttons}
{$this update_nofail_checkbox})
(exit
{session remove_sink $this remote_user_left})
(update_meta_performer
{$this update_nofail_checkbox})
(set_up_buttons
{if_else
{gamemode get can_resume_songs}
{$this enable lose_resume.btn}
{$this disable lose_resume.btn}}
{lose_nofail.btn set text_token no_fail_mode_band}
{cond
({gamemode in_mode campaign}
{lose_quit.btn set text_token overshell_quit_campaign})
({gamemode in_mode tour}
{lose_quit.btn set text_token overshell_quit_tour})
({gamemode in_mode audition}
{lose_quit.btn set text_token audition_quit})
{lose_quit.btn set text_token overshell_quit}})
(REMOTE_USER_LEFT_MSG
{$this set_up_buttons})
(SELECT_MSG
{switch
$component
(lose_restart.btn
#ifdef HX_WII
{game send_restart_game_net_msg FALSE}
#else
{game send_restart_game_net_msg}
#endif
{game_restart})
(lose_resume.btn
{game
send_resume_no_score_game_net_msg
{beatmatch get_fraction_completed}}
{game_resume_no_score
{beatmatch get_fraction_completed}})
(lose_practice.btn
{ui push_screen confirm_practice_screen})
(lose_nofail.btn
{meta_performer
set_band_no_fail
{!
{$this is_no_fail_set}}}
{$this update_nofail_checkbox})
(lose_quit.btn
{dx_randomize_backup_band}
{if_else
{gamemode in_mode audition}
{ui_event_mgr trigger_event quit_early}
{do
{[quit_confirm_screen]
set
quitting
TRUE}
{$this confirm_goto meta_loading_continue_screen}}})})
(is_no_fail_set
{meta_performer is_band_no_fail_set})
(confirm_goto
($destination)
{[quit_confirm_screen]
set
return_screen
{ui current_screen}}
{[quit_confirm_screen]
set
confirm_screen
$destination}
{ui
goto_screen
[quit_confirm_screen]})
(update_nofail_checkbox
{nofail.chk
set
checked
{$this is_no_fail_set}})}
{new
BandScreen
lose_screen
(panels lose_panel)
(focus lose_panel)
(enter
{if
{!=
{rnd aspect}
kWidescreenAspect}
{rnd set_aspect kLetterboxAspect}})}
{new
BandScreen
lose_confirm_quit_screen
(panels lose_panel dialog_panel)
(focus dialog_panel)
(confirm_screen '')
(return_screen '')
(quitting FALSE)
(enter
{dialog_panel set_yesno confirm_quit no.btn}
{$this set_up_buttons}
{session
add_sink
$this
(remote_user_left)})
(exit
{session remove_sink $this remote_user_left}
{unless
[quitting]
{net_sync enable}})
(set_up_buttons
{if
{<
{session num_users}
{gamemode get min_players}}
{{dialog_panel find no.btn}
set_state
kComponentDisabled}
{dialog_panel
set_focus
{dialog_panel find yes.btn}}})
(REMOTE_USER_LEFT_MSG
{$this set_up_buttons})
(SELECT_MSG
{switch
$component
(yes.btn
{if_else
{==
[confirm_screen]
meta_loading_main_screen}
{ui_event_mgr trigger_event quit_to_main}
{if_else
[quitting]
{ui
pop_screen
[confirm_screen]}
{ui
sync_screen
[confirm_screen]
0}}})
(no.btn
{ui
goto_screen
[return_screen]})})}
{new
BandScreen
confirm_practice_screen
(panels dialog_panel)
(focus dialog_panel)
(enter
{dialog_panel set_yesno confirm_quit no.btn})
(BUTTON_DOWN_MSG
{if_else
{== $action kAction_Cancel}
{ui pop_screen}
kDataUnhandled})
(SELECT_MSG
{switch
$component
(yes.btn
{if_else
{meta_performer
part_plays_in_song
{$user get_track_sym}}
{do
{critical_user_listener set_critical_user $user}
{training_mgr set_return_info song_select_screen pause_quit}
{training_mgr set_user $user}
{practice_panel
set
uses_harmony
{meta_performer is_now_using_vocal_harmony}}
{practice_sel_section_panel
set_initial_section
{beatmatch
get_section_at_ms
{{beatmatch main_performer}
progress_ms}}}
{ui pop_screen meta_loading_practice_screen}}
{do
{ui_event_mgr
trigger_event
error_message
(dummy init error_lose_practice_no_part)}
{ui pop_screen}}})
(no.btn
{ui pop_screen})})}
8 changes: 4 additions & 4 deletions _ark/ui/locale/esl/locale_updates_keep.dta
Original file line number Diff line number Diff line change
Expand Up @@ -1529,10 +1529,10 @@
(main_hub_drum_freestyle "Improvisación de batería")

; Venue options
(os_char_swap_off "Rotar Miembros de Banda: No")
(os_char_swap_off_desc "Tu banda no cambiará cada vez que termines una canción.")
(os_char_swap_on "Rotar Miembros de Banda: Sí")
(os_char_swap_on_desc "Cambia a una nueva banda cada vez que termines una canción.")
(os_random_backup_band_off "Rotar Miembros de Banda: No")
(os_random_backup_band_off_desc "Tu banda no cambiará cada vez que termines una canción.")
(os_random_backup_band_on "Rotar Miembros de Banda: Sí")
(os_random_backup_band_on_desc "Cambia a una nueva banda cada vez que termines una canción.")
(os_enablemv_off "Videos Musicales: No")
(os_enablemv_off_desc "Los Escenarios de Videos Musicales no aparecerán en rotación.")
(os_enablemv_on "Videos Musicales: Sí")
Expand Down
Loading

0 comments on commit 832c9e9

Please sign in to comment.