p2sr / SourceAutoRecord

Speedrun plugin for Source engine games.
https://sar.portal2.sr/
MIT License
93 stars 29 forks source link

allow for multiple maps in a category definition #208

Closed JaioCG closed 10 months ago

JaioCG commented 10 months ago

Mainly useful for Mel CM mtriggers where there are both the normal and advanced versions of each map. I did a little bit of testing and the mtriggers should all* work cross-map, meaning the only thing stopping only needing one set of mtriggers would be the category definitions themselves:

sar_speedrun_cc_start "Concepts" map=st_a3_concepts map=sp_a3_concepts action=split

Basically just allow two (or more teehee) maps in a category definition. Running a category can already be done via

sar_on_load cond "var:__mtriggers_enable=1 & (map=st_a3_concepts | map=sp_a3_concepts)" sar_speedrun_category "Concepts"

so maybe the syntax could be similar idk.

ThisAMJ commented 10 months ago

The only question I have is how rule hierarchy should handle this i.e.

action=split on category is overridden by action=start on rule, should the same be true for maps? i would think so

e.g. if you wanted a category that was 2 maps long, i guess? map=map_a map=map_b category rule load action=start map=map_a starts it only on map a. its really situational to use this

JaioCG commented 10 months ago

Implemented in 3a6c09317916923ece4b461235d145bfa621a9cf

ThisAMJ commented 10 months ago

Implemented again in 91c2f960463dc68dcf29d49c3eeecbd0071d0713

JaioCG commented 10 months ago

Neither commit works properly, shows image when attempting to play

ThisAMJ commented 10 months ago

skill issue

Screenshot-2023-11-23_11-58-53