Latest Posts

Changes in CampaignUi

Revision Differences of Revision 3

# The Campaign UI ¶

The campaigns and their maps are read out of the file "campaigns/cconfig" and are reflected in the Campaign UI. ¶

The positive side of this feature: ¶

* Integration of new campaigns is much easier (more dynamic) and doesn't need a recompile, not even a restart of Widelands* This fact enables us, to let our players download new versions and/or additions of campaigns, without having to recompile their widelands. ¶

* Through this new UI, much more information about the campaigns and the maps of the campaigns is provided. ¶
* We can add a map-event, which sets the next level and/or campaign visible in the campaigns-conf-file, so the player gets more excited, while playing a REAL timeline (but still can choose to play an already played scenario). ¶
* We can create interactive timelines. For example:
* The player has the possibility, to attack player1 or player2. After winning this game the fitting map will be set as visible (for example he attacked player1, so in his next scenario he has got player2 as allied player) ¶
* Another example: a player can expand northwards or eastwards. Now it depends on the point, (s)he is reaching first, whether the map of the northern or the eastern map is set as visible. ¶


The negative side of this feature: ¶

* Cheating will be much more easy, than it might be in a static programmed way (without conf-file) - but who cares? It's up to the users if they really want to cheat or not. ¶



## cconfig ¶

The Campaign-config file is split in several sections. First section is "global", which contains general informations about the campaigns and links to the following sections of the campaign-maps. ¶


### Section "global" ¶

The "??" is a placeholder for the number of the campaign. First entry is 00 and last possible entry (for now) is 99. ¶

* campname?? ¶
** - name of the Campaign ¶
* campsect?? ¶
** - name of section, to be loaded, if this campaign is selected. ¶
* campdiff?? ¶
** - level of difficulty 1-3 (easy to hard) (this is only a visualisation, it has no influences on the real difficulty). ¶
* campdesc?? ¶
** - description of the campaign with the number ??. ¶
* campvisi?? ¶
** - Is campaign visible by default? (1=yes, 0=no) ¶


### Sections of campaign - maps ¶

The name of the section MUST be the name of the campaign-section + "??" where ?? is an increasing number. ¶

* name ¶
** - name of the map. ¶
* visible ¶
** - is this map visible(1), or does it need another map to be played first(0). ¶
* newvisi (optional) ¶
** - if the scenario was added to an already existing campaign, this string holds the name of another campaign or scenario that should be set to visible, so this scenario gets visible as well. ¶
* path ¶
** - path to the map. ¶