wesnoth/wesnoth-old — pull request #98 by cbeck88 (2014-02-19 16:56:49+00:00)
Title: feature: [endlevel] may specify carryover WML merged/appended into next scenario

[endlevel] now has two optional subtags [next_scenario_settings], [next_scenario_append].

Both of these are parsed at scenario end and stored as carryover data. At the start of the next scenario,
[next_scenario_settings] is merged with the scenario wml ("level" variable in playcampaign.cpp),
and [next_scenario_append] has its children appended. This happens just before the carryover sides are transferred, so it is possible to use this to reconfigure the next scenario, reconfigure the sides, change their saveid's etc., and also to append events into the next scenario. Some simple illustration scenarios are included here: https://gna.org/bugs/?21670

I have tested this with extensive debugging output and also playing a bit of mainline sp and mp campaigns to make sure I didn't break anything. However I want to give others a chance to review and respond if they like before committing, I never got a hold of anyone who had previously worked on the campaign / carryover code.