Difference between revisions of "User:Dlr365"

From The Battle for Wesnoth Wiki
m (GSoC Application)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Info ==
 +
*Name - Doug Rosvick
 +
*Location - Calgary, Canada
 +
*Profession - Software Engineering student at University of Calgary
 +
 
== Works in Progress ==
 
== Works in Progress ==
=== GSoC Application ===
+
=== Current ===
I plan to re-write the map editor. ([[MapEditorRewrite|Application Wiki Page]])
+
* bug #12747 [https://gna.org/bugs/index.php?12747] - holding escape quits titlescreen
 +
 
 +
=== Previous ===
 +
==== [endlevel] giving different results to different sides ====
 +
(info below is out of date)
 +
 
 +
Allows specific sides to be issued specific results in multiplayer, instead of everyone getting the same result. See [http://gna.org/bugs/index.php?4960 bug#4960], [https://gna.org/patch/?1032 patch#1032].
  
=== Current ===
+
If [result] tags are found within an [endlevel] tag, the normal ''result='' key will be ignored.  If ''summary=yes'' is specified in the [endlevel] tag, then instead of specific victory/defeat messages for only local players, each player is shown the victory/defeat status of all sidesAny sides who are not given a specific [result] are either shown a summary or nothing, and their result is defaulted to ''continue''. Observers are shown a "game over" dialog if ''summary=no'', and the summary if ''summary=yes''.
==== [endlevel] [result] tag ====
 
Allows specific sides to be issued victory/defeat in multiplayer, instead of everyone getting the sameSee [https://gna.org/bugs/index.php?4960 bug#4960].
 
  
 
Example WML syntax:
 
Example WML syntax:
 
  [endlevel]
 
  [endlevel]
 +
 +
  next_scenario=
 +
 +
  bonus=                    {these are the defaults for all [result] tags}
 +
  carryover_percentage=
 +
  carryover_add=
 +
 +
  summary=                  {controls whether players are shown a summary of all sides, or just their local victory/defeat messages}
 +
 +
  [result]
 +
    side=1
 +
    outcome=victory          {may be victory, defeat, continue, continue_no_save}
 +
    fire_events=            {yes/no, controls whether victory/defeat events are fired}
 +
  [/result]
 +
 
   [result]
 
   [result]
     [victory]
+
     side=4
      side=1,4
+
     outcome=victory
     [/victory]
+
     fire_events=
     [defeat]
+
    carryover_percentage=    {can override the defaults}
      side=2,3
+
    carryover_add=
     [/defeat]
+
     bonus=
 
   [/result]
 
   [/result]
 +
 +
  [result]
 +
    outcome=defeat
 +
    side=2,3
 +
    fire_events=
 +
  [/result]
 +
 
  [/endlevel]
 
  [/endlevel]
This will issue a victory message for sides 1 and 4, and a defeat message for sides 2 and 3.
+
This will issue a victory message for sides 1 and 4, and a defeat message for sides 2 and 3.  Side 1 and 4 will have different carryover amounts.
  
Problems with current implementation:
+
Further discussion needed:
* 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
+
* Handling of ''name=victory'' and ''name=defeat'' events
** 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.
+
* could the default for ''summary'' be controlled by a menu option / preference? to allow players to always see a summary...
* 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 ===
+
Another possible format would be as follows: (thanks Sapient for ideas)
==== [endlevel] [result] tag ====
+
[endlevel]
* 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).
+
  next_scenario=
 
+
==== [result] -- new DirectActionWML ====
+
  bonus=
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).
+
  carryover_percentage=
 
+
  carryover_add=
===== Implementation =====
+
* The following keys are valid:
+
  summary=
** '''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.
+
  [victory]
*** -->(not implemented, see note#1)<-- '''default_result''' : sides who are not given specific results are issued this result.  Defaults to ''defeat''.
+
    side=1
 
+
    fire_events=
* The following tags are valid:
+
  [/victory]
** '''[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)''
+
  [victory]
*** '''bonus''' : whether the sides specified in this ''[victory]'' tag should get bonus gold.  Can be either ''yes'' or ''no''.  Defaults to ''yes''.
+
    side=4
*** '''carryover_percentage''' : Amount of gold carried over into the next scenarioDefaults to 80%.
+
    carryover_percentage=
*** '''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''.
+
    carryover_add=
** '''[defeat]''' : issues defeat to the specified sides.  Can have either zero or one ''[defeat]'' tag per ''[results]'' tag. Valid keys:
+
    bonus=
*** '''side''' : comma-delimited list of the sides to be given defeat. If not included, the ''[defeat]'' tag is ignored.
+
    fire_events=
 
+
  [/victory]
* If neither a ''[victory]'' nor ''[defeat]'' tag is specified, then all sides are issued ''default_result''.
+
   
 +
  [defeat]
 +
    side=2,3
 +
    fire_events=
 +
  [/defeat]
 +
   
 +
  [/endlevel]
 +
This will produce the same result as the above format, but involves less WML typing and is clearer what is going onFor ''continue'' and ''continue_no_save'' results, there is a ''[continue]'' tag in addition to [victory] and [defeat] tags, which takes a ''save='' key.
 +
  [continue]
 +
  side=
 +
  save=  {yes/no}
 +
[/continue]
  
===== Notes =====
+
==== 2008 SoC application ====
# does having multiple opposing sides with victory make sense??
+
[[MapEditorRewrite]]
# out of sync problems in MP with bonus gold?
 
# 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?
 

Latest revision as of 05:53, 23 December 2008

Info

  • Name - Doug Rosvick
  • Location - Calgary, Canada
  • Profession - Software Engineering student at University of Calgary

Works in Progress

Current

  • bug #12747 [1] - holding escape quits titlescreen

Previous

[endlevel] giving different results to different sides

(info below is out of date)

Allows specific sides to be issued specific results in multiplayer, instead of everyone getting the same result. See bug#4960, patch#1032.

If [result] tags are found within an [endlevel] tag, the normal result= key will be ignored. If summary=yes is specified in the [endlevel] tag, then instead of specific victory/defeat messages for only local players, each player is shown the victory/defeat status of all sides. Any sides who are not given a specific [result] are either shown a summary or nothing, and their result is defaulted to continue. Observers are shown a "game over" dialog if summary=no, and the summary if summary=yes.

Example WML syntax:

[endlevel]

  next_scenario=

  bonus=                     {these are the defaults for all [result] tags}
  carryover_percentage=
  carryover_add=

  summary=                   {controls whether players are shown a summary of all sides, or just their local victory/defeat messages}

  [result]
    side=1
    outcome=victory          {may be victory, defeat, continue, continue_no_save}
    fire_events=             {yes/no, controls whether victory/defeat events are fired}
  [/result]

  [result]
    side=4
    outcome=victory
    fire_events=
    carryover_percentage=    {can override the defaults}
    carryover_add=
    bonus=
  [/result]

  [result]
    outcome=defeat
    side=2,3
    fire_events=
  [/result]

[/endlevel]

This will issue a victory message for sides 1 and 4, and a defeat message for sides 2 and 3. Side 1 and 4 will have different carryover amounts.

Further discussion needed:

  • Handling of name=victory and name=defeat events
  • could the default for summary be controlled by a menu option / preference? to allow players to always see a summary...


Another possible format would be as follows: (thanks Sapient for ideas)

[endlevel]

  next_scenario=

  bonus=
  carryover_percentage=
  carryover_add=

  summary=

  [victory]
    side=1
    fire_events=
  [/victory]
  
  [victory]
    side=4
    carryover_percentage=
    carryover_add=
    bonus=
    fire_events=
  [/victory]

  [defeat]
    side=2,3
    fire_events=
  [/defeat]

[/endlevel]

This will produce the same result as the above format, but involves less WML typing and is clearer what is going on. For continue and continue_no_save results, there is a [continue] tag in addition to [victory] and [defeat] tags, which takes a save= key.

[continue]
  side=
  save=   {yes/no}
[/continue]

2008 SoC application

MapEditorRewrite

This page was last edited on 23 December 2008, at 05:53.