Page MenuHomeWildfire Games

Move mod version label from GUI pages to the mod info
AbandonedPublic

Authored by elexis on Nov 29 2017, 12:39 AM.

Details

Reviewers
None
Summary

The title of the mod (in alpha 23 "Ken Wood") is hardcoded in the session top panel and in the mainmenu.
Therefore its a bit messy to

  • have the "keep in sync with file XY" in the code
  • incentivize mods to copy these two pages if they want to change the label (delenda est does it)
  • have these GUI page changes in the ReleaseProcessDraft
Test Plan

Notice that having the label version in the mod json means that the topmost mod is required to define that string.
We could add a separate file with only that entry, but that seems unneeded.

Event Timeline

elexis created this revision.Nov 29 2017, 12:39 AM

Then factor out those common things into two XML files, or possibly even one and unify the capitalization of those. Oh, wait, parts of that have already been done, maybe just do the others instead of trying to do something because something must be done and this is something.

binaries/data/mods/public/gui/pregame/mainmenu.js
28

Apart from this being the wrong way to do this, this does break with any mod that isn't public.

binaries/data/mods/public/mod.json
5

No.

That does not belong here.

Vulcan added a subscriber: Vulcan.Nov 29 2017, 1:28 AM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Executing section Default...
Executing section Source...
Executing section JS...
elexis added inline comments.Nov 29 2017, 2:29 AM
binaries/data/mods/public/gui/pregame/mainmenu.js
28

JSInterface_Mod.cpp might be cleaner yes.

binaries/data/mods/public/mod.json
5

It's not a random GUI label but a mod version string.
Having only one place to describe a mod and
having the mod version label near the mod label and the mod version seems right.

Even if the mod version label is as required as a mod version and a mod label.

leper added inline comments.Nov 29 2017, 2:47 AM
binaries/data/mods/public/mod.json
5

It is a random GUI label. If you don't want to have to update two files, then unify them into one.

Does not belong here.

elexis added inline comments.Nov 29 2017, 2:57 AM
binaries/data/mods/public/mod.json
5

The random GUI labels are examples of the use case of a version label.
Having it as a globally accessible string means we can show it in the mod selection table, message boxes, game description dialogs used in the lobby, replay and savegame menu too for instance.

leper added inline comments.Nov 29 2017, 3:06 AM
binaries/data/mods/public/mod.json
5

There is only a version number. If you want to show it in the lobby or savegames just having the current version label seems quite useless.

So to get back to where I started: No.

elexis added inline comments.Nov 29 2017, 3:33 AM
binaries/data/mods/public/mod.json
5

mod_label + mod_version would be displayed where fit.

elexis planned changes to this revision.Nov 29 2017, 2:59 PM

Since the discussion was solely about the disagreement part, I'll make a differential revision proposal about the complementary part of the diff.

elexis retitled this revision from Translate mod title, description and move mod version label from GUI pages to mod info to Move mod version label from GUI pages to the mod info.Nov 29 2017, 4:33 PM
elexis abandoned this revision.Dec 12 2017, 8:40 PM