This page provides basic instructions to edit the battle documents that are used as a source in RoyaleAPI event portals.
① Link to battle collection
The link for this page follows this format:
("KEY" is the key for your event)
This page will only provide battles that have been logged by RoyaleAPI in the clan that has been chosen to host the event. If certain battles aren’t logged automatically or are played in different clans, admins will have to add them manually. By default, this page will display the 100 most recent battles in chronological order, but this limit can be extended up to 1000 battles.
② Copy battles
The easiest way to know which battles to copy is to look at the date of each battle. The first row will be the most recent one, and the selection can be extended until the desired date. After that, copy the selection.
③ Paste battles
The copied battles are now pasted in the Google Sheets document, in a sheet named “DraftRA”.
It's important for this sheet to be empty before pasting the battles. Old information can be removed by clearing the columns A:R, as shown in this image:
Once this range is empty, the copied battles can be pasted in the cell A2.
④ Fixing player sides
Clash Royale battles have a blue player (host) and a red player (visitor). For our database to work properly, all players from a team must be on the same side during a match. Depending on how the battles have been logged, the sides might be switched for some battles. To fix this, just activate the tick box from the row of a switched battle. After all the players of the same team are displayed in the same side, you can advance to the next step.
⑤ Copy sorted battles
The battle information appears processed and sorted in the columns BG:CF. When copying this range, watch out for battles that appear as duplicates. (If battle ID is available, it will be marked in red) You can also exclude from the selection any battles that aren't relevant for the event.
Note: to make selections of multiple ranges, use the Ctrl key while selecting additional ranges.
⑥ Paste sorted battles
Battles should be pasted in the sheet for the appropriate week, starting by the column E.
Important: when pasting battles you’ll want to paste the results from the previous step, not the functions that calculate them. In Windows, you can do this by pressing Ctrl+Shift+V, or with a right mouse click (Paste Special > Paste values only).
⑦ Battle index
The four columns of the left (A:D) will have to be completed manually with the numbers of the week, match, set and battle that refers to each battle.
⑧ Adding banned cards
The card that was banned by each team should be added on their side only. It should be included in each of the rows for the battles that are affected by the bans. The names of the cards should be written in lowercase English, as shown in the default choice list. Each side can have up to 2 bans, which are separated by commas. Example:
⊕ Non-played battles
If a battle hasn't been played but is relevant for the score of a match, it will have to be included manually. As there won't be deck information for these battles, the deck field will be filled with "unknown" instead (for both players). For non-played battles, the players that were supposed to play can be selected manually. If not, select "? Unknown [ 0 ]". Crown scores can either be 0-0 or 3-0/0-3, the most relevant selection for these battles is the winner field. Select "r" if the red player won or "b" if the blue one did.
⊕ Forfeit battles
In some situations, the battle winner might not be the player who earned more crowns. This can be the case when a banned card has been used or any other infraction happened. For these cases, manually change the winner field and select "r" if the red player won or "b" if the blue one did.