← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/casern_campaign into lp:widelands

 

Notabilis has proposed merging lp:~widelands-dev/widelands/casern_campaign into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/casern_campaign/+merge/314208

Adapted the tutorials and campaigns for the future implementation of barracks.

While the campaigns are currently playable some of them will (partially) break when barracks are required for soldier creation. This branch modifies some dialogs and objectives so barracks have/can be build where required / where it makes sense.

Please check the NOCOM in data/campaigns/emp02.wmf/scripting/starting_conditions.lua. It should work as proposed but I would like to have a second opinion about it.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/casern_campaign into lp:widelands.
=== modified file 'data/campaigns/bar02.wmf/scripting/mission_thread.lua'
--- data/campaigns/bar02.wmf/scripting/mission_thread.lua	2016-10-23 11:31:25 +0000
+++ data/campaigns/bar02.wmf/scripting/mission_thread.lua	2017-01-06 09:30:02 +0000
@@ -188,6 +188,7 @@
       "barbarians_ax_workshop",
       "barbarians_warmill",
       "barbarians_helmsmithy",
+      "barbarians_barracks",
       "barbarians_battlearena",
       "barbarians_trainingcamp",
       "barbarians_inn",
@@ -208,7 +209,7 @@
 end
 
 function check_trainingssite_obj(o)
-   while not check_for_buildings(p1, {barbarians_trainingcamp = 1, barbarians_battlearena = 1}) do
+   while not check_for_buildings(p1, {barbarians_barracks = 1, barbarians_trainingcamp = 1, barbarians_battlearena = 1}) do
       sleep(6523)
    end
    set_objective_done(o)

=== modified file 'data/campaigns/bar02.wmf/scripting/texts.lua'
--- data/campaigns/bar02.wmf/scripting/texts.lua	2016-09-20 17:01:35 +0000
+++ data/campaigns/bar02.wmf/scripting/texts.lua	2017-01-06 09:30:02 +0000
@@ -93,6 +93,7 @@
    title = _"Build a training infrastructure",
    number = 4,
    body = objective_text(_"Build a training infrastructure",
+      listitem_bullet(_"Build a barracks to train some basic soldiers.") ..
       listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
       listitem_bullet(_"Enhance your metal workshop to an ax workshop in order to produce weapons, and build up a second metal workshop to ensure the production of tools. When the blacksmith reaches his next level (master blacksmith), you can even enhance the ax workshop to a war mill, which will produce additional weapons.") ..
       listitem_bullet(_"Build a helm smithy to the west of the mountains to provide your soldiers with better armor."))
@@ -113,8 +114,8 @@
    title = _"Build training sites",
    number = 2,
    body = objective_text(_"Build training sites",
-      listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
-      listitem_arrow(_"Training sites like a training camp or a battle arena are used for training soldiers in their different attributes. These attributes are important in fights and the better a soldier is, the higher is the chance to win a fight."
+      listitem_bullet(_"Build a barracks, a battle arena and a training camp to the west of the mountains.") ..
+      listitem_arrow(_"Barracks train basic soldiers while training sites like a training camp or a battle arena are used for training soldiers in their different attributes. These attributes are important in fights and the better a soldier is, the higher is the chance to win a fight."
       .. "<br>" ..
       _"The attributes are: health, attack, defense and evade."))
 }

=== modified file 'data/campaigns/emp02.wmf/scripting/mission_thread.lua'
--- data/campaigns/emp02.wmf/scripting/mission_thread.lua	2016-10-23 11:31:25 +0000
+++ data/campaigns/emp02.wmf/scripting/mission_thread.lua	2017-01-06 09:30:02 +0000
@@ -246,7 +246,7 @@
       sleep(2343)
    end
    campaign_message_box(diary_page_9)
-   p1:allow_buildings{"empire_fortress"}
+   p1:allow_buildings{"empire_barracks", "empire_fortress"}
 
    o = add_campaign_objective(obj_remove_the_barbarians)
    -- Wait for the fortress to come up

=== modified file 'data/campaigns/emp02.wmf/scripting/starting_conditions.lua'
--- data/campaigns/emp02.wmf/scripting/starting_conditions.lua	2015-10-31 12:11:44 +0000
+++ data/campaigns/emp02.wmf/scripting/starting_conditions.lua	2017-01-06 09:30:02 +0000
@@ -14,7 +14,11 @@
          basket = 1,
          empire_bread = 8,
          bread_paddle = 2,
-         cloth = 5,
+         -- NOCOM(Notabilis): The barracks need 1 cloth, the rest is for armor.
+         -- However, cloth can not be produced. Is this a problem? Apart from
+         -- really strange player behavior it should be enough.
+         -- (8 in armor smithy, 3 made to armor and stored, 1 for barracks)
+         cloth = 15,
          coal = 12,
          felling_ax = 6,
          fire_tongs = 2,

=== modified file 'data/campaigns/emp02.wmf/scripting/texts.lua'
--- data/campaigns/emp02.wmf/scripting/texts.lua	2016-10-05 05:24:51 +0000
+++ data/campaigns/emp02.wmf/scripting/texts.lua	2017-01-06 09:30:02 +0000
@@ -95,6 +95,7 @@
    title =_"Destroy the Barbarian tribe",
    number = 2,
    body = objective_text(_"Destroy the Barbarian Tribe",
+      listitem_bullet(_[[Build a barracks to start training soldiers.]]) ..
       listitem_bullet(_[[As soon as you have enough soldiers, attack and completely destroy the Barbarian buildings.]]) ..
       listitem_bullet(_[[Finally, build up a fortress on the peninsula (near where the Barbarian headquarters stood before), to avoid new settlements of other tribes in that region.]])
    ),

=== modified file 'data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua'
--- data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua	2015-10-31 12:11:44 +0000
+++ data/campaigns/tutorial02_warfare.wmf/scripting/starting_conditions.lua	2017-01-06 09:30:02 +0000
@@ -54,6 +54,7 @@
       {"barbarians_sentry", 28, 57, soldiers = {[{3,5,0,2}] = 2 }},
       {"barbarians_sentry", 37, 61, soldiers = {[{3,5,0,2}] = 2 }},
       {"barbarians_barrier", 30, 58, soldiers = {[{0,0,0,0}] = 1 }}, -- to make sure some soldiers walk out
+      {"barbarians_barracks", 32, 58, wares = {ax = 8}},
       {"barbarians_lumberjacks_hut", 24, 1}
    )
 

=== modified file 'data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua'
--- data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua	2016-11-30 09:14:27 +0000
+++ data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua	2017-01-06 09:30:02 +0000
@@ -34,7 +34,7 @@
    position = "topright",
    title = _"Soldiers’ abilities",
    body = rt(
-      p(_[[A new soldier is created like a worker: when a military building needs a soldier, a carrier grabs the needed weapons and armor from a warehouse (or your headquarters) and walks up the road to your new building. Basic Barbarian soldiers do not use armor, they only need an ax.]]) ..
+      p(_[[New soldiers are created differently from normal workers: recruits are walking from a warehouse (or your headquarters) to the barracks where they receive some basic training and become soldiers. Basic Barbarian soldiers do not use armor, they only need an ax.]]) ..
       p(_[[Take a look at the soldiers that are on their way to our military buildings. They look different from normal workers: they have a health bar over their head that displays their remaining health, and they have four symbols, which symbolize the individual soldier’s current levels in the four different categories: health, attack, defense and evade.]]) ..
       -- TRANSLATORS: the current stats are: 3 health, 5 attack, 0 defense, 2 evade.
       p((_[[If a Barbarian soldier is fully trained, he has level %1% health, level %2% attack, level %3% defense and level %4% evade. This is one fearsome warrior then! The individual abilities have the following meaning:]]):bformat(soldier.max_health_level, soldier.max_attack_level, soldier.max_defense_level, soldier.max_evade_level))


Follow ups