Jump to content

boonGUI mod (compatible with A24)


Recommended Posts

Version: 1.5 (12/Mar/21)

boongui_1_5.pyromod

 

Description for boonGUI

This mod is basically a derivative of @ffm2's mod 'ffm_visibility' but with additional changes that I thought would be fitting.

  • In-Game:
    • The size of the hero portraits has been increased to 80x80.
    • Animals like chickens and fish are red to make them more easily noticeable.
    • Fruits are more vivid and easier to see due to the increased saturation and brightness, some have also had their hue changed. See the 1st image below for more clarity.
    • Metal mines have been modified to be more distinguishable from stone mines and also to look more attractive. Discovered in Delenda Est @wowgetoffyourcellphone.
    • Larger buttons on the right side of the selection panel  (see @Nescio D2806 in Phab). The max. number of icons in the selection panel is 32 (8x4) compared to 40 (10x4) without this mod.
  • Camera
    • Added a hotkey to access the view of a unit. Thanks to @Freagarach for pointing out this feature exists; D3046 in Phab. See the 2nd image below for more clarity.   
      • For now, you need to add the following line to your user.cfg file to make it work.
      • hotkey.boongui.camera.follow.fps = "Shift+F"
  • Main-Menu:
    • Added cheat codes to the game manual for the base game and Delenda Est (see also wiki/Manual_Cheats).
  • Lobby:
    • Lobby compatibility with players thanks to @nani.

boongui_1_5.thumb.jpg.fb25aa0df1768f62aae9c97050749567.jpg

boongui_1_5_FPS.thumb.jpg.ab964dc2cc92ca26486b3ee17072ca70.jpg

 

Compatibility, Installation & Troubleshooting

Spoiler

Compatibility:

Successfully tested for the following mods in A24:

Installation:

Download the pyromod file: (Should work on Windows/ Linux and macOS)

  • Either double click or
  • Drag and drop the file over the 0 A.D. app icon or
  • Right click and open the pyromod file with the 0 A.D. app

Go to 'Settings' --> 'Mod Selection' and enable the mod.

Troubleshooting:

Loading a mod like Delenda Est, after my mod is already enabled, the effect for the GUI buttons is not seen. Loading my mod after Delenda Est is enabled solves this problem. 

Older Versions

Spoiler

Version 1.4 (10/Mar/21)

boongui_1.4.pyromod

This is my first mod, judge me gently. I am open to suggestions and would like to implement them if they are not too complicated.

Edited by Langbart
version 1.5
  • Like 11
  • Thanks 1
Link to post
Share on other sites
On 10/03/2021 at 3:00 AM, Langbart said:

This is my first mod, judge me gently. I am open to suggestions and would like to implement them if they are not too complicated.

First of all, congratulations! While 0 A.D. is designed to be easily modifiable in principle, doing something the first time can be challenging. If you continue and become more experienced, you'll see many things turn out to be much easier than they might seem right now.

Then some minor nitpicking: 0 A.D. is free and open-source software. You can do whatever you want with it, provided you comply with the relevant licences. Most assets (e.g. art) are released under CC-BY-SA-3.0, while most code is released under GPLv2. Your mod contains both art and code, however, you only mention the former. You can release code under CC or any licence you like, if you've written it yourself. However, if you've copied it from 0 A.D. (and I believe you did), then you have to release it under GPLv2 (or v3), therefore you should make that explicit in your mod.

Furthermore, include the relevant licence files (you can just copy them from elsewhere). Although this is not really necessary, it is good practice (people can be lazy). See how it's done in https://trac.wildfiregames.com/browser/ps/trunk

Also, when using dates (e.g. in your diary.md), keep in mind some Americans might interpret 10/03/21 as October the 3rd, therefore it's advisable to either use the ISO format (2021-03-10) or to write out the month (10 March 2021) or abbreviate it (10/Mar/21).

 

And another suggestion: include https://code.wildfiregames.com/D3037 Many players are asking for this, unaware how to do it via the local user.cfg configuration file.

On 10/03/2021 at 3:00 AM, Langbart said:

Larger buttons on the right side of the selection panel  (see @Nescio D2806 in Phab). The max. number of icons in the selection panel is 32 (8x4) compared to 40 (10x4) without this mod.

You might want to partially revert D2875, if you've not done so already.

  • Like 1
  • Thanks 1
Link to post
Share on other sites
10 hours ago, Nescio said:

first time can be challenging

Yes, but I was surprised how easy it was to start a mod. The good documentation on the wiki helped a lot. Maintaining seems to be the tough part.

10 hours ago, Nescio said:

However, if you've copied it from 0 A.D. (and I believe you did), then you have to release it under GPLv2 (or v3), therefore you should make that explicit in your mod.

Furthermore, include the relevant licence files (you can just copy them from elsewhere).

Glad someone is looking at this stuff. I took care of your licensing concerns in version 1.5 by adding a license.txt file and honoring the members of wildfire Games.

10 hours ago, Nescio said:

or abbreviate it (10/Mar/21).

Hmm, this will work for me.

Regarding D3037 that sounds great, I will focus on that in my next version. Seems there a lot of goodies hidden in Phabcricator e.g. D1746

10 hours ago, Nescio said:

You might want to partially revert D2875, if you've not done so already.

The mod runs without errors, so I don't know what I shall revert.

Question:

(A) Is there an easy way to automatically add a line to my user.cfg file when enabling the mod? I would like to add the following line:

hotkey.boongui.camera.follow.fps = "Shift+F"

When I modify a file from @nani's AutoCiv mod (0ad/mods/autociv_1.0.0/gui/pregame/mainmenu~autociv.js) and add it to my mod, it works for me. I was just hoping there was an easier way to write a single line to the user.cfg file.

Link to post
Share on other sites
27 minutes ago, Langbart said:

I was just hoping there was an easier way to write a single line to the user.cfg file.

see autociv/gui/gui.d.ts for more

 

    /**
     * Save a config value in the specified namespace. If the config variable
     * existed the value is replaced.
     * @param namespace - Configuration namespace
     * @param key - Name of the value
     * @param value - Value
     * @returns True if successful
     */
    function ConfigDB_CreateValue(namespace"default" | "mod" | "system" | "user" | "hwdetect"keystringvaluestring): boolean
 
    /**
     * Remove a config value in the specified namespace.
     * @param namespace - Configuration namespace
     * @param key - Name of the value
     * @returns True if successful
     */
    function ConfigDB_RemoveValue(namespace"default" | "mod" | "system" | "user" | "hwdetect"keystring): boolean
 
    /**
     * Write the current state of the specified config namespace to the file
     * specified by 'path'
     * @param namespace - Configuration namespace
     * @param path - File path (file name included)
     * @returns True if successful
     */
    function ConfigDB_WriteFile(namespace"default" | "mod" | "system" | "user" | "hwdetect"pathstring): boolean
 
    /**
     * Write a config value to the file specified by 'path'
     * @param namespace - Configuration namespace
     * @param key - Name of the value
     * @param value - Value
     * @param path - File path (file name included)
     * @returns True if successful
     */
    function ConfigDB_WriteValueToFile(namespace"default" | "mod" | "system" | "user" | "hwdetect"keystringvaluestringpathstring): boolean
  • Like 2
Link to post
Share on other sites

Thank you for the mod, the decent size icons are much appreciated.

Installing was a bit different from the instructions because I use the flatpak version on Linux. I copied the downloaded file to "/home/USERNAME/.var/app/com.play0ad.zeroad/data/0ad/mods/" and then opened it with 0ad from that folder. This has to with permissions, I believe. Something similar may need to be done for anyone using the snap version but I am not familiar with the file structure.

  • Like 1
  • Thanks 1
Link to post
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.

×
×
  • Create New...