Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: Kingdoms: making an UI

  1. #1
    cedric37's Avatar Why Not ?!
    Patrician Citizen

    Join Date
    Sep 2009
    Location
    France
    Posts
    8,573

    Default Kingdoms: making an UI

    I can say for now, that all the graphical elements are located into several files which are in the \<mod name>\data\ui\<culture>\interface folder. They are either called stratpage*.tga for strategic map ui's, battlepage*.tga for battle ui's or sharedpage*.tga for both. As they are tga's you get an alpha1 layer that allows you to play on the transparency.

    Other than that, you can see on existing files and by switching to the game (you can easily do so by alt+tab, since when the game reload, it automaticall takes the last changes so ne need to restart the game, just doing alt+tab is enough to check the changes).

    You will see what the following files are mainly used for:
    - sharedpage_00.tga: upper scrolls borders and backgrounds
    - sharedpage_01.tga: OK button in the upper scrolls
    - stratpage_01.tga: lower ui frame
    - stratpage_02.tga: finances button
    - stratpage_03.tga: some element used as a tab in upper scroll
    - stratpage_04.tga: all tabs and buttons remaining
    - battlepage_01.tga: all you need to change for battle ui's is here

    Now the tricky thing is to connect the files and UI elements together. Some elements are simply pasted, while other are stretched automatically by Kingdoms engine.
    Additionaly the mouseover for all clickeable elements are also located in those files and can be modified as well.

    Things i now focus on are: quality, clearness, originality and fidelity to the faction. If one of them is missing people will complain and sooner or later vanilla UI will be prefered over your UI.

    By quality i mean not only visual quality but also all mouseover and elements connection must be as smoother as possible.

    Note: This tutorial cover the remake of the layout of the UI and buttons, but faction shields are also located in those files. Most of the time they are not done by the same guy on most of the mods So we won't speak of them in this tutorial.

    So let start:

    Spoiler Alert, click show to read: 









    Patronized by y2day/Patron of KDK, Swagger & Navajo Joe, of the Imperial House of Hader



  2. #2

    Default Re: Kingdoms: making an UI

    is it possible to create a new battlepage_04.tga ?

    i'm interested in making some new hero_abilities for "the third age" mod and since i'm planing on implementing like 10 abilities ,the current battlepage_04 (where most of the current abilities buttons get their sprites from) is kinna small (has 16 ,in total ,sprites)

    if yes..how ? (let's take one thing at a time)

    -what programs (preferably freewares) should i use ?

    -method (if you don't have tthe time to help/guide me at least maybe link me to some tutorials..this forum,unfortunately ain't got any..the most revelant
    would be this one,which is a bit "empty" for starters like me)

    -files i'm gonna need ?
    i have made copies of
    battle.sd
    battle.sd xml
    battlepages 1...3...4

    ps..guess i could use this to some extent

    http://www.twcenter.net/forums/showthread.php?t=144340

    (even though it ,still , doesn't resolve the "insert more buttons --> make battlepage bigger" issue)
    Last edited by Noobio; April 29, 2011 at 04:40 PM.

  3. #3

    Default Re: Kingdoms: making an UI

    Use GIMP to edit .tga files. Make the canvas bigger that is your .tga file and then add in the new icons on it and provide the coordinates of them in the .xml file although not sure what you are trying to do.

  4. #4

    Default Re: Kingdoms: making an UI

    thanks for responding..

    i'm trying to implement custom "hero_abilities" ...some generic ,like attack-fatigue-morale bonus/malus ,other a bit more specialised..
    so i'm gonna have to "amplify" the battlepage_04 "panel" where quite all abilities buttons get their enable/-during/-disabled sprites...

    so if the current panel is 141-pixels_width x143-pixels_height with 16 sprites in it (resolution 37,80 pixels/cm) how do i proceed ?

    -do i just create an enlarged canvas maintaining the aspect ratio and then edit the sprites (maybe starting with overlaping them with my new ones) or do i make everything from scrath ?

    ps..i've attached the original mod's battlepage_04 that i'm going to edit..unfortunately tga. files can't be uploaded so it's in jpeg..anyway,if you convert it,you'll see that the sprites don't exactly finish where the squares do..so how do i find the coordinates to use in the battle.sd ?

    don't know why but when i converted it,it came up as its mirror image (the lion should be on the right..infact letters BF are mirror like)
    Last edited by Noobio; May 01, 2011 at 07:57 AM.

  5. #5

    Default Re: Kingdoms: making an UI

    If you have a mod where it is possible to build more than 24 buildings, where would the second, bottom placed arrow go on the strat page to allow for a third drop down constructed building window? I have seen this feature before in other mods but for the life of me I can't remember which or I would refer to that. I will try and upload a few pics whenever the forum will so allow.
    Attached Thumbnails Attached Thumbnails UI 2.jpg  
    Last edited by MIKE GOLF; November 24, 2013 at 11:23 PM.

  6. #6

    Default Re: Kingdoms: making an UI

    I need vanilla files to edit, can i download them from somewhere or i need to unpack a file? If so what file and with what program?

  7. #7

    Default Re: Kingdoms: making an UI

    Is that BC? With the Jizya submod?


    "I need vanilla files to edit, can i download them from somewhere or i need to unpack a file? If so what file and with what program?"

    http://www.twcenter.net/forums/showthread.php?t=96588
    http://www.twcenter.net/forums/showt...or-new-modders

  8. #8

    Default Re: Kingdoms: making an UI

    Thx man, i'll can try finally to do what i want, and not to edit other mods .TGA!

  9. #9

    Default Re: Kingdoms: making an UI

    Ugh, this is no good...everything is now white! What did i do wrong? Pls help!
    Click image for larger version. 

Name:	0020.jpg 
Views:	67 
Size:	353.7 KB 
ID:	303667

  10. #10

    Default Re: Kingdoms: making an UI

    White UI is a symptom of the SD files not being loaded. There are a couple of ways that could happen:

    • You use io.file_first but the game thinks you do not have a sd.xml corresponding to a sd file. The log may hint at this, the SD file appears to be located at first but later it is mysteriously reported as though it wasn't found.
    • You do have a sd.xml and it's last modification timestamp is newer than the corresponding sd file, but the game is unable to regenerate the corresponding sd file. If you rely on the game to rebuild your sd files, check your SD.XML code is correct.
    • The game fails to find your sd file entirely. The log should contain messages to this effect if the log.level is set to trace.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  11. #11

    Default Re: Kingdoms: making an UI

    thy for reply, i check everything again and i find it! i did not use original file from unpacked data, but file from other mod, so background was not blank but white! now is correct.

  12. #12

    Default Re: Kingdoms: making an UI

    I don't know how this can be seen here! I did't change anything to interface and this appears! What to do?
    Click image for larger version. 

Name:	0035.jpg 
Views:	54 
Size:	100.2 KB 
ID:	307488

  13. #13
    irishron's Avatar Cura Palatii
    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Kingdoms: making an UI

    Mod?

  14. #14

    Default Re: Kingdoms: making an UI

    Quote Originally Posted by irishron View Post
    Mod?
    yes, i'm developing small vanilla mod. i just paste faction symbols in start and shared page, nothing else...

  15. #15
    irishron's Avatar Cura Palatii
    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Kingdoms: making an UI

    Not my expertise but I'd look at the battle ones.

  16. #16

    Default Re: Kingdoms: making an UI

    Quote Originally Posted by irishron View Post
    Not my expertise but I'd look at the battle ones.
    battle.sd entry? what line?
    i also miss faction shield on battle page ( flashing friend - foe )!

  17. #17
    irishron's Avatar Cura Palatii
    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Kingdoms: making an UI

    battle.sd, yes. Where at? I never checked mine.
    Flashing, I don't know.

  18. #18

    Default Re: Kingdoms: making an UI

    I can only see the thumbnail image (not your fault, that is the TWC forum skin doing something exceedingly brain damaged to pictures), but it seems clear this occurs on the campaign map.

    So my guess would be that this is loaded from either strategy.sd or shared.sd.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  19. #19

    Default Re: Kingdoms: making an UI

    problem with flashing friend-foe button is resolved! it's missing faction TGA in data/ui/faction_symbols folder. now is OK. here:
    Click image for larger version. 

Name:	0036.jpg 
Views:	41 
Size:	100.1 KB 
ID:	309789
    P.S. : faction symbol is just borrowed for test, no author rights violation!

    and, about first problem from post #12, i give up searching for error, i just copy original shared.sd file and now is OK.
    Last edited by sale70; August 07, 2014 at 11:23 AM. Reason: new info

  20. #20
    Titus le Chmakus's Avatar Biarchus
    Join Date
    Aug 2014
    Location
    Skiing on the Spine of the World or hunting in Lurkwood
    Posts
    648

    Default Re: Kingdoms: making an UI

    Quote Originally Posted by MIKE GOLF View Post
    If you have a mod where it is possible to build more than 24 buildings, where would the second, bottom placed arrow go on the strat page to allow for a third drop down constructed building window? I have seen this feature before in other mods but for the life of me I can't remember which or I would refer to that. I will try and upload a few pics whenever the forum will so allow.
    Any answer to that question guys ? I'm really interested !

    Thanks

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •