Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for Module Designer to set the default value for Module level preferences #9012

Open
uckelman opened this issue Jun 28, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@uckelman
Copy link
Contributor

Bugzilla
ID BZ13099
Reported 2020-06-16 00:12:00 +0200
Modified 2020-06-22 23:23:38 +0200
Product VASSAL
Component Editor
Version 3.3.0-beta4
Platform All
OS All
Status TRIAGED
Resolution None
Priority unspecified
Severity enhancement
Milestone ---
Reporter Brent Easton
Assignee Bugs

Brent Easton 2020-06-16 00:12:42 +0200

Module level preferences apply to an individual module and sometimes require specific settings for the module to work correctly. 

The classic example is 'Auto-report Moves' which needs to be set depending on how the Module Designer has handled reporting. Another obvious one is the Maximum Heap setting.

Default values for Module preferences are currently defined by Vassal and cannot be over-ridden by the Module Designer. So if a particular preference needs to be set, ever user who downloads the module needs to know to go in and change that preference.

Develop a method for Module Designers to record the preferred value for module level preferences.

Do not include all module level preferences as many of them (eg. Chat Colors) are really user preferences. I would include

 - All Compatibility tab preferences
 - Auto-Report moves?
 - JVM Heap Sizes
@Cattlesquat Cattlesquat added the enhancement New feature or request label Oct 25, 2021
@Cattlesquat
Copy link
Collaborator

I figured out a good way this can be done when I was doing the Turn Tracker tweaks in #10852: allow the module designer to define Global Properties with specified names (e.g. "TurnTracker.defaultFontSize"). The initial values for those are already present in the properties at "build time" as soon as the Global Properties are built. So any component built after Global Properties can check e.g. getProperty(xxx) on the key and read it as an alternative default. This is a nice low-noise approach -- doesn't require special configurers. So we can implement on an as-needed/as-requested basis.

@riverwanderer
Copy link
Collaborator

riverwanderer commented Feb 12, 2025

@Cattlesquat looking at this at moment. To override JVM max heap in general prefs needs a global option property, I think. Anything in the buildfile isn't available until the module is launched, which is after max heap is used. Right?

A global option property is stored in the local prefs file, just like max heap.

I am struggling so any further advice welcome.

Update - made some progress. PR #13836 is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants