Tournament Codes
Understanding tournament codes, how they're generated, and how to use them
Tournament Codes
Tournament codes are unique codes generated for each game that teams use to create custom games in League of Legends.
What are Tournament Codes?
Tournament codes are special codes that:
- Link to Riot: Connect games to Riot's tournament system
- Unique Per Game: Each game has its own code
- Used In-Game: Teams enter code to create custom game
- Track Games: Help identify and import games automatically
How Tournament Codes Work
Code Generation
Tournament codes are generated:
- Automatically: When games are created (if Riot integration set up)
- Per Game: One code per game, not per match
- On Creation: Codes generated when game slots are created
- With Metadata: Codes include game/match information
Code Structure
Each tournament code:
- Unique Identifier: Unique code string
- Linked to Game: Associated with specific game
- Contains Metadata: Includes game/match information
- Region Specific: Generated for specific region
Code Usage
Teams use codes by:
- Entering Code: Enter code in League of Legends client
- Creating Game: Code creates custom tournament game
- Playing Game: Teams play the game normally
- Game Completion: Game finishes and can be imported
Automatic Code Generation
When Codes Are Generated
Codes are generated automatically when:
- Games Created: When match creates game slots
- Riot Linked: Tournament is linked to Riot tournament
- Integration Active: Riot integration is configured
- Codes Enabled: Tournament code generation is enabled
Code Generation Process
- Match Created: Match is created with best_of value
- Games Created: Game slots created automatically
- Riot Check: System checks if tournament has Riot ID
- Code Generation: Codes generated for each game
- Code Storage: Codes stored in database
- Code Display: Codes shown in admin UI
Manual Code Generation
When to Generate Manually
Generate codes manually if:
- Automatic Failed: Automatic generation didn't work
- Codes Missing: Games don't have codes
- Re-generate: Need to regenerate codes
- New Games: Games created before Riot setup
How to Generate Manually
- Navigate to Match: Go to match management
- Expand Match: Expand to see games
- Find Game: Locate game without code
- Generate Code: Click "Generate Code" or use API
- Verify Code: Check code appears in UI
Bulk Code Generation
Generate codes for multiple games:
- Select Match: Choose match with multiple games
- Generate All: Use "Generate All Codes" option
- Wait for Completion: Codes generate in background
- Verify Codes: Check all games have codes
Code Configuration
Code Settings
Tournament codes can be configured with:
- Team Size: Number of players per team (default: 5)
- Spectator Type: Who can spectate (ALL, LOBBYONLY, etc.)
- Pick Type: Draft type (TOURNAMENT_DRAFT, etc.)
- Map Type: Game map (SUMMONERS_RIFT, etc.)
- Player Restrictions: Restrict to specific players
Default Settings
Default code configuration:
- Team Size: 5 players
- Spectator Type: ALL (anyone can spectate)
- Pick Type: TOURNAMENT_DRAFT
- Map Type: SUMMONERS_RIFT
- Player Restrictions: None (by default)
Code Display
Where Codes Appear
Tournament codes are displayed:
- Admin UI: In match management, when games expanded
- Game Details: In individual game information
- Match View: In match details page
- Export: Can be exported with match data
Code Format
Codes appear as:
- Short String: Alphanumeric code (e.g., "ABC123XYZ")
- Readable: Easy to copy and share
- Unique: Each code is unique
- Region Tagged: Associated with region
Using Tournament Codes
For Teams
Teams use codes to:
- Open League Client: Launch League of Legends
- Go to Custom Games: Navigate to custom game creation
- Enter Code: Enter tournament code
- Create Game: System creates tournament game
- Play Game: Play game normally
- Finish Game: Complete game as usual
For Administrators
Administrators use codes to:
- Distribute to Teams: Share codes with teams
- Track Games: Identify games by code
- Import Games: Use codes to import games
- Monitor Usage: See which codes are used
Code Management
Viewing Codes
View tournament codes:
- Navigate to Match: Go to match management
- Expand Match: Click to expand match
- View Games: See all games for match
- See Codes: Codes displayed for each game
- Copy Code: Click to copy code if needed
Code Status
Codes can have different statuses:
- Issued: Code generated and available
- Used: Code has been used in a game
- Expired: Code is no longer valid (rare)
- Invalid: Code has an error
Code Troubleshooting
Codes Not Generating
Problem: Codes not being generated automatically
Solutions:
- Verify tournament is linked to Riot
- Check Riot integration is configured
- Ensure Riot API access is valid
- Verify provider and tournament IDs
- Generate codes manually if needed
Codes Missing
Problem: Games don't have codes
Solutions:
- Check Riot integration status
- Verify codes were generated
- Generate codes manually
- Check for generation errors
- Review Riot API access
Codes Not Working
Problem: Teams can't use codes in-game
Solutions:
- Verify code is correct
- Check code hasn't expired
- Ensure region matches
- Verify Riot service status
- Try regenerating code
Wrong Codes
Problem: Codes don't match games
Solutions:
- Regenerate codes
- Verify game-to-code mapping
- Check code metadata
- Review code generation process
- Contact support if persistent
Best Practices
Code Distribution
- Share Early: Provide codes before match time
- Clear Communication: Share codes clearly
- Backup Method: Have backup way to share codes
- Verify Codes: Test codes work before sharing
- Document Codes: Keep record of codes used
Code Management
- Monitor Generation: Watch for generation issues
- Verify Codes: Check codes are correct
- Track Usage: Monitor which codes are used
- Handle Issues: Address code problems quickly
- Keep Records: Document code assignments
Code Security
- Don't Share Publicly: Keep codes private
- Share Securely: Use secure channels
- Time-Limited: Codes may expire
- One-Time Use: Codes typically used once
- Verify Recipients: Ensure right teams get codes
Code Metadata
What's Included
Tournament codes include metadata:
- Game ID: Links code to specific game
- Match ID: Links to parent match
- Tournament ID: Links to tournament
- Game Number: Which game in match (1, 2, 3, etc.)
- Week/Round: Match week and round information
- Team IDs: Home and away team IDs
Using Metadata
Metadata is used for:
- Game Identification: Finding game from code
- Automatic Import: Matching callbacks to games
- Tracking: Tracking code usage
- Debugging: Troubleshooting issues