Difference between revisions of "User:Dlr365"

From The Battle for Wesnoth Wiki
(Current)
Line 23: Line 23:
 
     side=1
 
     side=1
 
     outcome=victory          {may be victory, defeat, continue, continue_no_save}
 
     outcome=victory          {may be victory, defeat, continue, continue_no_save}
 +
    fire_events=            {yes/no, controls whether victory/defeat events are fired}
 
   [/result]
 
   [/result]
 
   
 
   
Line 28: Line 29:
 
     side=4
 
     side=4
 
     outcome=victory
 
     outcome=victory
 +
    fire_events=
 
     carryover_percentage=    {can override the defaults}
 
     carryover_percentage=    {can override the defaults}
 
     carryover_add=
 
     carryover_add=
 +
    bonus=
 
   [/result]
 
   [/result]
 
   
 
   
Line 35: Line 38:
 
     outcome=defeat
 
     outcome=defeat
 
     side=2,3
 
     side=2,3
 +
    fire_events=
 
   [/result]
 
   [/result]
 
   
 
   
Line 41: Line 45:
  
 
Further discussion needed:
 
Further discussion needed:
* ''name=victory'' and ''name=defeat'' events are currently ignored when using [result] tags (possibly need to re-structure the way these events are handled...)
+
* 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...
 
* 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]

Revision as of 08:09, 8 April 2008

Works in Progress

GSoC Application

I plan to re-write the map editor. (Application Wiki Page)

Current

[endlevel] giving different results to different sides

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]