Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improved "il" categories #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ These configuration files support the following speedrun categories:
- Solo Coop (`solocoop`)
- Coop Challenge Mode (`coop_cm`)
- Chapter ILs (`chapter_il`)
- Individual Levels (`il`)
- Celeste Mode (`celeste` - P2SM only)
- Reverse Mod (`reverse` - P2SM only)
- Workshop (`workshop`)
- Workshop Maps (`workshop`)
- Bhop Maps (`bhop`)

To manually switch to a category, simply run the category name as a
command; for instance, the command `anypc` activates the Any% category.
Expand All @@ -39,8 +41,11 @@ After manually selecting a category, the automatic selection will not be
re-enabled until the `auto` command is ran.

Note that in mods, only the `fullgame` category exists from the above.
Some mods also add a simple `il` category for doing individual level
runs.

An `il` category is also added for individual workshop maps as well as
manually-downloaded chambers, while `workshop` should be used for multiple
workshop maps (MRCC). The `bhop` category specifically times maps that include
the Timer prefab often seen on bhop maps.

## Binds

Expand Down
30 changes: 30 additions & 0 deletions srconfigs/cats/bhop.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Speedrun category
sar_speedrun_category "Bhop"
svar_set no_mtriggers 1

// Speedrun timing
sar_speedrun_offset 0
sar_speedrun_time_pauses 0
sar_speedrun_start_on_load 1
sar_speedrun_smartsplit 1

// Demo recording
sar_autorecord -1
sar_expand sar_expand sar_record_prefix "$demo_folder_name/bhop/$il_demo_name"
sar_speedrun_autostop 2
sar_challenge_autostop 0

// Fast loads
sar_fast_load_preset full

// Disable the challenge stats HUD in SP only
svar_set cm_hud_behavior -1

// Prevent accidental CM wrongwarp
sar_cm_rightwarp 1

// Enable developer mode for con_drawnotify etc
developer 1

// Category-specific aliases
sar_alias do_reset "sar_speedrun_reset; restart_level"
1 change: 1 addition & 0 deletions srconfigs/cats/il.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Speedrun category
sar_speedrun_category "Individual Levels"
svar_set no_mtriggers 1

// Speedrun timing
Expand Down
11 changes: 11 additions & 0 deletions srconfigs/mkcats.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
sar_speedrun_cc_start "Individual Levels" map=*
sar_speedrun_cc_rule "Start" load action=start
sar_speedrun_cc_rule "Finish" entity targetname=@relay_pti_level_end inputname=Trigger action=stop
sar_speedrun_cc_rule "Flags" end action=stop
sar_speedrun_cc_finish

cond "game=portal2" sar_speedrun_cc_start "Bhop" map=*
cond "game=portal2" sar_speedrun_cc_rule "Start" entity action=start targetname=timerinst_relay-start inputname=Trigger
cond "game=portal2" sar_speedrun_cc_rule "Finish" entity action=stop targetname=timerinst_relay-stop inputname=Trigger
cond "game=portal2" sar_speedrun_cc_finish

cond "game=srm" sar_speedrun_cc_start "Reverse"
cond "game=srm" sar_speedrun_cc_rule "Start" entity targetname=ending_vehicle inputname=ExitVehicle map=sp_a4_finale4 action=start
cond "game=srm" sar_speedrun_cc_rule "Finish" entity targetname=rev_sleep_button inputname=Use map=sp_a1_intro1 action=stop
Expand Down
3 changes: 2 additions & 1 deletion srconfigs/srconfigs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,16 @@ sar_on_load cond "game=mel" cat_only fullgame sar_record_at -1

// Create the built-in categories
add_cat fullgame
add_cat il
cond "game=portal2" add_cat anypc
cond "game=portal2 | game=mel" add_cat sp_cm
cond "game=portal2 | game=reloaded" add_cat amc
cond "game=portal2" add_cat ac
cond "game=portal2" add_cat coop_cm
cond "game=portal2 | game=reloaded" add_cat solocoop
cond "game=portal2" add_cat bhop
cond "game=srm" add_cat celeste
cond "game=srm" add_cat reverse
cond "game=mel | game=aptag | game=reloaded" add_cat il
cond "game=portal2 | game=srm | game=mel | game=aptag" add_cat chapter_il
add_cat workshop

Expand Down