UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5 IP: 198.54.202.234 URI: http://wesnoth.slack.it/?BuildingCampaigns - - - - - Index: BuildingCampaigns =================================================================== RCS file: /home/wesnoth/cvsroot/wikiroot/BuildingCampaigns,v retrieving revision 1.19 diff -u -r1.19 BuildingCampaigns --- BuildingCampaigns 10 Jul 2005 13:51:34 -0000 1.19 +++ BuildingCampaigns 20 Jul 2005 15:47:02 -0000 @@ -125,13 +125,13 @@ difficulty_descriptions= _ "&easy_icon.png,Easy;*&normal_icon.png,Normal;&hard_icon.png,Hard" [/campaign] + #ifdef CAMPAIGN_SAMPLE_CAMPAIGN + [+units] {campaigns/Sample_Campaign/units} {~campaigns/Sample_Campaign/units} [/units] - #ifdef CAMPAIGN_SAMPLE_CAMPAIGN - {campaigns/Sample_Campaign/scenarios} {~campaigns/Sample_Campaign/scenarios} @@ -152,11 +152,15 @@ they can both give the same name to a scenario without clashing). It also means that you can customise global wesnoth settings (the terrain configuration, for example) on a per-campaign basis. + However, notice that [+units] is not inside the #ifdef. This is due to a bug in Wesnoth programming that causes savegames in your campaign to be corrupt if you try to put it in. Unfortunately, this means that you need to make sure that -none of your units conflict with other user or mainline units. +none of your units conflict with other user or mainline units. //This +sounds completely wrong, [units] tags should be inside the campaign +#ifdef at least since 0.9.0, can someone please confirm if this +is still an issue?// Second, the [binary_path] tag allows images and sounds to be installed inside the {campaigns/Sample_Campaign} directory instead of the default Wesnoth path. @@ -171,7 +175,7 @@ You can refer to your images, installed this way, as "some-image.png" (that's the work of [binary_path]), and include maps by using the preprocessor syntax -"{campaigns/Sample_Campaign/maps/mymap}{~campaigns/Sample_Campaign/maps/mymap}" with the map_data attribute. You +"[EMAIL PROTECTED]/Sample_Campaign/maps/mymap}" with the map_data attribute. You might also define a preprocessor macro to abstract away from the title of your campaign. For example, you might write the end of the campaign file like this: @@ -179,7 +183,7 @@ #ifdef CAMPAIGN_SAMPLE_CAMPAIGN #define MAP NAME - map_data="{campaigns/Sample_Campaign/maps/{NAME}}{~campaigns/Sample_Campaign/maps/{NAME}}" + map_data="[EMAIL PROTECTED]/Sample_Campaign/maps/{NAME}}" #enddef [EMAIL PROTECTED]/Sample_Campaign/scenarios} @@ -190,8 +194,9 @@ #endif Now your scenarios can refer to their maps by saying "{MAP mymap}", -without having to know the name of the campaign they're included in, which might be helpful -- if you ever change the name of your campaign, you don't want to have to edit all the scenarios. +without having to know the name of the campaign they're included in, +which might be helpful - if you ever change the name of your campaign, +you don't want to have to edit all the scenarios. ||See Also||
_______________________________________________ Wesnoth-wiki-changes mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/wesnoth-wiki-changes
