Page MenuHomeWildfire Games

[WIP] Add JSON files defining visible classes metadata
Needs ReviewPublic

Authored by wraitii on Jan 9 2021, 10:36 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Visible Classes are useful, but lack a complete description in-game, which makes some of them trickier to understand than expected.
In particular, this is true of "Worker" right now (see D3290).
It's also annoying to maintain the list in Identity.js in my opinion, but that's neither here nor there.

This moves data to a .json file, inspired by status effects (almost a copy in fact -> should we have a generic tool?)

This is WIP, my plan would be to show the classes description when clicked on/hovered, à-la civopedia.
However, because the template viewer is just the tooltips, this is currently impossible.
I think we need a complete refactoring of these files, but that must come later.

If people agree with the direction, I'll move forward.

Test Plan

Agree.

Event Timeline

wraitii created this revision.Jan 9 2021, 10:36 AM
Owners added a subscriber: Restricted Owners Package.Jan 9 2021, 10:36 AM

Build is green

builderr-debug-macos.txt
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stu

See https://jenkins.wildfiregames.com/job/macos-differential/2724/display/redirect for more details.

wraitii requested review of this revision.Jan 9 2021, 11:23 AM
Nescio added a subscriber: Nescio.Jan 9 2021, 1:24 PM

The idea is nice, but I'm unsure about the proposed implementation. I don't think treating visible classes differently than (non-visible) classes (or ranks) is desirable.
Moreover, having a file for each visible class seems file inflation to me. I'd prefer having one file listing all classes, with one line per entry (cf. credits files).

The benefit of seperate files is that mods can add/delete classes at will, without the need for maintaining a copy of one (large) file. I think there might be no reason to not include the other classes here? Just add a boolean "hidden" that, when present makes it a non-visible class. (Why hidden instead of "visible"? So modders don't need to specify it by default. But one could just as easily argue otherwise.)

(almost a copy in fact -> should we have a generic tool?)

"If you need to code it twice, make a function."

Freagarach added inline comments.May 19 2021, 9:52 AM
binaries/data/mods/public/globalscripts/VisibleClasses.js
33

deepfreeze?