Difference between revisions of "User:Dlr365"

From The Battle for Wesnoth Wiki
Line 1: Line 1:
 
== Works in Progress ==
 
== Works in Progress ==
=== [result] -- new DirectActionWML ===
+
=== Current ===
 +
==== [endlevel] [result] tag ====
 +
Allows specific sides to be issued victory/defeat in multiplayer, instead of everyone getting the same.  See [https://gna.org/bugs/index.php?4960 bug#4960].
 +
 
 +
Example WML syntax:
 +
[endlevel]
 +
  [result]
 +
    [victory]
 +
      side=1,4
 +
    [/victory]
 +
    [defeat]
 +
      side=2,3
 +
    [/defeat]
 +
  [/result]
 +
[/endlevel]
 +
This will issue a victory message for sides 1 and 4, and a defeat message for sides 2 and 3.
 +
 
 +
Problems with current implementation:
 +
* uses ''result=continue'' to suppress regular victory/defeat dialogs, thus bonus gold is never applied to anyone, and ''name=victory'' events are always called regardless of any specific outcomes
 +
** possible fix -- a new LEVEL_RESULT type that doesn't show dialogs, but gives bonus gold properly and calls the proper ''[event]''s?  Needs more discussion.
 +
* does not notify the network immediatly that the game has ended, because the dialog for the current player is shown ''before'' the end_level_exception is thrown
 +
** this could also possibly be fixed by adding a new LEVEL_RESULT type for when end_level_exception is thrown
 +
* only supports [victory] and [defeat]... not sure if [continue] or [continue_no_save] tags would make sense....
 +
 
 +
 
 +
=== Need More Thought/Discussion ===
 +
==== [endlevel] [result] tag ====
 +
* The current implementation has a few key issues still... see above for problems/fix ideas... further ideas/discussion will go here.
 +
* Want to add support for a [summary] tag that simply shows the results of the [victory] and [defeat] tags to observers (or specific sides).
 +
 
 +
==== [result] -- new DirectActionWML ====
 
This tag would allow scenario authors to issue victory/defeat to specific sides from within events, without the scenario necessarily ending (if it makes sense for it to continue).
 
This tag would allow scenario authors to issue victory/defeat to specific sides from within events, without the scenario necessarily ending (if it makes sense for it to continue).
  
==== Implementation ====
+
===== Implementation =====
 
* The following keys are valid:
 
* The following keys are valid:
 
** '''endlevel''' : this key specifies if the level should be ended.  Can be either ''yes'' or ''no''.  Defaults to ''yes''.  '''CURRENT IMPLEMENTATION DOES NOT ALLOW ''endlevel=no''!'''  The following keys may be used if ''endlevel=yes'':
 
** '''endlevel''' : this key specifies if the level should be ended.  Can be either ''yes'' or ''no''.  Defaults to ''yes''.  '''CURRENT IMPLEMENTATION DOES NOT ALLOW ''endlevel=no''!'''  The following keys may be used if ''endlevel=yes'':
Line 20: Line 50:
 
* If neither a ''[victory]'' nor ''[defeat]'' tag is specified, then all sides are issued ''default_result''.
 
* If neither a ''[victory]'' nor ''[defeat]'' tag is specified, then all sides are issued ''default_result''.
  
==== Notes ====
+
===== Notes =====
 
# does having multiple opposing sides with victory make sense??
 
# does having multiple opposing sides with victory make sense??
 
# out of sync problems in MP with bonus gold?
 
# out of sync problems in MP with bonus gold?
 
# TODO : allow ''endlevel=no'' (may require server-side changes...)
 
# TODO : allow ''endlevel=no'' (may require server-side changes...)
 
#* when someone is issued defeat in MP (when there is 3 or more teams), could they become an observer?
 
#* when someone is issued defeat in MP (when there is 3 or more teams), could they become an observer?

Revision as of 02:14, 29 March 2008

Works in Progress

Current

[endlevel] [result] tag

Allows specific sides to be issued victory/defeat in multiplayer, instead of everyone getting the same. See bug#4960.

Example WML syntax:

[endlevel]
  [result]
    [victory]
      side=1,4
    [/victory]
    [defeat]
      side=2,3
    [/defeat]
  [/result]
[/endlevel]

This will issue a victory message for sides 1 and 4, and a defeat message for sides 2 and 3.

Problems with current implementation:

  • uses result=continue to suppress regular victory/defeat dialogs, thus bonus gold is never applied to anyone, and name=victory events are always called regardless of any specific outcomes
    • possible fix -- a new LEVEL_RESULT type that doesn't show dialogs, but gives bonus gold properly and calls the proper [event]s? Needs more discussion.
  • does not notify the network immediatly that the game has ended, because the dialog for the current player is shown before the end_level_exception is thrown
    • this could also possibly be fixed by adding a new LEVEL_RESULT type for when end_level_exception is thrown
  • only supports [victory] and [defeat]... not sure if [continue] or [continue_no_save] tags would make sense....


Need More Thought/Discussion

[endlevel] [result] tag

  • The current implementation has a few key issues still... see above for problems/fix ideas... further ideas/discussion will go here.
  • Want to add support for a [summary] tag that simply shows the results of the [victory] and [defeat] tags to observers (or specific sides).

[result] -- new DirectActionWML

This tag would allow scenario authors to issue victory/defeat to specific sides from within events, without the scenario necessarily ending (if it makes sense for it to continue).

Implementation
  • The following keys are valid:
    • endlevel : this key specifies if the level should be ended. Can be either yes or no. Defaults to yes. CURRENT IMPLEMENTATION DOES NOT ALLOW endlevel=no! The following keys may be used if endlevel=yes:
      • next_scenario : the ID of the next scenario that is to be played. Default specified in [scenario] tag.
      • -->(not implemented, see note#1)<-- default_result : sides who are not given specific results are issued this result. Defaults to defeat.
  • The following tags are valid:
    • [victory] : issues victory to the specified sides. Can have either zero or one [victory] tag per [results] tag. Valid keys:
      • side : comma-delimited list of the sides to be given victory. If not included, the [victory] tag is ignored. (see note#1)
      • bonus : whether the sides specified in this [victory] tag should get bonus gold. Can be either yes or no. Defaults to yes.
      • carryover_percentage : Amount of gold carried over into the next scenario. Defaults to 80%.
      • carryover_add : if true the gold will be added to the starting gold the next scenario, if false the next scenario will start with the amount of the current scenario (after taxes) or the minimum in the next scenario. Default is false.
    • [defeat] : issues defeat to the specified sides. Can have either zero or one [defeat] tag per [results] tag. Valid keys:
      • side : comma-delimited list of the sides to be given defeat. If not included, the [defeat] tag is ignored.
  • If neither a [victory] nor [defeat] tag is specified, then all sides are issued default_result.
Notes
  1. does having multiple opposing sides with victory make sense??
  2. out of sync problems in MP with bonus gold?
  3. TODO : allow endlevel=no (may require server-side changes...)
    • when someone is issued defeat in MP (when there is 3 or more teams), could they become an observer?