Jump to content

ModernGUI A27


Atrik
 Share

Recommended Posts

I'm happy to announce that I've been porting all features of boonGUI and proGUI into a new UI bundle for A27! Doing it made me realize once again how much work has been put into the development of 0AD but also to all those who contributed to the components of this bundle. So thank you!

GitLab link: https://gitlab.com/4trik/proGUI/-/tree/modernGUIA27
DirectDownload link: https://gitlab.com/4trik/proGUI/-/archive/modernGUIA27/proGUI-modernGUIA27.zip

In this mod:

  1. Retrieve your favorite A26 GUI style with a Quick Configuration page once you launch the mod.

    quickconfig.png.a4a5166fbec866dce329be8ee64478f1.png
     
  2. New exclusive features, like kill counts, flare message and more!

    killcount.png.a8ce266c0c169a40874f53c245bf77f9.png
    (the skulls near unit icons indicate for Player unit kills and Gaia entities kills)
     
  3. Explore tones of extra options in your settings to customize your GUI!

    screenshot0004.thumb.png.113e8da613dfcec007f26d43ffd79ff4.pngscreenshot0006.thumb.png.527f77ea60f7710c9c7e222afe13f723.pngscreenshot0005.thumb.png.9b4c1ea61843fc86c431331ae247bf82.png

 

Hope you'll try it out and enjoy! Please report any bugs and feel free to suggest improvements.
 

Edited by Atrik
  • Like 6
  • Thanks 2
Link to comment
Share on other sites

23 hours ago, Atrik said:

I'm happy to announce that I've been porting all features of boonGUI and proGUI into a new UI bundle for A27! Doing it made me realize once again how much work has been put into the development of 0AD but also to all those who contributed to the components of this bundle. So thank you!

GitLab link: https://gitlab.com/4trik/proGUI/-/tree/modernGUIA27
DirectDownload link: https://gitlab.com/4trik/proGUI/-/archive/modernGUIA27/proGUI-modernGUIA27.zip

In this mod:

  1. Retrieve your favorite A26 GUI style with a Quick Configuration page once you launch the mod.

    quickconfig.png.a4a5166fbec866dce329be8ee64478f1.png
     
  2. New exclusive features, like kill counts, flare message and more!

    killcount.png.a8ce266c0c169a40874f53c245bf77f9.png
    (the skulls near unit icons indicate for Player unit kills and Gaia entities kills)
     
  3. Explore tones of extra options in your settings to customize your GUI!

    screenshot0004.thumb.png.113e8da613dfcec007f26d43ffd79ff4.pngscreenshot0006.thumb.png.527f77ea60f7710c9c7e222afe13f723.pngscreenshot0005.thumb.png.9b4c1ea61843fc86c431331ae247bf82.png

 

Hope you'll try it out and enjoy! Please report any bugs and feel free to suggest improvements.

did you drop the "blood meter"?

  • Like 1
Link to comment
Share on other sites

17 hours ago, sarcoma said:

Can we have this mod for smaller displays?
i couldnt use progui because it takes the whole screen and the summary doesnt even fit

Hi @sarcoma, there are a lot of options to save screen space for the game GUI.
You can try the following existing options in settings :

  • Resize the minimap
  • Hide allied stats from top panel
  • Resize or even disable right panel

As for the summary, I was checking how could I adapt it better for small screens. Thanks for reporting this issue I wasn't aware of since I never worked on it. One solution on your end could be to disable the modifications to the summary. To do this you can :

  1. Go into the mod folder ModernGUI/gui/summary
  2. rename "summary" folder with "-summary" or whatever

And there you go, you will have the classical summary!

Edit: I've just pushed a small rework of the summary that should work for small displays.

Edited by Atrik
  • Thanks 1
Link to comment
Share on other sites

37 minutes ago, alre said:

did you drop the "blood meter"?

@alre I made it optional. You can enable it in options under "minimap perks".
Short therm KDR can be displayed in top panel too now, and it's a option that I use now.

Spoiler

image.thumb.png.a22cd71d9f8f748767d4a5998518e9d4.png
Here you can see in the top panel a bar growing blue or green depending on your kdr of last 10 sec. Very useful to tell if a ally or yourself is currently losing or winning a battle, especially when the kdr is consolidated already (like in late game when you already have tones of kills and deaths, your kdr won't change much, but this indicator helps).

 

  • Like 2
Link to comment
Share on other sites

  • 5 weeks later...
47 minutes ago, zzshahzz said:

I can't seem to get this to install. I created the mods directory in the file path you suggested and then dropped the package in there. It isn't showing up in the list of available mods once in the game. Is there something else I should be doing?

Hello. Does it look like this?

image.png

  • Like 1
Link to comment
Share on other sites

10 hours ago, zzshahzz said:

I can't seem to get this to install. I created the mods directory in the file path you suggested and then dropped the package in there. It isn't showing up in the list of available mods once in the game. Is there something else I should be doing?

Hi @zzshahzz, you can try the mod out but consider it unstable for-now. I've ported and added features for a27 that are too heavy on performances. So it's ongoing some re-factorization and optimizations. You could encounter bugs, errors and general slow performances that can hinder user experience. I'll post here when a more stable version is achieved, probably in a couple of days, or more. :) (Probably sooner then later).

Edited by Atrik
Link to comment
Share on other sites

I've updated the mod with some performances enhancements. I would consider it as stable now but:
There is still known issues about the Hero prop that fails to load with Vulkan.
I also had recourse to some temporary measures, like removing some features such as the kill counter, or throttling the gui refresh rate...
Basically did what I had to, beside code optimizations, for it not to impact the game performances that are crazy in a27 rn :sweatdrop:.

 

Spoiler

I liked it...
killcounter.png.50c705e5660abf80e83b50b9c4e27ef2.png

 

Edited by Atrik
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

34 minutes ago, Stan` said:

What do you need that new material for ?

Spoiler

image.thumb.png.79e7010f69453b6030bb82967ff3bcd9.png

I think the material is what makes this golden glow effect on the arrows above the heros. The entire 'hero visibility' feature is from Hyrule. The wiki doesn't mention compiling, can you tip me to some relevant tool or doc that can help me understand how can I get this recompiling done?

Link to comment
Share on other sites

I think you should be able to replace it with https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/art/materials/basic_glow_norm_spec.xml.

So replace

 <material>basic_glow_nu.xml</material>

by:

 <material>basic_glow_norm_spec.xml</material>

You might also replace

        <texture file="props/hero_selectorA.dds" name="normTex" />
        <texture file="props/hero_selectorA.dds" name="specTex" />

with 

        <texture file="default_norm.png" name="normTex"/>
        <texture file="null_white.dds" name="specTex"/>

(Lighter cheaper texture)

1 hour ago, Atrik said:

 The wiki doesn't mention compiling, can you tip me to some relevant tool or doc that can help me understand how can I get this recompiling done?

Indeed it was not updated after @vladislavbelov committed Vulkan.

Basically those materials define combinations, like "USE_SELF_LIGHT". In GLSL that's no problem, because the shader files (.vs and .fs) support any number of combinations, at the expense of performance. In vulkan however, you need one file per combination. So if you have USE_SELF_LIGHT and USE_TRANSPARENCY you've got four SPIR-V files. Add one more and you got 8 and another one 16. To save space, and make the compilation faster, we only generate a certain number of combination we know. So when you run the release with a combination we do not support boom.

To compile the shaders you need to run these commands:

Mod mod

python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/mod source/tools/spirv/rules.json binaries/data/mods/mod

Public mod

python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/public source/tools/spirv/rules.json binaries/data/mods/public

Your mod

python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/public binaries/data/mods/your_mod source/tools/spirv/rules.json binaries/data/mods/your_mod

 

 

 

  • Thanks 1
Link to comment
Share on other sites

@zzshahzz from the screenshots I think you have the mods folder at the wrong place?
It should be in

~/Library/Application\ Support/0ad/

So, basically you should have

~/Library/Application\ Support/0ad/mods/ModernGUI/ [the mod content directly here]

On @wowgetoffyourcellphone's screenshot, I believe he was showing you that you are NOT supposed to have

~/Library/Application\ Support/0ad/mods/ModernGUI/ModernGUI/ [mod content]
Link to comment
Share on other sites

On 31/12/2024 at 12:15 AM, sarcoma said:

Can we have this mod for smaller displays?
i couldnt use progui because it takes the whole screen and the summary doesnt even fit

I bought a new display to fix this. GUI scaling is an ugly fix. buy full HD display

  • Haha 1
Link to comment
Share on other sites

You shouldn't need a huge screen with the a27's ModernGUI, I adapted some features to smaller screens, a few elements get resized automatically and you have a great deal of options to shrink or remove some on-screen features. I did my best to improve this aspect over a26 gui mods.

Link to comment
Share on other sites

@Stan` thanks for the explanations and instructions. I still feel like I don't understand too much what I'm doing, but I did follow your instructions.
I would add to the wiki if theses tips are added: to make sure public and mod mods contents are unziped, as-well as placing your mod in binaries/data/mods/ if you are used to place them somewhere else ofc.


After this I was able to recompile the shaders for mod and public mods. But when trying for my mod, I can't do it.

  1. python3 source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/public binaries/data/mods/moderngui source/tools/spirv/rules.json binaries/data/mods/moderngu
    Trying to input mod and public as dependency throw me usage error:
    usage: compile.py [-h] -d DEPENDENCY [-p PROGRAM_NAME] [-j JOBS] input_mod_path rules_path output_mod_path
    compile.py: error: unrecognized arguments: binaries/data/mods/moderngui
  2. python3 source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/moderngui source/tools/spirv/rules.json binaries/data/mods/moderngui

    Trying with only mod or only public as dependency fails:

    Failed to run command: glslc -x glsl --target-env=vulkan1.1 -std=450core -I binaries/data/mods/moderngui/shaders/glsl -I binaries/data/mods/mod/shaders/glsl -fshader-stage=vertex -O binaries/data/mods/moderngui/shaders/glsl/model_common.vs -DIGNORE_LOS=1 -DMODE_SHADOWCAST=1 -DPASS_SHADOWS=1 -DRENDER_DEBUG_MODE=RENDER_DEBUG_MODE_NONE -DREQUIRE_ALPHA_GEQUAL=0.4 -DSHADOWS_CASCADE_COUNT=1 -DUSE_SHADOW=1 -DUSE_SHADOW_PCF=1 -DUSE_SHADOW_SAMPLER=1 -DUSE_TRANSPARENT=1 -DUSE_SPIRV=1 -DSTAGE_VERTEX=1 -o binaries/data/mods/moderngui/shaders/spirv/model_solid_tex_93abd5df7e11b5eb0eaca7c7664483806526d883ca0a0c39319cffd6de61462a.vs.spv -g
    multiprocessing.pool.RemoteTraceback: 
    """
    Traceback (most recent call last):
      File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
        result = (True, func(*args, **kwds))
      File "/home/pc/Programs/0ad/0ad-0.27.0/source/tools/spirv/compile.py", line 406, in build_combination
        reflection = compile_and_reflect(
      File "/home/pc/Programs/0ad/0ad-0.27.0/source/tools/spirv/compile.py", line 160, in compile_and_reflect
        ret, out, err = execute([*command, "-g"])
      File "/home/pc/Programs/0ad/0ad-0.27.0/source/tools/spirv/compile.py", line 76, in execute
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    [...]
    FileNotFoundError: [Errno 2] No such file or directory: 'glslc'
    """
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/pc/Programs/0ad/0ad-0.27.0/source/tools/spirv/compile.py", line 705, in <module>
        run()
      File "/home/pc/Programs/0ad/0ad-0.27.0/source/tools/spirv/compile.py", line 685, in run
        build(
      File "/home/pc/Programs/0ad/0ad-0.27.0/source/tools/spirv/compile.py", line 592, in build
        result.get()
      File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
        raise self._value
    FileNotFoundError: [Errno 2] No such file or directory: 'glslc'
  3. The only thing I got it to build the problematic "model_solid_player" was then you copy past shaders folder into moderngui then run the compile script with the mod itself as dependency. But that doesn't solve the initial problem, and nothing changed.
    python3 source/tools/spirv/compile.py -d binaries/data/mods/moderngui binaries/data/mods/moderngui source/tools/spirv/rules.json binaries/data/mods/moderngui
    Program "model_solid_tex"
      Building.
    Program "model_solid_player"
      Building.
    [...]

I also tried to read the compile script but ofc I'm not good enough to conclude anything from it... Can you see what I missed? :unsure:

Edited by Atrik
Link to comment
Share on other sites

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...