Follow-up Comment #6, patch #1032 (project wesnoth):
I don't think that specifying the individual sides [result]'s in an
[endlevel] is a good idea. With this implementation, I'd have to have a lot
of [endlevel]'s that are branched with [if][then][else] to cover all the
different outcome combinations. (for instance, in an mp campaign with allied
player sides 1,2,3 and 4 where individual sides can be eliminated, I'd need a
whopping 16 [endlevel]s to handle all combinations!)
*Instead*, I think it'd be much better to just specify the winning *team* in
any given [endlevel] tag. All sides belonging to that team who don't have
individual loss conditions defined (see below) will gain victory, all other
sides/teams lose.
Individual [loss] conditions can be declared as a direct action in any event
prior to an [endlevel] or other end of scenario. This causes the *side* (or
sides) it applies to to be marked as losing - they will suffer defeat at the
next [endlevel] even if their side wins.
When there is only one team remaining with sides that haven't been marked for
[loss], that team gets an automatic win. The [event] name=victory needs to be
able to filter for the team that wins - to be able to handle dialog and
cleanup appropriately.
The [loss] direct action would support a few other options such as whether
the side continues on the next scenario regardless (useful for running a
series of competitive battles where you simply want to give the winner a
handicap but continue with all combatants), or only if your team wins (for
some MP campaigns), or prevent continuation for the losing side. Also, the
[loss] condition can set a gold penalty and minimum gold for the next level.
Similarly, the [endlevel] should decide if losing teams get carried over to
the next scenario, or are eliminated instead.
WML syntax examples:
[event]
name=die
first_time_only=no
[filter]
role="protect_me_or_lose"
[/filter]
[store_unit]
variable=dead
kill=no
[filter]
x,y=$x1,$y1
[/filter]
[/store_unit]
[loss/lose/mark_for_defeat...etc]
side=$dead.side
immediate_message=no
continue=no (team_win, yes)
gold_penalty=50 (in %)
minimum_gold=100
canrecruit=0 # prevents recruitment for the rest of the scenario
[/loss]
# some dialogue follows...
[/event]
...
[event]
name=some event that causes a win
[endlevel]
winning_team="western alliance"
continuing_sides=all (team, winners)
next_scenario=...
gold_carryover=80
minimum_gold=100
[/endlevel]
# some dialog follows
[event]
name=victory
[filter] # not sure a unit
side=1 # filter is the right
[/filter] # place for this
# specific story dialog for side 1
# for this outcome follows ...
[/event]
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1032>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs