xna-cncnet-client icon indicating copy to clipboard operation
xna-cncnet-client copied to clipboard

Add campaign group selector

Open SadPencil opened this issue 3 years ago • 6 comments

This PR is backward compatible as by default the option is off. Modders can enable the CampaignTagSelectorEnabled option to use this feature.

This feature enables modders to make a "choose your side" interface before the campaign selector. Choosing among "Act 1/Act 2/..." or any other tags is also possible.

The screenshot below shows the feature. (I am not an expert in beautifying user interfaces so it is only a working example. Fully configurable through ini files.)

img1 img2 img3

The modders define tags for missions in battle.ini and customize the selector window in CampaignTagSelector.ini using the new INItializableWindow ini format.

I use TSC v6 client as an example. The corresponding files are attached here.

TSC.v6.example.zip


Prerequisite of this PR: #364 (merged now) and #367 (requesting merge).

SadPencil avatar Sep 14 '22 02:09 SadPencil

Nightly build for this pull request:

github-actions[bot] avatar Sep 14 '22 02:09 github-actions[bot]

Ready for review now. Prerequisite #367.

SadPencil avatar Sep 30 '22 20:09 SadPencil

I'm not a fan of the design where the Battle.ini is constantly re-read and re-parsed here.

I'd rather read Battle.ini only once, have all the missions in the Missions list, and filter what is actually displayed in the list.

Rampastring avatar Nov 15 '22 10:11 Rampastring

Actually wouldn't it be better to have one INI per window? So separate screens would have different Battle.ini alternatives.

Metadorius avatar Nov 15 '22 11:11 Metadorius

I think the single file gives more control when it comes to the "Show All" view.

Rampastring avatar Nov 15 '22 11:11 Rampastring

I'm not a fan of the design where the Battle.ini is constantly re-read and re-parsed here.

I'd rather read Battle.ini only once, have all the missions in the Missions list, and filter what is actually displayed in the list.

Thanks for the suggestion. Code updated.

SadPencil avatar Nov 17 '22 04:11 SadPencil