A Total War Saga: TROY

A Total War Saga: TROY

Provinces Panel Enhanced (UI/UX mod)
11 Comments
Guvenoren 7 Aug, 2022 @ 1:06pm 
This game could use some more UI fixes. Like 4k widescreen and enhanced sizes for UI panels. Sparta would desperately need that, all recruitments are so compacted.
LiOne 20 Sep, 2021 @ 10:48pm 
Thank you!:steamhappy:
Working Joe 18 Sep, 2021 @ 2:00am 
@mklabs that was a better answer than I could have ever hoped for! Thank you so much! I am very familiar with the amazing folks in the Modding Den, truly a gem of a discord. I'm trying to implement Agamemnon's political offices system for other factions (basically a copy/paste job) but I believe I need to understand some UI basics to do it. Thank you very much, again!
mklabs  [author] 18 Sep, 2021 @ 1:20am 
@Darkblade Also, I would recommend checking out CA's generated API scripting documentation available online there: https://chadvandy.github.io/tw_modding_resources/Troy/

As well as the modding wiki that Vandy is maintaining with the help of the modding community: https://tw-modding.com/index.php/Main_Page (it may have some infos on UI scripting)

Finally, I would recommend to head over the Modding Den Discord, you can find the link on tw-modding main page. There's a whole community of modders there that might be able to help you (me included, even though I'm not super active but you can still ping me)
mklabs  [author] 18 Sep, 2021 @ 1:19am 
@Darkblade Those are binary files (often called template in code) that you can't really edit (unless you hex edit them) or author yourself, you have to work with what is available in game. So most of the time, I'm looking for an UI element that suits what I'm trying to create, clone it, clean up his children and rebuild the hierarchy to do what I'm trying to achieve.
mklabs  [author] 18 Sep, 2021 @ 1:18am 
@Darkblade UI scripting in Total Wars (at least for both wh2 / troy where I have some experience) is based off what is called uic.
mklabs  [author] 18 Sep, 2021 @ 1:16am 
@Darkblade I would advise to start super simple, and try to create a basic panel or basic button on the screen, and try to play with it: changing it's text, size, register some listeners to it like click, mouseover etc. You can then go over the multiple uic templates available in the game, try to create a new component from them and see the results. You may crash the game a few times, but that's part of the process ;)
mklabs  [author] 18 Sep, 2021 @ 1:15am 
@Darkblade Lastly, another good way to learn more about UI scripting is to learn from others. Both in the base game scripts code base and from other mods. You can reference the two UI mods I made for Troy for learning purpose.
mklabs  [author] 18 Sep, 2021 @ 1:12am 
@Darkblade Thank you for the kind words. Regarding UI modding, it's a long learning process but at it's core, it's all LUA scripting.

One of the things that really helped me sorting out those mods is the devtool mod I made for both wh2 and troy. For troy, it's not uploaded yet on Steam but you can find the Epic version there: https://www.epicgames.com/store/en-US/mods/a-total-war-saga-troy--1e5c001242fd4169a1d2f2a7b8d2d1c9 (it's outdatded now though, and for 1.6 while it's still working, UI is a bit messed up and some functionnality not working anymore)

This devtool lets me inspect the UI hierarchy in game, grab references to some UI component and debug their props / children etc. Was very handy to implement both the Temples List and Provinces Panel.
Working Joe 17 Sep, 2021 @ 4:08pm 
Another brilliant mod. May I ask where you learned to mod the UI? I'm familiar with scripting for WH2/Troy, however UI is like Hieroglyphics. Any tips?
Naaquh 17 Sep, 2021 @ 12:23pm 
Great stuff!