-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
New Campaign Selector, enhanced support for campaign mods (and campaign balance mods) #3688
New Campaign Selector, enhanced support for campaign mods (and campaign balance mods) #3688
Conversation
4355c5a
to
8e122d5
Compare
This is pretty cool, I quite like these: Timer Power Bonus 40 Unit Limit |
923cbea
to
78b592d
Compare
The campaign number gets set by scripts on init or load.
- Calculate the ideal position so that the dropdown appears *overtop* of the currently-selected item (i.e. in-place) - Display shadow and highlight of parent dropdown widget area, to make it clearer which parent item was clicked
Enable the ability to scroll a ScrollableListWidget by child Paragraph line(s).
Set the DropdownItemWrapper geometry in addItem() to ensure that every wrapper widget gets a size. (Previously this was only done by DropdownWidget::geometryChanged(), so items would only receive their proper dimensions if the DropdownWidget was resized after they were added.)
The widget framework now implements its own mouse drag handling, and provides consumable events. `WIDGET` subclasses can override `capturesMouseDrag()` and return `true` if they wish to capture mouse drag events on mouse down. The widget that captured the mouse down will then have its `mouseDragged()` override called to process mouse drag events. It will also always receive a `released()` call when the mouse button is released (regardless of whether the mouse was released over the widget).
Fixes non-responsive slider drag when sliders are on overlay screens.
- Add support for new campaign mod packages that contain mod-info.json, compatibility info, tweak options, and more - Add new campaign selector UI, which display both original campaign balance mods and alternate campaigns, plus lots of options - Improve loading campaign mods, and on-demand loading of campaign mods with saveload See: doc/CampaignMods.md
Not sure if correct but I do see values that look right at a glance.
Co-Authored-By: KJeff01 <[email protected]>
Co-Authored-By: KJeff01 <[email protected]>
Co-Authored-By: KJeff01 <[email protected]>
0ea839d
to
39f3784
Compare
Really nice UI for the campaign selection, thanks! I only have a single technical concern about the PR. Wouldn't it be easier and cleaner to completely separate original remastered and original classic campaign modes by having a distinct set of JS scripts for each? I see a lot of But, maybe I'm missing something here. What do you think, @past-due and @KJeff01 ? Also had a couple of minor nitpicks, but, other than that, the PR is just fine 🙂 |
Because classic campaign mode is largely just a variation on what's already there (with stats changes of course), and the script changes are fairly minor to support research differences (and a few other small things), this seemed preferable (also from an ongoing maintenance standpoint). It also makes it easy for anyone to quickly check what the differences actually are between the two modes, IMHO, because they can just search for EDIT: Also we want to set a certain example: For campaign balance mods to have the best chance of continuing to work in future versions, they should be as limited as possible. (And, ideally, stats and only the most minimal script changes that are absolutely needed.) Since with the way mods work, if a campaign balance mod includes an edited Whereas, if a campaign balance mod is just stats files, it’s almost guaranteed to work long into the future, even if we make various other tweaks / fixes to the core campaign scripting. |
Add a brand-new campaign selector UI, which lets you easily pick between the Original Campaign and (newly-packaged) additional campaigns.
Newly-packaged campaign mods can all be placed inside
mods/campaign
, and the new selector screen lets you pick which to load when starting a new game.Once you've selected an overall campaign, you'll be able to configure:
Tweak Options provide additional toggles that can be configured to customize the campaign experience, such as:
Alternate campaign mods can provide their own custom tweak options as well.
Campaign mods now provide a
mod-info.json
file which contains important information, including compatibility.Remaining TODOs:
Possible Future TODOs: