• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

UI: toc-Files

Introduction

A TOC file is a file listing one or more fdf (frame definition files). Each line is a path to one fdf. Each fdf is an own file. In Warcraft 3 this TOC-Files are used to load the fdfs beeing listed.​
After a fdf was loaded into the game using a TOC lisiting it, main-Frames defined in the fdf can be created. Main-Frames are in my talking Frame definitions outside of Blocks { }.​
A TOC-File is not case sensitve.​
One can load a TOC-File using the native provided in Warcraft 3 1.31.​
native BlzLoadTOCFile takes string TOCFile returns boolean
it returns true if the TOC file was loaded successfuly. It might be smart to create a new function telling your, if a TOC load failed/succeeded.​
On default "ui/framedef/framedef.toc" is loaded, it contains most default fdf of warcraft 3.​
Code:
UI\FrameDef\GlobalStrings.fdf
UI\FrameDef\InfoPanelStrings.fdf
UI\FrameDef\NetworkStrings.fdf
UI\FrameDef\DateStrings.fdf
UI\FrameDef\Glue\DialogWar3.fdf
UI\FrameDef\Glue\MapInfoPane.fdf
UI\FrameDef\Glue\AdvancedOptionsDisplay.fdf
UI\FrameDef\Glue\AdvancedOptionsPane.fdf
UI\FrameDef\Glue\ListBoxWar3.fdf
UI\FrameDef\Glue\MapListBox.fdf
UI\FrameDef\Glue\DecoratedMapListBox.fdf
UI\FrameDef\Glue\MapPreferenceBox.fdf
UI\FrameDef\Glue\CheckListBox.fdf
UI\FrameDef\Glue\MainMenu.fdf
UI\FrameDef\Glue\MovieScreen.fdf
UI\FrameDef\Glue\Loading.fdf
UI\FrameDef\Glue\LoadSavedGameScreen.fdf
UI\FrameDef\Glue\OptionsMenu.fdf
UI\FrameDef\Glue\SinglePlayerMenu.fdf
UI\FrameDef\Glue\ViewReplayScreen.fdf
UI\FrameDef\Glue\CustomCampaignMenu.fdf
UI\FrameDef\Glue\CampaignMenu.fdf
UI\FrameDef\Glue\TeamSetup.fdf
UI\FrameDef\Glue\PlayerSlot.fdf
UI\FrameDef\Glue\Skirmish.fdf
UI\FrameDef\Glue\ScoreScreen.fdf
UI\FrameDef\Glue\LocalMultiplayerJoin.fdf
UI\FrameDef\Glue\LocalMultiplayerCreate.fdf
UI\FrameDef\Glue\LocalMultiplayerLoad.fdf
UI\FrameDef\Glue\GameChatroom.fdf
UI\FrameDef\Glue\CampaignListBox.fdf
UI\FrameDef\Glue\BattleNetMain.fdf
UI\FrameDef\Glue\BattleNetMatchmakerPanel.fdf
UI\FrameDef\Glue\BattleNetNewsBox.fdf
UI\FrameDef\Glue\BattleNetUserListBox.fdf
UI\FrameDef\Glue\BattleNetChatPanel.fdf
UI\FrameDef\Glue\BattleNetChatActionMenu.fdf
UI\FrameDef\Glue\BattleNetStandardPanel.fdf
UI\FrameDef\Glue\BattleNetTeamPanel.fdf
UI\FrameDef\Glue\BattleNetTeamInvitation.fdf
UI\FrameDef\Glue\BattleNetProfilePanel.fdf
UI\FrameDef\Glue\BattleNetCustomJoinPanel.fdf
UI\FrameDef\Glue\BattleNetCustomCreatePanel.fdf
UI\FrameDef\Glue\BattleNetCustomLoadPanel.fdf
UI\FrameDef\Glue\BattleNetScheduledGame.fdf
UI\FrameDef\Glue\BattleNetChatroom.fdf
UI\FrameDef\Glue\BattleNetFriendsListBox.fdf
UI\FrameDef\Glue\BattleNetFriendsPane.fdf
UI\FrameDef\Glue\BattleNetClanMateListBox.fdf
UI\FrameDef\Glue\BattleNetClanPane.fdf
UI\FrameDef\Glue\BattleNetClanInvitation.fdf
UI\FrameDef\Glue\BattleNetStatusBox.fdf
UI\FrameDef\Glue\BattleNetIconSelectBox.fdf
UI\FrameDef\UI\ConsoleUI.fdf
UI\FrameDef\UI\AllianceSlot.fdf
UI\FrameDef\UI\AllianceDialog.fdf
UI\FrameDef\UI\ChatDialog.fdf
UI\FrameDef\UI\LogDialog.fdf
UI\FrameDef\UI\EscMenuMainPanel.fdf
UI\FrameDef\UI\EscMenuOptionsPanel.fdf
UI\FrameDef\UI\EscMenuSaveGamePanel.fdf
UI\FrameDef\UI\GameResultDialog.fdf
UI\FrameDef\UI\UpperButtonBar.fdf
UI\FrameDef\UI\ResourceBar.fdf
UI\FrameDef\UI\SimpleInfoPanel.fdf
UI\FrameDef\UI\SuspendDialog.fdf
UI\FrameDef\UI\UnresponsiveDialog.fdf
UI\FrameDef\UI\ReplayPanel.fdf
UI\FrameDef\UI\ObserverPanel.fdf
UI\FrameDef\UI\QuestDialog.fdf
UI\FrameDef\UI\TimerDialog.fdf
UI\FrameDef\UI\Leaderboard.fdf
UI\FrameDef\UI\Multiboard.fdf
UI\FrameDef\UI\CinematicPanel.fdf
UI\FrameDef\UI\ScriptDialog.fdf
UI\FrameDef\UI\GameSaveSplashDialog.fdf
UI\FrameDef\UI\BrowserFrame.fdf


Although there are 3 further default fdf, providing quite useful basic frame templates which might be good to have in your map, if one does not create own custom fdf.​
Code:
ui\framedef\ui\escmenutemplates.fdf[
ui\framedef\glue\standardtemplates.fdf
ui\framedef\glue\battlenettemplates.fdf
The path written in the TOC file is the file the game will load. For imported fdf write the path you imported it into your map.​
It is recommented to add an empty line at the end of your TOC-Files text. It failed on the ptr without the empty ending line.​

Example

"myStatusBar.toc" imported to "war3mapImported\myStatusBar.toc"​
"myStatusbar.fdf" imported to "war3mapImported\myStatusBar.fdf"​
TOC-Content​
Toc empty Line White.jpg
in this example this line of code would load the imported TOC-File.​
call BlzLoadTOCFile("war3mapimported\\mystatusbar.toc")
TOC-Files are important when you want to create new frames or load further fdf.​
Edit: Added a zip containing "Templates.toc" it is loading the 2 templates mentioned.​
ImportToc.jpg


Other UI-Frame Tutorials

The following links might provide more insight into this subject.​
Default Names for BlzGetFrameByName (Access to Existing game-Frames)​
 

Attachments

  • Templates.zip
    181 bytes · Views: 418
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Probably stands for 'Table Of Contents'.
The paths in the file are not case-sensitive? Since the mpq archive uses some hash algorithm to locate a file, that's a bit strange. Either this must already not consider case or mentioning the FDFs in listfile would be a must?
Can you reference another toc in a toc?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I am cautious about this one.

The introduction gives a brief rundown of what the file format and a few fun facts about how it works in the background. This I have no problem with. But the important knowledge is just 3-4 sentences of information.
Importing a file is basic knowledge and does not really need to be taught. There are other tutorials that cover such.
Lastly, loading the file is also very useful but can also be explained in a single line.

This leaves the tutorial in my mind to feel extremely short. Yet those few lines are useful.
 
Top