[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wesnoth-dev] KISS Solution to user campaign stability problems
From: |
ott |
Subject: |
Re: [Wesnoth-dev] KISS Solution to user campaign stability problems |
Date: |
Tue, 28 Jun 2005 12:52:30 +0200 |
User-agent: |
Mutt/1.5.6i |
On Mon, Jun 27, 2005 at 07:35:36PM -0500, David White wrote:
> Now if there is an error in the campaign, the parsing will emit some
> error messages. The entire user campaign will be considered corrupt, and
> not loaded as part of the config. Then when Wesnoth gets to step 2, and
> tries to start a game at scenario1, of course it won't find it, because
> the entire module was rejected.
Thanks for the analysis, makes sense. Longer term it would be good
if step 2 was perhaps short-circuited with a more descriptive message,
something like "the campaign has errors, skipping it".
However, with several campaigns (such as Gryphon's Tale), their brokenness
generates exactly 0 error messages with current CVS even though 0.9.2
gives a long list of errors.
I have edited every single user campaign to remove the level 1 problem
of getting the campaign .cfg files to be parsed without errors, and
for the campaigns to appear in the menu. With every single campaign
server download installed, I now have no errors when starting the game,
but when trying to start my cleaned up Gryphon's Tale, I see
The following add-on campaign(s) had errors and could not be loaded:
.../Gryphon_Tale.cfg
ERROR DETAILS:
and that's it. The --log-info=all output shows the campaign scenarios
being parsed, macros being substituted, in other words normal stuff,
no errors at all, and then the above error dialog. If I was a campaign
author I would be very frustrated at this point -- there are errors
but no details are provided. Going back to 0.9.2 gives a whole pile
of errors: "Unterminated [element] tag at units/Pizolpha.cfg:19", etc.
Perfectly informative, but I'm not sure it's a good idea forcing people to
keep 0.9.2 around to debug their campaigns. This looks to me as though
errors found in custom units are somehow not propagated up to the list
of errors that is then displayed.
For reference, here are my diffs from the version of Gryphon's Tale on
the campaign server, so that the issue can be reproduced. This diff
fixes an unterminated string (this error appears in the debug output but
not the error dialog) and moves the campaign #ifdef to be better behaved.
-- address@hidden
diff -ur campaigns.orig/Gryphon_Tale/scenarios/Orcish_Prison.cfg
campaigns/Gryphon_Tale/scenarios/Orcish_Prison.cfg
--- campaigns.orig/Gryphon_Tale/scenarios/Orcish_Prison.cfg Tue Jun 21
14:44:46 2005
+++ campaigns/Gryphon_Tale/scenarios/Orcish_Prison.cfg Mon Jun 27 22:33:12 2005
@@ -495,7 +495,7 @@
[/message]
[message]
type=Young Ogre
- message="Er-eh-fheh! Uakher-rn! Daedlyayerr!"
+ message="Er-eh-fheh! Uakher-rn! Daedlyayerr!
@(Fun time's over, boys! Time to pick a side! If you're with me, you'll help
me kill them all!)"
[/message]
[message]
diff -ur campaigns.orig/Gryphon_Tale/scenarios/The_Trainer.cfg
campaigns/Gryphon_Tale/scenarios/The_Trainer.cfg
--- campaigns.orig/Gryphon_Tale/scenarios/The_Trainer.cfg Tue Jun 21
14:44:46 2005
+++ campaigns/Gryphon_Tale/scenarios/The_Trainer.cfg Mon Jun 27 22:36:17 2005
@@ -13,7 +13,7 @@
id="the_trainer"
{GRYPHONMAP courtyard}
turns=20
- #endif
+ ##endif
music="wesnoth-6.ogg"
next_scenario=the_necromancers
diff -ur campaigns.orig/Gryphon_Tale.cfg campaigns/Gryphon_Tale.cfg
--- campaigns.orig/Gryphon_Tale.cfg Tue Jun 21 14:44:46 2005
+++ campaigns/Gryphon_Tale.cfg Mon Jun 27 22:17:08 2005
@@ -15,6 +15,14 @@
first_scenario=capture_the_flag
[/campaign]
+# by putting this line outside the #ifdef it can load the gryphon image
+# for the campaign description
+[binary_path]
+path=data/campaigns/Gryphon_Tale/
+[/binary_path]
+
+#ifdef CAMPAIGN_GRYPHON_TALE
+
[+units]
address@hidden/Gryphon_Tale/units}
@@ -45,14 +53,6 @@
[/units]
-# by putting this line outside the #ifdef it can load the gryphon image
-# for the campaign description
-[binary_path]
-path=data/campaigns/Gryphon_Tale/
-[/binary_path]
-
-
-#ifdef CAMPAIGN_GRYPHON_TALE
#define GRYPHONMAP NAME
map_data="address@hidden/Gryphon_Tale/maps/{NAME}}"
@@ -64,4 +64,4 @@
address@hidden/Gryphon_Tale/images}
-#endif
\ No newline at end of file
+#endif