Author: fendrin
Date: Sun Sep 12 20:33:25 2010
New Revision: 46415

URL: http://svn.gna.org/viewcvs/wesnoth?rev=46415&view=rev
Log:
LoW: Fixed loading of persistent variables.
Removed newlines from story titles.
Disabled shroud explicitly since shroud=on seems to be the new multiplayer 
default.

Modified:
    trunk/data/campaigns/Legend_of_Wesmere/scenarios/01_The_Uprooting.cfg
    trunk/data/campaigns/Legend_of_Wesmere/scenarios/04_Elvish_Treasury.cfg
    trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg
    trunk/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg

Modified: trunk/data/campaigns/Legend_of_Wesmere/scenarios/01_The_Uprooting.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/scenarios/01_The_Uprooting.cfg?rev=46415&r1=46414&r2=46415&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/scenarios/01_The_Uprooting.cfg 
(original)
+++ trunk/data/campaigns/Legend_of_Wesmere/scenarios/01_The_Uprooting.cfg Sun 
Sep 12 20:33:25 2010
@@ -1,17 +1,17 @@
 #textdomain wesnoth-low
 #ifdef MULTIPLAYER
 [multiplayer]
+#ifdef EASY
+    name= _ "2p MC — LoW, Easy Mode, Chapter one"
+    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer 
Campaign\nChapter one\n Easy difficulty"
+#endif
+#ifdef NORMAL
+    name= _ "2p MC — LoW, Normal Mode, Chapter one"
+    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer 
Campaign\nChapter one\n Normal difficulty"
+#endif
 #ifdef HARD
     name= _ "2p MC — LoW, Hard Mode, Chapter one"
     description= _ "<i>The Legend of Wesmere</i>\nMultiplayer 
Campaign\nChapter one\n Hard difficulty"
-#endif
-#ifdef EASY
-    name= _ "2p MC — LoW, Easy Mode, Chapter one"
-    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer 
Campaign\nChapter one\n Easy difficulty"
-#endif
-#ifdef NORMAL
-    name= _ "2p MC — LoW, Normal Mode, Chapter one"
-    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer 
Campaign\nChapter one\n Normal difficulty"
 #endif
     random_start_time=no
     allow_new_game=yes
@@ -45,7 +45,10 @@
     [story]
         [part]
             delay=4000
-            title= _ "The Legend of Wesmere, Chapter one\nPart one\nFlight and 
fight"
+            title= _ "The Legend of Wesmere, 
+Chapter one
+Part one
+Flight and fight"
         [/part]
         [part]
             delay=4000
@@ -89,6 +92,7 @@
     [side]
         side=1
         fog=no
+        shroud=no
         {KALENZ}
         # wmllint: recognize Kalenz
         save_id=Kalenz
@@ -339,6 +343,7 @@
     [side]
         side=7
         fog=no
+        shroud=no
         {LANDAR}
         save_id=Landar
         controller=human

Modified: 
trunk/data/campaigns/Legend_of_Wesmere/scenarios/04_Elvish_Treasury.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/scenarios/04_Elvish_Treasury.cfg?rev=46415&r1=46414&r2=46415&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/scenarios/04_Elvish_Treasury.cfg 
(original)
+++ trunk/data/campaigns/Legend_of_Wesmere/scenarios/04_Elvish_Treasury.cfg Sun 
Sep 12 20:33:25 2010
@@ -62,9 +62,14 @@
 
     #wmllint: validate-off
     [side]
-        {KALENZ}
+        #{KALENZ}
         {PLAYER_GOLD}
+        {PLAYABLE}
+        no_leader=yes
         fog=no
+        shroud=no
+        team_name=Player
+        user_team_name= _ "Player"
         # wmllint: recognize Kalenz
         recruit=Elvish Fighter, Elvish Archer, Elvish Scout
 #ifndef MULTIPLAYER
@@ -136,8 +141,12 @@
     [side]
         side=4
         fog=no
-        {LANDAR}
+        shroud=no
+        no_leader=yes
+        #{LANDAR}
         {PLAYER_GOLD}
+        team_name=Player
+        user_team_name= _ "Player"
         # wmllint: recognize Landar
         recruit=Elvish Fighter, Elvish Archer, Elvish Scout
     [/side]
@@ -146,7 +155,11 @@
     [side]
         side=5
         fog=no
+        shroud=no
         {CLEODIL}
+        {PLAYER_GOLD}
+        team_name=Player
+        user_team_name= _ "Player"
         # wmllint: recognize Cleodil
         recruit=Elvish Shaman, Elvish Scout, Wose
     [/side]
@@ -193,20 +206,35 @@
 #enddef
 
     [event]
-        name=prestart
+        #Used this instead of prestart since global variables aren't synced 
before
+        name=side 1 turn 1
         [objectives]
             {OBJECTIVES}
         [/objectives]
 
+#ifdef MULTIPLAYER
+        {GET_PERSISTENT_RECALLS_FROM2 1 4 LoW_Chapter_One kalenz}
+        {GET_PERSISTENT_RECALLS_FROM2 4 1 LoW_Chapter_One landar}
+#endif
+
+        [recall]
+            id=Kalenz
+            x=7
+            y=29
+        [/recall]
+
+        [recall]
+            id=Landar
+            x=16
+            y=29
+        [/recall]
+
         {RECALL_LOYALS}
-
         # wmllint: recognize Huraldur
         #{CHECK_LANDAR}
-    [/event]
-
-    # wmllint: directory spelling dastone
-    [event]
-        name=start
+
+        [redraw]
+        [/redraw]
 
         [message]
             id=Kalenz
@@ -372,6 +400,7 @@
         [/message]
         [message]
             id=Cleodil
+            # wmllint: directory spelling dastone
             message= _ "The saurians happily carried away the treasury gold, 
but they had come here looking for something more specific... some individual 
object they called ‘dastone’. I am sorry, my lord Kalenz, I could not 
understand their distorted speech very well."
         [/message]
         [message]

Modified: trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg?rev=46415&r1=46414&r2=46415&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg 
(original)
+++ trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg Sun 
Sep 12 20:33:25 2010
@@ -172,29 +172,10 @@
             # wmllint: recognize Anduilas
 
 #ifdef MULTIPLAYER
-#define UNSTORE_PARTY SIDE
-    {FOREACH party_store member}
-        {VARIABLE (party_store[$member].side) {SIDE}}
-        [unstore_unit]
-            variable=party_store[$member]
-            x,y=recall,recall           
-        [/unstore_unit]
-
-        {DEBUG "unstoring $party_store[$member].name to side {SIDE}."}
-
-        {NEXT member}
-    {CLEAR_VARIABLE party_store}
-#enddef
-
-            {GET_PERSISTENT_RECALLS_FROM3 1 5 6 kalenz party_store}
-            {UNSTORE_PARTY 1}
-            {GET_PERSISTENT_RECALLS_FROM3 5 1 6 landar party_store}
-            {UNSTORE_PARTY 5}
-            {GET_PERSISTENT_RECALLS_FROM3 6 1 5 olurf  party_store}
-            {UNSTORE_PARTY 6}
-
-#undef UNSTORE_PARTY
-            #{CLEAR_GLOBAL_VARIABLE LoW party.Kalenz 1}
+            {GET_PERSISTENT_RECALLS_FROM4 1 5 6 7 LoW_Chapter_Two kalenz}
+            {GET_PERSISTENT_RECALLS_FROM4 5 1 6 7 LoW_Chapter_Two landar}
+            {GET_PERSISTENT_RECALLS_FROM4 6 1 5 7 LoW_Chapter_Two olurf}
+            {GET_PERSISTENT_RECALLS_FROM4 7 1 5 6 LoW_Chapter_Two cleodil}
 #endif
 
 #define LEAVE_BEHIND_L3 NAME SIDE

Modified: trunk/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg?rev=46415&r1=46414&r2=46415&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg (original)
+++ trunk/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg Sun Sep 12 
20:33:25 2010
@@ -288,61 +288,80 @@
     {FLAG_VARIANT undead}
 #enddef
 
-
-
-
-
-
-
-
-
-
-
-#define GET_PERSISTENT_RECALLS_FROM3 SIDE1 SIDE2 SIDE3 GLOBAL_VAR LOCAL_VAR
-    #Loads the recall list variable from both sides.
-    {VARIABLE_FROM_GLOBAL LoW {GLOBAL_VAR} {LOCAL_VAR} {SIDE1}}
+##### Persistent Global Variable macros for multiplayer mode #####
+
+#define LOAD_PERSISTENT_IF_LOCAL_EMPTY SIDE NAMESPACE GLOBAL_VAR LOCAL_VAR
     [if]
         {VARIABLE_CONDITIONAL ({LOCAL_VAR}.length) equals 0}
         [then]
-            {DEBUG ("Global Variable {GLOBAL_VAR} is empty for side {SIDE1}.")}
-            {VARIABLE_FROM_GLOBAL LoW {GLOBAL_VAR} {LOCAL_VAR} {SIDE2}}
-            [if]
-                {VARIABLE_CONDITIONAL ({LOCAL_VAR}.length) equals 0}
-                [then]
-                    {DEBUG ("Global Variable {GLOBAL_VAR} is empty for side 
{SIDE2}.")}
-                    {VARIABLE_FROM_GLOBAL LoW {GLOBAL_VAR} {LOCAL_VAR} {SIDE3}}
-                    [if]
-                        {VARIABLE_CONDITIONAL ({LOCAL_VAR}.length) equals 0}
-                        [then]
-                            {DEBUG ("Global Variable {GLOBAL_VAR} is empty for 
side {SIDE3}.")}
-                        [/then]
-                        [else]
-                            {DEBUG ("Global Variable {GLOBAL_VAR} is at size: 
${LOCAL_VAR}.length for side {SIDE3}.")}
-                        [/else]
-                    [/if]
-                [/then]
-                [else]
-                    {DEBUG ("Global Variable {GLOBAL_VAR} is at size: 
${LOCAL_VAR}.length for side {SIDE2}.")}
-                [/else]
-            [/if]
+            {DEBUG ("Global Variable {GLOBAL_VAR} is empty for side {SIDE}.")}
+            {VARIABLE_FROM_GLOBAL {NAMESPACE} {GLOBAL_VAR} {LOCAL_VAR} {SIDE}}
         [/then]
         [else]
-            {DEBUG ("Global Variable {GLOBAL_VAR} is at size: 
${LOCAL_VAR}.length for side {SIDE1}.")}
+            {DEBUG ("Global Variable {GLOBAL_VAR} is at size: 
${LOCAL_VAR}.length|, so {SIDE} got not considered.")}
         [/else]
     [/if]
 #enddef
 
-# define GET_PERSISTENT_RECALLS_FROM3 SIDE1 SIDE2 SIDE3 GLOBAL_VAR LOCAL_VAR
-#     Loads the recall list variable from all three sides.
-#     {GET_PERSISTENT_RECALLS_FROM2 {SIDE1} {SIDE2} {GLOBAL_VAR} {LOCAL_VAR} }
-#     [if]
-#         {VARIABLE_CONDITIONAL ({LOCAL_VAR}.length) equals 0}
-#         [then]
-#             {DEBUG ("Global Variable {GLOBAL_VAR} is empty for side 
{SIDE2}.")}
-#             {VARIABLE_FROM_GLOBAL LoW {GLOBAL_VAR} {LOCAL_VAR} {SIDE3}}
-#         [/then]
-#         [else]
-#             {DEBUG ("Global Variable {GLOBAL_VAR} is at size: 
${GLOBAL_VAR}.length for side {SIDE2}.")}
-#         [/else]
-#     [/if]
-# enddef
+#define LOAD_PERSISTENT_2PLAYER SIDE1 SIDE2 NAMESPACE GLOBAL_VAR LOCAL_VAR
+    #Loads a global variable into a local one.
+    #Specify two sides, the variable is loaded from the second one if it is 
empty 
+    #after reading from the first.
+    {VARIABLE_FROM_GLOBAL {NAMESPACE} {GLOBAL_VAR} {LOCAL_VAR} {SIDE1}}
+    {LOAD_PERSISTENT_IF_LOCAL_EMPTY {SIDE2} {NAMESPACE} {GLOBAL_VAR} 
{LOCAL_VAR}}
+#enddef
+
+#define LOAD_PERSISTENT_3PLAYER SIDE1 SIDE2 SIDE3 NAMESPACE GLOBAL_VAR 
LOCAL_VAR
+    #Loads a global variable into a local one.
+    #Specify two sides, the variable is loaded from the second one if it is 
empty 
+    #after reading from the first.
+    {VARIABLE_FROM_GLOBAL {NAMESPACE} {GLOBAL_VAR} {LOCAL_VAR} {SIDE1}}
+    {LOAD_PERSISTENT_IF_LOCAL_EMPTY {SIDE2} {NAMESPACE} {GLOBAL_VAR} 
{LOCAL_VAR}}
+    {LOAD_PERSISTENT_IF_LOCAL_EMPTY {SIDE3} {NAMESPACE} {GLOBAL_VAR} 
{LOCAL_VAR}}
+#enddef
+
+#define LOAD_PERSISTENT_4PLAYER SIDE1 SIDE2 SIDE3 SIDE4 NAMESPACE GLOBAL_VAR 
LOCAL_VAR
+    #Loads a global variable into a local one.
+    #Specify two sides, the variable is loaded from the second one if it is 
empty 
+    #after reading from the first.
+    {VARIABLE_FROM_GLOBAL {NAMESPACE} {GLOBAL_VAR} {LOCAL_VAR} {SIDE1}}
+    {LOAD_PERSISTENT_IF_LOCAL_EMPTY {SIDE2} {NAMESPACE} {GLOBAL_VAR} 
{LOCAL_VAR}}
+    {LOAD_PERSISTENT_IF_LOCAL_EMPTY {SIDE3} {NAMESPACE} {GLOBAL_VAR} 
{LOCAL_VAR}}
+    {LOAD_PERSISTENT_IF_LOCAL_EMPTY {SIDE4} {NAMESPACE} {GLOBAL_VAR} 
{LOCAL_VAR}}
+#enddef
+
+#define UNSTORE_PARTY SIDE
+    {FOREACH party_store member}
+        {VARIABLE (party_store[$member].side) {SIDE}}
+        [unstore_unit]
+            variable=party_store[$member]
+            x,y=recall,recall           
+        [/unstore_unit]
+
+        {DEBUG "unstoring $party_store[$member].name to side {SIDE}."}
+
+        {NEXT member}
+    {CLEAR_VARIABLE member}
+    {CLEAR_VARIABLE party_store}
+#enddef
+
+
+#define GET_PERSISTENT_RECALLS_FROM2 SIDE1 SIDE2 NAMESPACE GLOBAL_VAR 
+    #Loads the recall list variable from both sides.
+    {LOAD_PERSISTENT_2PLAYER {SIDE1} {SIDE2} {NAMESPACE} {GLOBAL_VAR} 
party_store}
+    {UNSTORE_PARTY {SIDE1} }
+#enddef
+
+#define GET_PERSISTENT_RECALLS_FROM3 SIDE1 SIDE2 SIDE3 NAMESPACE GLOBAL_VAR 
+    #Loads the recall list variable from both sides.
+    {LOAD_PERSISTENT_3PLAYER {SIDE1} {SIDE2} {SIDE3} {NAMESPACE} {GLOBAL_VAR} 
party_store}
+    {UNSTORE_PARTY {SIDE1} }
+#enddef
+
+#define GET_PERSISTENT_RECALLS_FROM4 SIDE1 SIDE2 SIDE3 SIDE4 NAMESPACE 
GLOBAL_VAR 
+    #Loads the recall list variable from both sides.
+    {LOAD_PERSISTENT_4PLAYER {SIDE1} {SIDE2} {SIDE3} {SIDE4} {NAMESPACE} 
{GLOBAL_VAR} party_store}
+    {UNSTORE_PARTY {SIDE1} }
+#enddef
+
+


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to