← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1298301 into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1298301 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1298301 in widelands: "Do not show scenario messages when player is in road building mode"
  https://bugs.launchpad.net/widelands/+bug/1298301
  Bug #1298304 in widelands: "Pop-up message "We lost a ... to the ocean!" in Atlantean campaign is annoying"
  https://bugs.launchpad.net/widelands/+bug/1298304

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1298301/+merge/236966

Created new script "messages.lua" that contains functions to give send_message and message_box a delay while in road building mode. Also contains a global definition for creating a campaign objective.

Implemented with all campaign and map scenarios except for the first Barbarian scenario, where there are issues with threading. Also implemented for win conditions.

Cleaned up scenario string formatting.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1298301/+merge/236966
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1298301 into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/init.lua'
--- campaigns/atl01.wmf/scripting/init.lua	2014-07-27 16:26:39 +0000
+++ campaigns/atl01.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -3,9 +3,10 @@
 -- =======================================================================
 
 include "scripting/coroutine.lua"
-include "scripting/table.lua"
 include "scripting/infrastructure.lua"
+include "scripting/messages.lua"
 include "scripting/objective_utils.lua"
+include "scripting/table.lua"
 include "scripting/ui.lua"
 
 include "map:scripting/water_rising.lua"
@@ -38,7 +39,7 @@
 
    if not i.h then i.h = 400 end
 
-   p1:message_box(i.title, i.body, i)
+   message_box(p1, i.title, i.body, i)
 
    if i.post_func then i.post_func() end
 
@@ -52,11 +53,6 @@
    end
 end
 
--- Add an objective
-function add_obj(o)
-   return p1:add_objective(o.name, o.title, o.body)
-end
-
 -- Return the total number of items in warehouses of the given
 -- ware.
 function count_in_warehouses(ware)
@@ -72,11 +68,10 @@
 end
 
 function send_building_lost_message(f)
--- TODO: replace menu.png with representative_image as soon as this has been wrapped
-   p1:send_message(_"Building lost!",
-      rt("image=tribes/atlanteans/".. f.immovable.descr.name .."/menu.png",
+   send_message(p1, _"Building lost!",
+      rt("image=".. f.immovable.descr.representative_image,
          p(_"We lost a building to the ocean!")
-      ), { field = f, popup = true }
+      ), { field = f, popup = false }
    )
 end
 
@@ -144,7 +139,7 @@
    scroll_smoothly_to(fowned)
    msg_boxes(horsefarm_and_warehouse_story)
 
-   local o = add_obj(obj_horsefarm_and_warehouse)
+   local o = add_campaign_objective(obj_horsefarm_and_warehouse)
    while not check_for_buildings(p1, {
       horsefarm = 1, warehouse = 1,
    }) do sleep(2384) end
@@ -154,7 +149,7 @@
 function build_training()
    msg_boxes(training_story)
 
-   local o = add_obj(obj_make_training_buildings)
+   local o = add_campaign_objective(obj_make_training_buildings)
    while not check_for_buildings(p1, {
       dungeon = 1, labyrinth = 1
    }) do sleep(3874) end
@@ -166,7 +161,7 @@
 function build_heavy_industrys_and_mining()
    msg_boxes(heavy_industry_story)
 
-   local o = add_obj(obj_make_heavy_industry_and_mining)
+   local o = add_campaign_objective(obj_make_heavy_industry_and_mining)
    while not check_for_buildings(p1, {
       coalmine = 1, ironmine = 1, goldmine = 1, crystalmine = 1,
       smelting_works = 1, weaponsmithy = 1, armorsmithy = 1,
@@ -186,7 +181,7 @@
       run(build_heavy_industrys_and_mining)
    end)
 
-   local o = add_obj(obj_make_food_infrastructure)
+   local o = add_campaign_objective(obj_make_food_infrastructure)
    while not check_for_buildings(p1, {
       farm = 1, blackroot_farm = 1,
       sawmill = 1, well = 1, bakery = 1,
@@ -203,7 +198,7 @@
 
    -- There is no spidercloth in any warehouse!
    msg_boxes(spidercloth_messages)
-   local o = add_obj(obj_spidercloth_production)
+   local o = add_campaign_objective(obj_spidercloth_production)
 
    while not check_for_buildings(p1, {
       spiderfarm = 1, ["gold-spinning-mill"] = 1, ["weaving-mill"] = 1
@@ -216,9 +211,9 @@
 
 function build_environment()
    msg_boxes(first_briefing_messages)
-   local o = add_obj(obj_ensure_build_wares_production)
+   local o = add_campaign_objective(obj_ensure_build_wares_production)
 
-   expand_objective = add_obj(obj_expand)
+   expand_objective = add_campaign_objective(obj_expand)
 
    while not check_for_buildings(p1, {
       woodcutters_house = 2,
@@ -314,7 +309,7 @@
             sleep(200)
             scroll_smoothly_to(f)
             msg_boxes(field_flooded_msg)
-            add_obj(obj_build_ships)
+            add_campaign_objective(obj_build_ships)
             p1:allow_buildings{"shipyard"}
             run(check_for_ships)
          end)

=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-07-15 05:12:37 +0000
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -29,7 +29,7 @@
 -- =======================================================================
 obj_ensure_build_wares_production = {
    name = "obj_ensure_build_wares_production",
-   title = _ "Ensure the supply of building wares",
+   title = _"Ensure the supply of building wares",
    number = 6,
    body = objective_text(_"Supply Building Wares", _
 [[Supply basic building material for your economy:]] .. paragraphdivider() ..
@@ -42,20 +42,20 @@
 
 obj_expand = {
    name = "obj_expand",
-   title = _ "Expand your territory and explore",
+   title = _"Expand your territory and explore",
    number = 1,
-   body = objective_text(_"Expand and Explore", _(
-[[The island is huge and as long as we are not sure that we are alone here, we cannot relax. ]] ..
-[[Explore and conquer it, this is the only way to protect us from threats on the island and from Atlantis.]]) .. paragraphdivider() ..
+   body = objective_text(_"Expand and Explore",
+		_([[The island is huge and as long as we are not sure that we are alone here, we cannot relax. Explore and conquer it, this is the only way to protect us from threats on the island and from Atlantis.]]) .. paragraphdivider() ..
       listitem_bullet(_[[Build military sites to expand your territory]])
    ),
 }
 
 obj_make_food_infrastructure = {
    name = "obj_make_food_infrastructure",
-   title = _ "Establish a solid food production",
+   title = _"Establish a solid food production",
    number = 10,
-   body = objective_text(_"Food Production", _[[Food is very important for mines and military training areas. Establish a well working food environment by building at least one farm, one blackroot farm and a mill. The two kinds of flour together with water from a well will be baked into bread in a bakery, so build a bakery and a well, too.]] .. paragraphdivider() ..
+   body = objective_text(_"Food Production",
+		_[[Food is very important for mines and military training areas. Establish a well working food environment by building at least one farm, one blackroot farm and a mill. The two kinds of flour together with water from a well will be baked into bread in a bakery, so build a bakery and a well, too.]] .. paragraphdivider() ..
       _[[The other two important food wares are smoked fish and smoked meat. Raw meat is delivered from a hunter. A fisher gets the fish out of the sea while a fish breeder makes sure that a school of fish does not go extinct by breeding more. Make sure that there are always fish left, otherwise the fish breeder won’t be able to breed new ones. The smoking happens in a smokery, you will need at least two of those.]] .. paragraphdivider() ..
       listitem_bullet(_[[Build a farm and a blackroot farm]]) ..
       listitem_bullet(_[[Build a mill to make cornflour and blackroot flour]]) ..
@@ -70,9 +70,10 @@
 
 obj_spidercloth_production = {
    name = "obj_spidercloth_production",
-   title = _ "Build a spider farm and a weaving mill",
+   title = _"Build a spider farm and a weaving mill",
    number = 3,
-   body = objective_text(_"Spidercloth Production", _[[The weavers produce spidercloth and tabards in the weaving mill. Spidercloth is needed for the construction of some buildings and clothing, while tabards are the uniforms of soldiers. The weaving mill needs gold yarn and spideryarn as raw material. Spideryarn is produced by the spider farm, while gold yarn is produced by the gold spinning mill out of gold.]] .. paragraphdivider() ..
+   body = objective_text(_"Spidercloth Production",
+		_[[The weavers produce spidercloth and tabards in the weaving mill. Spidercloth is needed for the construction of some buildings and clothing, while tabards are the uniforms of soldiers. The weaving mill needs gold yarn and spideryarn as raw material. Spideryarn is produced by the spider farm, while gold yarn is produced by the gold spinning mill out of gold.]] .. paragraphdivider() ..
       listitem_bullet(_[[Build a weaving mill]]) ..
       listitem_bullet(_[[Build a spider farm]]) ..
       listitem_bullet(_[[Build a gold spinning mill]])
@@ -81,9 +82,10 @@
 
 obj_make_heavy_industry_and_mining = {
    name = "obj_make_heavy_industry_and_mining",
-   title = _ "Build industry and mines",
+   title = _"Build industry and mines",
    number = 5,
-   body = objective_text(_"Industry and Mines", _[[Iron ore, gold ore and coal are mined in the respective mines. The crystal mine will dig for crystal, quartz and diamond – all of them are precious materials and very rarely found. It will produce a lot of stone while searching for them.]] .. paragraphdivider() ..
+   body = objective_text(_"Industry and Mines",
+		_[[Iron ore, gold ore and coal are mined in the respective mines. The crystal mine will dig for crystal, quartz and diamond – all of them are precious materials and very rarely found. It will produce a lot of stone while searching for them.]] .. paragraphdivider() ..
       listitem_bullet(_[[The ores have to be smelted at a smelting works before they can be used. The refined materials are then used in the weapon smithy, the armor smithy and the toolsmithy.]]) .. paragraphdivider() ..
       listitem_bullet(_[[Build a mine of each type. Make sure to send geologists to the mountain first.]]) ..
       listitem_bullet(_[[Build a smelting works]]) ..
@@ -96,7 +98,8 @@
    name = "obj_make_training_buildings",
    title = _"Build training buildings for soldiers",
    number = 2,
-   body = objective_text(_"Soldier Training Buildings", _[[Like all other tribes, the Atlanteans are also able to train soldiers: the dungeon trains attack – the major attribute of the Atlanteans – and the labyrinth trains evasion, health and defense. The items produced by the industry are used to train better soldiers in the two training buildings.]] .. paragraphdivider() ..
+   body = objective_text(_"Soldier Training Buildings",
+		_[[Like all other tribes, the Atlanteans are also able to train soldiers: the dungeon trains attack – the major attribute of the Atlanteans – and the labyrinth trains evasion, health and defense. The items produced by the industry are used to train better soldiers in the two training buildings.]] .. paragraphdivider() ..
       listitem_bullet(_[[Build a dungeon and a labyrinth]])
  )
 }
@@ -105,7 +108,8 @@
    name = "obj_horsefarm_and_warehouse",
    title = _"Build a warehouse and a horse farm",
    number = 2,
-   body = objective_text(_"Warehouse and Horse Farm", _[[As your road network gets longer and more complicated, you should employ horses to help out your carriers. Horses are bred at horse farms using water and corn. A warehouse will also help to ensure that your transportation system does not collapse.]] .. paragraphdivider() ..
+   body = objective_text(_"Warehouse and Horse Farm",
+		_[[As your road network gets longer and more complicated, you should employ horses to help out your carriers. Horses are bred at horse farms using water and corn. A warehouse will also help to ensure that your transportation system does not collapse.]] .. paragraphdivider() ..
       listitem_bullet(_[[Build a warehouse]]) ..
       listitem_bullet(_[[Build a horse farm]])
   )
@@ -113,9 +117,10 @@
 
 obj_build_ships = {
    name = "obj_build_ships",
-   title = _ "Build 3 ships to escape from the island",
+   title = _"Build 3 ships to escape from the island",
    number = 1,
-   body = objective_text(_"Escape From the Island", _[[There is a lake at the top of the island. Build three ships in these waters and you might be able to rescue your people before the island is swallowed completely by the ocean.]]  .. paragraphdivider() ..
+   body = objective_text(_"Escape From the Island",
+		_[[There is a lake at the top of the island. Build three ships in these waters and you might be able to rescue your people before the island is swallowed completely by the ocean.]]  .. paragraphdivider() ..
       listitem_bullet(_[[Build a shipyard close to the lake to start building ships]])
    )
 }
@@ -126,284 +131,183 @@
 
 -- This is an array or message descriptions
 initial_messages = {
-{
-   title = _ "Proud to the Death",
-   body = rt(
-      h1(_"Favored by the God") ..
-      p(_(
-[[On the hidden and lost island of Atlantis, a proud tribe settled since the ]] ..
-[[world was very young. Ruled by the bloodline of King Ajanthul – the first human ]] ..
-[[to be empowered by the sea god Lutas to breathe above sea level – and the ]] ..
-[[wise clerics, who provided the link to Lutas – they prospered and became ]] ..
-[[civilized.]]
-      )) .. p(_(
-[[This story is taking place during the reign of King Askandor, the 43rd successor of King Ajanthul. ]] ..
-[[He had been a good king, ruling Atlantis with wisdom and foresight. ]] ..
-[[But with age, he became afraid of dying and so he began looking for ]] ..
-[[a cure for death even though most clerics warned him against it. ]] ..
-[[Some said that endless life was only for the gods and that to seek for it was forbidden.]]
-      ))
-   ),
-},
-{
-   title = _ "Disgraced Before the God",
-   body = rt(
-      h1(_"The God’s Punishment") ..
-      p(_(
-[[But all seemed well. Only the horses seemed to feel something was wrong. ]] ..
-[[During the nights, they went crazy and were full of fear. ]] ..
-[[It was not long before the horse breeder Xydra figured out what was wrong with them: ]] ..
-[[the sea level in front of their stable was rising with ever increasing speed.]]
-   )) .. p(_(
-[[The clerics retreated into meditation and the reason for the rising water was soon to be found: ]] ..
-[[the god Lutas had lost faith in the Atlanteans because of the boldness of their king. ]] ..
-[[He decided to withdraw the rights that were granted to King Ajanthul and his children. ]] ..
-[[And so, he called them back below the sea again.]]
-   ))
-)
-},
-{
-   title = _ "Uproar and Confusion",
-   body = rt(
-      h1(_"Emerging Chaos...") ..
-      p(_(
-[[Guilt-ridden, the king committed suicide. ]] ..
-[[Without a monarch, the people turned to the clerics, but they had no substantial help to offer. ]] ..
-[[Most accepted their fate while others tried to change the god’s mind by offering animals in his temple. ]] ..
-[[But to no avail...]]
-   )) .. p(_(
-[[Jundlina, the late king’s daughter and the highest priestess of the god was the most determined cleric. ]] ..
-[[As countless offerings didn’t change the situation, she convinced herself that to soothe the god, ]] ..
-[[an offer of great personal value was needed. So she offered him her most beloved: ]] ..
-[[her husband, the father of her only child.]]
-   )) .. p(_(
-[[But not even this changed the mind of the god. The water kept on rising. ]] ..
-[[Nearly driven insane by guilt, pain and anger, Jundlina became a heretic: ]] ..
-[[Secretly, she gathered people of the common folk who were not in line ]] ..
-[[with the decision of the clerics to accept the god’s will. ]] ..
-[[Together with them, she set the temple on fire and stole a ship to flee from the god’s influence over Atlantis. ]] ..
-[[This small group started praying to Satul, the fire god and the worst enemy of Lutas.]]
-   )) .. p(_(
-[[Leaving the dying Atlantis and their past behind, they started on a quest to ]] ..
-[[find a place sheltered by the fire and protected from the sea.]]
-   ))
-)
-},
+	{
+		title = _"Proud to the Death",
+		body = rt(
+			h1(_"Favored by the God") ..
+			p(_([[On the hidden and lost island of Atlantis, a proud tribe settled since the world was very young. Ruled by the bloodline of King Ajanthul – the first human to be empowered by the sea god Lutas to breathe above sea level – and the wise clerics, who provided the link to Lutas – they prospered and became civilized.]])) ..
+			p(_([[This story is taking place during the reign of King Askandor, the 43rd successor of King Ajanthul. He had been a good king, ruling Atlantis with wisdom and foresight. But with age, he became afraid of dying and so he began looking for a cure for death even though most clerics warned him against it. Some said that endless life was only for the gods and that to seek for it was forbidden.]]))
+		)
+	},
+	{
+		title = _"Disgraced Before the God",
+		body = rt(
+			h1(_"The God’s Punishment") ..
+			p(_([[But all seemed well. Only the horses seemed to feel something was wrong. During the nights, they went crazy and were full of fear. It was not long before the horse breeder Xydra figured out what was wrong with them: the sea level in front of their stable was rising with ever increasing speed.]])) ..
+			p(_([[The clerics retreated into meditation and the reason for the rising water was soon to be found: the god Lutas had lost faith in the Atlanteans because of the boldness of their king. He decided to withdraw the rights that were granted to King Ajanthul and his children. And so, he called them back below the sea again.]]))
+		)
+	},
+	{
+		title = _"Uproar and Confusion",
+		body = rt(
+			h1(_"Emerging Chaos...") ..
+			p(_([[Guilt-ridden, the king committed suicide. Without a monarch, the people turned to the clerics, but they had no substantial help to offer. Most accepted their fate while others tried to change the god’s mind by offering animals in his temple. But to no avail...]])) ..
+			 p(_([[Jundlina, the late king’s daughter and the highest priestess of the god was the most determined cleric. As countless offerings didn’t change the situation, she convinced herself that to soothe the god, an offer of great personal value was needed. So she offered him her most beloved: her husband, the father of her only child.]])) ..
+			 p(_([[But not even this changed the mind of the god. The water kept on rising. Nearly driven insane by guilt, pain and anger, Jundlina became a heretic: Secretly, she gathered people of the common folk who were not in line with the decision of the clerics to accept the god’s will. Together with them, she set the temple on fire and stole a ship to flee from the god’s influence over Atlantis. This small group started praying to Satul, the fire god and the worst enemy of Lutas.]])) ..
+			 p(_([[Leaving the dying Atlantis and their past behind, they started on a quest to find a place sheltered by the fire and protected from the sea.]]))
+		)
+	},
 } -- end of initial messages.
 
 first_briefing_messages = {
-{
-   title = _ "The Princess’ Memoir",
-   body = jundlina(_ "Jundlina Writes Down Her Memories", _(
-[[We left Atlantis and sailed east. ]] ..
-[[We entered the forbidden sea on the sixth day without noticing any pursuers from Atlantis ]] ..
-[[and without Lutas having smashed our ship. Now, we are out of his reach. ]] ..
-[[One day later, we sighted an island which seems to have one of these fire spitting mountains on it. ]] ..
-[[I deemed this a sign from the fire god and we landed on its shore.]])
-.. paragraphdivider() .. _(
-[[We spent the last week building two watchtowers on the mountains close to our landing area; ]] ..
-[[and, of course, a hall for us all. We have very talented constructors in our group – still, ]] ..
-[[the buildings do not match the art we had on Atlantis. I hope they will withstand the next rain. ]] ..
-[[At least, the towers will warn us if a ship from Atlantis follows us and if the island is inhabited, ]] ..
-[[we will see attackers a long time before they arrive.]])
-.. paragraphdivider() .. _(
-[[We have established ourselves on this island. The next step is now to make it a home. ]] ..
-[[I reckon we need to establish a sustainable economy and to explore our surroundings. ]] ..
-[[I called for specialists and will follow their advice.]])
-   )
-},
-{
-   title = _ "Loftomor and Sidolus Arrive",
-   body = jundlina( _"Jundlina", _(
-[[May Satul warm you both. Loftomor, you have been the island’s most renowned architect. ]] ..
-[[Sidolus, you are a seasoned warrior and strategist. I have called you before me to seek your counsel: ]] ..
-[[what needs to be done to make this our new home?]]
-   ))
-},
-{
-   title = _ "Loftomor Speaks",
-   body = loftomor(_(
-[[May Satul warm you, Jundlina! ]] ..
-[[The most important things for building a settlement are the building materials. ]] ..
-[[There are some trees here, so we should build housings for some woodcutters and of course also for foresters, ]] ..
-[[so we will not run out of trees. Oh, and we mustn’t forget the sawmill, ]] ..
-[[for most buildings can’t be made out of logs alone. Stronger buildings also need stone, ]] ..
-[[but there is plenty to the north-east of here; ]] ..
-[[we just need to build a quarry, and my stonemasons will go to work promptly.]]
-   )) .. new_objectives(obj_ensure_build_wares_production)
-},
-{
-   title = _ "Sidolus Speaks",
-   body = sidolus(_(
-[[May Satul warm you, Jundlina! I agree with what Loftomor proposes. ]] ..
-[[We need a good supply of building materials for we have to expand our territory swiftly. ]] ..
-[[I will not feel safe on this island as long as we have not seen all its shores it. ]] ..
-[[I brought plenty of good men from Atlantis. The military might is available. ]] ..
-[[We only need some housing to live in.]])
-   ) ..  new_objectives(obj_expand)
-}
+	{
+		title = _"The Princess’ Memoir",
+		body = jundlina(_"Jundlina Writes Down Her Memories",
+			_([[We left Atlantis and sailed east. We entered the forbidden sea on the sixth day without noticing any pursuers from Atlantis and without Lutas having smashed our ship. Now, we are out of his reach. One day later, we sighted an island which seems to have one of these fire spitting mountains on it. I deemed this a sign from the fire god and we landed on its shore.]])
+			.. paragraphdivider() ..
+			_([[We spent the last week building two watchtowers on the mountains close to our landing area; and, of course, a hall for us all. We have very talented constructors in our group – still, the buildings do not match the art we had on Atlantis. I hope they will withstand the next rain. At least, the towers will warn us if a ship from Atlantis follows us and if the island is inhabited, we will see attackers a long time before they arrive.]])
+			.. paragraphdivider() ..
+			_([[We have established ourselves on this island. The next step is now to make it a home. I reckon we need to establish a sustainable economy and to explore our surroundings. I called for specialists and will follow their advice.]]))
+	},
+	{
+		title = _"Loftomor and Sidolus Arrive",
+		body = jundlina( _"Jundlina",
+			_([[May Satul warm you both. Loftomor, you have been the island’s most renowned architect. Sidolus, you are a seasoned warrior and strategist. I have called you before me to seek your counsel: what needs to be done to make this our new home?]]))
+	},
+	{
+		title = _"Loftomor Speaks",
+		body = loftomor(
+			_([[May Satul warm you, Jundlina! The most important things for building a settlement are the building materials. There are some trees here, so we should build housings for some woodcutters and of course also for foresters, so we will not run out of trees. Oh, and we mustn’t forget the sawmill, for most buildings can’t be made out of logs alone. Stronger buildings also need stone, but there is plenty to the north-east of here; we just need to build a quarry, and my stonemasons will go to work promptly.]]))
+			.. new_objectives(obj_ensure_build_wares_production)
+	},
+	{
+		title = _"Sidolus Speaks",
+		body = sidolus(
+			_([[May Satul warm you, Jundlina! I agree with what Loftomor proposes. We need a good supply of building materials for we have to expand our territory swiftly. I will not feel safe on this island as long as we have not seen all its shores it. I brought plenty of good men from Atlantis. The military might is available. We only need some housing to live in.]]))
+			..  new_objectives(obj_expand)
+	}
 }
 
 food_story_message = {
-{
-   title = _ "Jundlina is Satisfied",
-   body = jundlina(_"Jundlina’s Memoirs", _(
-[[Our building infrastructure is finished and I spent some days making sure that everybody is working well together. ]] ..
-[[Now, there are other pressing matters. ]] ..
-[[I called Colionder, my personal cook, before me to get his help with sorting some things out.]]
-   ))
-},
-{
-   title = _ "Colionder Arrives",
-   body = colionder(_
-[[May Satul warm you, Jundlina. Can I be of any service to you or the god?]]
-   )
-},
-{
-   title = _ "Jundlina Replies",
-   body = jundlina(_"Jundlina", _(
-[[May Satul warm you too, Colionder. ]] ..
-[[Yes, I wondered if there is a way that we could centralize our food production. ]] ..
-[[We lose a lot of productivity because our people are accustomed to making their own food. ]] ..
-[[I feel if we could split responsibilities, it would be better for us all. ]] ..
-[[I want your thoughts on this.]]
-   ))
-},
-{
-   title = _ "Colionder is in Thought",
-   body = colionder(_(
-[[Ahh, but I think this is impossible to change. The preparing and eating of food is something deeply ingrained in us Atlanteans – it is a ceremony that we just need for our well-being. So I guess we cannot take this away from the individuals completely.]])
-.. paragraphdivider() .. _(
-[[But we might find a compromise in between: for me, making bread is a troublesome task. Grinding the blackroot and corn to flour and then baking the bread is tedious and boring; I feel a more industrial approach would be helpful here. I for one would love to just have fresh bread delivered to my house every day.]])
-.. paragraphdivider() .. _(
-[[Oooh and even more important: the smoking of fish and meat to cleanse them and improve their taste is terrible. My house is full of smoke and stinks for weeks afterwards. Don’t you think that this could be done in a special building where the side effects do not matter? I think those two things would be accepted by the people and would reduce the cooking time without taking away the ritual.]]
- ))
-},
-{
-   title = _ "Jundlina Agrees",
-   body = jundlina(_
-[[Your words sound wise to me, Colionder. So be it then.]]
-   ) .. new_objectives(obj_make_food_infrastructure)
-},
+	{
+		title = _"Jundlina is Satisfied",
+		body = jundlina(_"Jundlina’s Memoirs",
+			_([[Our building infrastructure is finished and I spent some days making sure that everybody is working well together. Now, there are other pressing matters. I called Colionder, my personal cook, before me to get his help with sorting some things out.]]))
+	},
+	{
+		title = _"Colionder Arrives",
+		body = colionder(
+			_[[May Satul warm you, Jundlina. Can I be of any service to you or the god?]])
+	},
+	{
+		title = _"Jundlina Replies",
+		body = jundlina(_"Jundlina",
+			_([[May Satul warm you too, Colionder. Yes, I wondered if there is a way that we could centralize our food production. We lose a lot of productivity because our people are accustomed to making their own food. I feel if we could split responsibilities, it would be better for us all. I want your thoughts on this.]]))
+	},
+	{
+		title = _"Colionder is in Thought",
+		body = colionder(
+			_([[Ahh, but I think this is impossible to change. The preparing and eating of food is something deeply ingrained in us Atlanteans – it is a ceremony that we just need for our well-being. So I guess we cannot take this away from the individuals completely.]])
+			.. paragraphdivider() ..
+			_([[But we might find a compromise in between: for me, making bread is a troublesome task. Grinding the blackroot and corn to flour and then baking the bread is tedious and boring; I feel a more industrial approach would be helpful here. I for one would love to just have fresh bread delivered to my house every day.]])
+			.. paragraphdivider() ..
+			_([[Oooh and even more important: the smoking of fish and meat to cleanse them and improve their taste is terrible. My house is full of smoke and stinks for weeks afterwards. Don’t you think that this could be done in a special building where the side effects do not matter? I think those two things would be accepted by the people and would reduce the cooking time without taking away the ritual.]]))
+	},
+	{
+		title = _"Jundlina Agrees",
+		body = jundlina(_"Jundlina Agrees",
+			_([[Your words sound wise to me, Colionder. So be it then.]]))
+			.. new_objectives(obj_make_food_infrastructure)
+	},
 }
 
 food_story_ended_messages = {
    {
-      title = _ "Jundlina is Satisfied",
-      body = jundlina(_ "Jundlina is Reviewing the Reports", _(
-[[Seems like our food production is finished and everybody is working together nicely. ]] ..
-[[It is really starting to feel like home here.]]
-      ))
+      title = _"Jundlina is Satisfied",
+      body = jundlina(_"Jundlina is Reviewing the Reports",
+			_([[Seems like our food production is finished and everybody is working together nicely. It is really starting to feel like home here.]]))
    }
 }
 
 spidercloth_messages = {
    {
-      title = _"A Man Comes to Jundlina",
-      body = opol(_(
-[[May Satul warm you, Jundlina. My name is Opol, and I am the highest weaver of the guild abandoning Atlantis and Lutas with you. I come with sad news indeed: we have no more spidercloth. Not a single piece is to be found in our warehouses. Could you not help the weavers’ guild by arranging the building of a weaving mill and a spider farm? The spiders deliver the finest silk and we will produce the finest spidercloth from it.]])
-.. paragraphdivider() .. _(
-[[We offer to also produce the tabards for young soldiers and the golden tabards for officers for you in exchange. You will need them for sure as soon as you want to recruit new soldiers.]]))
- },
- {
-    title = _ "Jundlina Replies",
-    body = jundlina(_ "Jundlina Replies", _(
-[[May Satul warm you too, Opol. I wanted to delay production of spidercloth, but I understand your urgency. ]] ..
-[[Your suggestion sounds fair to me, I will build your weaving mill and spider farm. ]] ..
-[[I will also build a gold spinning mill so that the golden tabards you make will not be golden by name alone.]]
-    )) ..  new_objectives(obj_spidercloth_production)
- }
+		title = _"A Man Comes to Jundlina",
+		body = opol(
+			_([[May Satul warm you, Jundlina. My name is Opol, and I am the highest weaver of the guild abandoning Atlantis and Lutas with you. I come with sad news indeed: we have no more spidercloth. Not a single piece is to be found in our warehouses. Could you not help the weavers’ guild by arranging the building of a weaving mill and a spider farm? The spiders deliver the finest silk and we will produce the finest spidercloth from it.]])
+			.. paragraphdivider() ..
+			_([[We offer to also produce the tabards for young soldiers and the golden tabards for officers for you in exchange. You will need them for sure as soon as you want to recruit new soldiers.]]))
+	},
+	{
+		 title = _"Jundlina Replies",
+		 body = jundlina(_"Jundlina",
+			_([[May Satul warm you too, Opol. I wanted to delay production of spidercloth, but I understand your urgency. Your suggestion sounds fair to me, I will build your weaving mill and spider farm. I will also build a gold spinning mill so that the golden tabards you make will not be golden by name alone.]]))
+			..  new_objectives(obj_spidercloth_production)
+	}
 }
 
 spidercloth_story_ended_messages = {
    {
-      title = _ "Opol Seeks Out Jundlina",
-      body = opol(_(
-[[May Satul warm you, Jundlina! ]] ..
-[[The weaving mill, gold spinning mill and spider farm buildings are complete ]] ..
-[[and are starting their work at this very moment. The weavers’ guild is very grateful for your support ]] ..
-[[and we will stand by our word and deliver the first tabard very soon.]]
-      ))
+      title = _"Opol Seeks Out Jundlina",
+      body = opol(
+			_([[May Satul warm you, Jundlina! The weaving mill, gold spinning mill and spider farm buildings are complete and are starting their work at this very moment. The weavers’ guild is very grateful for your support and we will stand by our word and deliver the first tabard very soon.]]))
    },
    {
-      title = _ "Jundlina Replies",
-      body = jundlina(_(
-[[This is good news indeed, Opol. Our economy is developing very well. ]] ..
-[[Go back to your work now, Opol, and may Satul warm you and all your guild members!]]
-      ))
+      title = _"Jundlina Replies",
+      body = jundlina(_"Jundlina",
+			_([[This is good news indeed, Opol. Our economy is developing very well. Go back to your work now, Opol, and may Satul warm you and all your guild members!]]))
    }
 }
 
 
 heavy_industry_story = {
    {
-      title = _ "Sidolus Seeks Out Jundlina",
-      body = sidolus(_(
-[[May Satul warm you, Jundlina. Have you considered mining for resources in the mountains around us? ]] ..
-[[We are running short of quartz, crystal and diamonds for our buildings. ]] ..
-[[Also we could use more iron, gold and especially coal. If we find an ample supply of those commodities, ]] ..
-[[we could start producing weapons and tools; this would help enormously. ]] ..
-[[Of course, we would need smelters, a weapon smithy, an armor smithy and a toolsmithy. And maybe even more.]]
-      ))
+      title = _"Sidolus Seeks Out Jundlina",
+      body = sidolus(
+			_([[May Satul warm you, Jundlina. Have you considered mining for resources in the mountains around us? We are running short of quartz, crystal and diamonds for our buildings. Also we could use more iron, gold and especially coal. If we find an ample supply of those commodities, we could start producing weapons and tools; this would help enormously. Of course, we would need smelters, a weapon smithy, an armor smithy and a toolsmithy. And maybe even more.]]))
    },
    {
-      title = _ "Jundlina Replies",
-      body = jundlina(_"Jundlina Nods", _(
-[[I have considered this, Sidolus. I think  it is about time. We will make this a priority for now. You shall get your industry soon!]]
-      )) .. new_objectives(obj_make_heavy_industry_and_mining)
+      title = _"Jundlina Replies",
+      body = jundlina(_"Jundlina Nods",
+			_([[I have considered this, Sidolus. I think  it is about time. We will make this a priority for now. You shall get your industry soon!]]))
+			.. new_objectives(obj_make_heavy_industry_and_mining)
    },
 }
 
 training_story = {
    {
-      title = _ "Jundlina Summons Sidolus",
-      body = jundlina(_ "Jundlina is Angry", _(
-[[What is this I hear, Sidolus? I received words about your soldiers misbehaving and bullying the common folk. ]] ..
-[[What is this nonsense all about? They are servants for the common good and must not misuse their powers. ]] ..
-[[This is inexcusable! Explain this, if you will!]]
-      ))
+      title = _"Jundlina Summons Sidolus",
+      body = jundlina(_"Jundlina is Angry",
+			_([[What is this I hear, Sidolus? I received words about your soldiers misbehaving and bullying the common folk. What is this nonsense all about? They are servants for the common good and must not misuse their powers. This is inexcusable! Explain this, if you will!]]))
    },
    {
-      title = _ "Sidolus Seems Contrite",
-      body = sidolus(_(
-[[I agree with you and I have punished the troublemakers severely. ]] ..
-[[But it is very difficult to keep my men quiet: they are bored and have nothing to do. ]] ..
-[[I would like to ramp up their drill. ]] ..
-[[I think more routine in their life would keep them occupied and focused on their duties. ]] ..
-[[I would need a dungeon and a labyrinth for them. ]] ..
-[[I have the plans ready, but I guess they won’t come cheap.]]
-      ))
+      title = _"Sidolus Seems Contrite",
+      body = sidolus(
+			_([[I agree with you and I have punished the troublemakers severely. But it is very difficult to keep my men quiet: they are bored and have nothing to do. I would like to ramp up their drill. I think more routine in their life would keep them occupied and focused on their duties. I would need a dungeon and a labyrinth for them. I have the plans ready, but I guess they won’t come cheap.]]))
    },
    {
       title = _"Jundlina Replies",
-      body = jundlina(_(
-[[I do not fear the cost and labor as long as it keeps your people at bay. You shall get your buildings. ]] ..
-[[But note that I will not tolerate any rogue soldier; if similar things happen again, ]] ..
-[[I will make you responsible for them. Dismissed.]]
-      )) .. new_objectives(obj_make_training_buildings)
+      body = jundlina(_"Jundlina",
+			_([[I do not fear the cost and labor as long as it keeps your people at bay. You shall get your buildings. But note that I will not tolerate any rogue soldier; if similar things happen again, I will make you responsible for them. Dismissed.]]))
+			.. new_objectives(obj_make_training_buildings)
    }
 }
 
 training_story_end = {
    {
-      title = _ "Jundlina Received a Letter",
-      body = jundlina(_"Jundlina", _(
-[[I received an invitation from Sidolus. The first day of training in the newly finished labyrinth will be tomorrow. ]] ..
-[[The dungeon is done as well and will start its work soon. I am looking forward to tomorrow; ]] ..
-[[I am very interested in how our soldiers are trained, and I wonder if the additional workload ]] ..
-[[will keep them from bullying the civilian population.]]
-      ))
+      title = _"Jundlina Received a Letter",
+      body = jundlina(_"Jundlina",
+			_([[I received an invitation from Sidolus. The first day of training in the newly finished labyrinth will be tomorrow. The dungeon is done as well and will start its work soon. I am looking forward to tomorrow; I am very interested in how our soldiers are trained, and I wonder if the additional workload will keep them from bullying the civilian population.]]))
    }
 }
 
 horsefarm_and_warehouse_story = {
    {
-      title = _ "Jundlina Considers the Economy",
-      body = jundlina(_"Jundlina", _(
-[[People are complaining about crowded streets and slow transportation. We need to help out our carriers on the roads. I have decided to build a horse farm so that the horses can help with the heavy wares.]])
-.. paragraphdivider() .. _(
-[[Another way to take load from our roads is to build warehouses. We have claimed the mountain now, it seems a good idea to have a warehouse on the plateau to avoid having to transport everything up and down the slopes.]]
-      )) .. new_objectives(obj_horsefarm_and_warehouse)
+      title = _"Jundlina Considers the Economy",
+      body = jundlina(_"Jundlina",
+			_([[People are complaining about crowded streets and slow transportation. We need to help out our carriers on the roads. I have decided to build a horse farm so that the horses can help with the heavy wares.]])
+			.. paragraphdivider() ..
+			_([[Another way to take load from our roads is to build warehouses. We have claimed the mountain now, it seems a good idea to have a warehouse on the plateau to avoid having to transport everything up and down the slopes.]]))
+			.. new_objectives(obj_horsefarm_and_warehouse)
    }
 }
 
@@ -411,118 +315,91 @@
 --                         Leftover buildings found
 -- =======================================================================
 first_leftover_building_found = {
-{
-   posx = 100000,
-   posy = 0,
-   title = _ "A Dangerous Discovery",
-   body = jundlina(_ "Jundlina is in Thought", _(
-[[We found an old building, destroyed and burned by flames. I am very worried about this discovery. The building is not of any kind I’ve ever seen. It is certainly not designed by any Atlantean architect I’ve ever heard about. The building is crude, the assemblage is sloppy. But the materials are very enduring: the wood used for it seemed to have been burned in a strange way before it was used as building material – it is hard as stone.]])
-.. paragraphdivider() .. _(
-[[The implications frighten me. Are there others on this island? Where are they then? They work with fire, are they praying to Satul too? Are they friends or foe? And why is the building burned down? Has this island seen war? Is a war being waged on it right now?]])
-.. paragraphdivider() .. _(
-[[We must improve our military capabilities. If there are foes on the island, we have to be prepared when we meet them. We should also enforce the fortification of our borders.]])
-   )
-}
+	{
+		posx = 100000,
+		posy = 0,
+		title = _"A Dangerous Discovery",
+		body = jundlina(_"Jundlina is in Thought",
+			_([[We found an old building, destroyed and burned by flames. I am very worried about this discovery. The building is not of any kind I’ve ever seen. It is certainly not designed by any Atlantean architect I’ve ever heard about. The building is crude, the assemblage is sloppy. But the materials are very enduring: the wood used for it seemed to have been burned in a strange way before it was used as building material – it is hard as stone.]])
+			.. paragraphdivider() ..
+			_([[The implications frighten me. Are there others on this island? Where are they then? They work with fire, are they praying to Satul too? Are they friends or foe? And why is the building burned down? Has this island seen war? Is a war being waged on it right now?]])
+			.. paragraphdivider() ..
+			_([[We must improve our military capabilities. If there are foes on the island, we have to be prepared when we meet them. We should also enforce the fortification of our borders.]]))
+	}
 }
 
 second_leftover_building_found = {
-{
-   posx = 100000,
-   posy = 0,
-   title = _ "Another Building",
-   body = jundlina(_ "Jundlina is Worried", _(
-[[We found one more building of this strange making. We have yet to see any of its builders. ]] ..
-[[But obviously there has been a community on this island before and obviously it was militarized. ]] ..
-[[I have to check on our military status with my generals. ]] ..
-[[I will not allow that a potential enemy will find us unprepared.]]
-   ))
-}
+	{
+		posx = 100000,
+		posy = 0,
+		title = _"Another Building",
+		body = jundlina(_"Jundlina is Worried",
+			_([[We found one more building of this strange making. We have yet to see any of its builders. But obviously there has been a community on this island before and obviously it was militarized. I have to check on our military status with my generals. I will not allow that a potential enemy will find us unprepared.]]))
+	}
 }
 
 third_leftover_building_found = {
-{
-   posx = 100000,
-   posy = 0,
-   title = _ "One More Building",
-   body = jundlina(_(
-[[And yet another of these buildings. ]] ..
-[[We know now that the tribe that built them once had complete control over the island. ]] ..
-[[But I am no longer so scared of potential enemies. ]] ..
-[[We know so much of this island already and there is no trace of this old economy to be found. ]] ..
-[[I am starting to relax, but I will not let our guard down as we continue to explore this beautiful island. ]] ..
-[[But without obvious dangers, I am feeling very much at home here already.]]
-   ))
-}
+	{
+		posx = 100000,
+		posy = 0,
+		title = _"One More Building",
+		body = jundlina(_"Jundlina is in Thought",
+			_([[And yet another of these buildings. We know now that the tribe that built them once had complete control over the island. But I am no longer so scared of potential enemies. We know so much of this island already and there is no trace of this old economy to be found. I am starting to relax, but I will not let our guard down as we continue to explore this beautiful island. But without obvious dangers, I am feeling very much at home here already.]]))
+	}
 }
 
 -- =======================
 -- Flooding of the island
 -- =======================
 field_flooded_msg = {
-{
-   posx = 100000,
-   posy = 0,
-   title = _ "The Water is Rising!",
-   body = jundlina(_"Jundlina", _(
-[[May Satul save us! Lutas is still trying to get to us. A scout informed me that the ocean is rising quickly. ]] ..
-[[We have to reach higher ground and evacuate everybody and as much wares as we can ]] ..
-[[from the headquarters up the mountains. How can we escape?]]
-   ))
-},
-{
-   title = _ "A Young Man Approaches",
-   body = ostur(_(
-[[May Satul warm you, Jundlina. My name is Ostur and I construct ships. ]] ..
-[[I have invented a new kind of ship: smaller than those we are used to, but much sturdier. ]] ..
-[[If we build them correctly, I am confident that we can sail a much longer distance with them ]] ..
-[[and maybe escape from Lutas’ influence.]]
- ))
-},
-{
-   title = _ "Jundlina Replies",
-   body = jundlina(_ "Jundlina", _(
-[[Ostur, we have no time. The water rises too fast, and if we build the ships on the shore ]] ..
-[[they will vanish in the sea before they can float. I fear we are doomed!]]
-   )),
-},
-{
-   posx = 100000,
-   posy = 0,
-   title = _"Ostur Seems Confident",
-   pre_func = function()
-      local lake_field = map:get_field(75,80)
-      p1:reveal_fields(lake_field:region(10))
-      scroll_smoothly_to(lake_field)
-      sleep(200)
-   end,
-   body = ostur(_(
-[[A friend of mine explored the island on his own and he told me of a big lake at the top of the mountain. ]] ..
-[[I suggest we build the ships in this lake and wait until the island drowns beneath us. Then we can sail away. ]] ..
-[[It is a bold plan, but I think it could work.]]
-   ))
-},
-{
-   title = _ "Jundlina Replies",
-   body = jundlina(_(
-[[Your red hair is a signal from the fire god. I will trust you and support your plan. Our survival lies in your hands now, Ostur.]])
-.. paragraphdivider() .. _(
-[[Swift now, we need a house for Ostur next to the lake, and we need planks, logs and spidercloth for the construction there. Forget about everything else, we need those wares on top of the mountain before our warehouses are all swallowed by the sea.]]
-   )) .. new_objectives(obj_build_ships)
-}
+	{
+		posx = 100000,
+		posy = 0,
+		title = _"The Water is Rising!",
+		body = jundlina(_"Jundlina",
+			_([[May Satul save us! Lutas is still trying to get to us. A scout informed me that the ocean is rising quickly. We have to reach higher ground and evacuate everybody and as much wares as we can from the headquarters up the mountains. How can we escape?]]))
+	},
+	{
+		title = _"A Young Man Approaches",
+		body = ostur(
+			_([[May Satul warm you, Jundlina. My name is Ostur and I construct ships. I have invented a new kind of ship: smaller than those we are used to, but much sturdier. If we build them correctly, I am confident that we can sail a much longer distance with them and maybe escape from Lutas’ influence.]]))
+	},
+	{
+		title = _"Jundlina Replies",
+		body = jundlina(_"Jundlina",
+			_([[Ostur, we have no time. The water rises too fast, and if we build the ships on the shore they will vanish in the sea before they can float. I fear we are doomed!]]))
+	},
+	{
+		posx = 100000,
+		posy = 0,
+		title = _"Ostur Seems Confident",
+		pre_func = function()
+			local lake_field = map:get_field(75,80)
+			p1:reveal_fields(lake_field:region(10))
+			scroll_smoothly_to(lake_field)
+			sleep(200)
+		end,
+		body = ostur(
+			_([[A friend of mine explored the island on his own and he told me of a big lake at the top of the mountain. I suggest we build the ships in this lake and wait until the island drowns beneath us. Then we can sail away. It is a bold plan, but I think it could work.]]))
+	},
+	{
+		title = _"Jundlina Replies",
+		body = jundlina(_"Jundlina",
+			_([[Your red hair is a signal from the fire god. I will trust you and support your plan. Our survival lies in your hands now, Ostur.]])
+			.. paragraphdivider() ..
+			_([[Swift now, we need a house for Ostur next to the lake, and we need planks, logs and spidercloth for the construction there. Forget about everything else, we need those wares on top of the mountain before our warehouses are all swallowed by the sea.]]))
+			.. new_objectives(obj_build_ships)
+	}
 }
 
 scenario_won = {
    {
-      title = _ "Jundlina is Relieved",
-      body = jundlina(_"Jundlina", _(
-[[Praise Satul! Ostur, the young ship builder did it. ]] ..
-[[We have three ships – never have I seen sturdier ones – with enough room to carry all of us and some wares too. ]] ..
-[[And this rescue came just in time: Lutas is about to swallow the rest of this island, ]] ..
-[[the water rises faster by the hour. But we can make our escape now and start over in some country farther away... ]] ..
-[[I expect a long journey, but we will find the land of Satul in the end. ]] ..
-[[This is what I promised my people. And myself.]]
-      )) .. rt("<p font-size=10> <br></p>" .. h1(_ "Congratulations") .. p(_
-[[You have won this mission. Continue with the next one or keep playing for as long as you like.]]
-      )),
-   },
+      title = _"Jundlina is Relieved",
+      body = jundlina(_"Jundlina",
+			_([[Praise Satul! Ostur, the young ship builder did it. We have three ships – never have I seen sturdier ones – with enough room to carry all of us and some wares too. And this rescue came just in time: Lutas is about to swallow the rest of this island, the water rises faster by the hour. But we can make our escape now and start over in some country farther away...]])
+			.. paragraphdivider() ..
+			_([[I expect a long journey, but we will find the land of Satul in the end. This is what I promised my people. And myself.]]))
+			.. rt("<p font-size=10> <br></p>" .. h1(_ "Congratulations") ..
+			p(_[[You have won this mission. Continue with the next one or keep playing for as long as you like.]]))
+   }
 }

=== modified file 'campaigns/dummy.wmf/scripting/init.lua'
--- campaigns/dummy.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ campaigns/dummy.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -3,6 +3,7 @@
 -- =======================================================================
 set_textdomain("scenario_dummy.wmf")
 
+include "scripting/messages.lua"
 include "scripting/ui.lua"
 
 p1 = wl.Game().players[1]
@@ -13,4 +14,4 @@
    height=450,
    posy=1,
 }
-p1:message_box(dummy_msg.title, dummy_msg.body, dummy_msg)
+campaign_message_box(dummy_msg.title, dummy_msg.body, dummy_msg)

=== modified file 'campaigns/emp01.wmf/scripting/init.lua'
--- campaigns/emp01.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ campaigns/emp01.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -13,14 +13,4 @@
 
 include "map:scripting/starting_conditions.lua"
 include "map:scripting/texts.lua"
-
--- Some messages that spare some typing
-function send_msg(msg)
-   if not msg.h then msg.h = 400 end
-   p1:message_box(msg.title, msg.body, msg)
-end
-function add_obj(t)
-   return p1:add_objective(t.name, t.title, t.body)
-end
-
 include "map:scripting/mission_thread.lua"

=== modified file 'campaigns/emp01.wmf/scripting/mission_thread.lua'
--- campaigns/emp01.wmf/scripting/mission_thread.lua	2010-09-19 11:19:40 +0000
+++ campaigns/emp01.wmf/scripting/mission_thread.lua	2014-10-02 21:13:22 +0000
@@ -1,71 +1,72 @@
+include "scripting/messages.lua"
 
 function mission_thread()
    sleep(100) -- This is needed for yet unknown reasons
-   
+
    -- Initial messages
    local sea = wl.Game().map:get_field(47,25)
    local pts = scroll_smoothly_to(sea)
 
-   send_msg(diary_page_1)
+   campaign_message_box(diary_page_1)
    sleep(200)
 
    -- Show the sea
    p1:reveal_fields(sea:region(6))
    sleep(200)
-   send_msg(diary_page_2)
+   campaign_message_box(diary_page_2)
    -- Hide the sea after 5 seconds
    run(function() sleep(5000) p1:hide_fields(sea:region(6)) end)
 
    -- Back home
    timed_scroll(array_reverse(pts))
-   send_msg(diary_page_3)
+   campaign_message_box(diary_page_3)
 
 
    sleep(400)
-   
-   send_msg(saledus_1)
+
+   campaign_message_box(saledus_1)
    p1:allow_buildings{"barracks"}
-   local o = add_obj(obj_build_barracks)
+   local o = add_campaign_objective(obj_build_barracks)
    while #p1:get_buildings("barracks") < 1 do sleep(3249) end
    o.done = true
 
    -- Barracks are completed now
-   send_msg(saledus_2)
+   campaign_message_box(saledus_2)
    p1:allow_buildings{"lumberjacks_house"}
-   o = add_obj(obj_build_lumberjack)
-   send_msg(amalea_1)
+   o = add_campaign_objective(obj_build_lumberjack)
+   campaign_message_box(amalea_1)
    while #p1:get_buildings("lumberjacks_house") < 1 do sleep(3249) end
    o.done = true
 
    -- Lumberjack is now build
-   send_msg(amalea_2)
+   campaign_message_box(amalea_2)
    p1:allow_buildings{"sawmill"}
-   o = add_obj(obj_build_sawmill_and_lumberjacks)
+   o = add_campaign_objective(obj_build_sawmill_and_lumberjacks)
    while not check_for_buildings(p1, { lumberjacks_house = 3, sawmill = 1})
       do sleep(2343) end
    o.done = true
 
    -- Now the lady demands a forester after having us cut down the whole forest.
-   send_msg(amalea_3)
-   o = add_obj(obj_build_forester)
+   campaign_message_box(amalea_3)
+   o = add_campaign_objective(obj_build_forester)
    p1:allow_buildings{"foresters_house"}
    while not check_for_buildings(p1, { foresters_house = 1 }) do sleep(2434) end
    o.done = true
 
 
    -- Now a quarry
-   send_msg(saledus_3)
-   o = add_obj(obj_build_quarry)
+   campaign_message_box(saledus_3)
+   o = add_campaign_objective(obj_build_quarry)
    p1:allow_buildings{"quarry"}
    while not check_for_buildings(p1, { quarry = 1 }) do sleep(2434) end
    o.done = true
 
    -- All buildings done. Got home
-   send_msg(saledus_4)
+   campaign_message_box(saledus_4)
 
    sleep(25000) -- Sleep a while
 
-   send_msg(diary_page_4)
+   campaign_message_box(diary_page_4)
    p1:reveal_scenario("empiretut01")
 end
 
@@ -73,7 +74,7 @@
 function easter_egg()
    while not check_for_buildings(p1, {barracks = 10}) do sleep(4253) end
 
-   send_msg(safe_peninsula)
+   campaign_message_box(safe_peninsula)
 end
 
 

=== modified file 'campaigns/emp01.wmf/scripting/texts.lua'
--- campaigns/emp01.wmf/scripting/texts.lua	2014-07-14 10:45:44 +0000
+++ campaigns/emp01.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -78,24 +78,15 @@
 diary_page_1 = {
    title =_ "A Dark Night",
    body=lutius(_"Diary of Lutius",
-   _([[What has become of our Empire? I really ask this question – why did my king forbid me ]] ..
-[[from fighting against that monstrous barbarian tribe, who first acted as a peaceful friend ]] ..
-[[and then attacked my army in the darkest night?]]) .. paragraphdivider() ..
-_([[With an army of 150 men, I was assigned to patrol on our northern frontier, ]] ..
-[[which lies near the Galdin Mountains in a great, beautiful and ancient forest. ]] ..
-[[Soon, we met a barbarian tribe, which at first was friendly. A few of my men even traded with them ]] ..
-[[and their kids came to us, to admire our clean and tidy uniforms and weapons.]]) .. paragraphdivider() ..
-_([[But during our fifth night in that region, they attacked us with no reason. ]] ..
-[[I lost dozens of good men, and found myself imprisoned and brought to their chieftain. ]] ..
-[[He spat at me, mocked me and told me to leave this land forever. ]] ..
-[[He did not want new land and did not want our land, but he told me that THIS forest was their land]] ..
-[[ – and it would stay theirs until the ghosts took the last man of his folk!]]) .. paragraphdivider() ..
-_([[Three weeks later, I returned to Fremil to speak with our king. ]] ..
-[[He was furious at the Barbarians, yet forbade any attack on these tribes. ]] ..
-[[He believed that our army was too weak to survive in a war against the barbarians.]]) .. paragraphdivider() ..
-_([[Still, I saw no way that I could erase my shame without fighting against these barbarians. ]] ..
-[[So, I left Fremil by boat to find a new world and a new life for myself, somewhere in the south. ]] ..
-[[Now I am sailing on the perl-gulf with my family, some of my friends and a few of my best warriors.]])),
+		_([[What has become of our Empire? I really ask this question – why did my king forbid me from fighting against that monstrous barbarian tribe, who first acted as a peaceful friend and then attacked my army in the darkest night?]])
+		.. paragraphdivider() ..
+		_([[With an army of 150 men, I was assigned to patrol on our northern frontier, which lies near the Galdin Mountains in a great, beautiful and ancient forest. Soon, we met a barbarian tribe, which at first was friendly. A few of my men even traded with them and their kids came to us, to admire our clean and tidy uniforms and weapons.]])
+		.. paragraphdivider() ..
+		_([[But during our fifth night in that region, they attacked us with no reason. I lost dozens of good men, and found myself imprisoned and brought to their chieftain. He spat at me, mocked me and told me to leave this land forever. He did not want new land and did not want our land, but he told me that THIS forest was their land – and it would stay theirs until the ghosts took the last man of his folk!]])
+		.. paragraphdivider() ..
+		_([[Three weeks later, I returned to Fremil to speak with our king. He was furious at the Barbarians, yet forbade any attack on these tribes. He believed that our army was too weak to survive in a war against the barbarians.]])
+		.. paragraphdivider() ..
+		_([[Still, I saw no way that I could erase my shame without fighting against these barbarians. So, I left Fremil by boat to find a new world and a new life for myself, somewhere in the south. Now I am sailing on the perl-gulf with my family, some of my friends and a few of my best warriors.]])),
    w=500,
    posy=1,
 }
@@ -103,12 +94,9 @@
 diary_page_2 = {
    title=_"The Rough Sea",
    body= lutius(_"Diary of Lutius",
-   _([[It seems as if sailing on the perl-gulf was one of our biggest mistakes. ]] ..
-[[Nature was against us and drove us into a dark, wild storm. ]] ..
-[[I really don’t know how many hours have passed since the waves rose higher than our boat, ]] ..
-[[but still it would be suicide to go outside.]]) .. paragraphdivider() ..
-_([[Our ship is badly damaged and is taking in more and more water. ]] ..
-[[We can thank the Gods if we survive this black night with our lives.]])),
+		_([[It seems as if sailing on the perl-gulf was one of our biggest mistakes. Nature was against us and drove us into a dark, wild storm. I really don’t know how many hours have passed since the waves rose higher than our boat, but still it would be suicide to go outside.]])
+		.. paragraphdivider() ..
+		_([[Our ship is badly damaged and is taking in more and more water. We can thank the Gods if we survive this black night with our lives.]])),
    w=400,
    posy=1,
 }
@@ -116,12 +104,11 @@
 diary_page_3 = {
    title=_"Survivor",
    body= lutius(_"Diary of Lutius",
-   _([[Finally, the Gods were with us!]]) .. paragraphdivider() ..
-_([[We landed on an unknown coast and found peaceful rest under the palm trees growing at the shore. ]] ..
-[[But that is about as good as it gets. The truth is: when I woke up this morning, I saw nothing but sand around us.]]) ..
-paragraphdivider() ..
-_([[It really seems as if we have landed under the only palm trees existing in this far-away sandy desert. ]] ..
-[[I fear we won’t find the help we need to get our ship repaired in good time.]])),
+		_([[Finally, the Gods were with us!]])
+		.. paragraphdivider() ..
+		_([[We landed on an unknown coast and found peaceful rest under the palm trees growing at the shore. But that is about as good as it gets. The truth is: when I woke up this morning, I saw nothing but sand around us.]])
+		.. paragraphdivider() ..
+		_([[It really seems as if we have landed under the only palm trees existing in this far-away sandy desert. I fear we won’t find the help we need to get our ship repaired in good time.]])),
    w=400,
    posy=1,
 }
@@ -129,14 +116,12 @@
 saledus_1 = {
    title=_"A Foreboding",
    body= saledus(_"Saledus looks around nervously...",
-   _([[Sire, I fear we are not safe in this foreign land. ]] ..
-[[Who knows what terrible creatures live beyond this forest, in that mighty desert? ]] ..
-[[What if these creatures enter the woods and await the time to attack us?]]) .. paragraphdivider() ..
-_([[Well, perhaps my fear is misguided, but it can’t be wrong to keep watch in the forests]] ..
-[[ – so that we can be sure to see any potential enemies before they can see us.]]) .. paragraphdivider() ..
-_([[We really should build a barracks in the eastern portion of the forest. ]] ..
-[[Then one of us can keep watch in the darkness and keep us safe from these creatures.]]))
-.. new_objectives(obj_build_barracks),
+		_([[Sire, I fear we are not safe in this foreign land. Who knows what terrible creatures live beyond this forest, in that mighty desert? What if these creatures enter the woods and await the time to attack us?]])
+		.. paragraphdivider() ..
+		_([[Well, perhaps my fear is misguided, but it can’t be wrong to keep watch in the forests – so that we can be sure to see any potential enemies before they can see us.]])
+		.. paragraphdivider() ..
+		_([[We really should build a barracks in the eastern portion of the forest. Then one of us can keep watch in the darkness and keep us safe from these creatures.]]))
+		.. new_objectives(obj_build_barracks),
    w=400,
 }
 
@@ -144,87 +129,79 @@
 saledus_2 = {
    title=_"Safe For Now",
    body= saledus(_"Saledus speaks with a sigh of relief...",
-   _([[Sire, I saw that the construction of the barracks was completed, ]] ..
-[[so I have assigned one of my best soldiers to it to keep watch on the desert.]]) .. paragraphdivider() ..
-_([[This is a good step forward. Now we can feel a bit safer and can look forward to repairing our ship.]])),
+		_([[Sire, I saw that the construction of the barracks was completed, so I have assigned one of my best soldiers to it to keep watch on the desert.]])
+		.. paragraphdivider() ..
+		_([[This is a good step forward. Now we can feel a bit safer and can look forward to repairing our ship.]])),
    w=400,
 }
 
 amalea_1 = {
    title=_"Young Amalea",
    body= amalea(_"Amalea smiles...",
-   _([[Hey Lutius, I just met Saledus outside.]]) .. paragraphdivider() ..
-_([[He told me about the barracks. Well, I am not one of those girls who think we need more barracks]] ..
-[[ – instead, we might concentrate on other things now.]]) .. paragraphdivider() ..
-_([[It is absolutely clear that we need wood to repair our ship. ]] ..
-[[So, I walked through the forest yesterday and found a nice place for a lumberjack’s house, ]] ..
-[[south of our provisional headquarters.]]))
-.. new_objectives(obj_build_lumberjack),
+		_([[Hey Lutius, I just met Saledus outside.]])
+		.. paragraphdivider() ..
+		_([[He told me about the barracks. Well, I am not one of those girls who think we need more barracks – instead, we might concentrate on other things now.]])
+		.. paragraphdivider() ..
+		_([[It is absolutely clear that we need wood to repair our ship. So, I walked through the forest yesterday and found a nice place for a lumberjack’s house, south of our provisional headquarters.]]))
+		.. new_objectives(obj_build_lumberjack),
    w=400,
 }
 
 amalea_2 = {
    title=_"Young Amalea",
    body= amalea(_"Amalea recommends...",
-   _([[Hey Lutius, I got the message that our first lumberjack has started his work today. ]] ..
-[[Perhaps it would be a good idea to wait until he cleans enough space for constructing two more lumberjack’s houses, ]] ..
-[[so that we can harvest the logs faster.]]) .. paragraphdivider() ..
-_([[But unfortunately the logs are useless for repairing our ship – we need refined lumber, ]] ..
-[[like every ship and every bigger building needs, too. ]] ..
-[[So we should build a sawmill – as soon as we have enough space for this.]]))
-.. new_objectives(obj_build_sawmill_and_lumberjacks),
+		_([[Hey Lutius, I got the message that our first lumberjack has started his work today. Perhaps it would be a good idea to wait until he cleans enough space for constructing two more lumberjack’s houses, so that we can harvest the logs faster.]])
+		.. paragraphdivider() ..
+		_([[But unfortunately the logs are useless for repairing our ship – we need refined lumber, like every ship and every bigger building needs, too. So we should build a sawmill – as soon as we have enough space for this.]]))
+		.. new_objectives(obj_build_sawmill_and_lumberjacks),
    w=400,
 }
 
 amalea_3 = {
    title=_"Young Amalea",
-   body= amalea(_"Amalea comes in...",
-   _([[Hi Lutius, I’ve got two important things to talk about... First the good news:]]) .. paragraphdivider() ..
-_([[I noticed that the construction of the sawmill is complete, ]] ..
-[[so we can begin to refine the logs that the lumberjacks are harvesting into lumber.]]) .. paragraphdivider() ..
-_([[But that’s just about the only positive thing I know to talk about. ]] ..
-[[The bad news is that our lumberjacks harvest at an incredible speed. ]] ..
-[[There are almost no trees left on this island.]]) .. paragraphdivider() ..
-_([[Lutius, these trees provide shelter from the sandstorms that sweep in from the desert ]] ..
-[[and shade on the hot days, and they are the home of so many gentle animals. ]] ..
-[[We shouldn’t leave this island a complete desert.]]) .. paragraphdivider() ..
-_([[Lutius, I beg you: find someone who takes care of planting new trees.]]))
-.. new_objectives(obj_build_forester),
+   body= amalea(_"Amalea enters...",
+		_([[Hi Lutius, I’ve got two important things to talk about... First the good news:]])
+		.. paragraphdivider() ..
+		_([[I noticed that the construction of the sawmill is complete, so we can begin to refine the logs that the lumberjacks are harvesting into lumber.]])
+		.. paragraphdivider() ..
+		_([[But that’s just about the only positive thing I know to talk about. The bad news is that our lumberjacks harvest at an incredible speed. There are almost no trees left on this island.]])
+		.. paragraphdivider() ..
+		_([[Lutius, these trees provide shelter from the sandstorms that sweep in from the desert and shade on the hot days, and they are the home of so many gentle animals. We shouldn’t leave this island a complete desert.]])
+		.. paragraphdivider() ..
+		_([[Lutius, I beg you: find someone who takes care of planting new trees.]]))
+		.. new_objectives(obj_build_forester),
    w=400,
 }
 
 saledus_3 = {
    title=_"Thinking About the Future",
    body= saledus(_"Saledus notes...",
-   _([[Hey, my good old friend. I just thought about the rocks standing on the south shore of this land. ]] ..
-[[Perhaps we could cut out some useful hard stones and beautiful marble.]]) .. paragraphdivider() ..
-_([[The repair of our ship will take a few weeks, anyway, and the resources we harvest now ]] ..
-[[might be the base of strong and big buildings in another land.]]))
-.. new_objectives(obj_build_quarry),
+		_([[Hey, my good old friend. I just thought about the rocks standing on the south shore of this land. Perhaps we could cut out some useful hard stones and beautiful marble.]])
+		.. paragraphdivider() ..
+		_([[The repair of our ship will take a few weeks, anyway, and the resources we harvest now might be the base of strong and big buildings in another land.]]))
+		.. new_objectives(obj_build_quarry),
    w=400,
 }
 
 saledus_4 = {
    title=_"A Step Forward",
    body= saledus(_"Saledus looks promising...",
-   _([[Hey Lutius, today we got a lot closer to our first castle. ]] ..
-[[The quarry to the south began its work today and will soon provide us with stones and beautiful marble.]]) .. paragraphdivider() ..
-_([[Now we truly can look forward to settling down on another island.]])),
+		_([[Hey Lutius, today we got a lot closer to our first castle. The quarry to the south began its work today and will soon provide us with stones and beautiful marble.]])
+		.. paragraphdivider() ..
+		_([[Now we truly can look forward to settling down on another island.]])),
    w=400,
 }
 
 diary_page_4 = {
    title=_"Mission Complete",
-   body= lutius(
-_([[Today I got the message that our ship is completely repaired. ]] ..
-[[At the moment, my people are loading everything onto our newly repaired ship, ]] ..
-[[hoping it will serve us better than last time.]]) .. paragraphdivider() ..
-_([[Tonight will be our last night on this island. ]] ..
-[[Tomorrow morning we will leave, searching for a new place for our exile.]]) .. paragraphdivider() ..
-_([[I still wonder if we will ever see Fremil again.]])) ..
-      objective_text(_"Victory", _
-[[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]]
-   ),
+   body= lutius(_"Diary of Lutius",
+		_([[Today I got the message that our ship is completely repaired. At the moment, my people are loading everything onto our newly repaired ship, hoping it will serve us better than last time.]])
+		.. paragraphdivider() ..
+		_([[Tonight will be our last night on this island. Tomorrow morning we will leave, searching for a new place for our exile.]])
+		.. paragraphdivider() ..
+		_([[I still wonder if we will ever see Fremil again.]]))
+		.. objective_text(_"Victory",
+		_[[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]]),
    posy=1
 }
 

=== modified file 'campaigns/emp02.wmf/scripting/init.lua'
--- campaigns/emp02.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ campaigns/emp02.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -4,8 +4,8 @@
 set_textdomain("scenario_emp02.wmf")
 
 include "scripting/coroutine.lua"
+include "scripting/infrastructure.lua"
 include "scripting/objective_utils.lua"
-include "scripting/infrastructure.lua"
 include "scripting/table.lua"
 include "scripting/ui.lua"
 
@@ -15,15 +15,4 @@
 
 include "map:scripting/starting_conditions.lua"
 include "map:scripting/texts.lua"
-
--- Some messages that spare some typing
-function send_msg(msg)
-   if not msg.h then msg.h = 400 end
-   if not msg.w then msg.w = 450 end
-   p1:message_box(msg.title, msg.body, msg)
-end
-function add_obj(t)
-   return p1:add_objective(t.name, t.title, t.body)
-end
-
 include "map:scripting/mission_thread.lua"

=== modified file 'campaigns/emp02.wmf/scripting/mission_thread.lua'
--- campaigns/emp02.wmf/scripting/mission_thread.lua	2014-08-26 17:25:00 +0000
+++ campaigns/emp02.wmf/scripting/mission_thread.lua	2014-10-02 21:13:22 +0000
@@ -1,21 +1,24 @@
 -- =======================================================================
---                              Mission Threads                             
+--                              Mission Threads
 -- =======================================================================
+
+include "scripting/messages.lua"
+
 function building_materials()
    sleep(200)
-   send_msg(diary_page_5)
+   campaign_message_box(diary_page_5)
 
    local map = wl.Game().map
    local forests = map:get_field(17,10)
    p1:reveal_fields(forests:region(6))
    -- Hide again in 5 seconds
    run(function() sleep(5000) p1:hide_fields(forests:region(6)) end)
-   
+
    -- Show the trees
    scroll_smoothly_to(forests)
 
-   send_msg(diary_page_5_1)
-   local o_woodeconomy = add_obj(obj_build_woodeconomy)
+   campaign_message_box(diary_page_5_1)
+   local o_woodeconomy = add_campaign_objective(obj_build_woodeconomy)
    -- Check for completing of the woodeconomy
    run(function()
       while not check_for_buildings(p1, {
@@ -24,21 +27,21 @@
          sawmill = 1,
       }) do sleep(2342) end
 
-      send_msg(diary_page_6)
+      campaign_message_box(diary_page_6)
       o_woodeconomy.done = true
    end)
 
 
    -- Show the stones
    scroll_smoothly_to(map:get_field(14,25))
-   send_msg(diary_page_5_2)
-   local o_quarry = add_obj(obj_build_quarry)
+   campaign_message_box(diary_page_5_2)
+   local o_quarry = add_campaign_objective(obj_build_quarry)
    -- Check for completeness of the quarry
    run(function()
       while not check_for_buildings(p1, {quarry=1}) do sleep(3423) end
       o_quarry.done = true
 
-      send_msg(diary_page_7)
+      campaign_message_box(diary_page_7)
    end)
 end
 
@@ -57,8 +60,8 @@
       if s > 0 then break end
       sleep(2344)
    end
-   
-   send_msg(amalea_1)
+
+   campaign_message_box(amalea_1)
    p1:allow_buildings{
       "well",
       "farm",
@@ -73,12 +76,12 @@
       "inn",
       "fishers_house",
    }
-   local o = add_obj(obj_build_Food_infrastructure)
+   local o = add_campaign_objective(obj_build_food_infrastructure)
 
    -- Run easter egg: Amalea says something when Tavern is done
-   run(function() 
+   run(function()
       while #p1:get_buildings("tavern") < 1 do sleep(2349) end
-      send_msg(amalea_2)
+      campaign_message_box(amalea_2)
    end)
 
    while true do
@@ -110,7 +113,7 @@
    local iron_mountain = wl.Game().map:get_field(38,37)
    p1:reveal_fields(coal_mountain:region(6))
    p1:reveal_fields(iron_mountain:region(6))
-   run(function() sleep(5000) 
+   run(function() sleep(5000)
       p1:hide_fields(coal_mountain:region(6))
       p1:hide_fields(iron_mountain:region(6))
    end)
@@ -118,7 +121,7 @@
    local move_point = wl.Game().map:get_field(49,22)
    scroll_smoothly_to(move_point)
 
-   send_msg(saledus_3)
+   campaign_message_box(saledus_3)
    p1:allow_buildings{
       "coalmine",
       "deep_coalmine",
@@ -132,8 +135,8 @@
       "charcoal_kiln",
    }
 
-   local o = add_obj(obj_build_mining_infrastructure)
-   -- Wait for the infrastructure to come up 
+   local o = add_campaign_objective(obj_build_mining_infrastructure)
+   -- Wait for the infrastructure to come up
    while true do
       local rv = p1:get_buildings{
          "coalmine",
@@ -170,8 +173,8 @@
    -- Move to the shipparts
    local pts = scroll_smoothly_to(shipparts)
 
-   send_msg(saledus_1)
-   local o = add_obj(obj_build_military_buildings)
+   campaign_message_box(saledus_1)
+   local o = add_campaign_objective(obj_build_military_buildings)
    p1:allow_buildings{"barracks", "sentry"}
 
    -- Go back to where we were
@@ -180,7 +183,7 @@
    -- sleep while not owning 26, 21
    while wl.Game().map:get_field(26,21).owner ~= p1 do sleep(3243) end
    o.done = true
-   
+
    -- Marble Mountains
    local marblemountains = wl.Game().map:get_field(35,19)
    p1:reveal_fields(marblemountains:region(5))
@@ -188,9 +191,9 @@
 
    pts = scroll_smoothly_to(marblemountains)
 
-   send_msg(saledus_2)
+   campaign_message_box(saledus_2)
    p1:allow_buildings{"marblemine", "deep_marblemine"}
-   o = add_obj(obj_build_marblemine)
+   o = add_campaign_objective(obj_build_marblemine)
    run(function() while not check_for_buildings(p1, {marblemine = 1})
       do sleep(2133) end  o.done = true end)
 
@@ -222,8 +225,8 @@
    run(function() sleep(5000) p1:hide_fields(barbarians) end)
    scroll_smoothly_to(wl.Game().map:get_field(59, 55))
 
-   send_msg(diary_page_8)
-   local o = add_obj(obj_build_bigger_military_buildings)
+   campaign_message_box(diary_page_8)
+   local o = add_campaign_objective(obj_build_bigger_military_buildings)
    p1:allow_buildings{"outpost", "barrier", "tower"}
    p2:allow_buildings{"quarry"}
 
@@ -241,10 +244,10 @@
    while not mining_infrastructure_done do
       sleep(2343)
    end
-   send_msg(diary_page_9)
+   campaign_message_box(diary_page_9)
    p1:allow_buildings{"fortress"}
 
-   o = add_obj(obj_remove_the_barbarians)
+   o = add_campaign_objective(obj_remove_the_barbarians)
    -- Wait for the fortress to come up
    while not check_for_buildings(p1, {fortress=1},
       wl.Game().map:get_field(60,65):region(6))
@@ -253,9 +256,9 @@
    o.done = true
 
    -- Show victory message
-   send_msg(diary_page_10)
-   send_msg(seven_days_later)
-   send_msg(diary_page_11)
+   campaign_message_box(diary_page_10)
+   campaign_message_box(seven_days_later)
+   campaign_message_box(diary_page_11)
 
    p1:reveal_campaign("campsect2")
    p1:reveal_scenario("empiretut02")

=== modified file 'campaigns/emp02.wmf/scripting/texts.lua'
--- campaigns/emp02.wmf/scripting/texts.lua	2014-08-26 17:25:00 +0000
+++ campaigns/emp02.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -68,7 +68,7 @@
    ),
 }
 
-obj_build_Food_infrastructure = {
+obj_build_food_infrastructure = {
    name = "build_food_infrastructure",
    title =_"Provide your miners with food",
    number = 1,
@@ -107,43 +107,38 @@
    title =_ "A New Island",
    posy= 1,
    body = lutius(_"Diary of Lutius",
-_([[Finally! This island appears to have been made for us, it is a gift from the Gods to my people and myself. ]] ..
-[[Until now, we have only seen a small part of this island, but this part alone is already bringing sunlight to my mind. ]] ..
-[[I feel as if we have found a priceless treasure, a land like paradise.]]) .. paragraphdivider() ..
-_([[On this island, we will start our new life. ]] ..
-[[We will build up an outpost for our exile, which perhaps will become a new, beautiful home for every one of us.]])),
+		_([[Finally! This island appears to have been made for us, it is a gift from the Gods to my people and myself. Until now, we have only seen a small part of this island, but this part alone is already bringing sunlight to my mind. I feel as if we have found a priceless treasure, a land like paradise.]])
+		.. paragraphdivider() ..
+		_([[On this island, we will start our new life. We will build up an outpost for our exile, which perhaps will become a new, beautiful home for every one of us.]])),
 }
 
 diary_page_5_1 = {
    title =_ "The Green Forests",
    posy = 1,
    body= lutius(_"Diary of Lutius",
-_([[As Saledus and I walked through these wonderful forests in the north, we felt that our future had just begun. ]] ..
-[[This land is so peaceful, good and beautiful, I could stay here until the end of my life.]]) .. paragraphdivider() ..
-_([[But until that day, may many years pass! For now, we must concentrate on the present, ]] ..
-[[and build a few lumberjack’s houses and a sawmill to produce some basic building materials.]]) .. paragraphdivider() ..
-_([[But we shouldn’t forget to preserve this natural bounty. ]] ..
-[[These forests should last forever, so we really should build a forester’s house too.]]))
-.. new_objectives(obj_build_woodeconomy),
+		_([[As Saledus and I walked through these wonderful forests in the north, we felt that our future had just begun. This land is so peaceful, good and beautiful, I could stay here until the end of my life.]])
+		.. paragraphdivider() ..
+		_([[But until that day, may many years pass! For now, we must concentrate on the present, and build a few lumberjack’s houses and a sawmill to produce some basic building materials.]])
+		.. paragraphdivider() ..
+		_([[But we shouldn’t forget to preserve this natural bounty. These forests should last forever, so we really should build a forester’s house too.]]))
+		.. new_objectives(obj_build_woodeconomy)
 }
 
 diary_page_5_2 = {
    title =_ "The Rocks",
    posy = 1,
    body= lutius(_"Diary of Lutius",
-_([[Later, I walked down to the rocks in the south and looked for a place where we could build a quarry ]] ..
-[[to get some hard stone for our larger buildings.]]) .. paragraphdivider() ..
-_([[Again, I felt like I was in paradise when I noticed that some marble-like stones were among the rocks. ]] ..
-[[It seems that we will soon be able to build strong, luxurious buildings, like those we were accustomed to in Fremil.]]))
-.. new_objectives(obj_build_quarry),
+		_([[Later, I walked down to the rocks in the south and looked for a place where we could build a quarry to get some hard stone for our larger buildings.]])
+		.. paragraphdivider() ..
+		_([[Again, I felt like I was in paradise when I noticed that some marble-like stones were among the rocks. It seems that we will soon be able to build strong, luxurious buildings, like those we were accustomed to in Fremil.]]))
+		.. new_objectives(obj_build_quarry)
 }
 
 diary_page_6 = {
    title =_ "Wood for the Colony",
    posy=1,
    body= lutius(_"Diary of Lutius",
-_([[Good news! Today our wood economy was completed. ]] ..
-[[Now we can be sure that we will have enough wood for our future building projects.]])),
+		_([[Good news! Today our wood economy was completed. Now we can be sure that we will have enough wood for our future building projects.]]))
 }
 
 diary_page_7 = {
@@ -157,89 +152,86 @@
    title =_ "Dangerous Ship Parts",
    posy = 1,
    body= saledus(_"Saledus looks unhappy",
-_([[Greetings Lutius, I don’t want to start a panic, ]] ..
-[[but I found something which gives me a sinking feeling in my stomach and spreads waves of fear in my heart. ]] ..
-[[As I walked down to the southern shore, I found the remains of another ship. ]] ..
-[[I don’t know whether these parts are all that is left of that ship. ]] ..
-[[In any case, these parts do not seem to be old.]]) .. paragraphdivider() ..
-_([[Perhaps the people aboard that ship were caught in the same storm which brought us to Malac’ Mor]] ..
-[[ – and were brought to this island.]]) .. paragraphdivider() ..
-_([[I beg you to be cautious and to build some barracks or sentries around our colony.]]))
-.. new_objectives(obj_build_military_buildings),
+		_([[Greetings Lutius, I don’t want to start a panic, but I found something which gives me a sinking feeling in my stomach and spreads waves of fear in my heart. As I walked down to the southern shore, I found the remains of another ship. I don’t know whether these parts are all that is left of that ship. In any case, these parts do not seem to be old.]])
+		.. paragraphdivider() ..
+		_([[Perhaps the people aboard that ship were caught in the same storm which brought us to Malac’ Mor – and were brought to this island.]])
+		.. paragraphdivider() ..
+		_([[I beg you to be cautious and to build some barracks or sentries around our colony.]]))
+		.. new_objectives(obj_build_military_buildings)
 }
 
 saledus_2 = {
    title =_ "Marble on the Mountain",
    body= saledus(_"Saledus smiles",
-_([[Lutius, I’ve got good news for you: As I walked to the east, I found a larger mountain. I am not absolutely sure – a geologist should check if I am right – but I believe we could mine marble from some places on the mountain.]])
-.. paragraphdivider() ..
-_([[It would be a good source for bolstering our supply of quality marble, ]] ..
-[[beyond the meager quantities available from the quarry. ]] ..
-[[Perhaps you were right when you said that this island was like paradise.]]) .. paragraphdivider() ..
-_([[Let us expand to that mountain and start mining marble.]]))
-.. new_objectives(obj_build_marblemine),
+		_([[Lutius, I’ve got good news for you: As I walked to the east, I found a larger mountain. I am not absolutely sure – a geologist should check if I am right – but I believe we could mine marble from some places on the mountain.]])
+		.. paragraphdivider() ..
+		_([[It would be a good source for bolstering our supply of quality marble, beyond the meager quantities available from the quarry. Perhaps you were right when you said that this island was like paradise.]])
+		.. paragraphdivider() ..
+		_([[Let us expand to that mountain and start mining marble.]]))
+		.. new_objectives(obj_build_marblemine)
 }
 
 saledus_3 = {
    title =_ "Further Mountains",
    body= saledus(_"Saledus is amazed",
-_([[By the Gods, this is an unbelievable stroke of fortune! ]] ..
-[[There are two more mountains, and it seems that one has a large quantity of coal and the other of iron ore. ]] ..
-[[We should immediately start to build iron ore and coal mines (or at least charcoal kilns), ]] ..
-[[smelting works, toolsmithies, armor and weapon smithies.]]) .. paragraphdivider() ..
-_([[However: for all these bigger buildings, we need better and more elegant building materials. ]] ..
-[[So, let’s build a stonemason, who will cut columns from marble.]]) .. paragraphdivider() ..
-_([[After everything, we can now begin to live like we did in Fremil.]]))
-.. new_objectives(obj_build_mining_infrastructure),
+		_([[By the Gods, this is an unbelievable stroke of fortune! There are two more mountains, and it seems that one has a large quantity of coal and the other of iron ore. We should immediately start to build iron ore and coal mines (or at least charcoal kilns), smelting works, toolsmithies, armor and weapon smithies.]])
+		.. paragraphdivider() ..
+		_([[However: for all these bigger buildings, we need better and more elegant building materials. So, let’s build a stonemason, who will cut columns from marble.]])
+		.. paragraphdivider() ..
+		_([[After everything, we can now begin to live like we did in Fremil.]]))
+		.. new_objectives(obj_build_mining_infrastructure)
 }
 
 amalea_1 = {
    title =_ "Food for the Miners",
-   body= amalea(_"Amalea comes in...",
-_([[Hi Lutius, I hope you forgive my criticism, but it seems to me as if you forgot something.]]) .. paragraphdivider() ..
-_([[It’s nice, and of course a good idea, to build up mines, which will give us a more comfortable life, ]] ..
-[[but the people working in the mines are unhappy with the current situation. ]] ..
-[[They have to do hard work and have no time for making their own food.]]) .. paragraphdivider() ..
-_([[What do you think about helping them out? ]] ..
-[[I can’t tell you what we need exactly... but here are my recommendations:]]))
-.. new_objectives(obj_build_Food_infrastructure),
+   body= amalea(_"Amalea enters...",
+		_([[Hi Lutius, I hope you forgive my criticism, but it seems to me as if you forgot something.]])
+		.. paragraphdivider() ..
+		_([[It’s nice, and of course a good idea, to build up mines, which will give us a more comfortable life, but the people working in the mines are unhappy with the current situation. They have to do hard work and have no time for making their own food.]])
+		.. paragraphdivider() ..
+		_([[What do you think about helping them out? I can’t tell you what we need exactly... but here are my recommendations:]]))
+		.. new_objectives(obj_build_food_infrastructure)
+}
+
+amalea_2 = {
+   title =_ "Our New Tavern",
+   body= amalea(_"Amalea smiles",
+		_([[Greetings, my friend, I just visited our new tavern ‘At the palms’. The beer they serve is really tasty. You really should have a drink there, too.]])
+		.. paragraphdivider() ..
+		_([[It is good to see that we have now got a warmer and more familiar environment on our island. Thank you, Lutius.]]))
 }
 
 diary_page_8 = {
    title =_ "The Barbarians",
    posy=1,
    body= lutius(_"Diary of Lutius",
-_([[By the Gods! This is absolutely terrible. It seems as if we stand close to a test]] ..
-[[ – and it seems as if Saledus was right with his fear concerning the shipwreck he found.]]) .. paragraphdivider() ..
-_([[Today, as I walked down to the eastern shore, I got a shock. ]] ..
-[[I caught sight of one of those hated, evil, barbarian tribes with whom we have had so many problems before.]])
-.. paragraphdivider() ..
-_([[At first, I was naive and hoped that they were peaceful, but as soon as one of them saw me, ]] ..
-[[they charged towards me and started attacking me with their throwing-spears. Thanks be to the Gods ]] ..
-[[that I was able to flee and hide myself, before retreating back to our colony under cover of darkness.]])
-.. paragraphdivider() ..
-_([[Anyway, we must build up stronger military buildings as soon as possible.]]))
-.. new_objectives(obj_build_bigger_military_buildings),
+		_([[By the Gods! This is absolutely terrible. It seems as if we stand close to a test – and it seems as if Saledus was right with his fear concerning the shipwreck he found.]])
+		.. paragraphdivider() ..
+		_([[Today, as I walked down to the eastern shore, I got a shock. I caught sight of one of those hated, evil, barbarian tribes with whom we have had so many problems before.]])
+		.. paragraphdivider() ..
+		_([[At first, I was naive and hoped that they were peaceful, but as soon as one of them saw me, they charged towards me and started attacking me with their throwing-spears. Thanks be to the Gods that I was able to flee and hide myself, before retreating back to our colony under cover of darkness.]])
+		.. paragraphdivider() ..
+		_([[Anyway, we must build up stronger military buildings as soon as possible.]]))
+		.. new_objectives(obj_build_bigger_military_buildings)
 }
 
 diary_page_9 = {
    title =_ "Command to Attack",
    posy=1,
    body= lutius(_"Diary of Lutius",
-_([[That’s good. The first large military building is complete and the mining infrastructure is getting better and better. ]] ..
-[[Now we should think about preparing ourselves for battle.]]))
-.. new_objectives(obj_remove_the_barbarians),
+		_([[That’s good. The first large military building is complete and the mining infrastructure is getting better and better. Now we should think about preparing ourselves for battle.]]))
+		.. new_objectives(obj_remove_the_barbarians)
 }
 
 diary_page_10 = {
    title =_ "Victory",
    posy=1,
-   body= lutius(
-_([[Today is a proud day. We have fought for our new home and risen victorious.]]) .. paragraphdivider() ..
-_([[There are still a few barbarians hiding on our island, but I am sure that we will find them soon. Every barbarian who doesn’t attack us will be put in a boat with the other peaceful ones, and sent back to their country.]]))
-..  objective_text(_"Victory",
-   _[[You have established a working economy, trained new soldiers and driven the barbarians from the island.]]
-),
+   body= lutius(_"Diary of Lutius",
+		_([[Today is a proud day. We have fought for our new home and risen victorious.]])
+		.. paragraphdivider() ..
+		_([[There are still a few barbarians hiding on our island, but I am sure that we will find them soon. Every barbarian who doesn’t attack us will be put in a boat with the other peaceful ones, and sent back to their country.]]))
+		..  objective_text(_"Victory",
+		_[[You have established a working economy, trained new soldiers and driven the barbarians from the island.]])
 }
 
 seven_days_later = {
@@ -253,16 +245,9 @@
    title =_ "A Message",
    posy=1,
    body= lutius(_"Diary of Lutius",
-_([[Today a pigeon landed on our island. ]] ..
-[[It brought a message which fills me with dark thoughts and brings back my fears.]]) .. paragraphdivider() ..
-_([[The message was addressed to me, begging me to come back to Fremil. It says that the Empire is at war with the Barbarians. They were attacked from the north by the tribe that I was forbidden to attack. It is clear to me what I must do...]]) .. paragraphdivider() ..
-_([[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]])),
-}
-
-amalea_2 = {
-   title =_ "Our New Tavern",
-   body= amalea(_"Amalea smiles",
-_([[Greetings, my friend, I just visited our new tavern ‘At the palms’. ]] ..
-[[The beer they serve is really tasty. You really should have a drink there, too.]]) .. paragraphdivider() ..
-_([[It is good to see that we have now got a warmer and more familiar environment on our island. Thank you, Lutius.]])),
+		_([[Today a pigeon landed on our island. It brought a message which fills me with dark thoughts and brings back my fears.]])
+		.. paragraphdivider() ..
+		_([[The message was addressed to me, begging me to come back to Fremil. It says that the Empire is at war with the Barbarians. They were attacked from the north by the tribe that I was forbidden to attack. It is clear to me what I must do...]])
+		.. paragraphdivider() ..
+		_([[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]])),
 }

=== modified file 'campaigns/t01.wmf/scripting/init.lua'
--- campaigns/t01.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ campaigns/t01.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -56,11 +56,6 @@
    sleep(500)
 end
 
--- Add an objective
-function add_obj(objective, player)
-   return player:add_objective(objective.name, objective.title, objective.body)
-end
-
 include "scripting/coroutine.lua"
 include "scripting/ui.lua"
 include "scripting/table.lua"

=== modified file 'campaigns/t01.wmf/scripting/initial_messages.lua'
--- campaigns/t01.wmf/scripting/initial_messages.lua	2014-04-03 12:46:12 +0000
+++ campaigns/t01.wmf/scripting/initial_messages.lua	2014-10-02 21:13:22 +0000
@@ -14,28 +14,29 @@
 -- Briefing message
 title = _"The Story Begins"
 msg = thron(_"Thron sighs...",
-_[[It’s been months, and we are still hiding where the forests are old and dark.]] .. paragraphdivider() ..
-_[[My warriors hunt at day and lie awake at night – listening to the sounds of the cruel slaughter echoing from afar amongst the ancient trees.]])
+	_[[It’s been months, and we are still hiding where the forests are old and dark.]]
+	.. paragraphdivider() ..
+	_[[My warriors hunt at day and lie awake at night – listening to the sounds of the cruel slaughter echoing from afar amongst the ancient trees.]])
 show_story_box(title, msg)
 
-msg =
-thron(
-_[[We can see the raging flames that swallow Al’thunran from here, miles away.]] .. paragraphdivider() ..
-_[[The red lights flash in the darkness and dance to the rhythm of the war drums that haunt me even in my nightmares.]])
+msg = thron(_"Thron continues...",
+	_[[We can see the raging flames that swallow Al’thunran from here, miles away.]]
+	.. paragraphdivider() ..
+	_[[The red lights flash in the darkness and dance to the rhythm of the war drums that haunt me even in my nightmares.]])
 show_story_box(title, msg, al_thunran)
 
-msg = thron(
-_[[My father’s bones rest peacefully in the ground on which he once ended the senseless spilling of blood that had arisen amongst us. It pains me that his peace only endured for one generation.]] .. paragraphdivider() ..
-_[[Boldreth, my loyal companion and friend is a source of peace and comfort to me in these dark times. He keeps my spirits high and those of my warriors awake, preventing greed or despair from destroying the bonds between us as well.]])
+msg = thron(_"Thron says...",
+	_[[My father’s bones rest peacefully in the ground on which he once ended the senseless spilling of blood that had arisen amongst us. It pains me that his peace only endured for one generation.]]
+	.. paragraphdivider() ..
+	_[[Boldreth, my loyal companion and friend is a source of peace and comfort to me in these dark times. He keeps my spirits high and those of my warriors awake, preventing greed or despair from destroying the bonds between us as well.]])
 show_story_box(title, msg, grave)
 
-msg = thron(
-_[[As father told me, there are times to fight and times to lie and wait, trying not to fall asleep or die before the right time comes. And so I do... wait.]])
+msg = thron(_"Thron says...",
+	_[[As father told me, there are times to fight and times to lie and wait, trying not to fall asleep or die before the right time comes. And so I do... wait.]])
 show_story_box(title, msg)
 sleep(2000)
 
 include "map:scripting/khantrukhs_talking.lua"
 end
 
-
 run(briefing_messages)

=== modified file 'campaigns/t01.wmf/scripting/khantrukhs_talking.lua'
--- campaigns/t01.wmf/scripting/khantrukhs_talking.lua	2014-03-25 06:18:48 +0000
+++ campaigns/t01.wmf/scripting/khantrukhs_talking.lua	2014-10-02 21:13:22 +0000
@@ -4,6 +4,7 @@
 
 include "map:scripting/texts.lua"
 include "scripting/coroutine.lua"
+include "scripting/messages.lua"
 include "scripting/objective_utils.lua"
 
 function check_quarries()
@@ -20,9 +21,9 @@
 
 function tutorial_thread()
    p = wl.Game().players[1]
-   show_story_box(_"Somebody Comes up to You", khantrukh_1)
+   show_story_box(_"Somebody approaches you", khantrukh_1)
    show_story_box(_"The Advisor", khantrukh_2, nil, 80, 80)
-   local o = add_obj(start_lumberjack_01, p)
+   local o = add_campaign_objective(start_lumberjack_01)
 
    -- Wait till the hut is build.
    while not check_for_buildings(p, {constructionsite = 1},
@@ -37,7 +38,7 @@
 
    p:message_box(_"The Advisor", khantrukh_4, { h = 400 })
    p:message_box(_"The Advisor", khantrukh_5, { h = 400 })
-   local o = add_obj(start_lumberjack_02, p)
+   local o = add_campaign_objective(start_lumberjack_02)
 
    -- Wait till the hut is build.
    while not check_for_buildings(p, {lumberjacks_hut = 1},
@@ -46,8 +47,8 @@
 
    p:message_box(_"The Advisor", khantrukh_6, { h = 400 })
    p:allow_buildings{"rangers_hut", "quarry"}
-   objq = add_obj(start_quarries, p)
-   objr = add_obj(start_ranger, p)
+   objq = add_campaign_objective(start_quarries)
+   objr = add_campaign_objective(start_ranger)
    run(check_ranger)
    run(check_quarries)
 

=== modified file 'campaigns/t01.wmf/scripting/texts.lua'
--- campaigns/t01.wmf/scripting/texts.lua	2014-07-14 10:45:44 +0000
+++ campaigns/t01.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -14,7 +14,7 @@
 
 start_lumberjack_01 = {
    name = "start_lumberjack_01",
-   title = _ "Build a lumberjack’s hut",
+   title = _"Build a lumberjack’s hut",
    number = 2,
    body = objective_text(_"Build a lumberjack’s hut",
       listitem_bullet(_"Press SPACE to see where you can build. The red house symbols show you where a small building – like a lumberjack’s hut – may be built.") ..
@@ -22,152 +22,154 @@
       listitem_bullet(_"Build a road between your headquarters and the construction site of the lumberjack’s hut.") ..
       listitem_arrow(_"When you place the lumberjack’s hut, a flag is created for it. You need to connect it to another flag by building a road between them. If you click on a flag and select to build a road, little symbols will appear around it to show you in which directions you can build it.") ..
       listitem_arrow(_"The colors of these symbols indicate how steep this part of the road will be. Green is for flat, yellow means steep and red stands for very steep. The steeper the road is, the harder it will be for your people to walk on it (and your wares will be transported more slowly).") ..
-      listitem_arrow(_"You can click on any of the symbols to build the first part of the road there. New symbols will appear to show you where the next part of the road can go, and so on. However, you can also click farther away from the flag to build several steps at once. Click on the flag at the headquarters to finish the road.")
-   ),
+      listitem_arrow(_"You can click on any of the symbols to build the first part of the road there. New symbols will appear to show you where the next part of the road can go, and so on. However, you can also click farther away from the flag to build several steps at once. Click on the flag at the headquarters to finish the road."))
 }
 
 start_lumberjack_01_01 = {
    name = "start_lumberjack_01_01",
-   title = _ "Build a lumberjack’s hut",
+   title = _"Build a lumberjack’s hut",
    number = 1,
    body = objective_text(_"Build a lumberjack’s hut",
       listitem_bullet(_"Press SPACE to see where you can build. The red house symbols show you where a small building – like a lumberjack’s hut – may be built.") ..
-      listitem_bullet(_"Build a lumberjack’s hut at the red house symbol just right of your headquarters by clicking on it and selecting a lumberjack’s hut.")
-   ),
+      listitem_bullet(_"Build a lumberjack’s hut at the red house symbol just right of your headquarters by clicking on it and selecting a lumberjack’s hut."))
 }
 
 start_lumberjack_01_02 = {
    name = "start_lumberjack_01_02",
-   title = _ "Build a road to the lumberjack’s hut",
+   title = _"Build a road to the lumberjack’s hut",
    number = 1,
    body = objective_text(_"Road to the lumberjack’ hut",
       listitem_bullet(_"Build a road between your headquarters and the construction site of the lumberjack’s hut.") ..
       listitem_arrow(_"When you place the lumberjack’s hut, a flag is created for it. You need to connect it to another flag by building a road between them. If you click on a flag and select to build a road, little symbols will appear around it to show you in which directions you can build it.") ..
       listitem_arrow(_"The colors of these symbols indicate how steep this part of the road will be. Green is for flat, yellow means steep and red stands for very steep. The steeper the road is, the harder it will be for your people to walk on it (and your wares will be transported more slowly).") ..
-      listitem_arrow(_"You can click on any of the symbols to build the first part of the road there. New symbols will appear to show you where the next part of the road can go, and so on. However, you can also click farther away from the flag to build several steps at once. Click on the flag at the headquarters to finish the road.")
-   ),
+      listitem_arrow(_"You can click on any of the symbols to build the first part of the road there. New symbols will appear to show you where the next part of the road can go, and so on. However, you can also click farther away from the flag to build several steps at once. Click on the flag at the headquarters to finish the road."))
 }
 
 start_lumberjack_02 = {
    name = "start_lumberjack_02",
-   title = _ "Build a second lumberjack’s hut",
+   title = _"Build a second lumberjack’s hut",
    number = 2,
    body = objective_text(_"Build a second lumberjack’s hut",
       listitem_bullet(_"Place a flag in the middle of the road. There is a flag symbol in the middle of the road you just built. You create a flag there by clicking on the symbol and then choosing the flag button in the menu that opens up. This will divide the road the wood is transported into two parts with one carrier each.") ..
       listitem_bullet(_"Place a lumberjack’s hut just south of the flag you just placed on the road. Connect the flag you just raised with the flag of the new lumberjack’s hut construction site afterwards. Note that instead of building a road step by step, you may also click directly at its destination to build the entire road at once.") ..
-      listitem_arrow(_"When many wares are being transported between two points, additional flags in between make them arrive at their destination faster, thus improving your infrastructure.")
-   ),
+      listitem_arrow(_"When many wares are being transported between two points, additional flags in between make them arrive at their destination faster, thus improving your infrastructure."))
 }
 
 start_lumberjack_02_01 = {
    name = "start_lumberjack_02_01",
-   title = _ "Build a second lumberjack’s hut",
+   title = _"Build a second lumberjack’s hut",
    number = 1,
    body = objective_text(_"Build a second lumberjack’s hut",
       listitem_bullet(_"Place a flag in the middle of the road. There is a flag symbol in the middle of the road you just built. You create a flag there by clicking on the symbol and then choosing the flag button in the menu that opens up. This will divide the road the wood is transported into two parts with one carrier each.") ..
-      listitem_arrow(_"When many wares are being transported between two points, additional flags in between make them arrive at their destination faster, thus improving your infrastructure.")
-   ),
+      listitem_arrow(_"When many wares are being transported between two points, additional flags in between make them arrive at their destination faster, thus improving your infrastructure."))
 }
 
 start_lumberjack_02_02 = {
    name = "start_lumberjack_02_02",
-   title = _ "Build a second lumberjack’s hut",
+   title = _"Build a second lumberjack’s hut",
    number = 1,
    body = objective_text(_"Build a second lumberjack’s hut",
-      listitem_bullet(_"Place a lumberjack’s hut just south of the flag you just placed on the road. Connect the flag you just raised with the flag of the new lumberjack’s hut construction site afterwards. Note that instead of building a road step by step, you may also click directly at its destination to build the entire road at once.")
-   ),
+      listitem_bullet(_"Place a lumberjack’s hut just south of the flag you just placed on the road. Connect the flag you just raised with the flag of the new lumberjack’s hut construction site afterwards. Note that instead of building a road step by step, you may also click directly at its destination to build the entire road at once."))
 }
 
 start_ranger = {
    name = "start_ranger",
-   title = _ "Build a ranger’s hut",
+   title = _"Build a ranger’s hut",
    number = 1,
    body = objective_text(_"Build a ranger’s hut",
-      listitem_bullet(_"Build a ranger’s hut to the east of the first lumberjack’s hut.")
-   ),
+      listitem_bullet(_"Build a ranger’s hut to the east of the first lumberjack’s hut."))
 }
 
 start_quarries = {
    name = "start_quarries",
-   title = _ "Build two quarries",
+   title = _"Build two quarries",
    number = 1,
    body = objective_text(_"Build two quarries",
-      listitem_bullet(_"Build two quarries south-west of your headquarters.")
-   ),
+      listitem_bullet(_"Build two quarries south-west of your headquarters."))
 }
 
 -- =======================================================================
 --                              Kankruth's texts
 -- =======================================================================
 
-khantrukh_1= khantrukh(_"An old man says...",
-_[[Hail, chieftain. I am Khantrukh and have seen many winters pass. Please allow me to aid you with my counsel through these darkened days.]])
+khantrukh_1 = khantrukh(_"An old man says...",
+	_[[Hail, chieftain. I am Khantrukh and have seen many winters pass. Please allow me to aid you with my counsel through these darkened days.]])
 
-khantrukh_2= khantrukh(_"Khantrukh continues...",
-_[[Only the gods know how long we have to remain hidden here. The warriors hope we may march back gloriously any day now, but I strongly doubt that will happen soon. And the days are already getting shorter and colder...]] .. paragraphdivider() ..
-_[[We should prepare, in case we have to face the winter in these harsh lands. I believe to the east of our campsite are a few places where we could raise a lumberjack’s hut.]])
-.. new_objectives(start_lumberjack_01_01)
+khantrukh_2 = khantrukh(_"Khantrukh continues...",
+	_[[Only the gods know how long we have to remain hidden here. The warriors hope we may march back gloriously any day now, but I strongly doubt that will happen soon. And the days are already getting shorter and colder...]]
+	.. paragraphdivider() ..
+	_[[We should prepare, in case we have to face the winter in these harsh lands. I believe to the east of our campsite are a few places where we could raise a lumberjack’s hut.]])
+	.. new_objectives(start_lumberjack_01_01)
 
 khantrukh_3 = khantrukh(_"The elder remarks...",
-_[[Obviously, it would be too exhausting for our people to walk all the way to the lumberjack’s hut through the wilderness. We will have to build a road between our hall and the lumberjack’s hut. It’s not a hard guess that the men would appreciate a way as short and plain as possible – the wood will surely be heavy enough, nevertheless.]])
-.. new_objectives(start_lumberjack_01_02)
+	_[[Obviously, it would be too exhausting for our people to walk all the way to the lumberjack’s hut through the wilderness. We will have to build a road between our hall and the lumberjack’s hut. It’s not a hard guess that the men would appreciate a way as short and plain as possible – the wood will surely be heavy enough, nevertheless.]])
+	.. new_objectives(start_lumberjack_01_02)
 
 khantrukh_4 = khantrukh(_"Khantrukh remembers...",
-_[[There is an old saying:]] .. paragraphdivider() ..
-_[[‘A burden divided is easier to endure.’]] .. paragraphdivider() ..
-_[[A crossroads on the road between our headquarters and the lumberjack’s hut would ease the work of our carriers.]])
-.. new_objectives(start_lumberjack_02_01)
+	_[[There is an old saying:]]
+	.. paragraphdivider() ..
+	_[[‘A burden divided is easier to endure.’]]
+	.. paragraphdivider() ..
+	_[[A crossroads on the road between our headquarters and the lumberjack’s hut would ease the work of our carriers.]])
+	.. new_objectives(start_lumberjack_02_01)
 
 khantrukh_5 = khantrukh(_"The old man looks to the sky...",
-_[[The northern winds tell us that the coming winter will be a long and cruel one. One lumberjack’s hut will not be enough to serve the needs of our people. More trees await our axes just south of our new crossroads – let us raise a second lumberjack’s hut there!]])
-.. new_objectives(start_lumberjack_02_02)
+	_[[The northern winds tell us that the coming winter will be a long and cruel one. One lumberjack’s hut will not be enough to serve the needs of our people. More trees await our axes just south of our new crossroads – let us raise a second lumberjack’s hut there!]])
+	.. new_objectives(start_lumberjack_02_02)
 
 khantrukh_6 = khantrukh(_"Khantrukh nods...",
-_[[Of course, if we intended to build a bigger settlement, many more lumberjack’s huts would be advisable, but this should suffice for now.]] .. paragraphdivider() ..
-_[[But never forget – these forests are our heritage, entrusted upon us by our ancestors. We must always respect and care for them. What we take, we must give back again.]] .. paragraphdivider() ..
-_[[So, in order to replace the trees we chop down, we should build a ranger’s hut, preferably close to the lumberjack’s hut.]])
-.. new_objectives(start_ranger)
+	_[[Of course, if we intended to build a bigger settlement, many more lumberjack’s huts would be advisable, but this should suffice for now.]]
+	.. paragraphdivider() ..
+	_[[But never forget – these forests are our heritage, entrusted upon us by our ancestors. We must always respect and care for them. What we take, we must give back again.]]
+	.. paragraphdivider() ..
+	_[[So, in order to replace the trees we chop down, we should build a ranger’s hut, preferably close to the lumberjack’s hut.]])
+	.. new_objectives(start_ranger)
 
 khantrukh_7 = khantrukh(_"The elder speaks...",
-_[[I am well aware, chieftain, that neither you nor your warriors have the desire to stay in this forsaken place for long. But even so, our war to reconquer our home might take a long time and it would seem wise to make preparations.]]
-.. paragraphdivider() ..
-_[[I would advise that we obtain stones for the future – who knows what fortifications we might be forced to build very soon. And – like a gift of destiny – there are indeed great rocks just nearby...]])
-.. new_objectives(start_quarries)
+	_[[I am well aware, chieftain, that neither you nor your warriors have the desire to stay in this forsaken place for long. But even so, our war to reconquer our home might take a long time and it would seem wise to make preparations.]]
+	.. paragraphdivider() ..
+	_[[I would advise that we obtain stones for the future – who knows what fortifications we might be forced to build very soon. And – like a gift of destiny – there are indeed great rocks just nearby...]])
+	.. new_objectives(start_quarries)
 
-khantrukh_8 = khantrukh(_[[Very well done, chieftain. We now have all we need to face the winter and may prepare ourselves for the battles ahead.]])
-..  objective_text(_"Victory",
-   _[[You may continue to play this map if you wish. Otherwise, move on to the next mission.]]
+khantrukh_8 = khantrukh(_"Khantrukh is satisfied...",
+	_[[Very well done, chieftain. We now have all we need to face the winter and may prepare ourselves for the battles ahead.]])
+	..  objective_text(_"Victory",
+	_[[You may continue to play this map if you wish. Otherwise, move on to the next mission.]]
 )
 
 -- =======================================================================
 --                  General story texts by the chieftain
 -- =======================================================================
 story_msg1 = {
+	field = al_thunran,
    title = _"In the Night",
    msg = thron(_"Thron says...",
-_[[During another sleepless night, I went up to the hill and gazed towards the north. The fires are still burning, satisfying their hunger upon my father’s legacy.]] .. paragraphdivider() ..
-_[[They are a constant reminder of why we have to hide here... and why we must return in the end!]]),
-field = al_thunran,
+		_[[During another sleepless night, I went up to the hill and gazed towards the north. The fires are still burning, satisfying their hunger upon my father’s legacy.]]
+		.. paragraphdivider() ..
+		_[[They are a constant reminder of why we have to hide here... and why we must return in the end!]])
 }
 
-story_msg2= {
+story_msg2 = {
+	field = grave,
    title = _"At the Tomb",
    msg = thron(_"Thron says...",
-_[[Once again, I went up to my father’s tomb, in a sacred grove at the foot of the great spire of Kal’mavrath. I just stood there and felt neither the hours pass nor the cold rain pouring down from the darkened sky...]] .. paragraphdivider() ..
-_[[Somehow, it felt like a farewell. For the first time, I wondered what the future might hold for me...]]),
-field = grave,
+		_[[Once again, I went up to my father’s tomb, in a sacred grove at the foot of the great spire of Kal’mavrath. I just stood there and felt neither the hours pass nor the cold rain pouring down from the darkened sky...]]
+		.. paragraphdivider() ..
+		_[[Somehow, it felt like a farewell. For the first time, I wondered what the future might hold for me...]])
 }
 
 story_msg3 = {
-  title=_ "The Other Day",
+  title= _"The Other Day",
   msg = thron(_"Thron says thoughtfully...",
-_[[Some time ago, Boldreth came to me. His advice was to move to a place closer to home – to strike at the first sign of my brothers’ forces wavering.]] .. paragraphdivider() ..
-_[[But when I look over the forests I can still see black smoke rising to the sky. I know – it is too early yet, and what he hopes for will not happen any time soon. He might still be right, but I fear the bloodshed that returning too fast would cause both on our and the other side...]])
+	_[[Some time ago, Boldreth came to me. His advice was to move to a place closer to home – to strike at the first sign of my brothers’ forces wavering.]]
+	.. paragraphdivider() ..
+	_[[But when I look over the forests I can still see black smoke rising to the sky. I know – it is too early yet, and what he hopes for will not happen any time soon. He might still be right, but I fear the bloodshed that returning too fast would cause both on our and the other side...]])
 }
 
 story_msg4 = {
-title =_ "The Oath",
+title = _"The Oath",
 msg = thron(_"Thron looks furious...",
-_[[Today, my warriors picked up an old man, wandering sick and wounded through the dark forest. We listened in horror as he told us of the atrocities taking place in Al’thunran.]] .. paragraphdivider() ..
-_[[I hereby renew my oath – I will stop this madness at any cost!]])
+	_[[Today, my warriors picked up an old man, wandering sick and wounded through the dark forest. We listened in horror as he told us of the atrocities taking place in Al’thunran.]]
+	.. paragraphdivider() ..
+	_[[I hereby renew my oath – I will stop this madness at any cost!]])
 }

=== modified file 'campaigns/t02.wmf/scripting/mission_thread.lua'
--- campaigns/t02.wmf/scripting/mission_thread.lua	2014-08-26 17:25:00 +0000
+++ campaigns/t02.wmf/scripting/mission_thread.lua	2014-10-02 21:13:22 +0000
@@ -3,39 +3,30 @@
 -- =======================================================================
 
 include "map:scripting/mission_thread_texts.lua"
+include "scripting/messages.lua"
+include "scripting/table.lua"
 include "scripting/ui.lua"
-include "scripting/table.lua"
 
 quarry_done = false
 enhance_buildings_done = false
 build_materials_done = false
 cattle_farm_done = false
 
-function send_msg(t)
-   t.h = 400
-   plr:message_box(t.title, t.body, t)
-end
-
-function add_obj(t)
-   return plr:add_objective(t.name, t.title, t.body)
-end
-
-
 -- ==============================================
 -- First messages player at beginning of mission
 -- ==============================================
 function introduction_thread()
    sleep(2000)
 
-   send_msg(briefing_msg_1)
-   send_msg(briefing_msg_2)
-   send_msg(briefing_msg_3)
+   campaign_message_box(briefing_msg_1)
+   campaign_message_box(briefing_msg_2)
+   campaign_message_box(briefing_msg_3)
 
-   send_msg(order_msg_1)
-   send_msg(order_msg_2)
+   campaign_message_box(order_msg_1)
+   campaign_message_box(order_msg_2)
 
    -- Reveal the rocks
-   local obj = add_obj(obj_claim_northeastern_rocks)
+   local obj = add_campaign_objective(obj_claim_northeastern_rocks)
 
    local rocks = wl.Game().map:get_field(27, 48)
    local intermediate_point = wl.Game().map:get_field(31,12)
@@ -43,8 +34,8 @@
    local way1 = scroll_smoothly_to(intermediate_point, 1500)
    local way2 = scroll_smoothly_to(rocks, 1500)
 
-   send_msg(order_msg_3)
-   send_msg(order_msg_4)
+   campaign_message_box(order_msg_3)
+   campaign_message_box(order_msg_4)
 
    -- Move back to HQ
    timed_scroll(array_reverse(way2), 10)
@@ -57,7 +48,7 @@
    end
    obj.done = true
 
-   send_msg(order_msg_5_quarry)
+   campaign_message_box(order_msg_5_quarry)
 
    quarry_done = true
 end
@@ -75,8 +66,8 @@
    end
 
    -- Send a msg and add the objective
-   send_msg(order_msg_6_geologist)
-   o = add_obj(obj_build_mines)
+   campaign_message_box(order_msg_6_geologist)
+   o = add_campaign_objective(obj_build_mines)
    plr:allow_buildings{
       "coalmine",
       "oremine",
@@ -89,12 +80,12 @@
       sleep(5000)
    end
    o.done = true
-   send_msg(order_msg_7_mines_up)
-   send_msg(order_msg_8_mines_up)
-   send_msg(order_msg_9_hunter)
-   send_msg(order_msg_10_bread)
+   campaign_message_box(order_msg_7_mines_up)
+   campaign_message_box(order_msg_8_mines_up)
+   campaign_message_box(order_msg_9_hunter)
+   campaign_message_box(order_msg_10_bread)
 
-   local obj_bf = add_obj(obj_basic_food)
+   local obj_bf = add_campaign_objective(obj_basic_food)
    -- The function to check for completeness
    run(function()
       local tavern_msg_done = nil
@@ -104,11 +95,11 @@
             "hunters_hut", "gamekeepers_hut", "tavern"
          }
          if #rv.hunters_hut >= 1 and not hunter_msg_done then
-            send_msg(order_msg_11_basic_food_began)
+            campaign_message_box(order_msg_11_basic_food_began)
             hunter_msg_done = true
          end
          if #rv.tavern >= 1 and not tavern_msg_done then
-            send_msg(order_msg_13_tavern)
+            campaign_message_box(order_msg_13_tavern)
             tavern_msg_done = true
          end
          if #rv.hunters_hut >= 1 and #rv.gamekeepers_hut >= 1
@@ -118,7 +109,7 @@
       obj_bf.done = true
    end)
 
-   local obj_farming = add_obj(obj_begin_farming)
+   local obj_farming = add_campaign_objective(obj_begin_farming)
 
    -- Start the cattlefarm thread
    run(cattle_farm)
@@ -131,7 +122,7 @@
          end
          sleep(4234)
       end
-      send_msg(order_msg_12_farming_began)
+      campaign_message_box(order_msg_12_farming_began)
       obj_farming.done = true
    end)
 
@@ -151,19 +142,19 @@
    end
 
    -- Ready to build refiner stuff
-   send_msg(order_msg_14_refine_ore)
+   campaign_message_box(order_msg_14_refine_ore)
    plr:allow_buildings{"smelting_works"}
-   o = add_obj(obj_refine_ores)
+   o = add_campaign_objective(obj_refine_ores)
    while #plr:get_buildings("smelting_works") < 1 do
       sleep(6223)
    end
    o.done = true
 
    -- Information about making mines deeper
-   send_msg(order_msg_15_mines_exhausted)
+   campaign_message_box(order_msg_15_mines_exhausted)
    plr:allow_buildings{ "deep_coalmine", "inn", "micro-brewery" }
    -- objective.check will make sure that this i finished
-   local obj = add_obj(obj_enhance_buildings)
+   local obj = add_campaign_objective(obj_enhance_buildings)
 
    run(function()
       while not check_for_buildings(plr,
@@ -192,15 +183,15 @@
       sleep(5421)
    end
 
-   send_msg(order_msg_16_blackwood)
+   campaign_message_box(order_msg_16_blackwood)
    plr:allow_buildings{"hardener"}
-   local o = add_obj(obj_better_material_1)
+   local o = add_campaign_objective(obj_better_material_1)
    while #plr:get_buildings("hardener") < 1 do sleep(5421) end
    o.done = true
 
-   send_msg(order_msg_17_grindstone)
+   campaign_message_box(order_msg_17_grindstone)
    plr:allow_buildings{"lime_kiln", "well", "charcoal_kiln"}
-   o = add_obj(obj_better_material_2)
+   o = add_campaign_objective(obj_better_material_2)
    -- Wait for the buildings to be build
    while true do
       local rv = plr:get_buildings{"lime_kiln", "well",
@@ -213,12 +204,12 @@
    end
    o.done = true
 
-   send_msg(order_msg_18_reed_yard)
+   campaign_message_box(order_msg_18_reed_yard)
    plr:allow_buildings{"reed_yard"}
-   o = add_obj(obj_better_material_3)
+   o = add_campaign_objective(obj_better_material_3)
    while #plr:get_buildings("reed_yard") < 1 do sleep(5421) end
 
-   send_msg(order_msg_19_all_material)
+   campaign_message_box(order_msg_19_all_material)
    o.done = true
 
    build_materials_done = true
@@ -232,9 +223,9 @@
       sleep(7834)
    end
 
-   send_msg(msg_cattlefarm_00)
+   campaign_message_box(msg_cattlefarm_00)
 
-   local o = add_obj(obj_build_cattlefarm)
+   local o = add_campaign_objective(obj_build_cattlefarm)
    plr:allow_buildings{"cattlefarm"}
 
    while not check_for_buildings(plr, { cattlefarm = 1 }) do
@@ -251,10 +242,10 @@
 -- ======================
 function story_messages_thread()
    wake_me(180 * 1000)
-   send_msg(msg_story_2)
+   campaign_message_box(msg_story_2)
 
    wake_me(600 * 1000)
-   send_msg(msg_story_1)
+   campaign_message_box(msg_story_1)
 end
 
 -- =================
@@ -266,7 +257,7 @@
          sleep(10000)
    end
 
-   send_msg(msg_mission_complete)
+   campaign_message_box(msg_mission_complete)
    plr:reveal_scenario("barbariantut02")
 end
 
@@ -284,7 +275,7 @@
 
    pts = scroll_smoothly_to(wl.Game().map:get_field(55, 25), 3000)
 
-   send_msg(msg_village)
+   campaign_message_box(msg_village)
 
    timed_scroll(array_reverse(pts), 10)
    sleep(1500)

=== modified file 'campaigns/t02.wmf/scripting/mission_thread_texts.lua'
--- campaigns/t02.wmf/scripting/mission_thread_texts.lua	2014-08-26 17:25:00 +0000
+++ campaigns/t02.wmf/scripting/mission_thread_texts.lua	2014-10-02 21:13:22 +0000
@@ -20,123 +20,109 @@
 -- =======================================================================
 obj_claim_northeastern_rocks = {
    name = "mission quarry",
-   title =_"Expand north-east and build a quarry",
+   title = _"Expand north-east and build a quarry",
    number = 1,
-   body = objective_text(_"Expand north-east to the stones", 
+   body = objective_text(_"Expand north-east to the stones",
       listitem_bullet(_"Build military buildings (like sentries or barriers) to expand your territory.") ..
-      listitem_bullet(_"Get to the rocks north-east from you and build a quarry there.")
-   ),
+      listitem_bullet(_"Get to the rocks north-east from you and build a quarry there."))
 }
 
 obj_build_mines = {
-   name="mission mines",
-   title=_"Start building mines on the mountain",
+   name = "mission mines",
+   title = _"Start building mines on the mountain",
    number = 2,
-   body= objective_text(_"Build coal and iron ore mines",
+   body = objective_text(_"Build coal and iron ore mines",
       listitem_bullet(_"Build a coal mine and an iron ore mine.") ..
       listitem_arrow(_"To do so, place a flag up on the mountain’s flank to the east (on mountain terrain though, not mountain meadow). When you click on the new flag, you can send geologists there. Because the flag is on a mountain, the geologists will search for ores; otherwise, they would search for water. Then build a mine for both kinds of resources that he will find, choosing the mine to be built appropriately:") ..
-_[[Black – coal]] .. "<br>" ..
-_[[Red – iron ore]] .. "<br>" ..
-_[[Yellow – gold]] .. "<br>" ..
-_[[Grey – granite]] .. paragraphdivider() ..
-_[[Mines can only be built on mountain terrain. Suitable places for mines are displayed as orange mine symbols.]]
-   )
+      _[[Black – coal]] .. "<br>" ..
+      _[[Red – iron ore]] .. "<br>" ..
+      _[[Yellow – gold]] .. "<br>" ..
+      _[[Grey – granite]]
+      .. paragraphdivider() ..
+      _[[Mines can only be built on mountain terrain. Suitable places for mines are displayed as orange mine symbols.]])
 }
 
 obj_basic_food = {
-   name="basic food began",
-   title=_"Provide your miners with food",
+   name = "basic food began",
+   title = _"Provide your miners with food",
    number = 3,
-   body= objective_text(_"Build a hunter, a gamekeeper and a tavern", 
+   body = objective_text(_"Build a hunter, a gamekeeper and a tavern",
       listitem_bullet(_"In order to work, your miners need food.") ..
       listitem_arrow(_"A hunter can hunt down animals, while a gamekeeper prevents them from becoming extinct. The meat is then processed in a tavern into lunches for your miners.") ..
-_([[This is only the first example of a ware which has to be refined before being used in a secondary building]] ..
-[[ – others will follow.]])
-   )
+      _([[This is only the first example of a ware which has to be refined before being used in a secondary building – others will follow.]]))
 }
 
 obj_begin_farming = {
-   name="farming began",
-   title=_"Bake bread",
+   name = "farming began",
+   title = _"Bake bread",
    number = 3,
-   body=objective_text(_ "Build a well, a farm and a bakery", _(
-[[Other ways to produce food – different kinds of food – are fishers and hunters. ]] ..
-[[The wheat of the farms has to be processed with water in a bakery before it becomes edible. ]] ..
-[[You can obtain water by building a well at a spot where your geologists have found a water source.]]
-   ))
+   body = objective_text(_"Build a well, a farm and a bakery",
+		_([[Other ways to produce food – different kinds of food – are fishers and hunters. The wheat of the farms has to be processed with water in a bakery before it becomes edible. You can obtain water by building a well at a spot where your geologists have found a water source.]]))
 }
 
 obj_refine_ores = {
-   name="refining began",
-   title=_"Refine your mined resources",
+   name = "refining began",
+   title = _"Refine your mined resources",
    number = 1,
-   body= objective_text(_ "Build a smelting works", _
-[[The iron ore your miners dig up is not usable yet – it has to be melted into iron first.]]
-   )
+   body = objective_text(_"Build a smelting works",
+		_[[The iron ore your miners dig up is not usable yet – it has to be melted into iron first.]])
 }
 
 obj_enhance_buildings = {
-   name="enhance buildings",
-   title=_"Enhance buildings and build a micro brewery",
+   name = "enhance buildings",
+   title = _"Enhance buildings and build a micro brewery",
    number = 3,
-   body= objective_text(_[[Enhance the coal mine and the tavern, and build a micro brewery.]],
+   body = objective_text(_[[Enhance the coal mine and the tavern, and build a micro brewery.]],
       listitem_bullet(_"Enhance the coal mine and the tavern to the better versions of their buildings respectively.") ..
       listitem_bullet(_"Also build a micro brewery.") ..
       listitem_arrow(_"A normal mine can only dig up about one third of all the resources lying beneath it; then it must be enhanced to a deep mine in order to keep it working properly. To enhance a building, choose it and then click the appropriate button in the appearing window.")  ..
       listitem_arrow(_"Workers gain experience by successful work. With enough experience, they become more advanced workers, who are necessary to operate the enhanced buildings. Do not enhance a building before you have enough advanced workers to operate the advanced building!") ..
       listitem_arrow(_"Such buildings usually have greater demands than the basic kind of that building – for instance, deep mines need snacks instead of rations. You will have to enhance your tavern to an inn in order to produce snacks out of pitta bread AND a second kind of food (meat or fish) AND beer.") ..
-      _"You may of course enhance all mines to deep mines instantly given you have the workers – bigger mines work a bit faster, smaller mines need cheaper food. It’s up to you which strategy you prefer."
-   )
+      _"You may of course enhance all mines to deep mines instantly given you have the workers – bigger mines work a bit faster, smaller mines need cheaper food. It’s up to you which strategy you prefer.")
 }
 
 obj_better_material_1 = {
-   name="built hardener",
-   title=_"Build a wood hardener",
+   name = "built hardener",
+   title = _"Build a wood hardener",
    number = 1,
-   body= objective_text(_ "Build a wood hardener", _(
-[[Bigger and better buildings – including all military ones – require better building materials. ]] ..
-[[They cannot be built out of simple logs – the wood has to be refined to blackwood by a wood hardener first. ]] ..
-[[Always remember to build a wood hardener before you run out of blackwood, as without it you cannot expand.]] ..
-      listitem_bullet(_"Build a wood hardener")
-   ))
+   body = objective_text(_"Build a wood hardener",
+		_([[Bigger and better buildings – including all military ones – require better building materials. They cannot be built out of simple logs – the wood has to be refined to blackwood by a wood hardener first. Always remember to build a wood hardener before you run out of blackwood, as without it you cannot expand.]])
+		.. paragraphdivider() ..
+      listitem_bullet(_"Build a wood hardener"))
 }
 
 obj_better_material_2 = {
-   name="mission grindstone",
-   title=_"Build a lime kiln and coal economy",
+   name = "mission grindstone",
+   title = _"Build a lime kiln and coal economy",
    number = 3,
-   body=objective_text(_"Build a lime kiln, a well and a charcoal kiln, or a coal mine", _(
-[[Better buildings may also require other improved materials besides blackwood. ]] ..
-[[One of these is grout, which is produced out of raw stone, water and coal by a lime-burner.]]) .. paragraphdivider() ..
-_([[You can obtain water by building a well upon a water source, ]] ..
-[[which your geologists can discover when you send them to any flag that is not on a mountain. ]] ..
-[[Coal can be obtained by building a charcoal kiln or a coal mine.]] ..
-      listitem_bullet(_"Build a lime kiln, a well and a charcoal kiln, or a coal mine")
-   ))
+   body = objective_text(_"Build a lime kiln, a well and a charcoal kiln, or a coal mine",
+		_([[Better buildings may also require other improved materials besides blackwood. One of these is grout, which is produced out of raw stone, water and coal by a lime-burner.]])
+		.. paragraphdivider() ..
+		_([[You can obtain water by building a well upon a water source, which your geologists can discover when you send them to any flag that is not on a mountain. Coal can be obtained by building a charcoal kiln or a coal mine.]])
+		.. paragraphdivider() ..
+      listitem_bullet(_"Build a lime kiln, a well and a charcoal kiln, or a coal mine"))
 }
 
 obj_better_material_3 = {
-   name="mission reed_yard",
-   title=_"Build a reed yard",
+   name = "mission reed_yard",
+   title = _"Build a reed yard",
    number = 1,
-   body= objective_text(_"Build a reed yard", _(
-[[The third material necessary for improved buildings is thatch reed, used to cover roofs. ]] ..
-[[Thatch reed is planted by a gardener around his building, the reed yard.]] ..
-      listitem_bullet(_"Build a reed yard")
-   ))
+   body = objective_text(_"Build a reed yard",
+		_([[The third material necessary for improved buildings is thatch reed, used to cover roofs. Thatch reed is planted by a gardener around his building, the reed yard.]])
+		.. paragraphdivider() ..
+      listitem_bullet(_"Build a reed yard"))
 }
 
 obj_build_cattlefarm = {
    name = "mission cattlefarm",
-   title = _ "Build a cattle farm",
+   title = _"Build a cattle farm",
    number = 1,
-   body = objective_text(_"Build a cattle farm", _(
-[[When roads are under heavy load for a long time, one carrier is usually not enough to transport goods swiftly. ]] ..
-[[Traffic jams are the consequence. Such roads therefore employ a second carrier: ]] ..
-[[An ox that helps to carry the wares. This doubles the transport capacity.]]) .. paragraphdivider() ..
-_[[Oxen are bred in cattle farms out of wheat and water.]] ..
-      listitem_bullet(_"Build a cattle farm")
-   )
+   body = objective_text(_"Build a cattle farm",
+		_([[When roads are under heavy load for a long time, one carrier is usually not enough to transport goods swiftly. Traffic jams are the consequence. Such roads therefore employ a second carrier: An ox that helps to carry the wares. This doubles the transport capacity.]])
+		.. paragraphdivider() ..
+		_[[Oxen are bred in cattle farms out of wheat and water.]]
+		.. paragraphdivider() ..
+      listitem_bullet(_"Build a cattle farm"))
 }
 
 
@@ -144,274 +130,221 @@
 --                     Texts for the Main Mission Thread
 -- =======================================================================
 briefing_msg_1 = {
-   title =_ "The Story Continues",
+   title = _"The Story Continues",
    body = thron(_"Thron is shaking his head...",
-_([[The war goes on. More and more of our brothers and sisters flee the brutal war raging ]] ..
-[[in the capital beneath the trees.]]) .. paragraphdivider() ..
-_([[The stories they tell about the deeds of our kin are sad to hear. ]] ..
-[[I’ve spent nights lying awake, restless, more tired than I ever believed one could be. ]] ..
-[[Yet whenever I close my eyes, I see the fortress my father built consumed by flames. ]] ..
-[[The Throne Among the Trees, the symbol of unity and peace among our kin, became the wedge that drives us apart.]])
-   )
+		_([[The war goes on. More and more of our brothers and sisters flee the brutal war raging in the capital beneath the trees.]])
+		.. paragraphdivider() ..
+		_([[The stories they tell about the deeds of our kin are sad to hear. I’ve spent nights lying awake, restless, more tired than I ever believed one could be. Yet whenever I close my eyes, I see the fortress my father built consumed by flames. The Throne Among the Trees, the symbol of unity and peace among our kin, became the wedge that drives us apart.]]))
 }
 
 briefing_msg_2 = {
-   title =_ "The Story Continues",
-   body = thron(
-_([[Today my hunters brought men, women and little children before me who had hidden out in the forests, ]] ..
-[[trying to escape the war, hate and revenge that rage among the tribes fighting each other like in olden times, ]] ..
-[[when we were no more but wild beasts driven and controlled by instincts. ]] ..
-[[None of my brothers will ever gain and hold control over the wooden throne, ]] ..
-[[none of the tribes will be strong enough to subdue the other. T]] ..
-[[here will be no end to this slaughter, unless... is this it? As father told me?]]) .. paragraphdivider() ..
-_([[To rise against whoever threatens our very existence, even tough it may be one of your own blood or mind?]])
-   )
+   title = _"The Story Continues",
+   body = thron(_"Thron recalls",
+		_([[Today my hunters brought men, women and little children before me who had hidden out in the forests, trying to escape the war, hate and revenge that rage among the tribes fighting each other like in olden times, when we were no more but wild beasts driven and controlled by instincts. None of my brothers will ever gain and hold control over the wooden throne, none of the tribes will be strong enough to subdue the other. There will be no end to this slaughter, unless... is this it? As father told me?]])
+		.. paragraphdivider() ..
+		_([[To rise against whoever threatens our very existence, even tough it may be one of your own blood or mind?]]))
 }
 
 
 briefing_msg_3 = {
-   title =_ "The Story Continues",
-   body = thron(
-_([[Boldreth seems more and more torn as the days go by. ]] ..
-[[The spirits of my fellows sink as the cold season approaches, and we are still living in no more than huts and barracks. ]] ..
-[[I never intended to stay out here in the wilderness for so long]] ..
-[[ – but I never thought my brothers would engage in this senseless battle for so long either.]]) .. paragraphdivider() ..
-_([[Perhaps it’s time to make ourselves feel a little more at ease here. ]] ..
-[[Perhaps it’s time to give those who still live and think united a new home, ]] ..
-[[replacing what is now lost to us? Until we can return to the place we once called our home...]])
-   )
+   title = _"The Story Continues",
+   body = thron(_"Thron is worried",
+		_([[Boldreth seems more and more torn as the days go by. The spirits of my fellows sink as the cold season approaches, and we are still living in no more than huts and barracks. I never intended to stay out here in the wilderness for so long – but I never thought my brothers would engage in this senseless battle for so long either.]])
+		.. paragraphdivider() ..
+		_([[Perhaps it’s time to make ourselves feel a little more at ease here. Perhaps it’s time to give those who still live and think united a new home, replacing what is now lost to us? Until we can return to the place we once called our home...]]))
 }
 
 
 order_msg_1 = {
-   title=_"Your Loyal Companion",
+   title = _"Your Loyal Companion",
    body = boldreth(_"Brave Boldreth steps to your side...",
-_([[So you want to prepare us for a longer stay in these forests, Thron? ]] ..
-[[Well, I see the wisdom in doing so, yet my heart is yearning for a glorious return to Al’thunran. ]] ..
-[[Too long have we waited while our brethren have fought on the battlefield, ]] ..
-[[and our axes and swords have turned rusty over time.]])
-   )
+		_([[So you want to prepare us for a longer stay in these forests, Thron? Well, I see the wisdom in doing so, yet my heart is yearning for a glorious return to Al’thunran. Too long have we waited while our brethren have fought on the battlefield, and our axes and swords have turned rusty over time.]]))
 }
 
 
 order_msg_2 = {
-   title =_ "The Advisor",
+   title = _"The Advisor",
    body = khantrukh(_"Khantrukh joins in ...",
-_([[I beg your forgiveness, chieftain, but I have a grave concern to discuss with you. ]] ..
-[[The rocks close to our camp are shrinking fast under our workers’ tools, ]] ..
-[[and it is a matter of little time only before they are all gone.]])
-   )
+		_([[I beg your forgiveness, chieftain, but I have a grave concern to discuss with you. The rocks close to our camp are shrinking fast under our workers’ tools, and it is a matter of little time only before they are all gone.]]))
 }
 
 order_msg_3 = {
-   title=_"Your Loyal Companion",
+   title= _"Your Loyal Companion",
    posx = 0,
-   body = boldreth( _"Boldreth jumps up...",
-_([[While it is certainly no worthy task for a warrior, at least it is something to do! ]] ..
-[[Thron, what would you say about my taking a few of our most restless warriors ]] ..
-[[and venturing somewhat closer to the great mountain of Kal’mavrath]] ..
-[[ – maybe we will find some more big stones to please the old man?]])
-      ) .. new_objectives(obj_claim_northeastern_rocks),
+   body = boldreth(_"Boldreth jumps up...",
+		_([[While it is certainly no worthy task for a warrior, at least it is something to do! Thron, what would you say about my taking a few of our most restless warriors and venturing somewhat closer to the great mountain of Kal’mavrath – maybe we will find some more big stones to please the old man?]]))
+		.. new_objectives(obj_claim_northeastern_rocks)
 }
 
 order_msg_4 = {
-   title =_ "The Advisor",
+   title = _"The Advisor",
    posx = 0,
-   body = khantrukh( _"Khantrukh grumbles...", _
-   [[Old man? Disrespectful youth!]]
-   )
+   body = khantrukh(_"Khantrukh grumbles...",
+		_[[Old man? Disrespectful youth!]])
 }
 
 order_msg_5_quarry = {
-   title=_"The Advisor",
-   body= khantrukh( _"Khantrukh nods satisfied...", _
-[[At last! These rocks should last for a while.]]
-   )
+   title = _"The Advisor",
+   body = khantrukh(_"Khantrukh nods satisfied...",
+		_[[At last! These rocks should last for a while.]])
 }
 
 order_msg_6_geologist = {
-   title=_"Your Loyal Companion",
-   body=boldreth(_"Boldreth exclaims...",
-_([[Just look at that! In the east is the great mountain of Kal’mavrath! ]] ..
-[[I wonder what treasures nature might have hidden beneath its majestic flanks!]]) .. paragraphdivider() ..
-_([[Let’s expand to the east. There’s a chance for the elderly to become useful once in a while! ]] ..
-[[Let us send out some of those who understand the stone’s tongue to unravel the mountain’s secrets!]])
-   ) .. new_objectives(obj_build_mines)
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth exclaims...",
+		_([[Just look at that! In the east is the great mountain of Kal’mavrath! I wonder what treasures nature might have hidden beneath its majestic flanks!]])
+		.. paragraphdivider() ..
+		_([[Let’s expand to the east. There’s a chance for the elderly to become useful once in a while! Let us send out some of those who understand the stone’s tongue to unravel the mountain’s secrets!]]))
+		.. new_objectives(obj_build_mines)
 }
 
 order_msg_7_mines_up = {
-   title=_"Your Loyal Companion",
-   body=boldreth(_"Boldreth laughs...",
-_([[By Chat’Karuth’s beard, this is amazing! Just imagine what we can use this coal and iron ore for!]]) .. paragraphdivider() ..
-_([[It might even be enough to...]])
-   )
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth laughs...",
+		_([[By Chat’Karuth’s beard, this is amazing! Just imagine what we can use this coal and iron ore for!]])
+		.. paragraphdivider() ..
+		_([[It might even be enough to...]]))
 }
 
 order_msg_8_mines_up = {
-   title=_"The Advisor",
-   body =khantrukh(_"Khantrukh interrupts...",
-_([[While this is true, we should consider it later, for now other obstacles are at hand. ]] ..
-[[The miners will definitely demand greater rations for working high up on the mountain in this bitter cold, ]] ..
-[[and providing these supplies may not be easy.]])
-   )
+   title = _"The Advisor",
+   body = khantrukh(_"Khantrukh interrupts...",
+		_([[While this is true, we should consider it later, for now other obstacles are at hand. The miners will definitely demand greater rations for working high up on the mountain in this bitter cold, and providing these supplies may not be easy.]]))
 }
 
 
 order_msg_9_hunter = {
-   title=_"Your Loyal Companion",
-   body=boldreth(_"Boldreth nods...",
-_([[I have to hand it to you: you are right here, old man.]]) .. paragraphdivider() ..
-_([[There seem to be quite a lot of animals in the forests here – we might just hunt down more of them. ]] ..
-[[And, of course, the people would cheer a new tavern – hey, we might call it ‘Thron’s Pride’ or so if you want!]])
-   ) .. new_objectives(obj_basic_food)
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth nods...",
+		_([[I have to hand it to you: you are right here, old man.]])
+		.. paragraphdivider() ..
+		_([[There seem to be quite a lot of animals in the forests here – we might just hunt down more of them. And, of course, the people would cheer a new tavern – hey, we might call it ‘Thron’s Pride’ or so if you want!]]))
+		.. new_objectives(obj_basic_food)
 }
 
 order_msg_10_bread = {
-   title=_"The Advisor",
-   body=khantrukh(_"The elder jumps into the air...",
-_([[Wisdom commands to seek variety.]]) .. paragraphdivider() ..
-_([[North of the great mountain is a large plain – why don’t we use the space Mother Nature gave us and build a farm? ]] ..
-[[I sure would enjoy a freshly baked pitta bread for a change...]])
-   ) .. new_objectives(obj_begin_farming)
+   title = _"The Advisor",
+   body = khantrukh(_"The elder jumps into the air...",
+		_([[Wisdom commands to seek variety.]])
+		.. paragraphdivider() ..
+		_([[North of the great mountain is a large plain – why don’t we use the space Mother Nature gave us and build a farm? I sure would enjoy a freshly baked pitta bread for a change...]]))
+		.. new_objectives(obj_begin_farming)
 }
 
 order_msg_11_basic_food_began = {
-   title=_"Your Loyal Companion",
-   body=boldreth(_"Boldreth cheers up...",
-_([[Our hunters are out in the forests, Thron.]]) .. paragraphdivider() ..
-_([[I promise you, before the sun sets today you will have a magnificent meal fit for the chieftain of all clans!]])
-   )
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth cheers up...",
+		_([[Our hunters are out in the forests, Thron.]])
+		.. paragraphdivider() ..
+		_([[I promise you, before the sun sets today you will have a magnificent meal fit for the chieftain of all clans!]]))
 }
 
 order_msg_12_farming_began = {
-   title=_"The Advisor",
-   body=khantrukh(_ "Khantrukh gazes over the plains...",
-_([[Isn’t it lovely, the view of golden fields, growing peacefully, dancing to the wind? ]] ..
-[[And I believe the baker is just on his way here, with his most delicious bread reserved for our chieftain alone!]])
-   )
+   title = _"The Advisor",
+   body = khantrukh(_ "Khantrukh gazes over the plains...",
+		_([[Isn’t it lovely, the view of golden fields, growing peacefully, dancing to the wind? And I believe the baker is just on his way here, with his most delicious bread reserved for our chieftain alone!]]))
 }
 
 order_msg_13_tavern = {
-   title=_"A Beautiful Morning",
-   body=thron(_"Thron recognizes...",
-_([[A tavern opened for our people yesterday. While I am hardly in the mood for celebration, ]] ..
-[[I noticed how much this tiny bit of home means to my people. ]] ..
-[[Their songs filled the air until deep in the night, and they were in higher spirits still the day after.]])
-.. paragraphdivider() ..
-_([[Maybe we actually are slowly creating a place here which we can... call home.]])
-   )
+   title = _"A Beautiful Morning",
+   body = thron(_"Thron recognizes...",
+		_([[A tavern opened for our people yesterday. While I am hardly in the mood for celebration, I noticed how much this tiny bit of home means to my people. Their songs filled the air until deep in the night, and they were in higher spirits still the day after.]])
+		.. paragraphdivider() ..
+		_([[Maybe we actually are slowly creating a place here which we can... call home.]]))
 }
 
 order_msg_14_refine_ore = {
-   title=_ "Your Loyal Companion",
-   body= boldreth(_"Boldreth remarks...",
-_([[So now that we have both the mines and the food to sustain them, ]] ..
-[[we should bring what our brave miners gain for us into a more useful state. ]] ..
-[[The iron ore has to be melted into iron so that it is ready to be forged into whatever we want. ]] ..
-[[And we need the coal to keep the smelter’s ovens burning.]])
-   ) .. new_objectives(obj_refine_ores)
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth remarks...",
+		_([[So now that we have both the mines and the food to sustain them, we should bring what our brave miners gain for us into a more useful state. The iron ore has to be melted into iron so that it is ready to be forged into whatever we want. And we need the coal to keep the smelter’s ovens burning.]]))
+		.. new_objectives(obj_refine_ores)
 }
 
 order_msg_15_mines_exhausted = {
-   title=_ "The Advisor",
+   title = _"The Advisor",
    body = khantrukh(_"Khantrukh speaks...",
-_([[Our miners are digging up less and less by the day! We have to go deeper, closer to the mountain’s core, ]] ..
-[[if we want more of its treasures!]]) .. paragraphdivider() ..
-_([[Of course, it is dark and cold in such depths and only a few venture voluntarily into these places. ]] ..
-[[We should reward this bravery with greater rations for them. And a pint of beer or two will keep their spirits high.]])
-   ) .. new_objectives(obj_enhance_buildings)
+		_([[Our miners are digging up less and less by the day! We have to go deeper, closer to the mountain’s core, if we want more of its treasures!]])
+		.. paragraphdivider() ..
+		_([[Of course, it is dark and cold in such depths and only a few venture voluntarily into these places. We should reward this bravery with greater rations for them. And a pint of beer or two will keep their spirits high.]]))
+		.. new_objectives(obj_enhance_buildings)
 }
 
 order_msg_16_blackwood = {
-   title=_"Your Loyal Companion",
-   body= boldreth(_"Boldreth seems concerned...",
-_([[As I just discovered, we are running short on blackwood! We cannot put our warriors into some crumbling huts, ]] ..
-[[and even less so in times as dangerous as ours!]]) .. paragraphdivider() ..
-_([[We need a wood hardener, and we need one now!]])
-   ) .. new_objectives(obj_better_material_1)
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth seems concerned...",
+		_([[As I just discovered, we are running short on blackwood! We cannot put our warriors into some crumbling huts, and even less so in times as dangerous as ours!]])
+		.. paragraphdivider() ..
+		_([[We need a wood hardener, and we need one now!]]))
+		.. new_objectives(obj_better_material_1)
 }
 
 order_msg_17_grindstone = {
-   title=_"Your Loyal Companion",
-   body= boldreth(_"Boldreth smiles...",
-_([[Well, old friend, this should ensure that our fortifications do not break down with our foes’ first battle cry! ]] ..
-[[Now we can expand safely!]]) .. paragraphdivider() ..
-_([[Still, it would not hurt to accumulate some grout for our further campaign; ]] ..
-[[thus we could, in times of need, build a fortress such as the world has never seen before!]])
-   ) .. new_objectives(obj_better_material_2)
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth smiles...",
+		_([[Well, old friend, this should ensure that our fortifications do not break down with our foes’ first battle cry! Now we can expand safely!]])
+		.. paragraphdivider() ..
+		_([[Still, it would not hurt to accumulate some grout for our further campaign; thus we could, in times of need, build a fortress such as the world has never seen before!]]))
+		.. new_objectives(obj_better_material_2)
 }
 
 order_msg_18_reed_yard = {
-   title=_"The Advisor",
-   body= khantrukh(_"Khantrukh steps in...",
-_([[Chieftain, this is a disgrace! ]] ..
-[[It is well that we can produce grout for mighty fortifications and great buildings now]] ..
-[[ – only this does not prevent our roofs from becoming leaky! ]] ..
-[[Maybe the young ones like spending their nights in the rain, ]] ..
-[[but I just can’t find any sleep with these raindrops dripping on my face!]]) .. paragraphdivider() ..
-_([[Now this is a problem we should do something about!]])
-   ) .. new_objectives(obj_better_material_3)
+   title = _"The Advisor",
+   body = khantrukh(_"Khantrukh steps in...",
+		_([[Chieftain, this is a disgrace! It is well that we can produce grout for mighty fortifications and great buildings now – only this does not prevent our roofs from becoming leaky! Maybe the young ones like spending their nights in the rain, but I just can’t find any sleep with these raindrops dripping on my face!]])
+		.. paragraphdivider() ..
+		_([[Now this is a problem we should do something about!]]))
+		.. new_objectives(obj_better_material_3)
 }
 
 order_msg_19_all_material = {
-   title=_"The Advisor",
-   body=khantrukh(_"Khantrukh seems relieved...",
-_([[Wonderful! Our roofs are not dripping anymore, and we have all the material we need for, ]] ..
-[[well, whichever monumental building we see fit!]])
-   )
-}
-
-msg_mission_complete = {
-   title=_"Mission Complete",
-   body= thron(
-_([[The other day Boldreth asked me to accompany him to the new inn. It would cheer me up, he said.]])
-.. paragraphdivider() ..
-_([[When I looked around, I saw faithful faces, trusting that I could guide them through these dark days. ]] ..
-[[Yet before I could speak any words of gratitude or encouragement, one of my warriors ran into the inn. ]] ..
-[[He had been far out in the forest for the past days and I could see how weary he was.]]) .. paragraphdivider() ..
-_([[The news he brought changed everything...]])
-   )..  objective_text(_"Victory",
-   _[[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]]
-   )
+   title = _"The Advisor",
+   body = khantrukh(_"Khantrukh seems relieved...",
+		_([[Wonderful! Our roofs are not dripping anymore, and we have all the material we need for, well, whichever monumental building we see fit!]]))
 }
 
 msg_cattlefarm_00 = {
-   title = _ "We Need Oxen!",
+   title = _"We Need Oxen!",
    body = khantrukh(_ "Khantrukh speaks...",
-_([[As our realm is getting bigger and bigger, the traffic on the roads is overwhelming. ]] ..
-[[Our poor carriers are no longer able to transport the goods as fast as we need them to. ]] ..
-[[I suggest we give them some support by breeding oxen.]]) .. paragraphdivider() ..
-_([[They are amazing animals: The ox is as swift as a human being while being much stronger and very frugal: ]] ..
-[[all we need is wheat and water to breed them and they will do their work on the roads loyally and reliably.]])
-   ) .. new_objectives(obj_build_cattlefarm)
+		_([[As our realm is getting bigger and bigger, the traffic on the roads is overwhelming. Our poor carriers are no longer able to transport the goods as fast as we need them to. I suggest we give them some support by breeding oxen.]])
+		.. paragraphdivider() ..
+		_([[They are amazing animals: The ox is as swift as a human being while being much stronger and very frugal: all we need is wheat and water to breed them and they will do their work on the roads loyally and reliably.]]))
+		.. new_objectives(obj_build_cattlefarm)
+}
+
+msg_mission_complete = {
+   title = _"Mission Complete",
+   body = thron(_"Thron speaks...",
+		_([[The other day Boldreth asked me to accompany him to the new inn. It would cheer me up, he said.]])
+		.. paragraphdivider() ..
+		_([[When I looked around, I saw faithful faces, trusting that I could guide them through these dark days. Yet before I could speak any words of gratitude or encouragement, one of my warriors ran into the inn. He had been far out in the forest for the past days and I could see how weary he was.]])
+		.. paragraphdivider() ..
+		_([[The news he brought changed everything...]]))
+		..  objective_text(_"Victory",
+		_[[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]])
 }
 
 msg_story_1 = {
-   title=_"One Full Moon Night",
-   body=thron(_"Thron speaks...",
-_([[One night, when the moon shone brightly, I climbed to the peak of Kal’mavrath.]]) .. paragraphdivider() ..
-_([[When I gazed at the horizon, I still saw crimson lights flicker in the distance. ]] ..
-[[It is incredible with how much passion my brethren fight this war. ]] ..
-[[I fear the moment I will see Al’thunran again]] ..
-[[ – will there be anything but ashes and wasted ruins left of our once beautiful capital when we get there?]])
-   )
+   title = _"One Full Moon Night",
+   body = thron(_"Thron speaks...",
+		_([[One night, when the moon shone brightly, I climbed to the peak of Kal’mavrath.]])
+		.. paragraphdivider() ..
+		_([[When I gazed at the horizon, I still saw crimson lights flicker in the distance. It is incredible with how much passion my brethren fight this war. I fear the moment I will see Al’thunran again – will there be anything but ashes and wasted ruins left of our once beautiful capital when we get there?]]))
 }
 
 msg_story_2 = {
-    title= _"Another Cold Day",
-    body=thron(_"Thron looks worried...",
-_([[The winter is upon us. Many of us are suffering from the cold, yet we must endure. ]] ..
-[[The day we may return cannot be far anymore – it must not be far anymore.]]) .. paragraphdivider() ..
-_([[I prayed that it might get warmer again, as I prayed that the war would finally come to an end.]])
-.. paragraphdivider() ..
-_([[So far, it seems that neither prayer was fulfilled.]])
-   )
+    title = _"Another Cold Day",
+    body = thron(_"Thron looks worried...",
+		_([[The winter is upon us. Many of us are suffering from the cold, yet we must endure. The day we may return cannot be far anymore – it must not be far anymore.]])
+		.. paragraphdivider() ..
+		_([[I prayed that it might get warmer again, as I prayed that the war would finally come to an end.]])
+		.. paragraphdivider() ..
+		_([[So far, it seems that neither prayer was fulfilled.]]))
 }
 
 msg_village = {
-   title=_"A friendly village has joined us!",
-   body= thron(_"Thron speaks...",
-_([[We have found a village with friendly and productive people, impressed by our wealth, technology and strength.]]) .. paragraphdivider() ..
-_([[They have decided to join us!]])
-   )
+   title =_"A friendly village has joined us!",
+   body = thron(_"Thron speaks...",
+		_([[We have found a village with friendly and productive people, impressed by our wealth, technology and strength.]])
+		.. paragraphdivider() ..
+		_([[They have decided to join us!]]))
 }

=== modified file 'campaigns/t03.wmf/scripting/init.lua'
--- campaigns/t03.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ campaigns/t03.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -18,14 +18,4 @@
 
 include "map:scripting/starting_conditions.lua"
 include "map:scripting/texts.lua"
-
--- Some messages that spare some typing
-function send_msg(msg)
-   msg.h = 400
-   p1:message_box(msg.title, msg.body, msg)
-end
-function add_obj(t)
-   return p1:add_objective(t.name, t.title, t.body)
-end
-
 include "map:scripting/mission_thread.lua"

=== modified file 'campaigns/t03.wmf/scripting/mission_thread.lua'
--- campaigns/t03.wmf/scripting/mission_thread.lua	2014-08-26 17:25:00 +0000
+++ campaigns/t03.wmf/scripting/mission_thread.lua	2014-10-02 21:13:22 +0000
@@ -2,6 +2,8 @@
 --                          Various mission threads
 -- =======================================================================
 
+include "scripting/messages.lua"
+
 game = wl.Game()
 -- Mountain and frontier fields
 mountain = game.map:get_field(71,14)
@@ -22,10 +24,10 @@
 function remember_cattlefarm()
    sleep(100)
 
-   send_msg(cattlefarm_01)
+   campaign_message_box(cattlefarm_01)
 
    p1:allow_buildings{"cattlefarm"}
-   local o = add_obj(obj_build_cattlefarm)
+   local o = add_campaign_objective(obj_build_cattlefarm)
    while not check_for_buildings(p1, {cattlefarm = 1}) do
       sleep(1223) end
    o.done = true
@@ -34,11 +36,11 @@
 
 function initial_message_and_small_food_economy()
    wake_me(2000)
-   send_msg(story_msg_1)
+   campaign_message_box(story_msg_1)
 
    wake_me(120000)
-   send_msg(briefing_msg_1)
-   send_msg(order_msg_1_small_food_economy)
+   campaign_message_box(briefing_msg_1)
+   campaign_message_box(order_msg_1_small_food_economy)
 
    p1:allow_buildings{"fishers_hut",
       "hunters_hut",
@@ -50,7 +52,7 @@
       "sentry",
    }
 
-   local o = add_obj(obj_build_small_food_economy)
+   local o = add_campaign_objective(obj_build_small_food_economy)
    while not check_for_buildings(p1, {
          fishers_hut = 1,
          hunters_hut = 1,
@@ -59,7 +61,7 @@
          bakery = 1,
       }) do sleep(3413) end
    o.done = true
-   send_msg(story_note_1)
+   campaign_message_box(story_note_1)
 
    sleep(600000)  -- 10 minutes
    remember_cattlefarm()
@@ -84,8 +86,8 @@
 
    local pts = scroll_smoothly_to(game.map:get_field(67,19))
 
-   send_msg(order_msg_2_build_a_donjon)
-   local o = add_obj(obj_build_a_donjon)
+   campaign_message_box(order_msg_2_build_a_donjon)
+   local o = add_campaign_objective(obj_build_a_donjon)
    p1:forbid_buildings{"sentry"}
    p1:allow_buildings{"donjon"}
 
@@ -97,9 +99,9 @@
 
    while not check_for_buildings(p1, {donjon=1}) do sleep(2341) end
    o.done = true
-   send_msg(order_msg_3_explore_further)
+   campaign_message_box(order_msg_3_explore_further)
    -- "explore further" is active untill "Boldreth shout out", so the player always has one open objectve.
-   exploration_objective = add_obj(obj_explore_further)
+   exploration_objective = add_campaign_objective(obj_explore_further)
 
    p1:allow_buildings{"sentry", "barrier"}
 
@@ -127,8 +129,8 @@
 
    local pts = scroll_smoothly_to(game.map:get_field(82,20))
 
-   send_msg(order_msg_4_build_mining_economy)
-   local o = add_obj(obj_build_mining_economy)
+   campaign_message_box(order_msg_4_build_mining_economy)
+   local o = add_campaign_objective(obj_build_mining_economy)
 
    p1:allow_buildings{
       "coalmine",
@@ -157,11 +159,11 @@
       sleep(4139)
    end
    o.done = true
-   send_msg(story_note_2)
+   campaign_message_box(story_note_2)
 
    sleep(100000)
 
-   send_msg(order_msg_6_build_enhanced_economy_and_training)
+   campaign_message_box(order_msg_6_build_enhanced_economy_and_training)
    p1:allow_buildings{
       "axfactory",
       "warmill",
@@ -179,10 +181,10 @@
       "warehouse",
       "brewery",
    }
-   run(check_warehouse_obj, add_obj(obj_build_a_warehouse))
-   run(check_trainingssite_obj, add_obj(obj_build_trainingssites))
-   run(check_weapon_productions_obj, add_obj(obj_build_weapon_productions))
-   run(check_helmsmithy_obj, add_obj(obj_build_a_helmsmithy))
+   run(check_warehouse_obj, add_campaign_objective(obj_build_a_warehouse))
+   run(check_trainingssite_obj, add_campaign_objective(obj_build_trainingssites))
+   run(check_weapon_productions_obj, add_campaign_objective(obj_build_weapon_productions))
+   run(check_helmsmithy_obj, add_campaign_objective(obj_build_a_helmsmithy))
 end
 
 function check_trainingssite_obj(o)
@@ -215,14 +217,14 @@
       sleep(7349)
    end
 
-   send_msg(order_msg_5_build_a_fortress)
-   local o = add_obj(obj_build_a_fortress)
+   campaign_message_box(order_msg_5_build_a_fortress)
+   local o = add_campaign_objective(obj_build_a_fortress)
    p1:allow_buildings{"fortress"}
 
    while #p1:get_buildings("fortress") == 0 do sleep(6523) end
 
    o.done = true
-   send_msg(story_note_3)
+   campaign_message_box(story_note_3)
 end
 
 function expansion()
@@ -235,13 +237,13 @@
       )
    do sleep(8374) end
 
-   send_msg(story_msg_2)
-   send_msg(story_msg_3)
-   send_msg(story_msg_4)
+   campaign_message_box(story_msg_2)
+   campaign_message_box(story_msg_3)
+   campaign_message_box(story_msg_4)
 
    sleep(20000)
-   send_msg(story_msg_5)
-   send_msg(story_msg_6)
+   campaign_message_box(story_msg_5)
+   campaign_message_box(story_msg_6)
 end
 
 -- checks if all military buildings are drestroyed (the build-in function "defeated" only checks if all warehouses are destroyed)
@@ -270,8 +272,8 @@
    -- "explore further" is done
    exploration_objective.done = true
 
-   send_msg(order_msg_7_destroy_kalitaths_army)
-   local o = add_obj(obj_destroy_kalitaths_army)
+   campaign_message_box(order_msg_7_destroy_kalitaths_army)
+   local o = add_campaign_objective(obj_destroy_kalitaths_army)
 
    while not check_player_completely_defeated(p2) do
         sleep(7837)
@@ -308,9 +310,9 @@
 
    local pts = scroll_smoothly_to(map:get_field(120,92))
 
-   send_msg(order_msg_7_renegade_fortification)
-   send_msg(order_msg_7_free_althunran)
-   local o = add_obj(obj_military_assault_on_althunran)
+   campaign_message_box(order_msg_7_renegade_fortification)
+   campaign_message_box(order_msg_7_free_althunran)
+   local o = add_campaign_objective(obj_military_assault_on_althunran)
 
    timed_scroll(array_reverse(pts))
    sleep(503)
@@ -335,7 +337,7 @@
 
    local pts = scroll_smoothly_to(map:get_field(4,5))
 
-   send_msg(story_msg_7)
+   campaign_message_box(story_msg_7)
 
    p1:reveal_campaign("campsect1")
 end

=== modified file 'campaigns/t03.wmf/scripting/texts.lua'
--- campaigns/t03.wmf/scripting/texts.lua	2014-07-21 14:07:27 +0000
+++ campaigns/t03.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -18,386 +18,297 @@
 
 obj_build_small_food_economy = {
    name = "build_small_food_economy",
-   title=_"Build up a small food economy",
+   title = _"Build up a small food economy",
    number = 5,
    body = objective_text(_"Build up a small food economy",
-      _"Build up a basic food economy to provide your people with food." ..
+      _"Build up a basic food economy to provide your people with food."
+      .. paragraphdivider() ..
       listitem_bullet(_"Build a fisher’s hut") ..
       listitem_bullet(_"Build a hunter’s hut") ..
       listitem_bullet(_"Build a well") ..
       listitem_bullet(_"Build a farm") ..
-      listitem_bullet(_"Build a bakery")
-   ),
+      listitem_bullet(_"Build a bakery"))
 }
 
 obj_build_cattlefarm = {
    name = "obj_build_cattlefarm",
-   title = _ "Build a cattle farm",
+   title = _"Build a cattle farm",
    number = 1,
    body = objective_text(_"Remember to build a cattle farm",
-      _"As your roads grow longer and your economy bigger, you should make good use of your oxen to help transport wares more quickly." ..
-      listitem_bullet(_"Remember to build a cattle farm")
-   ),
+      _"As your roads grow longer and your economy bigger, you should make good use of your oxen to help transport wares more quickly."
+      .. paragraphdivider() ..
+      listitem_bullet(_"Remember to build a cattle farm"))
 }
 
 obj_build_a_donjon = {
    name = "build_a_donjon",
-   title=_"Build a donjon",
+   title = _"Build a donjon",
    number = 1,
    body = objective_text(_"Build a donjon",
-      listitem_bullet(_"Build a donjon at the north-east of your territory to get greater visual range and to protect your people from sudden attacks of enemies.")
-   ),
+      listitem_bullet(_"Build a donjon at the north-east of your territory to get greater visual range and to protect your people from sudden attacks of enemies."))
 }
 
 obj_explore_further = {
    name = "explore_further",
-   title=_"Explore further",
+   title = _"Explore further",
    number = 1,
    body = objective_text(_"Explore further",
-      listitem_bullet(_"Build more military buildings to explore the area around the headquarters and to ensure the safety of your people.")
-   ),
+      listitem_bullet(_"Build more military buildings to explore the area around the headquarters and to ensure the safety of your people."))
 }
 
 obj_build_mining_economy = {
    name = "build_mining_economy",
-   title=_"Build a mining infrastructure",
+   title = _"Build a mining infrastructure",
    number = 6,
    body = objective_text(_"Build a mining infrastructure",
-      listitem_bullet(_"Expand your territory to the mountains, send geologists to search for ore and coal and build a mining economy with mines, taverns, smelting works and metal workshop.")
-   ),
+      listitem_bullet(_"Expand your territory to the mountains, send geologists to search for ore and coal and build a mining economy with mines, taverns, smelting works and metal workshop."))
 }
 
 obj_build_a_fortress = {
    name = "build_a_fortress",
-   title=_"Build a fortress",
+   title = _"Build a fortress",
    number = 1,
    body = objective_text(_"Build a fortress",
-      listitem_bullet(_"Build a fortress to the east of the mountains.")
-   ),
+      listitem_bullet(_"Build a fortress to the east of the mountains."))
 }
 
 obj_build_training_infrastructure = {
    name = "build_training_infrastructure",
-   title=_"Build a training infrastructure",
+   title = _"Build a training infrastructure",
    number = 4,
    body = objective_text(_"Build a training infrastructure",
       listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
       listitem_bullet(_"Enhance your metal workshop to an axfactory 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 axfactory to a war mill, which will produce additional weapons.") ..
-      listitem_bullet(_"Build a helmsmithy to the west of the mountains to provide your soldiers with better armor.")
-   ),
+      listitem_bullet(_"Build a helmsmithy to the west of the mountains to provide your soldiers with better armor."))
 }
 
 
 obj_build_a_warehouse = {
    name = "build_a_warehouse",
-   title=_"Build a warehouse",
+   title = _"Build a warehouse",
    number = 1,
    body = objective_text(_"Build a warehouse",
       listitem_bullet(_"Build a warehouse to the west of the mountains.") ..
-      listitem_arrow(_"Warehouses are similar to your headquarters, with the only difference that they aren’t defended by soldiers. It is often wise to build a warehouse when your territory is growing and the paths to your headquarters get longer and longer.")
-   ),
+      listitem_arrow(_"Warehouses are similar to your headquarters, with the only difference that they aren’t defended by soldiers. It is often wise to build a warehouse when your territory is growing and the paths to your headquarters get longer and longer."))
 }
 
 obj_build_trainingssites = {
    name = "build_trainingssites",
-   title=_"Build training sites",
+   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." ..
          "<br>" ..
-         _"The attributes are: health, attack, defense and evade.")
-   ),
+         _"The attributes are: health, attack, defense and evade."))
 }
 
 obj_build_weapon_productions = {
    name = "build_weapon_productions",
-   title=_"Build weapons production",
+   title = _"Build weapons production",
    number = 3,
    body = objective_text(_"Build weapons production",
-      listitem_bullet(_"Enhance your metal workshop to an axfactory 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 axfactory to a war mill, which will produce additional weapons.")
-   ),
+      listitem_bullet(_"Enhance your metal workshop to an axfactory 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 axfactory to a war mill, which will produce additional weapons."))
 }
 
 obj_build_a_helmsmithy = {
    name = "build_a_helmsmithy",
-   title=_"Build a helmsmithy",
+   title = _"Build a helmsmithy",
    number = 1,
    body = objective_text(_"Build a helmsmithy",
-      listitem_bullet(_"Build a helmsmithy to the west of the mountains to provide your soldiers with better armor.")
-   ),
+      listitem_bullet(_"Build a helmsmithy to the west of the mountains to provide your soldiers with better armor."))
 }
 
 obj_destroy_kalitaths_army = {
    name = "destroy_kalitaths_army",
-   title=_"Destroy Kalitath’s army",
+   title = _"Destroy Kalitath’s army",
    number = 2,
    body = objective_text(_"Destroy Kalitath’s army",
       listitem_bullet(_"Destroy Kalitath’s army and expand your territory to the east.") ..
-      listitem_arrow(_"To attack an enemy, you must click on the door of an adversary’s military building. A menu will pop up allowing you to select the number of soldiers that should attack. When you are ready with setting the number, click on the cross (‘Start Attack’).")
-   ),
+      listitem_arrow(_"To attack an enemy, you must click on the door of an adversary’s military building. A menu will pop up allowing you to select the number of soldiers that should attack. When you are ready with setting the number, click on the cross (‘Start Attack’)."))
 }
 
 obj_military_assault_on_althunran = {
    name = "military_assault_on_althunran",
-   title=_"Military assault on Al’thunran",
+   title = _"Military assault on Al’thunran",
    number = 1,
    body = objective_text(_"Military assault on Al’thunran",
-      listitem_bullet(_"Destroy all forces of Thron’s two brothers to liberate the throne-circle.")
-   ),
+      listitem_bullet(_"Destroy all forces of Thron’s two brothers to liberate the throne-circle."))
 }
 
 -- =======================================================================
 --                              Messages to the user
 -- =======================================================================
 story_msg_1 = {
-   posy=1,
-   title=_"Close to Home",
-   body =thron(_"Thron looks worried...",
-_([[These last days, we came closer to our capital. ]] ..
-[[Many people have already joined us on our march and set their hopes on me. ]] ..
-[[However, I fear that we are not strong enough to take up the battle against my brothers.]]) ..
-paragraphdivider() ..
-_([[For now, we are resting at the borders of the old forest and preparing for the coming days.]])),
+   posy = 1,
+   title = _"Close to Home",
+   body = thron(_"Thron looks worried...",
+		_([[These last days, we came closer to our capital. Many people have already joined us on our march and set their hopes on me. However, I fear that we are not strong enough to take up the battle against my brothers.]])
+		.. paragraphdivider() ..
+		_([[For now, we are resting at the borders of the old forest and preparing for the coming days.]]))
 }
 
 story_msg_2 = {
-   posy=1,
-   title=_"Another Cold Day",
-   body =thron(_"Thron looks worried...",
-_([[The news that a patrol brought is not good to hear. ]] ..
-[[Our spies tell us that the war tribes still rage in battle, ]] ..
-[[but some of the elder soldiers and tribe leaders seem to grow tired of this senseless war. ]] ..
-[[Kalitath, son of Kun is the first war leader to leave Al’thunran, thus leaving his side weak and vulnerable. ]] ..
-[[As my scouts report, he has set foot on the lower grounds around the capital, ]] ..
-[[securing the outer fortification rings.]])),
+   posy = 1,
+   title = _"Another Cold Day",
+   body = thron(_"Thron looks worried...",
+		_([[The news that a patrol brought is not good to hear. Our spies tell us that the war tribes still rage in battle, but some of the elder soldiers and tribe leaders seem to grow tired of this senseless war. Kalitath, son of Kun is the first war leader to leave Al’thunran, thus leaving his side weak and vulnerable. As my scouts report, he has set foot on the lower grounds around the capital, securing the outer fortification rings.]]))
 }
 
 story_msg_3 = {
-   title=_"Doubts",
-   posy=1,
+   posy = 1,
+   title = _"Doubts",
    body = boldreth(_"Boldreth is shaking his head...",
-_([[Thron seeks to believe that Kalitath is tired of fighting and would be willing to join us ]] ..
-[[once we march to re-establish law and order in Al’thunran. But I don’t think so. ]] ..
-[[Kalitath is son to one of the mightiest generals of our forces ]] ..
-[[and his family never quite liked the thought of bowing before the banner of Chat’Karuth. ]] ..
-[[Why should he march with Chat’Karuth’s son to reclaim his heritage and the throne?]])),
+		_([[Thron seeks to believe that Kalitath is tired of fighting and would be willing to join us once we march to re-establish law and order in Al’thunran. But I don’t think so. Kalitath is son to one of the mightiest generals of our forces and his family never quite liked the thought of bowing before the banner of Chat’Karuth. Why should he march with Chat’Karuth’s son to reclaim his heritage and the throne?]]))
 }
 
 story_msg_4 = {
-   posy=1,
-   title=_"The Story Continues",
-   body= boldreth(
-_([[However, Thron is not willing to listen to my doubts. ]] ..
-[[He seeks to expand our fortifications to the borders of Kalitath’s territory and to reunite with his forces. ]] ..
-[[I have to keep an eye on everything that happens here.]])),
+   posy = 1,
+   title = _"The Story Continues",
+   body = boldreth(_"Boldreth says:",
+		_([[However, Thron is not willing to listen to my doubts. He seeks to expand our fortifications to the borders of Kalitath’s territory and to reunite with his forces. I have to keep an eye on everything that happens here.]]))
 }
 
 story_msg_5 = {
-   posy=1,
-   title=_"Another Cold Day",
-   body= thron(_"Thron is speaking confidently.",
-_([[The frontier line of my forces has expanded to the edge of the forests. ]] ..
-[[We have a long and cold winter and so many miles behind us. ]] ..
-[[The fortification that we erected around Ondun will guarantee us a fast supply of men and goods, ]] ..
-[[and once Al’thunran is in my hands, the two cities will be linked by a good and defensible infrastructure. ]] ..
-[[Still, I hope I will not walk alone on this mission, I hope Kalitath son of Kun will follow my call.]])),
+   posy = 1,
+   title = _"Another Cold Day",
+   body = thron(_"Thron is speaking confidently.",
+		_([[The frontier line of my forces has expanded to the edge of the forests. We have a long and cold winter and so many miles behind us. The fortification that we erected around Ondun will guarantee us a fast supply of men and goods, and once Al’thunran is in my hands, the two cities will be linked by a good and defensible infrastructure. Still, I hope I will not walk alone on this mission, I hope Kalitath son of Kun will follow my call.]]))
 }
 
 story_msg_6 = {
-   posy=1,
-   title=_"The Story Continues",
-   body= thron(
-_([[I have sent men to meet with Kalitath in his fortress. ]] ..
-[[He has barricaded the former main entrance to the capital and is trying to set up a siege ring around Al’thunran. ]] ..
-[[He will not let anyone enter or leave the city while the ring is intact. ]] ..
-[[Until now, he has not answered any of my messages. But the time I spend waiting won’t be lost. ]] ..
-[[I will further upgrade my soldiers and prepare for battle.]])),
+   posy = 1,
+   title = _"The Story Continues",
+   body = thron(_"Thron says:",
+		_([[I have sent men to meet with Kalitath in his fortress. He has barricaded the former main entrance to the capital and is trying to set up a siege ring around Al’thunran. He will not let anyone enter or leave the city while the ring is intact. Until now, he has not answered any of my messages. But the time I spend waiting won’t be lost. I will further upgrade my soldiers and prepare for battle.]]))
 }
 
 order_msg_7_destroy_kalitaths_army = {
-   title=_"Your Loyal Companion",
-   body= boldreth(_"Boldreth shouts out!",
-_([[The BASTARD! Only one man of our frontier patrol came back alive. ]] ..
-[[He carried a message from Kalitath, telling us that he will punish every move of our troops with their own blood! ]] ..
-[[We cannot accept this behavior. From now on, there is war between Kalitath and us!]]))
-.. new_objectives(obj_destroy_kalitaths_army),
+   title = _"Your Loyal Companion",
+   body = boldreth(_"Boldreth shouts out!",
+		_([[The BASTARD! Only one man of our frontier patrol came back alive. He carried a message from Kalitath, telling us that he will punish every move of our troops with their own blood! We cannot accept this behavior. From now on, there is war between Kalitath and us!]]))
+		.. new_objectives(obj_destroy_kalitaths_army)
 }
 
 
 
 order_msg_7_renegade_fortification = {
    posy = 1,
-   title=_"Renegade Fortification",
-   body= thron(_"Thron says:",
-_([[The traitor left his armies dying where they lay when he saw that he would not keep my forces back. ]] ..
-[[Kalitath disappeared in the confusion of the war, but I don’t care now. ]] ..
-[[Shall he flee and be forgotten for all times as a tribal leader that would not bow before the wooden throne, ]] ..
-[[that is mine to take now.]]) .. paragraphdivider() ..
-_([[Furthermore, his flight brought us a great benefit: ]] ..
-[[all year, Kalitath was so busy fighting that he did not even care to store enough food for all his men. ]] ..
-[[Now that he has fled, their hunger has caused some of his younger followers to desert. ]] ..
-[[This group holds a strong fortification on the main ring.]]) ..
-_([[But there is more news: ]] ..
-[[My scouts have reported that the two raging tribes of my brothers are in chaos ]] ..
-[[and have barely noticed the new danger that is about to strike them. ]] ..
-[[However, they would not care if they noticed I guess, blinded by rage and hate, ]] ..
-[[there is no sense left in them at all I believe.]])),
+   title = _"Renegade Fortification",
+   body = thron(_"Thron says:",
+		_([[The traitor left his armies dying where they lay when he saw that he would not keep my forces back. Kalitath disappeared in the confusion of the war, but I don’t care now. Shall he flee and be forgotten for all times as a tribal leader that would not bow before the wooden throne, that is mine to take now.]])
+		.. paragraphdivider() ..
+		_([[Furthermore, his flight brought us a great benefit: all year, Kalitath was so busy fighting that he did not even care to store enough food for all his men. Now that he has fled, their hunger has caused some of his younger followers to desert. This group holds a strong fortification on the main ring.]])
+		.. paragraphdivider() ..
+		_([[But there is more news: My scouts have reported that the two raging tribes of my brothers are in chaos and have barely noticed the new danger that is about to strike them. However, they would not care if they noticed I guess, blinded by rage and hate, there is no sense left in them at all I believe.]]))
 }
 
 briefing_msg_1 = {
-   posy=1,
-   title=_"Winter Ahead",
-   body= boldreth(_"Boldreth says:",
-_([[This morning, I found Thron’s mind troubled. He returned from his patrol late last night ]] ..
-[[and sat back against a tree, watching over the encampment. ]] ..
-[[The number of quarrels and disputes keeps growing, and the winter has us firmly in its grip. ]] ..
-[[We should put food in our storage to survive the long, cold winter!]])),
+   posy = 1,
+   title = _"Winter Ahead",
+   body = boldreth(_"Boldreth says:",
+		_([[This morning, I found Thron’s mind troubled. He returned from his patrol late last night and sat back against a tree, watching over the encampment. The number of quarrels and disputes keeps growing, and the winter has us firmly in its grip. We should put food in our storage to survive the long, cold winter!]]))
 }
 
 order_msg_1_small_food_economy = {
-   posy=1,
-   title=_"The Advisor",
-   body= khantrukh(_"Khantrukh nods.",
-_([[Boldreth is right! We don’t have enough food to survive a long, cold winter. ]] ..
-[[We should start to build a well, a fisher’s and a hunter’s hut. ]] ..
-[[And if we find enough space, we should as well build up a farm and a bakery! ]] ..
-[[One of our farmers seems to be very clever – he already got some crops to grow in this cold soil.]]))
-.. new_objectives(obj_build_small_food_economy),
+   posy = 1,
+   title = _"The Advisor",
+   body = khantrukh(_"Khantrukh nods.",
+		_([[Boldreth is right! We don’t have enough food to survive a long, cold winter. We should start to build a well, a fisher’s and a hunter’s hut. And if we find enough space, we should as well build up a farm and a bakery! One of our farmers seems to be very clever – he already got some crops to grow in this cold soil.]]))
+		.. new_objectives(obj_build_small_food_economy)
 }
 
 story_note_1 = {
-   posy=1,
-   title=_"Food Economy Completed",
-   body= thron(
-_([[Khantrukh has just informed me that our basic food economy was built up successfully. ]] ..
-[[Finally, none of us has to fear starvation anymore.]])),
+   posy = 1,
+   title = _"Food Economy Completed",
+   body = thron(_"Thron says:",
+		_([[Khantrukh has just informed me that our basic food economy was built up successfully. Finally, none of us has to fear starvation anymore.]]))
 }
 
 order_msg_2_build_a_donjon = {
-   posy=1,
-   title=_"Tracks",
-   body= boldreth(
-   _([[Thron told me that he discovered tracks in the snow to the northeast of our settlement. ]] ..
-[[He has instructed us to build a Donjon, to have a greater visual range over the area around our hall ]] ..
-[[to protect our people from sudden attacks.]]))
-.. new_objectives(obj_build_a_donjon),
+   posy = 1,
+   title = _"Tracks",
+   body = boldreth(_"Boldreth says:",
+		_([[Thron told me that he discovered tracks in the snow to the northeast of our settlement. He has instructed us to build a Donjon, to have a greater visual range over the area around our hall to protect our people from sudden attacks.]]))
+		.. new_objectives(obj_build_a_donjon)
 }
 
 order_msg_3_explore_further = {
-   posy=1,
-   title=_"Further Exploration",
-   body= boldreth(
-_([[The first fortification Thron ordered has just been completed. ]] ..
-[[At the moment, he seeks to bring trust and belief to those who live inside the walls of our new habitat, ]] ..
-[[that we named ‘Ondun’, which means ‘those who wait’ in the old tongue. ]] ..
-[[But Thron is not yet satisfied – and I fully understand his fears: ]] ..
-[[the forests are deep, and the frontier to Al’thunran is near. ]] ..
-[[I am sure that there are a thousand greater dangers out there than the unknown tracks.]]) ..
-paragraphdivider() ..
-_([[To overlook more of the area around our hall, we should explore further ]] ..
-[[and set up more guards and scouts to observe the frontier ]] ..
-[[and keep an eye on the raging wars on our doorstep. ]] ..
-[[THEN we will be prepared once trouble seeks to capture our woods.]]))
-.. new_objectives(obj_explore_further),
+   posy = 1,
+   title = _"Further Exploration",
+   body = boldreth(_"Boldreth says:",
+		_([[The first fortification Thron ordered has just been completed. At the moment, he seeks to bring trust and belief to those who live inside the walls of our new habitat, that we named ‘Ondun’, which means ‘those who wait’ in the old tongue. But Thron is not yet satisfied – and I fully understand his fears: the forests are deep, and the frontier to Al’thunran is near. I am sure that there are a thousand greater dangers out there than the unknown tracks.]])
+		.. paragraphdivider() ..
+		_([[To overlook more of the area around our hall, we should explore further and set up more guards and scouts to observe the frontier and keep an eye on the raging wars on our doorstep. THEN we will be prepared once trouble seeks to capture our woods.]]))
+		.. new_objectives(obj_explore_further)
 }
 
 order_msg_4_build_mining_economy = {
-   posy=1,
-   title=_"Mountains Found",
-   body= khantrukh(
-_([[I have just spoken to the leader of our patrol. ]] ..
-[[He told me that they found some mountains to the north-east and east of our territory. ]] ..
-[[With a bit of luck this will open up a new chance for rearming our men, ]] ..
-[[because as far as I remember, most of the mountains west to Al’thunran hold coal and some metal ores.]]))
-.. new_objectives(obj_build_mining_economy),
+   posy = 1,
+   title = _"Mountains Found",
+   body = khantrukh("Khantrukh says:",
+		_([[I have just spoken to the leader of our patrol. He told me that they found some mountains to the north-east and east of our territory. With a bit of luck this will open up a new chance for rearming our men, because as far as I remember, most of the mountains west to Al’thunran hold coal and some metal ores.]]))
+		.. new_objectives(obj_build_mining_economy)
 }
 
 story_note_2 = {
-   posy=1,
-   title=_"Mining Economy Completed",
-   body= thron(
-_([[I just got informed that our mining economy has started its work. ]] ..
-[[This news brought a smile to my face – even if the hardest part is still waiting to be done, ]] ..
-[[now that our smiths will give their best to further ease our lives.]])),
+   posy = 1,
+   title = _"Mining Economy Completed",
+   body = thron(_"Thron says:",
+		_([[I just got informed that our mining economy has started its work. This news brought a smile to my face – even if the hardest part is still waiting to be done, now that our smiths will give their best to further ease our lives.]]))
 }
 
 order_msg_5_build_a_fortress = {
-   posy=1,
-   title=_"Fortress Needed",
-   body= thron(
-_([[Boldreth and I just explored the area around the three mountains. ]] ..
-[[One major strategic problem of that area seems to be that there are two bigger passages]] ..
-[[ – one north and one south of the central mountain. Those passages are quite hard to control, ]] ..
-[[and so it seems to me like we have only one chance to secure the mountains from enemy hands: ]] ..
-[[We must build a fortress to the east of the mountains!]]))
-.. new_objectives(obj_build_a_fortress),
+   posy = 1,
+   title = _"Fortress Needed",
+   body = thron(_"Thron says:",
+		_([[Boldreth and I just explored the area around the three mountains. One major strategic problem of that area seems to be that there are two bigger passages – one north and one south of the central mountain. Those passages are quite hard to control, and so it seems to me like we have only one chance to secure the mountains from enemy hands: We must build a fortress to the east of the mountains!]]))
+		.. new_objectives(obj_build_a_fortress)
 }
 
 story_note_3 = {
-   posy=1,
-   title=_"Fortress Completed",
-   body=thron(
-_([[Finally! The fortress has just been completed, so the entrance to our settlement should be safe for now. ]] ..
-[[For the future, we might think on building some more fortifications like barriers and donjons at the passages, ]] ..
-[[but for now we can take a deep breath.]])),
+   posy = 1,
+   title = _"Fortress Completed",
+   body = thron(_"Thron says:",
+		_([[Finally! The fortress has just been completed, so the entrance to our settlement should be safe for now. For the future, we might think on building some more fortifications like barriers and donjons at the passages, but for now we can take a deep breath.]]))
 }
 
 order_msg_6_build_enhanced_economy_and_training = {
-   posy=1,
-   title=_"Enhanced Economy and Training",
-   body= boldreth(
-_([[Our mining economy seems to work fine, that is already good news! ]] ..
-[[Anyway, there are still a lot of men and women waiting in our hall to get a task, ]] ..
-[[so they can help our soldiers to prepare for the future fights.]]) ..
-paragraphdivider() ..
-_([[Our geologists found a lot more deposits of iron ore, coal and even gold. ]] ..
-[[We should enhance our current mines as soon as our miners are more experienced. ]] ..
-[[We should build up some more mines, a bigger food infrastructure ]] ..
-[[to always supply our men with sufficient food and a further processing economy. ]] ..
-[[But that’s still not everything – most of our soldiers are quite young ]] ..
-[[and neither have a good weapon nor are they well trained. ]] ..
-[[We should build up training sites to prepare them for their future tasks.]]))
-.. new_objectives(obj_build_training_infrastructure),
-}
-
-story_msg_7 = {
-   posy=1,
-   title=_"Another Cold Day",
-   body= thron(_"Thron looks worried...",
-_([[My brothers and their soldiers are dead and left fire and destruction behind. ]] ..
-[[In none of all the ruins could I find any man or woman of the normal folk, ]] ..
-[[and so I just may hope that they fled from this cruel battleground and started a better life somewhere else.]])
-.. paragraphdivider() ..
-_([[Nothing is left of that beauty I remember, only ruins remain of the old capital. ]] ..
-[[I am sorrowful but also relieved. I never hoped to ever see Al’thunran’s old beauty again]] ..
-[[ – it was only a few months ago that I wondered whether I would ever be able to set my feet in Al’thunran again. ]] ..
-[[Now the old town is back in my hands, and I will not hesitate to rebuild it with all the strength my people have. ]] ..
-[[I can’t wait to see it again in its old beauty.]]))
-..  objective_text(_"Victory",
-   _([[You have completed the last mission of the barbarian tutorial campaign. ]] ..
-[[You may continue playing if you wish, otherwise move on to the next campaign.]]))
+   posy = 1,
+   title = _"Enhanced Economy and Training",
+   body = boldreth(_"Boldreth says:",
+		_([[Our mining economy seems to work fine, that is already good news! Anyway, there are still a lot of men and women waiting in our hall to get a task, so they can help our soldiers to prepare for the future fights.]])
+		.. paragraphdivider() ..
+		_([[Our geologists found a lot more deposits of iron ore, coal and even gold. We should enhance our current mines as soon as our miners are more experienced. We should build up some more mines, a bigger food infrastructure to always supply our men with sufficient food and a further processing economy. But that’s still not everything – most of our soldiers are quite young and neither have a good weapon nor are they well trained. We should build up training sites to prepare them for their future tasks.]]))
+		.. new_objectives(obj_build_training_infrastructure)
 }
 
 order_msg_7_free_althunran = {
    posy = 1,
-   title=_"Military Assault",
-   body= thron(
-_([[So be it, the generals are out and about arranging my troops, and Boldreth himself will lead the first strike. ]] ..
-[[I will ride by his side, to free Al’thunran of this war and return peace to our capital.]]) .. paragraphdivider() ..
-_([[When the young sun rises above the trees tomorrow morning, I will order the assault. ]] ..
-[[By dusk, I will celebrate my victory in the wooden halls of the warlord ]] ..
-[[and sacrifice a newborn lamb in the honor of my father, whose eyes are set upon me today.]]) ..
-paragraphdivider() ..
-_([[So be it!]]))
-.. new_objectives(obj_military_assault_on_althunran),
+   title = _"Military Assault",
+   body = thron(_"Thron says:",
+		_([[So be it, the generals are out and about arranging my troops, and Boldreth himself will lead the first strike. I will ride by his side, to free Al’thunran of this war and return peace to our capital.]])
+		.. paragraphdivider() ..
+		_([[When the young sun rises above the trees tomorrow morning, I will order the assault. By dusk, I will celebrate my victory in the wooden halls of the warlord and sacrifice a newborn lamb in the honor of my father, whose eyes are set upon me today.]])
+		.. paragraphdivider() ..
+		_([[So be it!]]))
+		.. new_objectives(obj_military_assault_on_althunran),
 }
 
 cattlefarm_01 = {
-   title = _"Khantrukh says:",
-   body= khantrukh(
-_([[Chieftain, remember the poor carriers: Our roads get longer and longer ]] ..
-[[and the burden on their shoulders never gets lighter. ]] ..
-[[We should breed more oxen to make their work lighter and our transportation more efficient.]]))
-.. new_objectives(obj_build_cattlefarm),
+   title = _"Faster Transportation",
+   body = khantrukh(_"Khantrukh says:",
+		_([[Chieftain, remember the poor carriers: Our roads get longer and longer and the burden on their shoulders never gets lighter. We should breed more oxen to make their work lighter and our transportation more efficient.]]))
+		.. new_objectives(obj_build_cattlefarm),
+}
+
+story_msg_7 = {
+   posy = 1,
+   title = _"Another Cold Day",
+   body = thron(_"Thron looks worried...",
+		_([[My brothers and their soldiers are dead and left fire and destruction behind. In none of all the ruins could I find any man or woman of the normal folk, and so I just may hope that they fled from this cruel battleground and started a better life somewhere else.]])
+		.. paragraphdivider() ..
+		_([[Nothing is left of that beauty I remember, only ruins remain of the old capital. I am sorrowful but also relieved. I never hoped to ever see Al’thunran’s old beauty again – it was only a few months ago that I wondered whether I would ever be able to set my feet in Al’thunran again. Now the old town is back in my hands, and I will not hesitate to rebuild it with all the strength my people have. I can’t wait to see it again in its old beauty.]]))
+		..  objective_text(_"Victory",
+		_([[You have completed the last mission of the barbarian tutorial campaign. You may continue playing if you wish, otherwise move on to the next campaign.]]))
 }

=== modified file 'maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua'
--- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua	2014-08-26 17:25:00 +0000
+++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua	2014-10-02 21:13:22 +0000
@@ -2,8 +2,9 @@
 -- Island Hopping Fun Map Scripting
 -- =================================
 include "scripting/coroutine.lua"
+include "scripting/formatting.lua"
 include "scripting/infrastructure.lua"
-include "scripting/formatting.lua"
+include "scripting/messages.lua"
 include "scripting/objective_utils.lua"
 
 -- ==========
@@ -95,7 +96,7 @@
 -- Sends a game status message to all players
 function send_to_all(text)
    for idx,plr in ipairs(game.players) do
-      plr:send_message(_ "Game Status", text, {popup=true})
+      send_message(plr, _ "Game Status", text, {popup=true})
    end
 end
 

=== modified file 'maps/MP Scenarios/Smugglers.wmf/elemental'
--- maps/MP Scenarios/Smugglers.wmf/elemental	2014-02-25 10:47:47 +0000
+++ maps/MP Scenarios/Smugglers.wmf/elemental	2014-10-02 21:13:22 +0000
@@ -6,7 +6,7 @@
 map_h="144"
 nr_players="4"
 world="greenland"
-name="Smugglers"
+name=_"Smugglers"
 author="Nasenbaer,SirVer"
 descr=_"Your well established smuggling routes suddenly got busy: Two other tribes have appeared and now a rivalry among smugglers has started: Which team will be the first to smuggle a certain number of wares? Teams are: Blue + Red vs. Yellow + Green."
 tags="official"

=== modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/smuggling.lua'
--- maps/MP Scenarios/Smugglers.wmf/scripting/smuggling.lua	2014-07-27 16:43:42 +0000
+++ maps/MP Scenarios/Smugglers.wmf/scripting/smuggling.lua	2014-10-02 21:13:22 +0000
@@ -2,6 +2,8 @@
 --                              Smuggling logic
 -- =======================================================================
 
+include "scripting/messages.lua"
+
 -- =================
 -- Helper functions
 -- =================
@@ -91,13 +93,13 @@
    )
    for idx,plr in ipairs(game.players) do
       if plr.number ~= receiving_wh.owner.number and plr.number ~= sending_wh.owner.number then
-         plr:send_message(_ "Game Status", non_team_message, {popup=true})
+         send_message(plr, _ "Game Status", non_team_message, {popup=true})
       end
    end
-   receiving_wh.owner:send_message(_ "Game Status",
+   send_message(receiving_wh.owner, _ "Game Status",
       smuggling_route_established_receiver:format(points), {popup=true, field=receiving_wh.fields[1]}
    )
-   sending_wh.owner:send_message(_ "Game Status",
+   send_message(sending_wh.owner, _ "Game Status",
       smuggling_route_established_sender:format(points), {popup=true, field=sending_wh.fields[1]}
    )
 

=== modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua'
--- maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua	2014-07-15 18:30:46 +0000
+++ maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -4,52 +4,41 @@
 welcome_msg = rt(
    h1(_"Smugglers") ..
    h2(_"Rules") ..
-   p(_(
-[[Smugglers is a fun map for 4 players. You and your partner start diagonally from each other on a point symmetric island. ]] ..
-[[There are plenty of smuggling tunnels on this island, each consisting of a receiving and a sending end. ]])
-.. _(
-[[To establish a smuggling route, you need to build a warehouse on a sending/receiving spot ]] ..
-[[while your team mate has to build one on the corresponding receiving/sending spot. ]] ..
-[[A ware is then transported every 10 seconds. ]]) ..
--- TRANSLATORS: %s = '<number> points'
-_([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]]
-)) ..
-   rt("image=map:send_spot.png", p(_"A sending spot")) ..
-   rt("image=map:recv_spot.png", p(_"A receiving spot")) ..
-rt(
-   p(_(
-[[Remember that the map has rotational symmetry. ]] ..
-[[For example, when you have found a spot to the top-left of your headquarters, ]] ..
-[[the corresponding spot will be to the bottom-right of the headquarters of your team mate.]])
-))  .. p(_(
-[[You can see the number of wares traded at any time in the general statistics menu. Good luck!]]
-)))
+   p(
+		_([[Smugglers is a fun map for 4 players. You and your partner start diagonally from each other on a point symmetric island. There are plenty of smuggling tunnels on this island, each consisting of a receiving and a sending end. ]]) ..
+		_([[To establish a smuggling route, you need to build a warehouse on a sending/receiving spot while your team mate has to build one on the corresponding receiving/sending spot. A ware is then transported every 10 seconds. ]]) ..
+		-- TRANSLATORS: %s = '<number> points'
+		_([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]]))
+	) ..
+		rt(h2(_"A sending spot")) .. rt("image=map:send_spot.png", p("")) ..
+		rt(h2(_"A receiving spot")) .. rt("image=map:recv_spot.png", p("")) ..
+	rt(h2(_"Note")) ..
+		p(_([[Remember that the map has rotational symmetry. For example, when you have found a spot to the top-left of your headquarters, the corresponding spot will be to the bottom-right of the headquarters of your team mate.]])) ..
+		p(_([[You can see the number of wares traded at any time in the general statistics menu. Good luck!]]))
+	)
 
 -- TRANSLATORS: the first 2 parameters are player names, the last parameter is '<number> points'
-smuggling_route_established_other_team = rt(p(_(
-[[A new smuggling route from %1$s to %2$s has been established! ]] ..
-[[Every ware they smuggle there is worth %3$s.]]
-)))
--- TRANSLATORS: %s = '<number> points'
-smuggling_route_established_sender = rt(p(_(
-[[Your team has established a new smuggling route. You have the sending warehouse. ]] ..
-[[Every ware smuggled here is worth %s.]]
-)))
--- TRANSLATORS: %s = '<number> points'
-smuggling_route_established_receiver = rt(p(_(
-[[Your team has established a new smuggling route. You have the receiving warehouse. ]] ..
-[[Every ware smuggled here is worth %s.]]
-)))
+smuggling_route_established_other_team = rt(
+		p(_([[A new smuggling route from %1$s to %2$s has been established! Every ware they smuggle there is worth %3$s.]]))
+	)
+
+-- TRANSLATORS: %s = '<number> points'
+smuggling_route_established_sender = rt(
+		p(_([[Your team has established a new smuggling route. You have the sending warehouse. Every ware smuggled here is worth %s.]]))
+	)
+
+-- TRANSLATORS: %s = '<number> points'
+smuggling_route_established_receiver = rt(
+		p(_([[Your team has established a new smuggling route. You have the receiving warehouse. Every ware smuggled here is worth %s.]]))
+	)
 
 -- TRANSLATORS: the first parameter is '<number> points', the last 2 parameters are player names
-smuggling_route_broken = rt(p(_
-[[The smuggling route worth %1$s from %2$s to %3$s has been broken!]]
-))
+smuggling_route_broken = rt(
+		p(_[[The smuggling route worth %1$s from %2$s to %3$s has been broken!]])
+	)
 
 game_over = rt(
-   h1("Game over!") ..
+		h1("Game over!") ..
 -- TRANSLATORS: the first 4 parameters are player names, the last parameter is '<number> points'
-   p(_
-[[Game over! %1$s and %2$s have won the game! %3$s and %4$s only managed to collect %5$s.]]
-)
-)
+		p(_[[Game over! %1$s and %2$s have won the game! %3$s and %4$s only managed to collect %5$s.]])
+	)

=== modified file 'maps/Plateau.wmf/scripting/init.lua'
--- maps/Plateau.wmf/scripting/init.lua	2014-05-28 09:15:34 +0000
+++ maps/Plateau.wmf/scripting/init.lua	2014-10-02 21:13:22 +0000
@@ -6,6 +6,7 @@
 
 include "scripting/coroutine.lua"
 include "scripting/infrastructure.lua"
+include "scripting/messages.lua"
 include "scripting/table.lua"
 include "scripting/ui.lua"
 
@@ -21,8 +22,8 @@
 function mission_thread()
    sleep(300)
 
-   send_msg(briefing_1_the_forbidden_island)
-   local o = add_obj(obj_forbidden_island)
+   campaign_message_box(briefing_1_the_forbidden_island)
+   local o = add_campaign_objective(obj_forbidden_island)
 
    local map = wl.Game().map
    while not p1:seen_field(map:get_field(5,8)) do sleep(2345) end
@@ -47,9 +48,9 @@
    -- Move to the castle
    scroll_smoothly_to(castle)
 
-   send_msg(briefing_2_found_ancient_castle)
+   campaign_message_box(briefing_2_found_ancient_castle)
    o.done = true
-   o = add_obj(obj_capture_ancient_castle)
+   o = add_campaign_objective(obj_capture_ancient_castle)
 
    -- Wait till we conquered the castle
    while #p1:get_buildings"castle.atlanteans" < 1 do sleep(2345) end
@@ -58,9 +59,9 @@
    scroll_smoothly_to(castle)
 
    p1:reveal_fields(castle:region(18))
-   send_msg(briefing_3_captured_ancient_castle)
-   local o_erwyn = add_obj(obj_defeat_erwyn)
-   local o_jomo = add_obj(obj_defeat_jomo)
+   campaign_message_box(briefing_3_captured_ancient_castle)
+   local o_erwyn = add_campaign_objective(obj_defeat_erwyn)
+   local o_jomo = add_campaign_objective(obj_defeat_jomo)
 
    sleep(100)
    p1:hide_fields(castle:region(18))
@@ -68,19 +69,19 @@
    -- Function to check for victory over erwyn
    run(function()
       while not p2.defeated do sleep(3434) end
-      send_msg(briefing_erwyn_defeated)
+      campaign_message_box(briefing_erwyn_defeated)
       o_erwyn.done = true
    end)
    -- Function to check for victory over jomo
    run(function()
       while not p3.defeated do sleep(3434) end
-      send_msg(briefing_jomo_defeated)
+      campaign_message_box(briefing_jomo_defeated)
       o_jomo.done = true
    end)
 
    while not (p2.defeated and p3.defeated) do sleep(4325) end
 
-   send_msg(last_briefing_victory)
+   campaign_message_box(last_briefing_victory)
 end
 
 run(mission_thread)

=== modified file 'maps/Plateau.wmf/scripting/texts.lua'
--- maps/Plateau.wmf/scripting/texts.lua	2014-07-15 17:29:28 +0000
+++ maps/Plateau.wmf/scripting/texts.lua	2014-10-02 21:13:22 +0000
@@ -4,34 +4,19 @@
 
 include "scripting/formatting.lua"
 include "scripting/format_scenario.lua"
+include "scripting/messages.lua"
 
--- Removes whitespace at the beginning or the end and translates
--- newlines into spaces.
-function reflow(s)
-   s = s:gsub("\r", ""):gsub("\n", " ")
-   return s:match'^%s*(.*%S)' or ''
-end
 
 -- ===========
 -- Objectives
 -- ===========
-function _obj(t)
-   return
-      "<rt><p line-spacing=3 font-size=12>" .. reflow(t) .. "</p></rt>"
-end
-function add_obj(o)
-   return p1:add_objective(o.name, o.title, _obj(reflow(o.body)), o)
-end
-
 obj_forbidden_island = {
    name = "forbidden_island",
    title = _"The Forbidden Island",
-   body = _(
-[[Finally! We have just taken our first step towards victory! ]] ..
-[[Last night, we landed on the forbidden island and defeated the few guards that were watching the ]] ..
-[[north-western part of the island. ]] ..
-[[I am quite sure that none of the other warlords has detected us so far, ]] ..
-[[so we should keep quiet and build up our infrastructure. Soon we will be strong enough to raid their positions.]]),
+   number = 1,
+   body = objective_text(_"The Forbidden Island",
+		_([[Finally! We have just taken our first step towards victory! Last night, we landed on the forbidden island and defeated the few guards that were watching the north-western part of the island. I am quite sure that none of the other warlords has detected us so far, so we should keep quiet and build up our infrastructure. Soon we will be strong enough to raid their positions.]])
+   ),
 }
 
 
@@ -39,42 +24,40 @@
 obj_capture_ancient_castle = {
    name = "capture_ancient_castle",
    title = _"Capture the Ancient Castle",
-   body = listitem_bullet(_[[Defeat Lanissa and capture the ancient castle.]]),
+   number = 1,
+   body = objective_text(_"Capture the Ancient Castle",
+		listitem_bullet(_[[Defeat Lanissa and capture the ancient castle.]])
+   ),
 }
 
 obj_defeat_erwyn = {
    name = "defeat_erwyn",
    title = _"Defeat Erwyn",
-   body = listitem_bullet(_[[Defeat Erwyn. He commands the strongest opposing military force left on this island.]]),
+   number = 1,
+	body = objective_text(_"Defeat Erwyn",
+		listitem_bullet(_[[Defeat Erwyn. He commands the strongest opposing military force left on this island.]])
+   ),
 }
 obj_defeat_jomo = {
    name = "defeat_jomo",
-   title =_ "Defeat Jomo",
-   body = listitem_bullet(_[[Defeat Jomo. He is taking care of the soldiers’ food supply.]]),
+   title = _"Defeat Jomo",
+   number = 1,
+   body = objective_text(_"Defeat Jomo",
+		listitem_bullet(_[[Defeat Jomo. He is taking care of the soldiers’ food supply.]])
+	),
 }
 
 -- =====================
 -- Messages to the User
 -- =====================
-function _msg(title, text, ...)
-   local s =
-"<rt><p font-size=24 font-face=DejaVuSerif font-weight=bold font-color=3333FF>"
-   .. title ..  "</p></rt><rt>" ..
-   "<rt><p line-spacing=3 font-size=12>" .. reflow(text)
-   objs = {...}
-   if #objs > 0 then
-      s = s .. "<br><br></p></rt>" .. rt(h2(_"New Objective")) .. "<rt><p line-spacing=3 font-size=12>"
-      local i = 1
-      while i < #objs do
-         s = s .. reflow(objs[i].body) .. "<br>"
-         i = i+1
-      end
-      s = s .. reflow(objs[#objs].body)
-   end
-   return s .. "</p></rt>"
-end
-function send_msg(t)
-   p1:message_box(t.title, t.body, t)
+
+function obj_message(title, text)
+   return
+		rt("<p font-size=20 font-weight=bold font-face=DejaVuSerif font-color=3333FF>"
+			..	title ..
+			"</p><p font-size=10> <br></p>"
+			.. p(text)
+			)
 end
 
 briefing_1_the_forbidden_island = {
@@ -82,12 +65,9 @@
    width = 400,
    height = 300,
    posy = 1,
-   body = _msg(_"The Forbidden Island", _(
-[[Finally! We have just taken our first step towards victory! ]] ..
-[[Last night, we landed on the forbidden island and defeated the few guards that were watching the ]] ..
-[[north-western part of the island. ]] ..
-[[I am quite sure that none of the other warlords has detected us so far, ]] ..
-[[so we should keep quiet and build up our infrastructure. Soon we will be strong enough to raid their positions.]])),
+   body = obj_message(_"The Forbidden Island",
+		_([[Finally! We have just taken our first step towards victory! Last night, we landed on the forbidden island and defeated the few guards that were watching the north-western part of the island. I am quite sure that none of the other warlords has detected us so far, so we should keep quiet and build up our infrastructure. Soon we will be strong enough to raid their positions.]])
+	),
 }
 
 briefing_2_found_ancient_castle = {
@@ -95,14 +75,10 @@
    width = 400,
    height = 300,
    posy = 1,
-   body = _msg(_"An Ancient Castle", _(
-[[By the Gods! One of our scouts has discovered a mighty castle at the center of the old plateau. ]] ..
-[[The castle must be quite old and seems to have been built in a foreign style. ]] ..
-[[It’s quite obvious that this is not barbarian craft.]]) .. paragraphdivider() ..
-_([[Let’s hope that Lanissa – the warlord holding sway over that castle – has not discovered our movements yet. ]] ..
-[[Perhaps we have a chance of conquering that mighty building without a bigger fight! ]] ..
-[[However, it is essential that we capture it. It will be the key to our reign over this island!]]),
-   obj_capture_ancient_castle),
+   body = obj_message(_"An Ancient Castle",
+		_([[By the Gods! One of our scouts has discovered a mighty castle at the center of the old plateau. The castle must be quite old and seems to have been built in a foreign style. It’s quite obvious that this is not barbarian craft.]]) .. paragraphdivider() ..
+		_([[Let’s hope that Lanissa – the warlord holding sway over that castle – has not discovered our movements yet. Perhaps we have a chance of conquering that mighty building without a bigger fight! However, it is essential that we capture it. It will be the key to our reign over this island!]]))
+		.. new_objectives(obj_capture_ancient_castle)
 }
 
 briefing_3_captured_ancient_castle = {
@@ -110,16 +86,10 @@
    width = 400,
    height = 300,
    posy = 1,
-   body = _msg(_"Ancient Castle Captured", _(
-[[Wonderful! Our troops have finally defeated Lanissa and her soldiers. The ancient castle is ours!]]) .. paragraphdivider() ..
-_([[It is amazing how far one can see from the highest tower of the castle. We can watch the whole island. ]] ..
-[[So now I wonder why Lanissa did not see us and thus did not prepare. ]] ..
-[[Be that as it may, some things will never come to the light of day. ]] ..
-[[The only important issue at the moment are the opposing troops still left. ]] ..
-[[We have discovered enemy positions held by Erwyn to the north and east of the castle. ]] ..
-[[He is known to be a strong warlord and surely commands the strongest warriors. ]] ..
-[[In the south, we caught sight of some food infrastructures guarded by Jomo – a younger warlord – ]] ..
-[[and we should take care of those infrastructures so we can cut off our enemies’ food supply.]]), obj_defeat_erwyn, obj_defeat_jomo),
+   body = obj_message(_"Ancient Castle Captured",
+		_([[Wonderful! Our troops have finally defeated Lanissa and her soldiers. The ancient castle is ours!]]) .. paragraphdivider() ..
+		_([[It is amazing how far one can see from the highest tower of the castle. We can watch the whole island. So now I wonder why Lanissa did not see us and thus did not prepare. Be that as it may, some things will never come to the light of day. The only important issue at the moment are the opposing troops still left. We have discovered enemy positions held by Erwyn to the north and east of the castle. He is known to be a strong warlord and surely commands the strongest warriors. In the south, we caught sight of some food infrastructures guarded by Jomo – a younger warlord – and we should take care of those infrastructures so we can cut off our enemies’ food supply.]]))
+		.. new_objectives(obj_defeat_erwyn) .. new_objectives(obj_defeat_jomo)
 }
 
 briefing_erwyn_defeated = {
@@ -127,8 +97,8 @@
    width = 400,
    height = 300,
    posy = 1,
-   body = _msg( _"Erwyn Defeated", _
-[[Great! Erwyn gave up when he saw his last buildings burning down. That’s one less strong warlord on this island!]]),
+   body = obj_message(_"Erwyn Defeated",
+		_([[Great! Erwyn gave up when he saw his last buildings burning down. That’s one less strong warlord on this island!]]))
 }
 
 briefing_jomo_defeated = {
@@ -136,8 +106,8 @@
    width = 400,
    height = 300,
    posy = 1,
-   body = _msg( _"Jomo Defeated", _
-[[Great! Jomo gave up when he saw his last buildings burning down. That’s one less warlord on this island!]]),
+   body = obj_message(_"Jomo Defeated",
+		_([[Great! Jomo gave up when he saw his last buildings burning down. That’s one less warlord on this island!]]))
 }
 
 last_briefing_victory = {
@@ -145,8 +115,7 @@
    width = 400,
    height = 300,
    posy = 1,
-   body = _msg( _"Victory!", _
-[[Finally! The island is completely ours. Now we just have to defend it better than the warlords did.]] .. paragraphdivider() ..
-_"Congratulations! You have mastered this scenario. You may play on if you like!"
-),
+   body = obj_message(_"Victory!",
+		_([[Finally! The island is completely ours. Now we just have to defend it better than the warlords did.]]) .. paragraphdivider() ..
+		_("Congratulations! You have mastered this scenario. You may play on if you like!"))
 }

=== modified file 'scripting/format_scenario.lua'
--- scripting/format_scenario.lua	2014-07-14 10:45:44 +0000
+++ scripting/format_scenario.lua	2014-10-02 21:13:22 +0000
@@ -57,7 +57,7 @@
 --
 --    :returns: symbol .. " " .. text .. paragraphdivider()
 function listitem(symbol, text)
-   return symbol .. " " .. text .. paragraphdivider()
+   return symbol .. " " .. text .. listdivider()
 end
 
 -- RST
@@ -84,6 +84,19 @@
    return listitem("•", text)
 end
 
+
+-- RST
+-- .. function:: listdivider()
+--
+--    Closes a paragraph and opens a new paragraph.
+--    Use this before starting a list when it doesn't create a paragraph.
+--    If you want more space, before the list, use paragraphdivider().
+--
+--    :returns: <br></p><p font-size=4><br></p><p line-spacing=3 font-size=12>
+function listdivider()
+	return ("<br></p><p font-size=4><br></p><p line-spacing=3 font-size=12>")
+end
+
 -- RST
 -- .. function:: paragraphdivider()
 --

=== added file 'scripting/messages.lua'
--- scripting/messages.lua	1970-01-01 00:00:00 +0000
+++ scripting/messages.lua	2014-10-02 21:13:22 +0000
@@ -0,0 +1,76 @@
+-- RST
+-- messages.lua
+-- --------------
+--
+-- Functions to send messages to the player and to add objectives to campaigns.
+
+include "scripting/coroutine.lua"
+
+-- RST
+-- .. function:: send_message(player, title, body, parameters)
+--
+--    Sends a message to the player.
+--    If the popup parameter is true and the player is in building mode,
+--    the function waits until the player leaves the building mode
+--    before sending the message
+--
+--    :arg player: the recipient of the message
+--    :arg title: the localized title of the message
+--    :type title: :class:`string`
+--    :arg body: the localized body of the message. You can use rt functions here.
+--    :type body: :class:`string`
+--    :arg parameters: Array of message parameters as defined in the Lua interface,
+--                     for wl.game.Player, e.g. { field = f, popup = true }.
+--                     The popup parameter must be set.
+--
+function send_message(player, title, body, parameters)
+	if (parameters["popup"]) then
+		while (wl.ui.MapView().is_building_road) do sleep(2000) end
+   end
+   player:send_message(title, body, parameters)
+end
+
+-- RST
+-- .. function:: message_box(player, title, message, parameters)
+--
+--    Waits if player is in building mode, then shows a scenario message box
+--
+--    :arg player: the recipient of the message
+--    :arg title: the localized title of the message
+--    :type title: :class:`string`
+--    :arg body: the localized body of the message. You can use rt functions here.
+--    :type body: :class:`string`
+--    :arg parameters: Array of message parameters as defined in the Lua interface,
+--                     for wl.game.Player, e.g. { field = f }.
+--
+function message_box(player, title, body, parameters)
+   while (wl.ui.MapView().is_building_road) do sleep(2000) end
+   player:message_box(title, body, parameters)
+end
+
+-- RST
+-- .. function:: campaign_message_box(message)
+--
+--    Sets message.h and message.w if not set and calls
+--    message_box(player, title, body, parameters) for player 1
+--
+--    :arg message: the message to be sent
+--
+function campaign_message_box(message)
+   if not message.h then message.h = 400 end
+   if not message.w then message.w = 450 end
+   message_box(wl.Game().players[1], message.title, message.body, message)
+end
+
+-- RST
+-- .. function:: add_campaign_objective(objective)
+--
+--    Addes an objective to a campaign.
+--
+--    :arg objective: The objective to be added. It needs to have a name, title, and body.
+--
+--    :returns: The new objective.
+--
+function add_campaign_objective(objective)
+   return wl.Game().players[1]:add_objective(objective.name, objective.title, objective.body)
+end

=== modified file 'scripting/ui.lua'
--- scripting/ui.lua	2014-03-25 06:18:48 +0000
+++ scripting/ui.lua	2014-10-02 21:13:22 +0000
@@ -107,6 +107,8 @@
 --
 --    Make a nice moving transition in a given time to the viewpoint x, y.
 --    The function will return as soon as the transition is completed.
+--    If the player is in roadbuilding mode, waits before the player is
+--    finished before moving.
 --
 --    :arg x: x position to center the view on
 --    :type x: :class:`integer`
@@ -118,6 +120,7 @@
 --    :returns: an :class:`array` with the intermediate points that were
 --       targeted
 function scroll_smoothly_to_pos(x, y, g_T)
+   while (wl.ui.MapView().is_building_road) do sleep(2000) end
    local start = {
       x = wl.ui.MapView().viewpoint_x,
       y = wl.ui.MapView().viewpoint_y

=== modified file 'scripting/win_condition_functions.lua'
--- scripting/win_condition_functions.lua	2014-06-05 10:04:20 +0000
+++ scripting/win_condition_functions.lua	2014-10-02 21:13:22 +0000
@@ -1,3 +1,5 @@
+include "scripting/messages.lua"
+
 -- RST
 -- win_condition_functions.lua
 -- ---------------------------
@@ -101,10 +103,11 @@
 --    broadcast a message to all players using
 --    :meth:`~wl.game.Player.send_message`. All parameters are passed
 --    literally.
+--    Message is delayed while player is in road building mode.
 function broadcast(plrs, header, msg, goptions)
    local options = goptions or {}
    for idx, p in ipairs(plrs) do
-      p:send_message(header, msg, options)
+      send_message(p, header, msg, options)
    end
 end
 

=== modified file 'scripting/win_conditions/02_collectors.lua'
--- scripting/win_conditions/02_collectors.lua	2014-07-15 18:30:46 +0000
+++ scripting/win_conditions/02_collectors.lua	2014-10-02 21:13:22 +0000
@@ -3,8 +3,9 @@
 -- =======================================================================
 
 include "scripting/coroutine.lua" -- for sleep
+include "scripting/messages.lua"
+include "scripting/formatting.lua"
 include "scripting/table.lua"
-include "scripting/formatting.lua"
 include "scripting/win_condition_functions.lua"
 
 set_textdomain("win_conditions")
@@ -138,7 +139,7 @@
       end
 
       for idx, plr in ipairs(plrs) do
-         plr:send_message(game_status.title, "<rt>" .. msg .. "</rt>")
+			send_message(plr, game_status.title,  "<rt>" .. msg .. "</rt>", {popup = true})
       end
    end
 

=== modified file 'scripting/win_conditions/03_territorial_lord.lua'
--- scripting/win_conditions/03_territorial_lord.lua	2014-06-05 10:04:20 +0000
+++ scripting/win_conditions/03_territorial_lord.lua	2014-10-02 21:13:22 +0000
@@ -3,6 +3,7 @@
 -- =======================================================================
 
 include "scripting/coroutine.lua" -- for sleep
+include "scripting/messages.lua"
 include "scripting/table.lua"
 include "scripting/win_condition_functions.lua"
 
@@ -167,9 +168,9 @@
 			for idx, p in ipairs(plrs) do
 				if candidateisteam and currentcandidate == p.team
 					or not candidateisteam and currentcandidate == p.name then
-					p:send_message(game_status.title, msg2)
+					send_message(p, game_status.title, msg2, {popup = true})
 				else
-					p:send_message(game_status.title, msg1)
+					send_message(p, game_status.title, msg1, {popup = true})
 				end
 			end
 		end

=== modified file 'scripting/win_conditions/03_territorial_time.lua'
--- scripting/win_conditions/03_territorial_time.lua	2014-06-05 10:04:20 +0000
+++ scripting/win_conditions/03_territorial_time.lua	2014-10-02 21:13:22 +0000
@@ -3,6 +3,7 @@
 -- =======================================================================
 
 include "scripting/coroutine.lua" -- for sleep
+include "scripting/messages.lua"
 include "scripting/table.lua"
 include "scripting/win_condition_functions.lua"
 
@@ -231,7 +232,7 @@
 				msg = msg .. "\n\n"
 				msg = msg .. game_status.body
 				msg = msg .. _status(points, "has")
-				p:send_message(game_status.title, msg, {popup = true})
+				send_message(p, game_status.title, msg, {popup = true})
 			end
 		end
 


Follow ups