Challenge ini format for campaigns?

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Challenge ini format for campaigns?

Post by aubergine »

With campaigns becoming more moddable, would it be worth using something similar to a challenge ini to define a mission?

In the campaign ini the "level" property would define the location of the mission ini.

The mission ini then defines the map, who the players are, the rules.js to use and the "extra" script would be the mission script similar to cam1a.js. Essentially the mission ini replaces /base/wrf/cam1/cam1a.wrf with something more descriptive, readable and flexible.

This would have a number of benefits IMHO:

* Ability to test missions as challenges before putting them in a campaign
* Encourage more cross-pollination between challenges and campaign missions
* Easier to document - challenges and campaigns will share more common elements
* Reduction of duplicate code in WZ

I assume things like labels.ini and droid.ini would live in the map referenced by the ini. The only change to the challenge ini format would probably be allowing an .ai file to be referenced for "ai" properties (currently it has to be a .js file, which doesn't specify ai name, etc).

Ideally we could end up with people making a number of challenge games and then deciding to turn them in to a campaign (which at that point would be relatively easy for them to do).

Also, and somewhat off-topic, I'd like to propose that gameOverMessage() be given a new 'allowSave' param (default = false) which if 'true' would show "save game" on the results screen. This would allow a single "mission" (or challenge) to actually contain several missions, with optional objectives from first mission remaining available in subsequent missions.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Challenge ini format for campaigns?

Post by Per »

Yes, that is the direction I want to go. (Except I do not see any gains from reusing the challenge code. There should be a way to (re)play individual missions for users as well, not just developers, so that as a hack should not be necessary.)
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: Challenge ini format for campaigns?

Post by Goth Zagog-Thou »

I'm interested in this as well so that standalone missions will be possible and selectable from a list .. of course the API should allow for loading a next-in-series mission if desired.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Challenge ini format for campaigns?

Post by aubergine »

loadLevel() allows loading of next mission, although I'm still not quite sure how missions are defined in the current system (seems to be lots of .wrf, .txt, .ini, .vlo and .slo files in several locations).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Post Reply