Observer Interface Mods

SC2Interfaces are an entirely new feature that enables observers to watch the game using a completely custom User Interface. They exist within the Interfaces folder within the respective Documents folder for the logged in player (next to Saves and Replays)

! Note ! Currently this folder is not automatically created. Users will need to create this folder in order to place custom interface files there.

An easy way to find which account ID folder is for you is to use the shortcuts in C:\Users\BobTheUser\Documents\StarCraft II\ to get into the appropriate account.

tl;dr: The folder you put the file in can be found by going to C:\Users\YourWindowsAccountName\Documents\StarCraft II Beta\ and clicking on the link of your battle.net name, and adding the folder called "Interfaces" at the same level as the "Replays" and "Saves" folder.

Quote:

These archives function as a lightweight type of mod capable of adjusting the User Interface for the local player. They don’t modify or change the game in any way for other players.

Creating SC2Interface mods
Here’s a summary of how to access SC2Interface functionality through the Editor:

Mod documents now have a “type” associated with them, which can be either Interface or Gameplay (i.e. a normal mod). This type is determined automatically by the editor as data is changed, analogous to the melee/custom type for maps.The mod type and reasons for it being that type can be seen in the new Mod > Mod Status window (again, similar to Map > Map Status).When saving a mod file, if the mod is classified as Interface, then you can optionally choose the SC2Interface extension in the file dialog. You can always use the SC2Mod extension regardless of classification (We don’t want to require SC2Mod files to have actual gameplay data, they could just have assets for example).SC2Interface files can be loaded and saved exactly like SC2Mod files.If you load an existing SC2Interface file, then add data which causes it to be classified as Gameplay, the next time you save you’ll see a confirmation dialog indicating that the file extension must be changed to SC2Mod, and then a “Save As” dialog (which will only allow SC2Mod).

So if you wanted to make a custom interface from scratch, the steps would be:

1) Use File > New and choose the Mod document type.
2) Add custom layouts, text, and assets as desired, making sure not to change any gameplay data
3) Save the document and choose the SC2Interface extension from the type menu in the file dialog.

Breakdown of SC2Interface mod archives

SC2Interface mods can contain the following files:

Assets.txt
A file that contains key/value pairs representing paths to asset files included in the SC2Interface archive. This can also be used to override existing entries in currently loaded mods.

Any types of custom assets, such as .dds files can be included in the archive and referenced in this file.

enUS.SC2Data/LocalizedData/GameStrings.txt
A file that contains key/value pairs for English readable text. This can also be used to override existing entries in currently loaded mods.

%locale%.SC2Data/LocalizedData/GameStrings.txt
A localized text file where % represents any locale that needs localized text support. For example, deDE would be loaded by the German client. This support is included for players who want to make mods that can be distributed to players speaking different languages.

ObserverVariables.txt
A variables file that can be used to forcibly overwrite any player variables for the duration of the map. These variables will be discarded once the map ends and their values will revert back to the player’s variables.

For example this can be used to turn off the “gametooltips” variable while the SC2Interface is loaded so that even a player with their Display Game Tooltips Option turned on will not see game tooltips.

Note that there are many variables which don’t support elegantly changing their value at map load time in this way, such as many graphics options. The primary use of this file should be changing various gameplay or User Interface options.

It’s also not recommended to change options in the Options Panel while observing a game using a SC2Interface.

FontStyles.SC2Style
A file that contains entries representing font style data. This can be used to override existing font styles or create new ones to use in the SC2Interface.

DescIndex.SC2Layout
A file that contains the names of all the various SC2Layout files to load.

Many SC2Layout files can be added to the SC2Interface archive and used to either override existing UI or create entirely new UI.

DescIndex.SC2Layout: This file is generated automatically by the editor when you save your file. It will include any SC2Layouts you have added through the UI module of the editor. You do not need to add this manually.

To add a SC2Layout file:

open the UI module in the editor (Modules->UI, or shift+f6)

add a new layout (Data->Add Layout, or ctrl+L, or right click on the left panel->Add Layout). This is equivalent to adding a .SC2Layout file

edit the xml of layout you added as desired (check the starting guide linked above for help with this)

Testing your SC2Interface file

Assuming you've already moved the file to the correct place (see the very beginning of this post), all you have to do is:

make sure your interface file is selected in game by going to Options->Gameplay->Observer Interface (if it's not listed, you have it in the wrong folder)

opening up a replay

The game executable holds a write lock on the SC2Interface file while it is using it, but it does not cache the file. This means you can leave the replay and, with the game still open, modify/save the file you have selected in the game options, and immediately open up a replay and see your changes.

Sorry for my noobness, coming from a casting/obs perspective, I didn't realize that the editor generates DescIndex.SC2Layout for you. I thought you had to add it yourself since the guide posted on the bnet forums pointed it out specifically. Actually it freaks out a little if you try and import it and it doesn't match exactly what it was looking for path-wise. If you just add the SC2Layout files you want using the UI console, it will generate/update the DescIndex.SC2Layout for you each time you save. I'll update the OP :)

I found out that if you use a text ID in a sc2interface, it picks up whatever that value has been set to, including by the map. This means you can use the following and it will always show the current map name (which can be helpful for obs/casting):

<Frametype="Label"name="MapName"><Textval="@@DocInfo/Name"/></Frame>

Is there any text ID to get a player's name by number? Like Player 3's name? I understand that we can only get the text value and not change it to a string (since that's pretty much all I found when I searched), but all I want to do is display the name and nothing but the name. Is there a @@ for that, maybe one the map usually sets like the map name? Or is there any way in the context of a sc2interface that I can actually script/set text values and get it that way?