Jump to content

boonGUI


Langbart
 Share

Recommended Posts

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 2
  • Thanks 1
Link to comment
Share on other sites

On 11/03/2021 at 9:19 PM, 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.

On 11/03/2021 at 9:19 PM, 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.

On 11/03/2021 at 9:19 PM, 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

On 11/03/2021 at 9:19 PM, 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.

Edited by Langbart
Link to comment
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 comment
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 comment
Share on other sites

  • Langbart changed the title to boonGUI mod (compatible with A25)

if a mod only uses what is marked as stable/public api then it should be guaranteed to work with future releases. As 0ad doesn't have an such an api for modders there is no point in supporting the >= specification in the first place (It's always a lie). You could just treat >= as = for backward compat and issue a warning for the mod developers that >= is gone. This would prevent lot of "can't start new release" issues at little to no cost.

Link to comment
Share on other sites

It's getting off topic.

For a project like 0ad the only way I see it to be finished is when it is dead. So I hope it will never be finished but be maintained and worked on for years to come. LibreOffice or the Linux kernel aren't finished either but provide an api which they promise to not break if at all possible. If needed the API will be marked deprecated and use of will possibly spit out warnings for quite a while before being removed. There is no reason 0ad couldn't do the same if it wanted. But supporting >= without a stable api makes no sense what so ever. A modder should only ever use >= if he is exclusively using such an stable yet till now and for the foreseeable future inexistent api.

PS: You could also have the mods installed into a versioned directory like replays, which could alleviate the issue of broken installs to some degree.

 

  • Like 1
Link to comment
Share on other sites

25 minutes ago, sarcoma said:

@Langbart: where can i change the scale to use your mod with a resolution of 1600x900?

This might become an option with A26 ( D3037 - Add gui scale to options).

For now you need to edit your user.cfg file (see wiki/GameDataPaths) and add

 gui.scale = "1.2"

play with this number until you are happy.

 user_cfg.jpg.54883fbedd21f53814b4084aa986e096.jpg

  • Thanks 1
Link to comment
Share on other sites

9 minutes ago, sarcoma said:

Your Shift-F is out of this world.

This is such a silly feature, but I love it too. When Delenda Est comes out for A25, I'll try to make it compatible. There are cool little details in it. For example, some units bleed from their noses when they die, which doesn't add to the gameplay, but it's just great that the developer took the time to add that detail.

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

On 13/08/2021 at 10:47 PM, Langbart said:

For example, some units bleed from their noses when they die, which doesn't add to the gameplay, but it's just great that the developer took the time to add that detail.

The developer (me) didn't actually change anything. Check out the Elite Roman Triarius in Empires Ascendant! Kill him in Atlas and you'll see his face go bloody. :) 

Link to comment
Share on other sites

2 hours ago, wowgetoffyourcellphone said:

The developer (me) didn't actually change anything. Check out the Elite Roman Triarius in Empires Ascendant! Kill him in Atlas and you'll see his face go bloody. :) 

As the author of the no blood mod, can confirm.

Link to comment
Share on other sites

On 09/03/2021 at 9:00 PM, Langbart said:

Compatible version 1.0 (27/Aug/21) for Delenda Est

boongui_delenda_1.0.pyromod 4 MB · 0 downloads

This is cool, m8. I think that enabling stats overlay at the top should not be Shift-S since Folks could be moving the camera (WASD) while Shift-queueing orders. This makes the info panel sometimes toggle off and on accidentally. The big mini-map and moved buttons should definitely be a base-game option! Very nice. The ginormous garrison flags are a bit overkill.

Link to comment
Share on other sites

  • Langbart changed the title to boonGUI

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