Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

UI (User interface) - RTW

From TWC Wiki
Jump to navigationJump to search
Rome:Total War & Remastered - Modding Index


Introduction

A process monitor can be used whilst RTW is running to view the paths of image files that the game attempts to load.

Note: Files which load from inside .pak file would not show loading in process monitor individually due to those files would upload to memory as bulk *.pak files only once at start up.

Note: Although process monitor have shown attempt that game try to load .dds variation of the files inside UI folder, its successful loading attempt lead to black UI or no UI appeared on display so all those detail have been omitted unless it show successful display result.

"UI" Folder structures

 "data\ui\ancillaries" folder (contain images using by ancillaries)
 "data\ui\captain banners" folder (contain captain's cards)
 	"data\ui\captain banners\dead" folder (contain "dead" equivalent of captain's cards)
 "data\ui\cursors" folder (contain cursor animation variant)
 "data\ui\custom_portraits" folder (hardcoded place for custom portraits, only support in Alexander: Total War"
 "data\ui\icons" folder (no longer use/left over from development?)
 "data\ui\images" folder (no longer use/left over from development?)
 "data\ui\indicators" folder (contain transparent indicator, but RTW using CAS files instead so it maybe left over content)
 "data\ui\messages" folder (no longer use as event pictures as now they using "ui\*culture_id*\eventpics" folder instead)
 "data\ui\pips" folder (hardcoded location for pips icon using in settlement review and settlement tooltip)
 "data\ui\resources" folder (contain pips for trade resources (not hardcoded))
 "data\ui\generic" folder
 	"data\ui\generic\eventpics" folder (not exist in vanilla but valid location for loading event pictures, see below)
 	"data\ui\generic\bribed_portrait.tga" (hardcoded picture for character inside family tree that join enemy)
 	"data\ui\generic\#generic_unit_card.tga" (hardcoded picture for generic unit card, last resort loading)
 	"data\ui\generic\generic_unit_info.tga" (hardcoded picture for generic unit info picture, last resort loading)
 	"data\ui\generic\generic_city.tga" (hardcoded picture for generic city portrait using in list menu)
 	"data\ui\generic\generic_fort.tga" (hardcoded picture for generic fort portrait using in list menu)
 "data\ui\*culture_id*" folder (contain culture-specific UI content)
 	"data\ui\*culture_id*\agents" folder (no longer use/left over from development)
 	"data\ui\*culture_id*\buildings" folder (contain building picture for lower bar display and building browser)
 	"data\ui\*culture_id*\buildings\construction" folder (contain building picture for construction menu)
 	"data\ui\*culture_id\cities*" folder (contain settlement representation in list menu and building browser)
 	"data\ui\*culture_id*\construction" folder (no longer use/left over from development)
 	"data\ui\*culture_id*\eventpics" folder (contain in-game event pictures)
 	"data\ui\*culture_id*\interface" folder (contain in-game campaign/battle interface)
 	"data\ui\*culture_id*\plugins" folder (no longer use/left over from development?)
 	"data\ui\*culture_id*\portraits" folder (contain in-game character portraits&cards)
 		"data\ui\*culture_id*\portraits\family" folder (contain in-game non-character family member's cards)
 			"data\ui\*culture_id*\portraits\family\dead" folder (dead general cards)
 		"data\ui\*culture_id*\portraits\cards" folder (contain in-game character cards)
 			"data\ui\*culture_id*\portraits\cards\Dead" folder (dead general cards)
 			"data\ui\*culture_id*\portraits\cards\old" folder (old character cards)
 				"data\ui\*culture_id*\portraits\cards\old\civilians" folder (old diplomat cards)
 				"data\ui\*culture_id*\portraits\cards\old\generals" folder (old general cards)
 				"data\ui\*culture_id*\portraits\cards\old\rogue" folder (old spy/assassin cards)
 			"data\ui\*culture_id*\portraits\cards\young" folder (contain in-game young character cards)
 				"data\ui\*culture_id*\portraits\cards\young\civilians" folder (young diplomat cards)
 				"data\ui\*culture_id*\portraits\cards\young\generals" folder (young general cards)
 				"data\ui\*culture_id*\portraits\cards\young\rogue" folder (young spy/assassin cards)
 		"data\ui\*culture_id*\portraits\portriats" folder (contain in-game character portraits)
 			"data\ui\*culture_id*\portraits\portriats\Dead" folder (dead general portraits)
 			"data\ui\*culture_id*\portraits\portriats\old" folder (old character portraits)
 				"data\ui\*culture_id*\portraits\portriats\old\civilians" folder (old diplomat portraits)
 				"data\ui\*culture_id*\portraits\portriats\old\generals" folder (old general portraits)
 				"data\ui\*culture_id*\portraits\portriats\old\rogue" folder (old spy/assassin portraits)
 			"data\ui\*culture_id*\portraits\portriats\young" folder (contain in-game young character portraits)
 				"data\ui\*culture_id*\portraits\portriats\young\civilians" folder (young diplomat portraits)
 				"data\ui\*culture_id*\portraits\portriats\young\generals" folder (young general portraits)
 				"data\ui\*culture_id*\portraits\portriats\young\rogue" folder (young spy/assassin portraits)
 		"data\ui\*culture_id*\portraits\general_card.tga" folder (no longer use/left over from development)
 		"data\ui\*culture_id*\portraits\general_portrait.tga" folder (no longer use/left over from development)
  "data\ui\units" folder (contain unit/agent cards, categorized by factions)
 	"data\ui\units\*faction_id*" folder (contain faction varient of each unit/agent cards)
  "data\ui\unit_info" folder (contain unit/agent info picture for browser, categorized by factions)
 	"data\ui\unit_info\*faction_id*" folder (contain faction varient of each unit/agent info picture)
  "data\ui\wonders" folder (contain browser UI for wonders)

Category, Format, and Loading priority

Agents' UI

Name of UI using by agent are according to setting inside descr_cultures.txt (except admiral which using captain banner instead) or not still yet to be verify. but location for agents' unit card (which using in recruitment menu) is inside "ui\units\*faction_id*" folder under names assassin.tga, diplomat.tga, and spy.tga. Agent picture for unit browsers could be found in "ui\unit_info\*faction_id*" under names assassin_info.tga, diplomat_info.tga, and spy_info.tga. For detail about portraits, see portraits section.

-Loading priority

1st - "*mod*\data\ui\units\*faction_id*\xxx.tga" (outside .pak file)

2nd - "*mod*\data\ui\units\*faction_id*\xxx.tga" (inside .pak file)

3rd - "data\ui\units\*faction_id*\xxx.tga" (outside .pak file)

4th - "data\ui\units\*faction_id*\xxx.tga" (inside .pak file)

5th - untest


1st - "*mod*\data\ui\unit_info\*faction_id*\xxx_info.tga" (outside .pak file)

2nd - "*mod*\data\ui\unit_info\*faction_id*\xxx_info.tga" (inside .pak file)

3rd - "data\ui\unit_info\*faction_id*\xxx_info.tga" (outside .pak file)

4th - "data\ui\unit_info\*faction_id*\xxx_info.tga" (inside .pak file)

5th - untest


Ancillaries Images

Ancillaries image as specified in image section in ancillary entry inside export_descr_ancillaries.txt would always load from "*mod*\data\ui\ancillaries" or "data\ui\ancillaries". If file which specified in that section not exist, there would be CTD upon spawning of that ancillary.

Note: Vanilla ancillaries image may contain alpha channals but it is not loaded in game and behind alpha channal contain background which would display in game so modder should aware of that before modify them.

-Loading priority

1st - "*mod*\data\ui\ancillaries\xxx.tga" (outside .pak file)

2nd - "*mod*\data\ui\ancillaries\xxx.tga" (inside .pak file)

3rd - "data\ui\units\ancillaries\xxx.tga" (outside .pak file)

Last - "data\ui\units\ancillaries\xxx.tga" (inside .pak file)


Buildings and Interface

Look up of Buildings's UI depending on "culture_id" and "building_level_id". Building UI have to be put in "data\ui\*culture_id*\buildings" or "*mod*\data\ui\*culture_id*\buildings" which included following files...

 #*culture_id*_building_level_id.tga (for settlement tab on lower menu bar)
 #*culture_id*_building_level_id_constructed.tga (for building info browser)

construction\#*culture_id*_building_level_id.tga (for settlement construction menu)


Buildings UI could shared between several buildings (like case of temple in vanilla RTW) by redirect UI usage setting inside descr_ui_buildings.txt which would follow pattern below.

 lookup_variants
 {
 	<culture_id> <culture_id (substitute)>
 	<building_level_id> <name_id (substitute)>
 }

There are two ways to redirect buildings' UI look up, first by redirect from one culture to another. By this setting if UI for the buildings is not exist for the culture, it would look for substitute from the same building_level_id from the culture you specified. Here is example from vanilla setting.

 	carthaginian eastern
 	carthaginian egyptian
 	eastern egyptian
 	greek roman

Under vanilla setting, any building UI which carthaginian culture does not have, game would look for the same entry inside eastern and egyptian cultures entries instead. The same also for eastern culture to look for missing entries from egyptian culture set and greek from roman set.

Second way of redirecting that descr_ui_buildings.txt allowed is to specific building_level_id to look into specific name_id of pictures which vanilla is using for generalized all temples inside the same culture as you would see the example below.

 	temple_of_battle_shrine	shrine

From this example from vanilla, building level "temple_of_battle_shrine" would looking for files below if direct match of their building_level_id not exist.

 #*culture_id*_shrine.tga (for settlement tab on lower menu bar)
 #*culture_id*_shrine_constructed.tga (for building info browser)

construction\#*culture_id*_shrine.tga (for settlement construction menu)


Both redirect to other cultures and redirect to other ui entry name are able to combine in effect.

As UI usage of buildings could be shared or redirect, there is not hardcoded last resort setting for building UI and any missing UI building UI in faction which could build the building in export_descr_buildings.txt would lead to CTD at start up. If building which faction could not build and has no UI entry for it in its cultured assigned as creator in side descr_strat.txt would also lead to CTD upon scrolling over settlement on strategy overland map.

-Loading priority

1st - "*mod*\data\ui\*culture_id*" (outside .pak file)

2nd - "*mod*\data\ui\*culture_id*" (inside .pak file)

3rd - "data\ui\*culture_id*" (outside .pak file)

Last - "data\ui\*culture_id*" (inside .pak file)

Captain's Portraits

Captain's banner UIs (as representation of portraits and cards) are hardcoded loading from "*mod*\data\ui\captain banners" or "data\ui\captain banners" which each factions would contain set of following...

captain_card_*faction_id*.tga (using by living captain of the faction in list scroll)

captain_card_*faction_id*_rebel.tga (use by living captain of slave subfaction in list scroll)

captain_portrait_*faction_id*.tga (using by living captain of the faction as portrait substitute)

captain_portrait_*faction_id*_rebel.tga (use by living captain of slave subfaction as portrait substitute)

dead\captain_card_*faction_id*.tga (using by dead captain of the faction)

dead\captain_card_*faction_id*_rebel.tga (use by dead captain of slave subfaction)


Load priority of captain's card is quite exceptional that last priority for its loading is outside UI folder and discovered by using of process monitor.

-Loading priority

1st - "*mod*\data\ui\captain banners" (outside .pak file)

2nd - "*mod*\data\ui\captain banners" (inside .pak file)

3rd - "data\ui\captain banners" (outside .pak file)

4th - "data\ui\captain banners" (inside .pak file)

5th - "*mod*\data\textures\placeholder.tga" (outside .pak file)

6th - "*mod*\data\textures\placeholder.tga" (inside .pak file)

7th - "data\textures\placeholder.tga" (outside .pak file)

Last - "data\textures\placeholder.tga" (inside .pak file)


Note: slave rebel as spawn through shadow faction setting (shadowing slave or shadowed_by slave) would not able to load proper subfaction-related UI and character names, so its portraits and cards loading would skip to priority 5th immediately.


Character's Portraits

Character's portraits of each culture could be setting in descr_cultures.txt in "portrait_mapping" section. Localization in this section would point to *culture_id*" folder inside UI folder but actual portraits set are in "Portraits" folder inside it. Inside "Portraits" folder contains 3 subfolders, "cards", "family", and "portraits". "cards" and "portraits" folders are connected by id number of portraits/cards which matched one another. "family" folder contains cards for non-character family members (wife.tga, son.tga, daughter.tga) and their dead version inside "family/dead" subfolder.

The structure inside cards and portraits folders are the same which divide into 3 subfolders "dead", "old", and "young". "Dead" folder contains only dead portraits of general characters while "old" and "young" contain 3 subfolders which separate set of portraits/cards for "civilians" which using diplomat, "generals" which using for general characters, and "rogues' using for assassin and spy. ID number of the pictures are sorted from 000 and counting upward. A picture of the same id should be the same set across the folders according to the following:

- generals set

portraits\cards\dead\

portraits\cards\old\generals\

portraits\cards\young\generals\

portraits\portraits\dead\

portraits\portraits\old\generals\

portraits\portraits\young\generals\


Note: Vanilla dead portraits are out of sync with old and young portraits in the same set.


- civilians set (for diplomats)

portraits\cards\old\civilians\

portraits\cards\young\civilians\

portraits\portraits\old\civilians\

portraits\portraits\young\civilians\


- rogues set (for assassins and spies)

portraits\cards\old\rogues\

portraits\cards\young\rogues\

portraits\portraits\old\rogues\

portraits\portraits\young\rogues\


Each picture in the same set must share the same ID numbers. Missing pictures or skip number may cause problems. (not test yet) But not all portraits and cards need to be in the same folder, folders inside *mod* folder could contain id number that continue from vanilla ones. In case portraits/cards in *mod* folder shared the same id with vanilla folder, content in *mod* folder would take priority. And if modder want portrait mapping to different from vanilla but number of id lower than what vanilla have, modder could create new folder to start new set for portrait mapping purposes.

Note: Vanilla portraits may contain alpha channels but it is not loaded in game and behind alpha channel contain background which would display in game so modder should aware of that before modify them.

-Loading priority

1st - "*mod*\data\ui\*culture_id*" (outside .pak file)

2nd - "*mod*\data\ui\*culture_id*" (inside .pak file)

3rd - "data\ui\*culture_id*" (outside .pak file)

Last - "data\ui\*culture_id*" (inside .pak file)


Cursors

Usage of Cursors UI and their location is not hardcoded and could be modified or change pathing for UI in descr_ui_animations.txt.

-Loading priority

1st - "*location specified in "descr_ui_animations.txt"* (outside .pak file)"

Last - "*location specified in "descr_ui_animations.txt"* (but NOT pathing to mod folder)" (inside .pak file)


Event Pictures

Look up of event pictures UI depending on *culture_id*, *event_id*, and some image specification setting in descr_event_image.txt (in case set event picture to shared with other events). If it could not find picture with name match *event_id*, game would load "messenger.tga" as generic picture for event message.

Difference from other types of UI, event pictures have generic folder priority higher than culture folder priority. So if using culture specific event picture, there must not be picture of the same event_id inside "ui/generic/eventpics" folder.

-Loading priority

1st - "*mod*\data\ui\generic\eventpics\*event_id*.tga" (outside .pak file)

2nd - "*mod*\data\ui\generic\eventpics\*event_id*.tga" (inside .pak file)

("data\ui\generic\eventpics\*event_id*.tga" is theorectical location, game would attempt to load as shown by process monitors but files are not exist in that location in vanilla folder)

3rd - "*mod*\data\ui\*culture_id*\eventpics\*event_id*.tga" (outside .pak file)

4th - "*mod*\data\ui\*culture_id*\eventpics\*event_id*.tga" (inside .pak file)

5rd - "data\ui\*culture_id*\eventpics\*event_id*.tga" (outside .pak file)

6th - "data\ui\*culture_id*\eventpics\*event_id*.tga" (inside .pak file)

7th - "*mod*\data\ui\generic\eventpics\messenger.tga" (outside .pak file)

8th - "*mod*\data\ui\generic\eventpics\messenger.tga" (inside .pak file)

9rd - "*mod*\data\ui\*culture_id*\eventpics\messenger.tga" (outside .pak file)

10th - "*mod*\data\ui\*culture_id*\eventpics\messenger.tga" (inside .pak file)

("data\ui\generic\eventpics\messenger.tga" is theorectical location, game would attempt to load as shown by process monitors but files are not exist in that location in vanilla folder)

11th - "data\ui\*culture_id*\eventpics\messenger.tga" (outside .pak file)

Last - "data\ui\*culture_id*\eventpics\messenger.tga" (inside .pak file)


Interface

Look up of Interface's UI depending on "culture_id" by looking for interface content inside "*mod*\data\ui\*culture_id*\interface" or "data\ui\*culture_id*\interface" but could could also shared or redirect UI usage setting based on culture substitute setting inside descr_ui_buildings.txt (see above).

Minor UI categories inside "data\ui\*culture_id*" (#fort.tga, #watchtower.tga, advisor battlemap.tga, advisor stratmap.tga) are also working the same way as it could be shared and redirected based on descr_ui_buildings.txt.

As UI usage of interface could be shared or redirect, there is not hardcoded last resort setting for building UI and any missing UI building UI in faction which could build the building in export_descr_buildings.txt would lead to CTD at start up. If building which faction could not build and has no UI entry for it in its cultured assigned as creator in side descr_strat.txt would also lead to CTD upon scrolling over settlement on strategy overland map.

-Loading priority

1st - "*mod*\data\ui\*culture_id*" (outside .pak file)

2nd - "*mod*\data\ui\*culture_id*" (inside .pak file)

3rd - "data\ui\*culture_id*" (outside .pak file)

Last - "data\ui\*culture_id*" (inside .pak file)


Pips

Most of pips are hardcoded in term of location with loading priority except religion and trade resource pips.

-Loading priority

1st - "*mod*\data\ui\pips\xxx.tga" (outside .pak file)

2nd - "*mod*\data\ui\pips\xxx.tga" (inside .pak file)

3rd - "data\ui\units\pips\xxx.tga" (outside .pak file)

Last - "data\ui\units\pips\xxx.tga" (inside .pak file)


Religion pips are setting in "*mod*\data\descr_belief.txt" with pathing as reference from game's exe file.

-Loading priority

1st - "*location specified in "*mod*\data\descr_belief.txt"* (outside .pak file)"

Last - "*location specified in "*mod*\data\descr_belief.txt"* (but NOT pathing to mod folder)" (inside .pak file)


Trade resource pips are setting in "descr_sm_resources.txt" with pathing as reference from game's exe file.

-Loading priority

1st - "*location specified in "descr_sm_resources.txt"* (outside .pak file)"

Last - "*location specified in "descr_sm_resources.txt"* (but NOT pathing to mod folder)" (inside .pak file)


Settlement UI

UI represent settlements on each level could be found in "data\ui\*culture_id*\cities" and loading of these files are hardcoded. This category is different from most of other hardcoded UI, it has no loading priority outside vanilla data folder. So if modder want to change them, they could only be done by put inside .pak file only. Fortunately, usage of shared UI is effected by culture substitution inside descr_ui_buildings.txt

-Loading priority

1st - "*mod*\data\ui\*culture_id*\cities" (inside .pak file)

2nd - "data\ui\*culture_id*\cities" (outside .pak file)

Last - "data\ui\*culture_id*\cities" (inside .pak file)


Units

Each faction would use these UI inside their own subfolder (named by their own faction_id) inside folder "data\ui\units". Matching between units and units's UI are based on "directory" entry in EDU (the same one with one that use for text description localization) with additional prefix "#" inside their own subfolder. If file not exist, it would attempt to load from file "data\ui\generic\#generic_unit_card.tga". There would not be cross-faction loading in this category.

-Loading priority

1st - "*mod*\data\ui\units\*faction_id*\#xxx.tga" (outside .pak file)

2nd - "*mod*\data\ui\units\*faction_id*\#xxx.tga" (inside .pak file)

3rd - "data\ui\units\*faction_id*\#xxx.tga" (outside .pak file)

4th - "data\ui\units\*faction_id*\#xxx.tga" (inside .pak file)

5th - "*mod*\data\ui\generic\#generic_unit_card.tga" (outside .pak file)

6th - "*mod*\data\ui\generic\#generic_unit_card.tga" (inside .pak file)

7th - "data\ui\generic\#generic_unit_card.tga" (outside .pak file)

Last - "data\ui\generic\#generic_unit_card.tga" (inside .pak file)


Unit_info

Each faction would use these UI inside their own subfolder (named by their own faction_id) inside folder "data\ui\unit_info". Matching between units and unit_info's UI are based on "directory" entry in EDU (the same one with one that use for text description localization) with additional suffix "_info" at the end of its name. If file not exist, it would attempt to load from file "data\ui\generic\generic_unit_info.tga". There would not be cross-faction loading in this category.

-Loading priority

1st - "*mod*\data\ui\unit_info\*faction_id*\xxx_info.tga" (outside .pak file)

2nd - "*mod*\data\ui\unit_info\*faction_id*\xxx_info.tga" (inside .pak file)

3rd - "data\ui\unit_info\*faction_id*\xxx_info.tga" (outside .pak file)

4th - "data\ui\unit_info\*faction_id*\xxx_info.tga" (inside .pak file)

5th - "*mod*\data\ui\generic\generic_unit_info.tga" (outside .pak file)

6th - "*mod*\data\ui\generic\generic_unit_info.tga" (inside .pak file)

7th - "data\ui\generic\generic_unit_info.tga" (outside .pak file)

Last - "data\ui\generic\generic_unit_info.tga" (inside .pak file)


Wonders

Location of Wonders image is not hardcoded and could be changed and set in "data\descr_sm_landmark.txt" in image section of each landmark entries. There is no alternative loading location. If want to load image file from mod, modder must pathing the file to mod folder instead of vanilla folder. Wrong pathing would lead to CTD upon open wonder info browser.

-Loading priority

1st - "*location specified in descr_sm_landmark.txt*" (outside .pak file)

Last - "*location specified in descr_sm_landmark.txt* (but NOT pathing to mod folder)" (inside .pak file)

Closing

End

YOU can help us improve this Wiki! ~ Look for ways to help and editing advice. ~ If you need further advice, please post here.