Jump to content

Leader names with >17 characters cut off in diplomacy window


Ceres
 Share

Recommended Posts

Hello!

Longer leader names get cut off in the diplomacy window:

image.png.26a6aa394e934b04fe0a6dfe8675ad23.png

This is not restricted to the Millennium mod, and further tests showed that names get cut off after 17 characters. See test dummy name "12345678901234567890":

image.png.c5c8719614a398436790467dedfbb584.png

 

MS Windows path for civs incl. leader names: ..\binaries\data\mods\public\public.zip\simulation\data\civs

The longest name I found (in the "Millennium" mod, though), is "Æthelwald Moll of Northumbria", which is 29 characters long. Leaders from other civs in the 0 A.D. base game, e.g. "Hasdrubal the Boetharch" (cart) or "Demetrius II Aetolicus" (mace) have long names of >17 characters, too.

 

Maybe the diplomacy window column with the names could be made wider (e.g. for 36 characters max.?) to accommodate for longer civ leader names.

Where in the source code is this diplomacy window defined? If I knew, I could try to provide some amendment.

Thanks for pointing me into the right direction! :)

 

PS: It must be this: binaries/data/mods/public/gui/session/diplomacy/DiplomacyDialog.xml

<object name="diplomacyHeaderName" size="0 0 140 100%" type="text" style="DiplomacyText" ghost="true" text_align="center">

        <translatableAttribute id="caption">Name</translatableAttribute>

</object>

Adjusting the 140 (and the following columns' widths) should hopefully do the trick. I will check...

Edited by Ceres
Found file in GitHub
  • Like 1
Link to comment
Share on other sites

2 hours ago, Ceres said:

Maybe the diplomacy window column with the names could be made wider (e.g. for 36 characters max.?) to accommodate for longer civ leader names.

 

The diplomacy window needs redesigned. Maybe I can make a mockup for it (which will of course include plenty of space for names).

  • Like 1
Link to comment
Share on other sites

Thanks a lot for your kind offer. I wanted to take the opportunity to get myself again involved and learn more about git etc. So feel free to redesign it, whereas I will play with it in parallel a bit. I have forked 0 A.D. from GitHub for this purpose. What is BTW the best way to git clone and test drive the game? I cloned to a new folder on my PC and plan to manually paste into it the remaining necessary files like pyrogenesis.exe etc. Or is there a more elegant way foor this?

 

PS to your second post: I am still struggling with cloning from GitHub and getting an executable game from this (without building everything from scratch). I should know more in the next 30 minutes or so. Please bear with me. ;)

PS2: Why cannot the exe file be extracted with e.g. 7zip? As it seems, we can only execute the file for extraction etc. And Windows always complains about security threats from it. Sorry that this is OT here.

Edited by Ceres
Link to comment
Share on other sites

BTW, the lines I mentioned above were wrong. Correct ones (I believe) are these:

    <object size="32 64 100%-32 384">
        <repeat count="8" var="n">
            <object name="diplomacyPlayer[n]" size="0 0 100% 20" type="image" hidden="true">
                <object name="diplomacyPlayerOutcome[n]" size="0 0 25 100%" type="image" tooltip_style="sessionToolTipBold"/>
                <object name="diplomacyPlayerName[n]" size="25 0 150 100%" type="text" style="DiplomacyText"/>
                <object name="diplomacyPlayerCiv[n]" size="150 0 250 100%" type="text" style="DiplomacyText"/>
                <object name="diplomacyPlayerTeam[n]" size="250 0 300 100%" type="text" style="DiplomacyText"/>
                <object name="diplomacyPlayerTheirs[n]" size="300 0 360 100%" type="text" style="DiplomacyText"/>

I have to take a break now and will look into this later again.

Link to comment
Share on other sites

But if we made it very large, the game background could not be seen. Is this a problem?

PS:

One might miss something important happening in the game if the diplomacy screen was too large, and the mini map would be hidden.

What is the minimum and what the recommended resolution? On my laptop I have 1920 x 1080 pixels.

Edited by Ceres
Link to comment
Share on other sites

@wowgetoffyourcellphone

It takes me a while to get accustomed to the mostly hardcoded margins, widths, etc. but I made some "progress". Since I have not changed the height, I cropped the screenshot as follows but kept the original width of the game (1920 pixels in my case):

image.thumb.png.60d355379905fe3c74f47318448dbbc4.png

I know that this is not yet ideal, since the name column only allow for 23 characters and we need more, but I also wanted to know how this works at all and if I am on the right track. ;)

And I do not need the meaning of this line:

<object name="diplomacyPlayerOutcome[n]" size="0 0 25 100%" type="image" tooltip_style="sessionToolTipBold"/>

It is the first column (left from the name) showing some "outcome" but what exactly is it? And should we add a caption with a tooltip for it?

 

The modified file is attached to this post. If you rather prefer a diff, I could try learning how to produce it from my GitHub fork (but that could take even longer ;) ).

 

Edited by Ceres
Attached file removed - see next post for update
Link to comment
Share on other sites

1 minute ago, Ceres said:

And I do not need the meaning of this line:

                <object name="diplomacyPlayerOutcome[n]" size="0 0 25 100%" type="image" tooltip_style="sessionToolTipBold"/>

It is the first column (left from the name) showing some "outcome" but what exactly is it? And should we add a caption with a tooltip for it?

 

Defeated, Victor, etc.

  • Thanks 1
Link to comment
Share on other sites

I had forgotten the column for the "diplomacyAttackRequest[n]". Please find attached the now updated file and below what it looks like. Please let me know what you think about it, if it works for you, too, or whether it needs further amendment.

image.thumb.png.e1ff6667b3e94aaf29dc7271da520e07.png

DiplomacyDialog.xml

BTW, does the 0 A.D. GUI allow transparency? The diplomacy screen would benefit from it.

Edited by Ceres
Link to comment
Share on other sites

1 hour ago, Ceres said:

I had forgotten the column for the "diplomacyAttackRequest[n]". Please find attached the now updated file and below what it looks like. Please let me know what you think about it, if it works for you, too, or whether it needs further amendment.

image.thumb.png.e1ff6667b3e94aaf29dc7271da520e07.png

DiplomacyDialog.xml 5 kB · 0 downloads

BTW, does the 0 A.D. GUI allow transparency? The diplomacy screen would benefit from it.

aesthetically I do not recommend it.

Link to comment
Share on other sites

1 hour ago, Ceres said:

@Lion.Kanzen

Can you maybe share some further thoughts how to amend it (maybe dynamically adjust the diplomacy screen width according to its content, if this is possible)? Or would you prefer to leave it as it currently is?

 

@wowgetoffyourcellphone

Do you have something else on your mind?

It is always good to investigate what exists in other games of the same nature.

For now what would come in handy is to minimize the window.

Link to comment
Share on other sites

8 hours ago, Lion.Kanzen said:

It is always good to investigate what exists in other games of the same nature.

For now what would come in handy is to minimize the window.

How could we minimize this window, which seems to be even larger now?

5 hours ago, wowgetoffyourcellphone said:

Just add the spy and attack request features and we're good to go.

Or is this of the same dimensions/size as the current one?

Link to comment
Share on other sites

@wowgetoffyourcellphone

Would you mind keeping the abbreviations A/N/E and explain them by tooltip instead of spelling them out?

Besides, I like how it currently works with the tributes, i.e. we can send something by just a click (or shift+click) instead of the need to first click on a [+] and then on the [Apply] button. Do we need a [-] button at all?

 

@Lion.Kanzen

What exactly did you mean by "aesthetically I do not recommend it"? The layout, the size, the colors, something else?

Link to comment
Share on other sites

5 hours ago, Ceres said:

Would you mind keeping the abbreviations A/N/E and explain them by tooltip instead of spelling them out?

I actually hate the abbreviations. Lol

 

5 hours ago, Ceres said:

Besides, I like how it currently works with the tributes, i.e. we can send something by just a click (or shift+click) instead of the need to first click on a [+] and then on the [Apply] button. Do we need a [-] button at all?

Imho, the game's current way of immediately sending resources on click and immediately changing diplomacy on click instead of having a Confirm or Apply Changes button is bad design. I don't think the current Diplomacy screen was meant to be the final version, just "good enough" for the time. It's served the game well, but it's time to update it.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

20 hours ago, Ceres said:

BTW, does the 0 A.D. GUI allow transparency? The diplomacy screen would benefit from it.

 

7 hours ago, Ceres said:

What exactly did you mean by "aesthetically I do not recommend it"? The layout, the size, the colors, something else?

This the transparency.unless you talk about transparency of the entire interface.

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...