So, you've come to this crazy place. You want to learn about UI modding. Congrats, and good luck.
This section is going to cover a lot - I'd like to share about as much UI modding tips as I have - and because of that, it's likely things will go back and forth. Primarily, this is a subject based in Lua, and most of the actual UI creation will take place in Lua scripts. Lua knowledge is expected. I'm not going to make this a copy of the Lua chapters, but with UI. If you don't know what I'm talking about, it should be in the Lua chapters. If it is not, tell me, and I will add it.
There will also be assumptions that you understand what various game objects are - like buildings, effects, localisation - and there will be assumptions that you know how to do them and use them. If you do not - find out, then come back.
The final large assumption this tutorial bears in mind is that you have a goal, a specific thing you want to create. I'm going to mostly be doing lightly guiding, and I'll be explaining one general concept at a time. We'll start from the very basics, and will eventually rabbit-hole into a bunch of fun specific tasks - like creating custom tooltips, generating UI from data. If a chapter doesn't cover whatever your specific needs are - I would read it. The progression is setup in mind for someone trying to go from "create a button" to "create fully custom UI panels and mess with vanilla ones as well".
Note that this is heavily geared towards WH2, but almost all of the information here will carry over to Three Kingdoms. I'll try to make clear any differences, if I can recall any!
And without further adieu, let's get started.