Skip to content

feat: Add autoPlayed funtionality for TeamParticipants#6872

Open
hjpalpha wants to merge 17 commits intomainfrom
autoplayed-for-TC
Open

feat: Add autoPlayed funtionality for TeamParticipants#6872
hjpalpha wants to merge 17 commits intomainfrom
autoplayed-for-TC

Conversation

@hjpalpha
Copy link
Copy Markdown
Collaborator

@hjpalpha hjpalpha commented Nov 30, 2025

Summary

if |autoplayed=true is set in an opponent in the TeamParticipants template it enables a lookup in match2 data which player actually played in any (team) matches of the tournament the TeamParticipants is used for.

Funnily enough this implementation would make import from match2 data for players quite easy too.
So if we want/need this at a later date the changes for that are minimal.

fwiw importing all teams from a toruanemt with their players from match2 without specifying any teams/players is basically not a good idea with how TeamParticipants stuff is set up...

How did you test this change?

{{TeamParticipants|dev=hjp
	|{{Opponent|StreamerZone|autoplayed=true
		|players={{Persons
			|{{Person|sOs|role=captain}}
			|{{Person|Gerald}}
			|{{Person|LunaSea}}
			|{{Person|BabyMarine}}
			|{{Person|QuanTa}}
			|{{Person|Jumy}}
			|{{Person|NightMare}}
		}}
	}}
}}

on https://liquipedia.net/starcraft2/CranK_Gathers/Season_2

  • if used above the prizepool or in section preview no autoPlayed is applied
  • if used below prize pool autoPlayed is applied correctly

@hjpalpha hjpalpha changed the title feat: auto played from match data for TC feat: Add autoPlayed funtionality for new TeamCards Nov 30, 2025
@hjpalpha hjpalpha changed the title feat: Add autoPlayed funtionality for new TeamCards feat: Add autoPlayed funtionality for TeamParticipants Nov 30, 2025
@hjpalpha hjpalpha marked this pull request as ready for review November 30, 2025 12:28
Copy link
Copy Markdown
Collaborator

@Eetwalt Eetwalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of typos, otherwise looks good to me

hjpalpha and others added 2 commits December 1, 2025 08:57
Co-authored-by: Eetu Rantanen <75437856+Eetwalt@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@ElectricalBoy ElectricalBoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm modulo typo

Co-authored-by: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com>
@mbergen
Copy link
Copy Markdown
Collaborator

mbergen commented Dec 2, 2025

Will this lead to issues with data cycles or mismatches?
Without the variables being stored (played=false) by the teamcard, the storage in the match will be bad, so importing that can cause issues.

@hjpalpha
Copy link
Copy Markdown
Collaborator Author

hjpalpha commented Dec 2, 2025

Will this lead to issues with data cycles or mismatches? Without the variables being stored (played=false) by the teamcard, the storage in the match will be bad, so importing that can cause issues.

the wikis this is (mostly) intended for (craft wikis) already store the players in match.match2opponents[X].match2players if they are set in a map even if they are not set in TC

function MapFunctions.getTeamMapPlayers(mapInput, opponent, opponentIndex)

we currently already use a very similar logic on sc, sc2 and stormgate (only real diff is that instead of parent we use stages input, but implementing that for the new TC we would need to pass more stuff into settings and you wouldn't want to have to enter that per opponent...)

additionally this functionality is to be enabled via a param (hence by default not enabled and not causing issues) and manual input always wins

@hjpalpha
Copy link
Copy Markdown
Collaborator Author

hjpalpha commented Dec 9, 2025

retested

@hjpalpha hjpalpha requested review from a team as code owners February 28, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants