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

Implement custom mission support with CampaignTagSelector #518

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SadPencil
Copy link
Member

@SadPencil SadPencil commented Mar 10, 2024

This PR includes and therefore closes #367 and closes #370, avoiding maintaining too many PRs

This PR works with CnCNet/yrpp-spawner#19

Apart from the campaign tag selector feature brought by #370, this PR also include a custom mission support.

Users can drop third-party fan-made singleplayer missions in Maps\CustomMissions folder, like this:

CustomMissions
├── vnsepa.csf # optional
├── vnsepa.map
├── vnsepa.pal # optional
└── vnsepa.shp # optional

This installs a custom mission named vnsepa.

vnsepa.map file is basically a .map file containing campaigns, with the following new-added sectiones:

[CNCNET:MISSION:BATTLE.INI]
CD=2
BuildOffAlly=yes
Scenario=vnsepa.map ; this line will be ignored by the client
Description=vnsepa
Summary=MAP:DESCREDDAWN
Side=0
SideName=Allies
Act=1
LongDescription=Operation: The Separation - Location: Kon Tum, Central Vietnam blah blah

[CNCNET:MISSION:MISSION.INI]
Briefing=Brief:AREDDAWN
ShowBriefing=true
UIName=MAP:TITREDDAWN
LSLoadMessage=LoadMsg:AREDDAWN
LSLoadBriefing=LoadBrief:AREDDAWN
LS640BriefLocX=20
LS640BriefLocY=20
LS800BriefLocX=20
LS800BriefLocY=20
LS640BkgdName=custommission.shp ; the filename is fixed
LS800BkgdName=custommission.shp ; the filename is fixed
LS800BkgdPal=custommission.pal ; the filename is fixed
LoadScreenText.Color=LightGrey

; Map created with FinalAlert 2(tm) Mission Editor
; Get it at http://www.westwood.com
; note that all comments were truncated

The two sections define mission info for the client as well as YR spawner.

To show custom missions, modders need to define a button ButtonTag_CUSTOM in file CampaignTagSelector.ini.

Copy link

github-actions bot commented Mar 10, 2024

Nightly build for this pull request:

@SadPencil SadPencil force-pushed the feature-custom-mission branch 5 times, most recently from 6414310 to 787614a Compare March 10, 2024 12:12
@SadPencil SadPencil force-pushed the feature-custom-mission branch from 787614a to 1485f2a Compare September 22, 2024 16:26
@SadPencil SadPencil marked this pull request as draft November 14, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant