Merge lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands

Proposed by GunChleoc
Status: Work in progress
Proposed branch: lp:~widelands-dev/widelands/fh1_multiline_textarea
Merge into: lp:widelands
Diff against target: 10496 lines (+2235/-3546)
134 files modified
data/campaigns/atl01.wmf/scripting/init.lua (+2/-3)
data/campaigns/atl01.wmf/scripting/texts.lua (+58/-61)
data/campaigns/bar01.wmf/scripting/texts.lua (+71/-81)
data/campaigns/bar02.wmf/scripting/texts.lua (+33/-36)
data/campaigns/emp01.wmf/scripting/texts.lua (+28/-29)
data/campaigns/emp02.wmf/scripting/texts.lua (+35/-33)
data/campaigns/tutorial01_basic_control.wmf/scripting/texts.lua (+125/-210)
data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua (+56/-84)
data/campaigns/tutorial03_seafaring.wmf/scripting/texts.lua (+43/-74)
data/campaigns/tutorial04_economy.wmf/scripting/texts.lua (+112/-185)
data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/first_island.lua (+4/-4)
data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/multiplayer_init.lua (+1/-1)
data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/texts.lua (+15/-16)
data/maps/MP_Scenarios/Smugglers.wmf/scripting/texts.lua (+6/-6)
data/maps/The_Green_Plateau.wmf/scripting/texts.lua (+7/-11)
data/scripting/editor/editor_controls.lua (+34/-36)
data/scripting/editor/editor_introduction.lua (+7/-9)
data/scripting/editor/format_editor.lua (+3/-22)
data/scripting/editor/terrain_help.lua (+9/-9)
data/scripting/editor/tree_help.lua (+3/-3)
data/scripting/format_scenario.lua (+7/-24)
data/scripting/formatting.lua (+321/-152)
data/scripting/messages.lua (+5/-4)
data/scripting/win_conditions/collectors.lua (+7/-7)
data/scripting/win_conditions/defeat_all.lua (+1/-0)
data/scripting/win_conditions/endless_game.lua (+1/-0)
data/scripting/win_conditions/endless_game_fogless.lua (+1/-0)
data/scripting/win_conditions/territorial_lord.lua (+1/-0)
data/scripting/win_conditions/win_condition_functions.lua (+1/-0)
data/scripting/win_conditions/win_condition_texts.lua (+5/-5)
data/scripting/win_conditions/wood_gnome.lua (+1/-1)
data/tribes/scripting/help/building_help.lua (+121/-118)
data/tribes/scripting/help/controls.lua (+75/-77)
data/tribes/scripting/help/format_help.lua (+88/-40)
data/tribes/scripting/help/introduction.lua (+2/-4)
data/tribes/scripting/help/ware_help.lua (+6/-6)
data/tribes/scripting/help/worker_help.lua (+38/-50)
data/txts/AUTHORS.lua (+17/-10)
data/txts/LICENSE.lua (+19/-29)
data/txts/README.lua (+32/-34)
data/txts/TRANSLATORS.lua (+28/-10)
data/txts/format_authors.lua (+0/-14)
data/txts/help/multiplayer_help.lua (+22/-25)
data/txts/translators_data.lua (+1/-1)
doc/sphinx/source/wlrichtext.rst (+4/-6)
src/editor/ui_menus/tool_change_resources_options_menu.cc (+1/-1)
src/graphic/CMakeLists.txt (+0/-7)
src/graphic/font.cc (+0/-1)
src/graphic/font_handler.cc (+0/-265)
src/graphic/font_handler.h (+0/-75)
src/graphic/font_handler1.cc (+3/-1)
src/graphic/graphic.cc (+0/-5)
src/graphic/richtext.cc (+0/-505)
src/graphic/richtext.h (+0/-61)
src/graphic/text/CMakeLists.txt (+1/-0)
src/graphic/text/rt_parse.cc (+29/-14)
src/graphic/text/rt_render.cc (+309/-129)
src/graphic/text/rt_render.h (+2/-9)
src/graphic/text/test/data/br/input00.txt (+0/-13)
src/graphic/text/test/data/br/width (+0/-1)
src/graphic/text/test/data/bullet_point/input00.txt (+8/-8)
src/graphic/text/test/data/div_autowidth_floatleftimg/input00.txt (+2/-2)
src/graphic/text/test/data/div_background_img/input00.txt (+2/-2)
src/graphic/text/test/data/div_fixedwidth_floatbothsides/input00.txt (+4/-4)
src/graphic/text/test/data/div_fixedwidth_floatleft/input00.txt (+2/-2)
src/graphic/text/test/data/div_fixedwidth_floatleftimg/input00.txt (+2/-2)
src/graphic/text/test/data/div_fixedwidth_floatright/input00.txt (+2/-2)
src/graphic/text/test/data/div_margin_bgclr/input00.txt (+4/-4)
src/graphic/text/test/data/div_margin_bgimg/input00.txt (+4/-4)
src/graphic/text/test/data/div_nonfloating_valign/input00.txt (+2/-2)
src/graphic/text/test/data/div_padding/input00.txt (+2/-2)
src/graphic/text/test/data/font_shadow/input00.txt (+1/-1)
src/graphic/text/test/data/table_like/input00.txt (+17/-14)
src/graphic/text_constants.h (+6/-12)
src/graphic/text_constants.h.moved (+42/-0)
src/graphic/text_layout.cc (+24/-5)
src/graphic/text_layout.h (+17/-8)
src/graphic/text_parser.cc (+0/-286)
src/graphic/text_parser.h (+0/-185)
src/logic/cmd_luacoroutine.cc (+1/-4)
src/logic/map_objects/map_object.cc (+63/-0)
src/logic/map_objects/map_object.h (+15/-1)
src/logic/map_objects/tribes/building.cc (+1/-57)
src/logic/map_objects/tribes/building.h (+0/-10)
src/logic/map_objects/tribes/militarysite.cc (+14/-8)
src/logic/map_objects/tribes/production_program.cc (+3/-4)
src/logic/map_objects/tribes/productionsite.cc (+3/-2)
src/logic/map_objects/tribes/ship.cc (+24/-48)
src/logic/map_objects/tribes/ship.h (+0/-6)
src/logic/map_objects/tribes/soldier.cc (+7/-10)
src/logic/map_objects/tribes/warehouse.cc (+12/-6)
src/logic/map_objects/tribes/worker.cc (+6/-16)
src/logic/map_objects/world/resource_description.cc (+1/-1)
src/logic/map_objects/world/resource_description.h (+3/-3)
src/scripting/lua_map.cc (+1/-1)
src/third_party/eris/lstate.h (+1/-1)
src/ui_basic/button.h (+0/-2)
src/ui_basic/editbox.cc (+2/-2)
src/ui_basic/editbox.h (+1/-1)
src/ui_basic/icongrid.h (+0/-1)
src/ui_basic/listselect.cc (+1/-1)
src/ui_basic/messagebox.cc (+1/-1)
src/ui_basic/multilineeditbox.cc (+1/-1)
src/ui_basic/multilinetextarea.cc (+63/-50)
src/ui_basic/multilinetextarea.h (+3/-10)
src/ui_basic/panel.cc (+6/-1)
src/ui_basic/progressbar.cc (+2/-2)
src/ui_basic/progresswindow.cc (+1/-1)
src/ui_basic/slider.cc (+6/-6)
src/ui_basic/textarea.cc (+1/-1)
src/ui_fsmenu/about.cc (+1/-1)
src/ui_fsmenu/base.cc (+2/-2)
src/ui_fsmenu/campaign_select.cc (+2/-2)
src/ui_fsmenu/launch_spg.cc (+1/-1)
src/ui_fsmenu/loadgame.cc (+1/-1)
src/ui_fsmenu/mapselect.cc (+1/-1)
src/ui_fsmenu/netsetup_lan.cc (+1/-1)
src/ui_fsmenu/options.cc (+1/-1)
src/wlapplication.cc (+1/-8)
src/wui/attack_box.cc (+1/-1)
src/wui/attack_box.h (+2/-1)
src/wui/chat_msg_layout.cc (+0/-60)
src/wui/chat_msg_layout.h (+0/-3)
src/wui/encyclopedia_window.cc (+6/-5)
src/wui/game_debug_ui.cc (+2/-2)
src/wui/game_message_menu.cc (+1/-5)
src/wui/game_summary.cc (+1/-1)
src/wui/gamechatpanel.cc (+3/-5)
src/wui/helpwindow.cc (+1/-1)
src/wui/helpwindow.h (+10/-7)
src/wui/mapdetails.cc (+5/-8)
src/wui/multiplayersetupgroup.cc (+1/-1)
src/wui/waresdisplay.cc (+4/-4)
utils/update_authors.py (+2/-4)
To merge this branch: bzr merge lp:~widelands-dev/widelands/fh1_multiline_textarea
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+292033@code.launchpad.net

Description of the change

I am now looking for an evaluation of the NOCOM comments only - which ones can be turned into TODO comments, and which ones absolutely need fixing for Build 19?

To post a comment you must log in.
Revision history for this message
kaputtnik (franku) wrote :

:-)

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Uhm, to late, already branched it.
/me will try to read first, next time :-)

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
GunChleoc (gunchleoc) wrote :

I am getting a bit burned out trying to fix this thing, so I need a pair of fresh eyes.

I have circumvented the remaining bugs by some hacking - what I need to know now is which hacks we can live with and which hacks need to be fixed. I think getting rid of the old font renderer is worth a few hacks, if they're not too bad - rendering quality is so much better.

I have marked all the hacks with NOCOM comments. The ones we find acceptable can be turned into TODO comments and then hopefully be fixed for Build 20.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1056. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/125357667.
Appveyor build 887. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_multiline_textarea-887.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Bunnybot encountered an error while working on this merge proposal:

The read operation timed out

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1056. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/125357667.
Appveyor build 887. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_multiline_textarea-887.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Bunnybot encountered an error while working on this merge proposal:

HTTP Error 503: Service Unavailable

Revision history for this message
bunnybot (widelandsofficial) wrote :

Bunnybot encountered an error while working on this merge proposal:

HTTP Error 503: Service Unavailable

Revision history for this message
bunnybot (widelandsofficial) wrote :

Bunnybot encountered an error while working on this merge proposal:

HTTP Error 500: Internal Server Error

Revision history for this message
bunnybot (widelandsofficial) wrote :

Bunnybot encountered an error while working on this merge proposal:

HTTP Error 500: Internal Server Error

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1056. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/125357667.
Appveyor build 887. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_multiline_textarea-887.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/campaigns/atl01.wmf/scripting/init.lua'
2--- data/campaigns/atl01.wmf/scripting/init.lua 2016-01-28 05:24:34 +0000
3+++ data/campaigns/atl01.wmf/scripting/init.lua 2016-08-05 05:28:30 +0000
4@@ -72,9 +72,8 @@
5 p1,
6 -- TRANSLATORS: Short message title. Translate as "Lost!" if you don't have enough space.
7 pgettext("message_short_title", "Building lost!"),
8- rt("image=".. f.immovable.descr.representative_image,
9- p(_"We lost a building to the ocean!")
10- ),
11+ rt(p(img(f.immovable.descr.representative_image) ..
12+ _"We lost a building to the ocean!")),
13 {
14 field = f,
15 popup = false,
16
17=== modified file 'data/campaigns/atl01.wmf/scripting/texts.lua'
18--- data/campaigns/atl01.wmf/scripting/texts.lua 2016-03-03 17:07:13 +0000
19+++ data/campaigns/atl01.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
20@@ -31,12 +31,12 @@
21 name = "obj_ensure_build_wares_production",
22 title = _"Ensure the supply of building wares",
23 number = 6,
24- body = objective_text(_"Supply Building Wares", _
25-[[Supply basic building material for your economy:]] .. paragraphdivider() ..
26- listitem_bullet(_[[Build a quarry]]) ..
27- listitem_bullet(_[[Build two woodcutter’s houses]]) ..
28- listitem_bullet(_[[Build two forester’s houses]]) ..
29- listitem_bullet(_[[Build a sawmill]])
30+ body = objective_text(_"Supply Building Wares",
31+ _[[Supply basic building material for your economy:]] ..
32+ li(_[[Build a quarry]]) ..
33+ li(_[[Build two woodcutter’s houses]]) ..
34+ li(_[[Build two forester’s houses]]) ..
35+ li(_[[Build a sawmill]])
36 ),
37 }
38
39@@ -45,8 +45,8 @@
40 title = _"Expand your territory and explore",
41 number = 1,
42 body = objective_text(_"Expand and Explore",
43- _([[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() ..
44- listitem_bullet(_[[Build military sites to expand your territory]])
45+ _([[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.]]) ..
46+ li(_[[Build military sites to expand your territory]])
47 ),
48 }
49
50@@ -55,16 +55,16 @@
51 title = _"Establish a solid food production",
52 number = 10,
53 body = objective_text(_"Food Production",
54- _[[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() ..
55- _[[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() ..
56- listitem_bullet(_[[Build a farm and a blackroot farm]]) ..
57- listitem_bullet(_[[Build a mill to make cornmeal and blackroot flour]]) ..
58- listitem_bullet(_[[Build a well]]) ..
59- listitem_bullet(_[[Build a bakery to bake bread from cornmeal, blackroot flour and water]]) ..
60- listitem_bullet(_[[Build a hunter’s house to get raw meat]]) ..
61- listitem_bullet(_[[Build a fisher’s house close to water to get raw fish]]) ..
62- listitem_bullet(_[[Build a fish breeder’s house close to the fisher to make sure the fish do not die out]]) ..
63- listitem_bullet(_[[Build two smokeries to smoke raw meat and fish]])
64+ _[[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.]] ..
65+ p(_[[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.]]) ..
66+ li(_[[Build a farm and a blackroot farm]]) ..
67+ li(_[[Build a mill to make cornmeal and blackroot flour]]) ..
68+ li(_[[Build a well]]) ..
69+ li(_[[Build a bakery to bake bread from cornmeal, blackroot flour and water]]) ..
70+ li(_[[Build a hunter’s house to get raw meat]]) ..
71+ li(_[[Build a fisher’s house close to water to get raw fish]]) ..
72+ li(_[[Build a fish breeder’s house close to the fisher to make sure the fish do not die out]]) ..
73+ li(_[[Build two smokeries to smoke raw meat and fish]])
74 )
75 }
76
77@@ -73,10 +73,10 @@
78 title = _"Build a spider farm and a weaving mill",
79 number = 3,
80 body = objective_text(_"Spidercloth Production",
81- _[[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 thread and spider silk as raw material. Spider silk is produced by the spider farm, while gold thread is produced by the gold spinning mill out of gold.]] .. paragraphdivider() ..
82- listitem_bullet(_[[Build a weaving mill]]) ..
83- listitem_bullet(_[[Build a spider farm]]) ..
84- listitem_bullet(_[[Build a gold spinning mill]])
85+ _[[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 thread and spider silk as raw material. Spider silk is produced by the spider farm, while gold thread is produced by the gold spinning mill out of gold.]] ..
86+ li(_[[Build a weaving mill]]) ..
87+ li(_[[Build a spider farm]]) ..
88+ li(_[[Build a gold spinning mill]])
89 )
90 }
91
92@@ -85,12 +85,12 @@
93 title = _"Build industry and mines",
94 number = 5,
95 body = objective_text(_"Industry and Mines",
96- _[[Iron ore, gold ore and coal are mined in the respective mines. The crystal mine will dig for quartz and diamonds – all of them are precious materials and very rarely found. It will produce a lot of granite while searching for them.]] .. paragraphdivider() ..
97- 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() ..
98- listitem_bullet(_[[Build a mine of each type. Make sure to send geologists to the mountain first.]]) ..
99- listitem_bullet(_[[Build a smelting works]]) ..
100- listitem_bullet(_[[Build an armor smithy and a weapon smithy]]) ..
101- listitem_bullet(_[[Build a toolsmithy]])
102+ _[[Iron ore, gold ore and coal are mined in the respective mines. The crystal mine will dig for quartz and diamonds – all of them are precious materials and very rarely found. It will produce a lot of granite while searching for them.]] ..
103+ li(_[[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.]]) ..
104+ li(_[[Build a mine of each type. Make sure to send geologists to the mountain first.]]) ..
105+ li(_[[Build a smelting works]]) ..
106+ li(_[[Build an armor smithy and a weapon smithy]]) ..
107+ li(_[[Build a toolsmithy]])
108 )
109 }
110
111@@ -99,8 +99,8 @@
112 title = _"Build training sites for soldiers",
113 number = 2,
114 body = objective_text(_"Soldier Training Sites",
115- _[[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 sites.]] .. paragraphdivider() ..
116- listitem_bullet(_[[Build a dungeon and a labyrinth]])
117+ _[[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 sites.]] ..
118+ li(_[[Build a dungeon and a labyrinth]])
119 )
120 }
121
122@@ -109,9 +109,9 @@
123 title = _"Build a warehouse and a horse farm",
124 number = 2,
125 body = objective_text(_"Warehouse and Horse Farm",
126- _[[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() ..
127- listitem_bullet(_[[Build a warehouse]]) ..
128- listitem_bullet(_[[Build a horse farm]])
129+ _[[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.]] ..
130+ li(_[[Build a warehouse]]) ..
131+ li(_[[Build a horse farm]])
132 )
133 }
134
135@@ -120,8 +120,8 @@
136 title = _"Build 3 ships to escape from the island",
137 number = 1,
138 body = objective_text(_"Escape From the Island",
139- _[[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() ..
140- listitem_bullet(_[[Build a shipyard close to the lake to start building ships]])
141+ _[[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.]] ..
142+ li(_[[Build a shipyard close to the lake to start building ships]])
143 )
144 }
145
146@@ -133,37 +133,34 @@
147 initial_messages = {
148 {
149 title = _"Proud to the Death",
150- body = rt(
151+ body =
152 h1(_"Favored by the God") ..
153 -- TRANSLATORS: Foreword
154 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.]])) ..
155 -- TRANSLATORS: Foreword
156 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.]]))
157- )
158 },
159 {
160 title = _"Disgraced Before the God",
161- body = rt(
162+ body =
163 h1(_"The God’s Punishment") ..
164 -- TRANSLATORS: Foreword
165 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.]])) ..
166 -- TRANSLATORS: Foreword
167 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.]]))
168- )
169 },
170 {
171 title = _"Uproar and Confusion",
172- body = rt(
173+ body =
174 h1(_"Emerging Chaos…") ..
175 -- TRANSLATORS: Foreword
176 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…]])) ..
177 -- TRANSLATORS: Foreword
178- 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.]])) ..
179- -- TRANSLATORS: Foreword
180- 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.]])) ..
181- -- TRANSLATORS: Foreword
182- 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.]]))
183- )
184+ 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.]])) ..
185+ -- TRANSLATORS: Foreword
186+ 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.]])) ..
187+ -- TRANSLATORS: Foreword
188+ 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.]]))
189 },
190 } -- end of initial messages.
191
192@@ -173,10 +170,10 @@
193 body = jundlina(_"Jundlina Writes Down Her Memories",
194 -- TRANSLATORS: Jundlina - Diary
195 _([[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.]])
196- .. paragraphdivider() ..
197+ .. close_p() .. open_p() ..
198 -- TRANSLATORS: Jundlina - Diary
199 _([[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.]])
200- .. paragraphdivider() ..
201+ .. close_p() .. open_p() ..
202 -- TRANSLATORS: Jundlina - Diary
203 _([[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.]]))
204 },
205@@ -206,7 +203,7 @@
206 {
207 title = _"Jundlina is Satisfied",
208 body = jundlina(_"Jundlina’s Memoirs",
209- -- TRANSLATORS: Jundlina
210+ -- TRANSLATORS: Jundlina - Diary
211 _([[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.]]))
212 },
213 {
214@@ -226,10 +223,10 @@
215 body = colionder(
216 -- TRANSLATORS: Colionder
217 _([[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.]])
218- .. paragraphdivider() ..
219+ .. close_p() .. open_p() ..
220 -- TRANSLATORS: Colionder
221 _([[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.]])
222- .. paragraphdivider() ..
223+ .. close_p() .. open_p() ..
224 -- TRANSLATORS: Colionder
225 _([[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.]]))
226 },
227@@ -257,13 +254,13 @@
228 body = opol(
229 -- TRANSLATORS: Opol
230 _([[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.]])
231- .. paragraphdivider() ..
232+ .. close_p() .. open_p() ..
233 -- TRANSLATORS: Opol
234 _([[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.]]))
235 },
236 {
237- title = _"Jundlina Replies",
238- body = jundlina(_"Jundlina",
239+ title = _"Jundlina Replies",
240+ body = jundlina(_"Jundlina",
241 -- TRANSLATORS: Jundlina
242 _([[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.]]))
243 .. new_objectives(obj_spidercloth_production)
244@@ -339,7 +336,7 @@
245 body = jundlina(_"Jundlina",
246 -- TRANSLATORS: Jundlina
247 _([[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.]])
248- .. paragraphdivider() ..
249+ .. close_p() .. open_p() ..
250 -- TRANSLATORS: Jundlina
251 _([[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.]]))
252 .. new_objectives(obj_horsefarm_and_warehouse)
253@@ -357,10 +354,10 @@
254 body = jundlina(_"Jundlina is in Thought",
255 -- TRANSLATORS: Jundlina
256 _([[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.]])
257- .. paragraphdivider() ..
258+ .. close_p() .. open_p() ..
259 -- TRANSLATORS: Jundlina
260 _([[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?]])
261- .. paragraphdivider() ..
262+ .. close_p() .. open_p() ..
263 -- TRANSLATORS: Jundlina
264 _([[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.]]))
265 }
266@@ -431,7 +428,7 @@
267 body = jundlina(_"Jundlina",
268 -- TRANSLATORS: Jundlina
269 _([[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.]])
270- .. paragraphdivider() ..
271+ .. close_p() .. open_p() ..
272 -- TRANSLATORS: Jundlina
273 _([[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.]]))
274 .. new_objectives(obj_build_ships)
275@@ -444,10 +441,10 @@
276 body = jundlina(_"Jundlina",
277 -- TRANSLATORS: Jundlina
278 _([[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…]])
279- .. paragraphdivider() ..
280+ .. close_p() .. open_p() ..
281 -- TRANSLATORS: Jundlina
282 _([[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.]]))
283- .. rt("<p font-size=10> <br></p>" .. h1(_ "Congratulations") ..
284- p(_[[You have won this mission. Continue with the next one or keep playing for as long as you like.]]))
285+ .. objective_text(_ "Congratulations",
286+ _[[You have won this mission. Continue with the next one or keep playing for as long as you like.]])
287 }
288 }
289
290=== modified file 'data/campaigns/bar01.wmf/scripting/texts.lua'
291--- data/campaigns/bar01.wmf/scripting/texts.lua 2016-01-28 05:24:34 +0000
292+++ data/campaigns/bar01.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
293@@ -23,9 +23,8 @@
294 title = _"Build two ranger’s huts",
295 number = 1,
296 body = objective_text(_"Build two ranger’s huts",
297- listitem_bullet(_"Build a ranger’s hut next to each lumberjack’s hut.") ..
298- listitem_arrow(_"Naturally, trees only grow at a slow rate. To make sure you have enough logs, you have to build rangers.")
299- )
300+ li(_"Build a ranger’s hut next to each lumberjack’s hut.") ..
301+ li_arrow(_"Naturally, trees only grow at a slow rate. To make sure you have enough logs, you have to build rangers."))
302 }
303
304 obj_claim_northeastern_rocks = {
305@@ -33,8 +32,8 @@
306 title = _"Expand north-east and build a quarry",
307 number = 1,
308 body = objective_text(_"Expand north-east to the rocks",
309- listitem_bullet(_"Build military buildings (like sentries or barriers) to expand your territory.") ..
310- listitem_bullet(_"Get to the rocks north-east from you and build a quarry there."))
311+ li(_"Build military buildings (like sentries or barriers) to expand your territory.") ..
312+ li(_"Get to the rocks north-east from you and build a quarry there."))
313 }
314
315 obj_build_mines = {
316@@ -42,21 +41,20 @@
317 title = _"Start building mines on the mountain",
318 number = 2,
319 body = objective_text(_"Build coal and iron mines",
320- listitem_bullet(_"Build a coal mine and an iron mine.") ..
321- 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 they will find, choosing the appropriate mine to be built:") ..
322- "</rt>" ..
323- rt("image=tribes/immovables/resi_coal1/idle_00.png", p(_"a bit of coal")) ..
324- rt("image=tribes/immovables/resi_coal2/idle_00.png", p(_"a lot of coal")) ..
325- rt("image=tribes/immovables/resi_iron1/idle_00.png", p(_"a bit of iron")) ..
326- rt("image=tribes/immovables/resi_iron2/idle_00.png", p(_"a lot of iron")) ..
327- rt("image=tribes/immovables/resi_gold1/idle_00.png", p(_"a bit of gold")) ..
328- rt("image=tribes/immovables/resi_gold2/idle_00.png", p(_"a lot of gold")) ..
329- rt("image=tribes/immovables/resi_stones1/idle_00.png", p(_"a bit of granite")) ..
330- rt("image=tribes/immovables/resi_stones2/idle_00.png", p(_"a lot of granite")) ..
331- rt("image=tribes/immovables/resi_water1/idle_00.png", p(_"water")) ..
332- rt("image=tribes/immovables/resi_none/idle_00.png", p(_"nothing was found here")) ..
333- "<rt>" ..
334- p(_[[Mines can only be built on mountain terrain. Suitable places for mines are displayed as orange mine symbols.]]))
335+ li(_"Build a coal mine and an iron mine.") ..
336+ li_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 they will find, choosing the appropriate mine to be built:") ..
337+ -- TODO(GunChleoc): We want functions to get the icons here, which can then be used in the help as well.
338+ p(img("tribes/immovables/resi_coal1/idle_00.png") .. _"a bit of coal") ..
339+ p(img("tribes/immovables/resi_coal2/idle_00.png") .. _"a lot of coal") ..
340+ p(img("tribes/immovables/resi_iron1/idle_00.png") .. _"a bit of iron") ..
341+ p(img("tribes/immovables/resi_iron2/idle_00.png") .. _"a lot of iron") ..
342+ p(img("tribes/immovables/resi_gold1/idle_00.png") .. _"a bit of gold") ..
343+ p(img("tribes/immovables/resi_gold2/idle_00.png") .. _"a lot of gold") ..
344+ p(img("tribes/immovables/resi_stones1/idle_00.png") .. _"a bit of granite") ..
345+ p(img("tribes/immovables/resi_stones2/idle_00.png") .. _"a lot of granite") ..
346+ p(img("tribes/immovables/resi_water1/idle_00.png") .. _"water") ..
347+ p(img("tribes/immovables/resi_none/idle_00.png") .. _"nothing was found here") ..
348+ p(_[[Mines can only be built on mountain terrain. Suitable places for mines are displayed as orange mine symbols.]]))
349 }
350
351 obj_basic_food = {
352@@ -64,9 +62,9 @@
353 title = _"Provide your miners with food",
354 number = 3,
355 body = objective_text(_"Build a hunter, a gamekeeper and a tavern",
356- listitem_bullet(_"In order to work, your miners need food.") ..
357- 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.") .. " " ..
358- _([[This is only the first example of a ware which has to be refined before being used in a secondary building – others will follow.]]))
359+ li(_"In order to work, your miners need food.") ..
360+ li_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.") ..
361+ p(_([[This is only the first example of a ware which has to be refined before being used in a secondary building – others will follow.]])))
362 }
363
364 obj_begin_farming = {
365@@ -90,11 +88,11 @@
366 title = _"Enhance buildings and build a micro brewery",
367 number = 3,
368 body = objective_text(_[[Enhance a mine and the tavern, and build a micro brewery.]],
369- listitem_bullet(_"Enhance the coal mine or the iron mine to a deep mine, and enhance the tavern to an inn.") ..
370- listitem_bullet(_"Also build a micro brewery.") ..
371- listitem_arrow(_"A normal mine can only dig up about one third of all the resources that lie 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.") ..
372- 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!") ..
373- 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.") ..
374+ li(_"Enhance the coal mine or the iron mine to a deep mine, and enhance the tavern to an inn.") ..
375+ li(_"Also build a micro brewery.") ..
376+ li_arrow(_"A normal mine can only dig up about one third of all the resources that lie 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.") ..
377+ li_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!") ..
378+ li_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.") ..
379 _"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.")
380 }
381
382@@ -103,26 +101,21 @@
383 title = _"Build a wood hardener",
384 number = 1,
385 body = objective_text(_"Build a wood hardener",
386- _([[Bigger and better buildings – including all military ones – require better building materials. They cannot be built out of simple logs – the logs have 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.]])
387- .. paragraphdivider() ..
388- listitem_bullet(_"Build a wood hardener"))
389+ _([[Bigger and better buildings – including all military ones – require better building materials. They cannot be built out of simple logs – the logs have 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.]]) ..
390+ li(_"Build a wood hardener"))
391 }
392
393 obj_better_material_2 = {
394 name = "mission grout",
395 title = _"Build a lime kiln and coal economy",
396 number = 3,
397- body = objective_text(_"Build a lime kiln fed by a well, and by a charcoal kiln or by a coal mine",
398- _([[Better buildings may also require other improved materials besides blackwood. One of these is grout, which is produced out of granite, water and coal by a lime-burner.]])
399- .. paragraphdivider() ..
400- _([[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.]])
401- ..paragraphdivider() ..
402- "</p></rt>" ..
403- rt("image=images/wui/fieldaction/menu_geologist.png", p(_"In order to call a geologist to search for water, click on a flag in the area that you want him to search and then on the button labeled ‘Send geologist to explore site’.")
404- .. paragraphdivider() ..
405- _([[Coal can be obtained by building a charcoal kiln or a coal mine. Burning charcoal out of logs is slow. You should only build a charcoal kiln when no coal is available.]])
406- .. paragraphdivider() ..
407- listitem_bullet(_"Build a lime kiln and a well. Additionally, build either a charcoal kiln or a coal mine for coal supply.")))
408+ body =
409+ objective_text(_"Build a lime kiln fed by a well, and by a charcoal kiln or by a coal mine",
410+ _([[Better buildings may also require other improved materials besides blackwood. One of these is grout, which is produced out of granite, water and coal by a lime-burner.]]) ..
411+ p(_([[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.]])) ..
412+ p(img("images/wui/fieldaction/menu_geologist.png") .. _"In order to call a geologist to search for water, click on a flag in the area that you want him to search and then on the button labeled ‘Send geologist to explore site’.") ..
413+ p(_([[Coal can be obtained by building a charcoal kiln or a coal mine. Burning charcoal out of logs is slow. You should only build a charcoal kiln when no coal is available.]])) ..
414+ li(_"Build a lime kiln and a well. Additionally, build either a charcoal kiln or a coal mine for coal supply."))
415 }
416
417 obj_better_material_3 = {
418@@ -130,9 +123,8 @@
419 title = _"Build a reed yard",
420 number = 1,
421 body = objective_text(_"Build a reed yard",
422- _([[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.]])
423- .. paragraphdivider() ..
424- listitem_bullet(_"Build a reed yard"))
425+ _([[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.]]) ..
426+ li(_"Build a reed yard"))
427 }
428
429 obj_build_cattlefarm = {
430@@ -140,11 +132,9 @@
431 title = _"Build a cattle farm",
432 number = 1,
433 body = objective_text(_"Build a cattle farm",
434- _([[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.]])
435- .. paragraphdivider() ..
436- _([[Oxen are bred in cattle farms out of wheat and water.]])
437- .. paragraphdivider() ..
438- listitem_bullet(_"Build a cattle farm"))
439+ _([[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.]]) ..
440+ p(_([[Oxen are bred in cattle farms out of wheat and water.]])) ..
441+ li(_"Build a cattle farm"))
442 }
443
444
445@@ -157,7 +147,7 @@
446 body = thron(_"Thron sighs…",
447 -- TRANSLATORS: Thron
448 _[[It’s been months, and we are still hiding where the forests are old and dark.]]
449- .. paragraphdivider() ..
450+ .. close_p() .. open_p() ..
451 -- TRANSLATORS: Thron
452 _[[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.]]
453 )
454@@ -169,7 +159,7 @@
455 body = thron(
456 -- TRANSLATORS: Thron
457 _[[We can see the raging flames that swallow Al’thunran from here, miles away.]]
458- .. paragraphdivider() ..
459+ .. close_p() .. open_p() ..
460 -- TRANSLATORS: Thron
461 _[[The red lights flash in the darkness and dance to the rhythm of the war drums that haunt me even in my nightmares.]]),
462 field = al_thunran,
463@@ -183,7 +173,7 @@
464 body = thron(
465 -- TRANSLATORS: Thron
466 _[[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.]]
467- .. paragraphdivider() ..
468+ .. close_p() .. open_p() ..
469 -- TRANSLATORS: Thron
470 _[[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.]]),
471 field = grave,
472@@ -204,7 +194,7 @@
473 body = thron(_"Thron is shaking his head…",
474 -- TRANSLATORS: Thron
475 _([[Yet the war goes on. More and more of our brothers and sisters flee the brutal war raging in the capital beneath the trees.]])
476- .. paragraphdivider() ..
477+ .. close_p() .. open_p() ..
478 -- TRANSLATORS: Thron
479 _([[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.]])),
480 field = sf -- scroll back when showing this and the next few message boxes
481@@ -216,7 +206,7 @@
482 body = thron(
483 -- TRANSLATORS: Thron
484 _([[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?]])
485- .. paragraphdivider() ..
486+ .. close_p() .. open_p() ..
487 -- TRANSLATORS: Thron
488 _([[To rise against whoever threatens our very existence, even though it may be one of your own blood or mind?]]))
489 }
490@@ -227,7 +217,7 @@
491 body = thron(
492 -- TRANSLATORS: Thron
493 _([[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.]])
494- .. paragraphdivider() ..
495+ .. close_p() .. open_p() ..
496 -- TRANSLATORS: Thron
497 _([[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…]]))
498 }
499@@ -238,7 +228,7 @@
500 body = khantrukh(_"An old man says…",
501 -- TRANSLATORS: Khantrukh
502 _[[Hail, chieftain. I am Khantrukh and have seen many winters pass. Please allow me to aid you with my counsel through these darkened days.]]
503- .. paragraphdivider() ..
504+ .. close_p() .. open_p() ..
505 -- TRANSLATORS: Khantrukh
506 _[[Only the gods know for 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 short and cold…]])
507 }
508@@ -249,10 +239,10 @@
509 body = khantrukh(_"Khantrukh notes…",
510 -- TRANSLATORS: Khantrukh
511 _[[I see you have already built a quarry and two lumberjack’s huts. That is a good beginning if we want to stay here longer.]]
512- .. paragraphdivider() ..
513+ .. close_p() .. open_p() ..
514 -- TRANSLATORS: Khantrukh
515 _[[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.]]
516- .. paragraphdivider() ..
517+ .. close_p() .. open_p() ..
518 -- TRANSLATORS: Khantrukh
519 _[[So, in order to replace the trees we chop down, we should build some ranger’s huts, preferably close to the lumberjack’s huts.]])
520 .. new_objectives(obj_build_rangers)
521@@ -264,7 +254,7 @@
522 body = thron(_"Thron says…",
523 -- TRANSLATORS: Thron
524 _[[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.]]
525- .. paragraphdivider() ..
526+ .. close_p() .. open_p() ..
527 -- TRANSLATORS: Thron
528 _[[They are a constant reminder of why we have to hide here… and why we must return in the end!]]),
529 field = al_thunran,
530@@ -278,7 +268,7 @@
531 body = thron(_"Thron says…",
532 -- TRANSLATORS: Thron
533 _[[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…]]
534- .. paragraphdivider() ..
535+ .. close_p() .. open_p() ..
536 -- TRANSLATORS: Thron
537 _[[Somehow, it felt like a farewell. For the first time, I wondered what the future might hold for me…]]),
538 field = grave,
539@@ -292,7 +282,7 @@
540 body = thron(_"Thron says thoughtfully…",
541 -- TRANSLATORS: Thron
542 _[[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.]]
543- .. paragraphdivider() ..
544+ .. close_p() .. open_p() ..
545 -- TRANSLATORS: Thron
546 _[[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 on both sides…]])
547 }
548@@ -303,7 +293,7 @@
549 body = thron(_"Thron looks furious…",
550 -- TRANSLATORS: Thron
551 _[[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.]]
552- .. paragraphdivider() ..
553+ .. close_p() .. open_p() ..
554 -- TRANSLATORS: Thron
555 _[[I hereby renew my oath – I will stop this madness at any cost!]])
556 }
557@@ -353,7 +343,7 @@
558 body = boldreth(_"Boldreth exclaims…",
559 -- TRANSLATORS: Boldreth
560 _([[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!]])
561- .. paragraphdivider() ..
562+ .. close_p() .. open_p() ..
563 -- TRANSLATORS: Boldreth
564 _([[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!]]))
565 .. new_objectives(obj_build_mines)
566@@ -364,7 +354,7 @@
567 body = boldreth(_"Boldreth laughs…",
568 -- TRANSLATORS: Boldreth
569 _([[By Chat’Karuth’s beard, this is amazing! Just imagine what we can use this coal and iron ore for!]])
570- .. paragraphdivider() ..
571+ .. close_p() .. open_p() ..
572 -- TRANSLATORS: Boldreth
573 _([[It might even be enough to…]]))
574 }
575@@ -382,7 +372,7 @@
576 body = boldreth(_"Boldreth nods…",
577 -- TRANSLATORS: Boldreth
578 _([[I have to hand it to you: you are right here, old man.]])
579- .. paragraphdivider() ..
580+ .. close_p() .. open_p() ..
581 -- TRANSLATORS: Boldreth
582 _([[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!]]))
583 .. new_objectives(obj_basic_food)
584@@ -393,7 +383,7 @@
585 body = khantrukh(_"The elder jumps into the air…",
586 -- TRANSLATORS: Khantrukh
587 _([[Wisdom commands to seek variety.]])
588- .. paragraphdivider() ..
589+ .. close_p() .. open_p() ..
590 -- TRANSLATORS: Khantrukh
591 _([[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…]]))
592 .. new_objectives(obj_begin_farming)
593@@ -404,7 +394,7 @@
594 body = boldreth(_"Boldreth cheers up…",
595 -- TRANSLATORS: Boldreth
596 _([[Our hunters are out in the forests, Thron.]])
597- .. paragraphdivider() ..
598+ .. close_p() .. open_p() ..
599 -- TRANSLATORS: Boldreth
600 _([[I promise you, before the sun sets today you will have a magnificent meal fit for the chieftain of all clans!]]))
601 }
602@@ -421,7 +411,7 @@
603 body = thron(_"Thron recognizes…",
604 -- TRANSLATORS: Thron
605 _([[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.]])
606- .. paragraphdivider() ..
607+ .. close_p() .. open_p() ..
608 -- TRANSLATORS: Thron
609 _([[Maybe we actually are slowly creating a place here which we can… call home.]]))
610 }
611@@ -439,7 +429,7 @@
612 body = khantrukh(_"Khantrukh speaks…",
613 -- TRANSLATORS: Khantrukh
614 _([[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!]])
615- .. paragraphdivider() ..
616+ .. close_p() .. open_p() ..
617 -- TRANSLATORS: Khantrukh
618 _([[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.]]))
619 .. new_objectives(obj_enhance_buildings)
620@@ -450,7 +440,7 @@
621 body = boldreth(_"Boldreth seems concerned…",
622 -- TRANSLATORS: Boldreth
623 _([[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!]])
624- .. paragraphdivider() ..
625+ .. close_p() .. open_p() ..
626 -- TRANSLATORS: Boldreth
627 _([[We need a wood hardener, and we need one now!]]))
628 .. new_objectives(obj_better_material_1)
629@@ -461,7 +451,7 @@
630 body = boldreth(_"Boldreth smiles…",
631 -- TRANSLATORS: Boldreth
632 _([[Well, old friend, this should ensure that our fortifications do not break down with our foes’ first battle cry! Now we can expand safely!]])
633- .. paragraphdivider() ..
634+ .. close_p() .. open_p() ..
635 -- TRANSLATORS: Boldreth
636 _([[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!]]))
637 .. new_objectives(obj_better_material_2)
638@@ -472,7 +462,7 @@
639 body = khantrukh(_"Khantrukh steps in…",
640 -- TRANSLATORS: Khantrukh
641 _([[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!]])
642- .. paragraphdivider() ..
643+ .. close_p() .. open_p() ..
644 -- TRANSLATORS: Khantrukh
645 _([[Now this is a problem we should do something about!]]))
646 .. new_objectives(obj_better_material_3)
647@@ -490,7 +480,7 @@
648 body = khantrukh(_"Khantrukh speaks…",
649 -- TRANSLATORS: Khantrukh
650 _([[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.]])
651- .. paragraphdivider() ..
652+ .. close_p() .. open_p() ..
653 -- TRANSLATORS: Khantrukh
654 _([[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.]]))
655 .. new_objectives(obj_build_cattlefarm)
656@@ -501,10 +491,10 @@
657 body = thron(_"Thron speaks…",
658 -- TRANSLATORS: Thron
659 _([[The other day Boldreth asked me to accompany him to the new inn. It would cheer me up, he said.]])
660- .. paragraphdivider() ..
661+ .. close_p() .. open_p() ..
662 -- TRANSLATORS: Thron
663 _([[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.]])
664- .. paragraphdivider() ..
665+ .. close_p() .. open_p() ..
666 -- TRANSLATORS: Thron
667 _([[The news he brought changed everything…]]))
668 .. objective_text(_"Victory",
669@@ -516,7 +506,7 @@
670 body = thron(_"Thron speaks…",
671 -- TRANSLATORS: Thron
672 _([[One night, when the moon shone brightly, I climbed to the peak of Kal’mavrath.]])
673- .. paragraphdivider() ..
674+ .. close_p() .. open_p() ..
675 -- TRANSLATORS: Thron
676 _([[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?]]))
677 }
678@@ -526,10 +516,10 @@
679 body = thron(_"Thron looks worried…",
680 -- TRANSLATORS: Thron
681 _([[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.]])
682- .. paragraphdivider() ..
683+ .. close_p() .. open_p() ..
684 -- TRANSLATORS: Thron
685 _([[I prayed that it might get warmer again, as I prayed that the war would finally come to an end.]])
686- .. paragraphdivider() ..
687+ .. close_p() .. open_p() ..
688 -- TRANSLATORS: Thron
689 _([[So far, it seems that neither prayer was fulfilled.]]))
690 }
691@@ -539,10 +529,10 @@
692 body = thron(_"Thron speaks…",
693 -- TRANSLATORS: Thron
694 _([[We have found a village with friendly and productive people, impressed by our wealth, technology and strength.]])
695- .. paragraphdivider() ..
696+ .. close_p() .. open_p() ..
697 -- TRANSLATORS: Thron
698 _([[They have lived simply, yet blithely, from hunting and farming. They have not been involved in any conflict so far, and are not ready for fighting.]])
699- .. paragraphdivider() ..
700+ .. close_p() .. open_p() ..
701 -- TRANSLATORS: Thron
702 _([[But they fear that the war around Al’thunran will set an end to this life. Therefore, they have decided to join us, hoping that we can help each other.]])
703 )
704
705=== modified file 'data/campaigns/bar02.wmf/scripting/texts.lua'
706--- data/campaigns/bar02.wmf/scripting/texts.lua 2016-05-02 15:33:14 +0000
707+++ data/campaigns/bar02.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
708@@ -36,13 +36,12 @@
709 title = _"Build up a small food economy",
710 number = 5,
711 body = objective_text(_"Build up a small food economy",
712- _"Build up a basic food economy to provide your people with food."
713- .. paragraphdivider() ..
714- listitem_bullet(_"Build a fisher’s hut") ..
715- listitem_bullet(_"Build a hunter’s hut") ..
716- listitem_bullet(_"Build a well") ..
717- listitem_bullet(_"Build a farm") ..
718- listitem_bullet(_"Build a bakery"))
719+ _"Build up a basic food economy to provide your people with food." ..
720+ li(_"Build a fisher’s hut") ..
721+ li(_"Build a hunter’s hut") ..
722+ li(_"Build a well") ..
723+ li(_"Build a farm") ..
724+ li(_"Build a bakery"))
725 }
726
727 obj_build_cattlefarm = {
728@@ -50,9 +49,8 @@
729 title = _"Build a cattle farm",
730 number = 1,
731 body = objective_text(_"Remember to build a cattle farm",
732- _"As your roads grow longer and your economy bigger, you should make good use of your oxen to help transport wares more quickly."
733- .. paragraphdivider () ..
734- listitem_bullet(_"Remember to build a cattle farm")
735+ _"As your roads grow longer and your economy bigger, you should make good use of your oxen to help transport wares more quickly." ..
736+ li(_"Remember to build a cattle farm")
737 ),
738 }
739
740@@ -61,7 +59,7 @@
741 title = _"Build a tower",
742 number = 1,
743 body = objective_text(_"Build a tower",
744- listitem_bullet(_"Build a tower at the north-east border of your territory to get greater visual range and to protect your people from sudden attacks by enemies."))
745+ li(_"Build a tower at the north-east border of your territory to get greater visual range and to protect your people from sudden attacks by enemies."))
746 }
747
748 obj_explore_further = {
749@@ -69,7 +67,7 @@
750 title = _"Explore further",
751 number = 1,
752 body = objective_text(_"Explore further",
753- listitem_bullet(_"Build more military buildings to explore the area around the headquarters and to ensure the safety of your people."))
754+ li(_"Build more military buildings to explore the area around the headquarters and to ensure the safety of your people."))
755 }
756
757 obj_build_mining_economy = {
758@@ -77,7 +75,7 @@
759 title = _"Build a mining infrastructure",
760 number = 6,
761 body = objective_text(_"Build a mining infrastructure",
762- 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."))
763+ li(_"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."))
764 }
765
766 obj_build_a_fortress = {
767@@ -85,7 +83,7 @@
768 title = _"Build a fortress",
769 number = 1,
770 body = objective_text(_"Build a fortress",
771- listitem_bullet(_"Build a fortress to the east of the mountains."))
772+ li(_"Build a fortress to the east of the mountains."))
773 }
774
775 obj_build_training_infrastructure = {
776@@ -93,9 +91,9 @@
777 title = _"Build a training infrastructure",
778 number = 4,
779 body = objective_text(_"Build a training infrastructure",
780- listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
781- listitem_bullet(_"Enhance your metal workshop to an ax workshop in order to produce weapons, and build up a second metal workshop to ensure the production of tools. When the blacksmith reaches his next level (master blacksmith), you can even enhance the ax workshop to a war mill, which will produce additional weapons.") ..
782- listitem_bullet(_"Build a helm smithy to the west of the mountains to provide your soldiers with better armor."))
783+ li(_"Build a battle arena and a training camp to the west of the mountains.") ..
784+ li(_"Enhance your metal workshop to an ax workshop in order to produce weapons, and build up a second metal workshop to ensure the production of tools. When the blacksmith reaches his next level (master blacksmith), you can even enhance the ax workshop to a war mill, which will produce additional weapons.") ..
785+ li(_"Build a helm smithy to the west of the mountains to provide your soldiers with better armor."))
786 }
787
788
789@@ -104,8 +102,8 @@
790 title = _"Build a warehouse",
791 number = 1,
792 body = objective_text(_"Build a warehouse",
793- listitem_bullet(_"Build a warehouse to the west of the mountains.") ..
794- 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."))
795+ li(_"Build a warehouse to the west of the mountains.") ..
796+ li_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."))
797 }
798
799 obj_build_trainingssites = {
800@@ -113,10 +111,9 @@
801 title = _"Build training sites",
802 number = 2,
803 body = objective_text(_"Build training sites",
804- listitem_bullet(_"Build a battle arena and a training camp to the west of the mountains.") ..
805- 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."
806- .. "<br>" ..
807- _"The attributes are: health, attack, defense and evade."))
808+ li(_"Build a battle arena and a training camp to the west of the mountains.") ..
809+ li_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." ..
810+ p(_"The attributes are: health, attack, defense and evade.")))
811 }
812
813 obj_build_weapon_productions = {
814@@ -124,7 +121,7 @@
815 title = _"Build weapons production",
816 number = 3,
817 body = objective_text(_"Build weapons production",
818- listitem_bullet(_"Enhance your metal workshop to an ax workshop in order to produce weapons, and build up a second metal workshop to ensure the production of tools. When the blacksmith reaches his next level (master blacksmith), you can even enhance the ax workshop to a war mill, which will produce additional weapons."))
819+ li(_"Enhance your metal workshop to an ax workshop in order to produce weapons, and build up a second metal workshop to ensure the production of tools. When the blacksmith reaches his next level (master blacksmith), you can even enhance the ax workshop to a war mill, which will produce additional weapons."))
820 }
821
822 obj_build_a_helmsmithy = {
823@@ -132,7 +129,7 @@
824 title=_"Build a helm smithy",
825 number = 1,
826 body = objective_text(_"Build a helm smithy",
827- listitem_bullet(_"Build a helm smithy to the west of the mountains to provide your soldiers with better armor."))
828+ li(_"Build a helm smithy to the west of the mountains to provide your soldiers with better armor."))
829 }
830
831 obj_destroy_kalitaths_army = {
832@@ -140,8 +137,8 @@
833 title = _"Destroy Kalitath’s army",
834 number = 2,
835 body = objective_text(_"Destroy Kalitath’s army",
836- listitem_bullet(_"Destroy Kalitath’s army and expand your territory to the east.") ..
837- 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’)."))
838+ li(_"Destroy Kalitath’s army and expand your territory to the east.") ..
839+ li_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’)."))
840 }
841
842 obj_military_assault_on_althunran = {
843@@ -149,7 +146,7 @@
844 title = _"Military assault on Al’thunran",
845 number = 1,
846 body = objective_text(_"Military assault on Al’thunran",
847- listitem_bullet(_"Destroy all forces of Thron’s two brothers to liberate the throne-circle."))
848+ li(_"Destroy all forces of Thron’s two brothers to liberate the throne-circle."))
849 }
850
851 -- =======================================================================
852@@ -161,7 +158,7 @@
853 body =thron(_"Thron looks worried…",
854 -- TRANSLATORS: Thron
855 _([[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.]])
856- .. paragraphdivider() ..
857+ .. close_p() .. open_p() ..
858 -- TRANSLATORS: Thron
859 _([[For now, we are resting at the borders of the old forest and preparing for the coming days.]]))
860 .. new_objectives(obj_build_basic_economy)
861@@ -223,10 +220,10 @@
862 body = thron(_"Thron says:",
863 -- TRANSLATORS: Thron
864 _([[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.]])
865- .. paragraphdivider() ..
866+ .. close_p() .. open_p() ..
867 -- TRANSLATORS: Thron
868 _([[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.]])
869- .. paragraphdivider() ..
870+ .. close_p() .. open_p() ..
871 -- TRANSLATORS: Thron
872 _([[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.]]))
873 }
874@@ -271,7 +268,7 @@
875 body = boldreth(_"Boldreth says:",
876 -- TRANSLATORS: Boldreth
877 _([[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.]])
878- .. paragraphdivider() ..
879+ .. close_p() .. open_p() ..
880 -- TRANSLATORS: Boldreth
881 _([[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.]]))
882 .. new_objectives(obj_explore_further)
883@@ -317,7 +314,7 @@
884 body = boldreth(_"Boldreth says:",
885 -- TRANSLATORS: Boldreth
886 _([[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 war to come.]])
887- .. paragraphdivider() ..
888+ .. close_p() .. open_p() ..
889 -- TRANSLATORS: Boldreth
890 _([[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.]]))
891 .. new_objectives(obj_build_training_infrastructure)
892@@ -329,7 +326,7 @@
893 body= thron(_"Thron looks worried…",
894 -- TRANSLATORS: Thron
895 _([[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.]])
896- .. paragraphdivider() ..
897+ .. close_p() .. open_p() ..
898 -- TRANSLATORS: Thron
899 _([[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 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 there 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.]]))
900 .. objective_text(_"Victory",
901@@ -342,10 +339,10 @@
902 body = thron(_"Thron says:",
903 -- TRANSLATORS: Thron
904 _([[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.]])
905- .. paragraphdivider() ..
906+ .. close_p() .. open_p() ..
907 -- TRANSLATORS: Thron
908 _([[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.]])
909- .. paragraphdivider() ..
910+ .. close_p() .. open_p() ..
911 -- TRANSLATORS: Thron
912 _([[So be it!]]))
913 .. new_objectives(obj_military_assault_on_althunran),
914
915=== modified file 'data/campaigns/emp01.wmf/scripting/texts.lua'
916--- data/campaigns/emp01.wmf/scripting/texts.lua 2016-05-17 16:40:22 +0000
917+++ data/campaigns/emp01.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
918@@ -28,7 +28,7 @@
919 title=_"Build a blockhouse",
920 number = 1,
921 body = objective_text(_"Blockhouse",
922- listitem_bullet(_[[Build a blockhouse at the red house symbol on the east side of the forests, to the right of your provisional headquarters.]])
923+ li(_[[Build a blockhouse at the red house symbol on the east side of the forests, to the right of your provisional headquarters.]])
924 ),
925 }
926
927@@ -37,7 +37,7 @@
928 title=_"Build a lumberjack’s house",
929 number = 1,
930 body = objective_text(_"Lumberjack’s House",
931- listitem_bullet(_[[Build a lumberjack’s house at the red house symbol, south of your provisional headquarters.]])
932+ li(_[[Build a lumberjack’s house at the red house symbol, south of your provisional headquarters.]])
933 ),
934 }
935
936@@ -46,7 +46,7 @@
937 title=_"Build 2 lumberjack’s houses and a sawmill",
938 number = 3,
939 body = objective_text(_"Two Lumberjack’s Houses and a Sawmill",
940- listitem_bullet(_[[Build two more lumberjack’s houses and a sawmill as soon as there is enough space for them.]])
941+ li(_[[Build two more lumberjack’s houses and a sawmill as soon as there is enough space for them.]])
942 ),
943 }
944
945@@ -55,7 +55,7 @@
946 title=_"Build a forester’s house",
947 number = 1,
948 body = objective_text(_"Forester’s House",
949- listitem_bullet(_[[Build a forester’s house to preserve the wood resources of this island.]])
950+ li(_[[Build a forester’s house to preserve the wood resources of this island.]])
951 ),
952 }
953
954@@ -64,13 +64,12 @@
955 title=_"Build a quarry",
956 number = 5,
957 body = objective_text(_"Quarry",
958- listitem_bullet(_[[Build a quarry in the south to cut some granite and marble out of the rocks.]]) ..
959- listitem_arrow(_[[These might be used for future buildings.]])
960+ li(_[[Build a quarry in the south to cut some granite and marble out of the rocks.]]) ..
961+ li_arrow(_[[These might be used for future buildings.]])
962 ),
963 }
964
965
966-
967 -- ==================
968 -- Texts to the user
969 -- ==================
970@@ -79,17 +78,17 @@
971 body=lutius(_"Diary of Lutius",
972 -- TRANSLATORS: Lutius - Diary
973 _([[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?]])
974- .. paragraphdivider() ..
975+ .. close_p() .. open_p() ..
976 -- TRANSLATORS: Lutius - Diary
977 _([[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 children came to us, to admire our clean and tidy uniforms and weapons.]])
978- .. paragraphdivider() ..
979+ .. close_p() .. open_p() ..
980 -- TRANSLATORS: Lutius - Diary
981 _([[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 spirits took the last man of his folk!]])
982- .. paragraphdivider() ..
983+ .. close_p() .. open_p() ..
984 -- TRANSLATORS: Lutius - Diary
985 _([[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.]])
986- .. paragraphdivider() ..
987- -- TRANSLATORS: Lutius - Diary. Gulf of Perl is a place name.
988+ .. close_p() .. open_p() ..
989+ -- TRANSLATORS: Lutius - Diary
990 _([[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 Gulf of Perl with my family, some of my friends and a few of my best warriors.]])),
991 w=500,
992 posy=1,
993@@ -100,7 +99,7 @@
994 body= lutius(_"Diary of Lutius",
995 -- TRANSLATORS: Lutius - Diary
996 _([[It seems as if sailing on the Gulf of Perl 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.]])
997- .. paragraphdivider() ..
998+ .. close_p() .. open_p() ..
999 -- TRANSLATORS: Lutius - Diary
1000 _([[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.]])),
1001 w=400,
1002@@ -112,10 +111,10 @@
1003 body= lutius(_"Diary of Lutius",
1004 -- TRANSLATORS: Lutius - Diary
1005 _([[Finally, the Gods were with us!]])
1006- .. paragraphdivider() ..
1007+ .. close_p() .. open_p() ..
1008 -- TRANSLATORS: Lutius - Diary
1009 _([[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.]])
1010- .. paragraphdivider() ..
1011+ .. close_p() .. open_p() ..
1012 -- TRANSLATORS: Lutius - Diary
1013 _([[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.]])),
1014 w=400,
1015@@ -127,10 +126,10 @@
1016 body= saledus(_"Saledus looks around nervously…",
1017 -- TRANSLATORS: Saledus
1018 _([[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?]])
1019- .. paragraphdivider() ..
1020+ .. close_p() .. open_p() ..
1021 -- TRANSLATORS: Saledus
1022 _([[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.]])
1023- .. paragraphdivider() ..
1024+ .. close_p() .. open_p() ..
1025 -- TRANSLATORS: Saledus
1026 _([[You really should build a blockhouse in the eastern portion of the forest. Then one of my men can keep watch in the darkness and keep us safe from these creatures.]]))
1027 .. new_objectives(obj_build_blockhouse),
1028@@ -143,7 +142,7 @@
1029 body= saledus(_"Saledus speaks with a sigh of relief…",
1030 -- TRANSLATORS: Saledus
1031 _([[Sire, I saw that the construction of the blockhouse was completed, so I have assigned one of my best soldiers to it to keep watch on the desert.]])
1032- .. paragraphdivider() ..
1033+ .. close_p() .. open_p() ..
1034 -- TRANSLATORS: Saledus
1035 _([[This is a good step forward. Now we can feel a bit safer and can look forward to repairing our ship.]])),
1036 w=400,
1037@@ -154,10 +153,10 @@
1038 body= amalea(_"Amalea smiles…",
1039 -- TRANSLATORS: Amalea
1040 _([[Greetings, Lutius! I just met Saledus outside.]])
1041- .. paragraphdivider() ..
1042+ .. close_p() .. open_p() ..
1043 -- TRANSLATORS: Amalea
1044 _([[He told me about the blockhouse. Well, I don’t think we need more blockhouses – instead, we might concentrate on other things now.]])
1045- .. paragraphdivider() ..
1046+ .. close_p() .. open_p() ..
1047 -- TRANSLATORS: Amalea
1048 _([[It is absolutely clear that we need wood to repair our ship. So, I walked through the forest yesterday to look for a nice place for a lumberjack’s house and found one right south of our provisional headquarters.]]))
1049 .. new_objectives(obj_build_lumberjack),
1050@@ -169,7 +168,7 @@
1051 body= amalea(_"Amalea recommends…",
1052 -- TRANSLATORS: Amalea
1053 _([[I got the message that our first lumberjack has started his work today. Perhaps it would be a good idea to wait until he has cleared enough space for constructing two more lumberjack’s houses, so that we can harvest the logs faster.]])
1054- .. paragraphdivider() ..
1055+ .. close_p() .. open_p() ..
1056 -- TRANSLATORS: Amalea
1057 _([[But unfortunately the logs are useless for repairing our ship – we need to turn them into planks, which are needed by every ship and every bigger building too. So we should build a sawmill – as soon as we have enough space for this.]]))
1058 .. new_objectives(obj_build_sawmill_and_lumberjacks),
1059@@ -181,16 +180,16 @@
1060 body= amalea(_"Amalea comes in…",
1061 -- TRANSLATORS: Amalea
1062 _([[I’ve got two important things to talk about… First the good news:]])
1063- .. paragraphdivider() ..
1064+ .. close_p() .. open_p() ..
1065 -- TRANSLATORS: Amalea
1066 _([[I noticed that the construction of the sawmill is complete, so we can begin to refine the logs that the lumberjacks are harvesting into planks.]])
1067- .. paragraphdivider() ..
1068+ .. close_p() .. open_p() ..
1069 -- TRANSLATORS: Amalea
1070 _([[But the bad news is that our lumberjacks harvest at an incredible speed. There are almost no trees left on this island.]])
1071- .. paragraphdivider() ..
1072+ .. close_p() .. open_p() ..
1073 -- TRANSLATORS: Amalea
1074 _([[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 many gentle animals. We shouldn’t leave this island a complete desert.]])
1075- .. paragraphdivider() ..
1076+ .. close_p() .. open_p() ..
1077 -- TRANSLATORS: Amalea
1078 _([[Lutius, please find someone who will take care of planting new trees.]]))
1079 .. new_objectives(obj_build_forester),
1080@@ -202,7 +201,7 @@
1081 body= saledus(_"Saledus notes…",
1082 -- TRANSLATORS: Saledus
1083 _([[Sire, I just thought about the rocks standing on the south shore of this land. Perhaps we could cut out some useful granite and beautiful marble.]])
1084- .. paragraphdivider() ..
1085+ .. close_p() .. open_p() ..
1086 -- TRANSLATORS: Saledus
1087 _([[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.]]))
1088 .. new_objectives(obj_build_quarry),
1089@@ -214,7 +213,7 @@
1090 body= saledus(_"Saledus looks excited…",
1091 -- TRANSLATORS: Saledus
1092 _([[Sire, 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 granite and beautiful marble.]])
1093- .. paragraphdivider() ..
1094+ .. close_p() .. open_p() ..
1095 -- TRANSLATORS: Saledus
1096 _([[Now we truly can look forward to settling down on another island.]])),
1097 w=400,
1098@@ -225,10 +224,10 @@
1099 body= lutius(_"Diary of Lutius",
1100 -- TRANSLATORS: Lutius - Diary
1101 _([[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.]])
1102- .. paragraphdivider() ..
1103+ .. close_p() .. open_p() ..
1104 -- TRANSLATORS: Lutius - Diary
1105 _([[Tonight will be our last night on this island. Tomorrow morning we will leave, searching for a new place for our exile.]])
1106- .. paragraphdivider() ..
1107+ .. close_p() .. open_p() ..
1108 -- TRANSLATORS: Lutius - Diary
1109 _([[I still wonder if we will ever see Fremil again.]]))
1110 .. objective_text(_"Victory",
1111
1112=== modified file 'data/campaigns/emp02.wmf/scripting/texts.lua'
1113--- data/campaigns/emp02.wmf/scripting/texts.lua 2016-01-28 05:24:34 +0000
1114+++ data/campaigns/emp02.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
1115@@ -28,7 +28,7 @@
1116 title =_"Build up a wood economy",
1117 number = 5,
1118 body = objective_text(_"Wood Economy",
1119- listitem_bullet(_[[Build three lumberjack’s houses, a forester’s house and a sawmill.]])
1120+ li(_[[Build three lumberjack’s houses, a forester’s house and a sawmill.]])
1121 ),
1122 }
1123
1124@@ -37,7 +37,7 @@
1125 title =_"Build a quarry",
1126 number = 1,
1127 body = objective_text(_"Quarry",
1128- listitem_bullet(_[[Build a quarry to the south of your headquarters.]])
1129+ li(_[[Build a quarry to the south of your headquarters.]])
1130 ),
1131 }
1132
1133@@ -46,7 +46,7 @@
1134 title =_"Protect your colony",
1135 number = 1,
1136 body = objective_text(_"Protect Your Colony",
1137- listitem_bullet(_[[Build some blockhouses and sentries around the colony.]])
1138+ li(_[[Build some blockhouses and sentries around the colony.]])
1139 ),
1140 }
1141
1142@@ -55,7 +55,7 @@
1143 title =_"Start mining marble",
1144 number = 1,
1145 body = objective_text(_"Marble",
1146- listitem_bullet(_[[Expand to the east, to start mining marble from the mountain.]])
1147+ li(_[[Expand to the east, to start mining marble from the mountain.]])
1148 ),
1149 }
1150
1151@@ -64,7 +64,7 @@
1152 title =_"Build a stonemason’s house and mining infrastructure",
1153 number = 7,
1154 body = objective_text(_"Stonemason’s house and Mining Infrastructure",
1155- listitem_bullet(_[[Build a stonemason’s house and then a complete mining and production infrastructure (coal mine and / or charcoal kiln, iron ore mine, toolsmithy, weapon smithy, armor smithy and smelting works).]])
1156+ li(_[[Build a stonemason’s house and then a complete mining and production infrastructure (coal mine and / or charcoal kiln, iron ore mine, toolsmithy, weapon smithy, armor smithy and smelting works).]])
1157 ),
1158 }
1159
1160@@ -73,10 +73,10 @@
1161 title =_"Provide your miners with food",
1162 number = 1,
1163 body = objective_text(_"Food For Your Miners",
1164- listitem_bullet(_[[To produce some sustaining food for our miners, we could build up a tavern. To supply them with some good and strong drinks, we could build up a brewery and a winery.]]) ..
1165- listitem_bullet(_[[Of course this means we will need more resources for preparing this food – like fish, meat or bread. To provide these foodstuffs, you would have to build a fisher’s house, a farm, a mill and a bakery.]]) ..
1166- listitem_bullet(_[[Maybe you will also need a hunter’s house, a piggery, a vineyard and some wells.]]) ..
1167- listitem_arrow(_[[It’s up to you what you want to build. But remember – coal and iron ore mines need beer, marble and gold mines need wine and all mines need at least rations, which are produced out of bread OR meat OR fish.]])
1168+ li(_[[To produce some sustaining food for our miners, we could build up a tavern. To supply them with some good and strong drinks, we could build up a brewery and a winery.]]) ..
1169+ li(_[[Of course this means we will need more resources for preparing this food – like fish, meat or bread. To provide these foodstuffs, you would have to build a fisher’s house, a farm, a mill and a bakery.]]) ..
1170+ li(_[[Maybe you will also need a hunter’s house, a piggery, a vineyard and some wells.]]) ..
1171+ li_arrow(_[[It’s up to you what you want to build. But remember – coal and iron ore mines need beer, marble and gold mines need wine and all mines need at least rations, which are produced out of bread OR meat OR fish.]])
1172 ),
1173 }
1174
1175@@ -85,8 +85,8 @@
1176 title =_"Protect your eastern frontier",
1177 number = 1,
1178 body = objective_text(_"Protect Your Eastern Frontier",
1179- listitem_bullet(_[[Build up stronger military buildings, such as an outpost, a barrier or a tower, on the eastern frontier.]]) ..
1180- listitem_arrow(_[[To watch deep inside the enemy territory, build a tower.]])
1181+ li(_[[Build up stronger military buildings, such as an outpost, a barrier or a tower, on the eastern frontier.]]) ..
1182+ li_arrow(_[[To watch deep inside the enemy territory, build a tower.]])
1183 ),
1184 }
1185
1186@@ -95,8 +95,8 @@
1187 title =_"Destroy the Barbarian tribe",
1188 number = 2,
1189 body = objective_text(_"Destroy the Barbarian Tribe",
1190- listitem_bullet(_[[As soon as you have enough soldiers, attack and completely destroy the Barbarian buildings.]]) ..
1191- listitem_bullet(_[[Finally, build up a fortress on the peninsula (near where the Barbarian headquarters stood before), to avoid new settlements of other tribes in that region.]])
1192+ li(_[[As soon as you have enough soldiers, attack and completely destroy the Barbarian buildings.]]) ..
1193+ li(_[[Finally, build up a fortress on the peninsula (near where the Barbarian headquarters stood before), to avoid new settlements of other tribes in that region.]])
1194 ),
1195 }
1196
1197@@ -109,7 +109,7 @@
1198 body = lutius(_"Diary of Lutius",
1199 -- TRANSLATORS: Lutius - Diary
1200 _([[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.]])
1201- .. paragraphdivider() ..
1202+ .. close_p() .. open_p() ..
1203 -- TRANSLATORS: Lutius - Diary
1204 _([[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.]])),
1205 }
1206@@ -120,10 +120,10 @@
1207 body= lutius(_"Diary of Lutius",
1208 -- TRANSLATORS: Lutius - Diary
1209 _([[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.]])
1210- .. paragraphdivider() ..
1211+ .. close_p() .. open_p() ..
1212 -- TRANSLATORS: Lutius - Diary
1213 _([[But until that day, many years may 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.]])
1214- .. paragraphdivider() ..
1215+ .. close_p() .. open_p() ..
1216 -- TRANSLATORS: Lutius - Diary
1217 _([[But we mustn’t forget to preserve this natural bounty. These forests should last forever, so we really have to build a forester’s house too.]]))
1218 .. new_objectives(obj_build_woodeconomy)
1219@@ -135,7 +135,7 @@
1220 body= lutius(_"Diary of Lutius",
1221 -- TRANSLATORS: Lutius - Diary
1222 _([[Later, I walked down to the rocks in the south and looked for a place where we could build a quarry to get some granite for our larger buildings.]])
1223- .. paragraphdivider() ..
1224+ .. close_p() .. open_p() ..
1225 -- TRANSLATORS: Lutius - Diary
1226 _([[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.]]))
1227 .. new_objectives(obj_build_quarry)
1228@@ -163,10 +163,10 @@
1229 body= saledus(_"Saledus looks unhappy",
1230 -- TRANSLATORS: Saledus
1231 _([[Sire, 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.]])
1232- .. paragraphdivider() ..
1233+ .. close_p() .. open_p() ..
1234 -- TRANSLATORS: Saledus
1235 _([[Perhaps the people aboard that ship were caught in the same storm which brought us to Malac’ Mor – and were brought to this island.]])
1236- .. paragraphdivider() ..
1237+ .. close_p() .. open_p() ..
1238 -- TRANSLATORS: Saledus
1239 _([[I beg you to be cautious and to build some blockhouses or sentries around our colony.]]))
1240 .. new_objectives(obj_build_military_buildings)
1241@@ -177,10 +177,10 @@
1242 body= saledus(_"Saledus smiles",
1243 -- TRANSLATORS: Saledus
1244 _([[Sire, 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.]])
1245- .. paragraphdivider() ..
1246+ .. close_p() .. open_p() ..
1247 -- TRANSLATORS: Saledus
1248 _([[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.]])
1249- .. paragraphdivider() ..
1250+ .. close_p() .. open_p() ..
1251 -- TRANSLATORS: Saledus
1252 _([[Please, expand to that mountain and start mining marble.]]))
1253 .. new_objectives(obj_build_marblemine)
1254@@ -191,10 +191,10 @@
1255 body= saledus(_"Saledus is excited",
1256 -- TRANSLATORS: Saledus
1257 _([[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. I advise you to immediately build iron ore and coal mines (or at least charcoal kilns), smelting works, toolsmithies, armor and weapon smithies.]])
1258- .. paragraphdivider() ..
1259+ .. close_p() .. open_p() ..
1260 -- TRANSLATORS: Saledus
1261 _([[However: for all these bigger buildings, we need better and more elegant building materials. So you have to build a house for the stonemason, who will cut columns from marble.]])
1262- .. paragraphdivider() ..
1263+ .. close_p() .. open_p() ..
1264 -- TRANSLATORS: Saledus
1265 _([[After everything, we can now begin to live like we did in Fremil.]]))
1266 .. new_objectives(obj_build_mining_infrastructure)
1267@@ -205,10 +205,10 @@
1268 body= amalea(_"Amalea enters…",
1269 -- TRANSLATORS: Amalea
1270 _([[Lutius, don’t you think you forgot something important?]])
1271- .. paragraphdivider() ..
1272+ .. close_p() .. open_p() ..
1273 -- TRANSLATORS: Amalea
1274 _([[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.]])
1275- .. paragraphdivider() ..
1276+ .. close_p() .. open_p() ..
1277 -- TRANSLATORS: Amalea
1278 _([[What do you think about helping them out? I can’t tell you what we need exactly… but here are my recommendations:]]))
1279 .. new_objectives(obj_build_food_infrastructure)
1280@@ -219,7 +219,7 @@
1281 body= amalea(_"Amalea smiles",
1282 -- TRANSLATORS: Amalea
1283 _([[I just visited our new tavern ‘At the palms’. The beer they serve is really tasty. You really should have a drink there, too.]])
1284- .. paragraphdivider() ..
1285+ .. close_p() .. open_p() ..
1286 -- TRANSLATORS: Amalea
1287 _([[It is good to see that we have now got a warmer and more familiar environment on our island. Thank you, Lutius.]]))
1288 }
1289@@ -230,13 +230,13 @@
1290 body= lutius(_"Diary of Lutius",
1291 -- TRANSLATORS: Lutius - Diary
1292 _([[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.]])
1293- .. paragraphdivider() ..
1294+ .. close_p() .. open_p() ..
1295 -- TRANSLATORS: Lutius - Diary
1296 _([[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.]])
1297- .. paragraphdivider() ..
1298+ .. close_p() .. open_p() ..
1299 -- TRANSLATORS: Lutius - Diary
1300 _([[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.]])
1301- .. paragraphdivider() ..
1302+ .. close_p() .. open_p() ..
1303 -- TRANSLATORS: Lutius - Diary
1304 _([[Anyway, we must build up stronger military buildings as soon as possible.]]))
1305 .. new_objectives(obj_build_bigger_military_buildings)
1306@@ -257,10 +257,11 @@
1307 body= lutius(_"Diary of Lutius",
1308 -- TRANSLATORS: Lutius - Diary
1309 _([[Today is a proud day. We have fought for our new home and risen victorious.]])
1310- .. paragraphdivider() ..
1311+ .. close_p() .. open_p() ..
1312 -- TRANSLATORS: Lutius - Diary
1313 _([[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.]]))
1314 .. objective_text(_"Victory",
1315+ -- TRANSLATORS: Lutius - Diary
1316 _[[You have established a working economy, trained new soldiers and driven the Barbarians from the island.]])
1317 }
1318
1319@@ -268,7 +269,7 @@
1320 title =_ "As Time is Running By",
1321 w=200,
1322 h=150,
1323- body=rt(p(_"7 days later…")),
1324+ body= p(_"7 days later…"),
1325 }
1326
1327 diary_page_11 = {
1328@@ -277,9 +278,10 @@
1329 body= lutius(_"Diary of Lutius",
1330 -- TRANSLATORS: Lutius - Diary
1331 _([[Today a pigeon landed on our island. It brought a message which fills me with dark thoughts and brings back my fears.]])
1332- .. paragraphdivider() ..
1333+ .. close_p() .. open_p() ..
1334 -- TRANSLATORS: Lutius - Diary
1335 _([[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…]])
1336- .. paragraphdivider() ..
1337+ .. close_p() .. open_p() ..
1338+ -- TRANSLATORS: Lutius - Diary
1339 _([[You have completed this mission. You may continue playing if you wish, otherwise move on to the next mission.]]))
1340 }
1341
1342=== modified file 'data/campaigns/tutorial01_basic_control.wmf/scripting/texts.lua'
1343--- data/campaigns/tutorial01_basic_control.wmf/scripting/texts.lua 2016-03-16 10:41:23 +0000
1344+++ data/campaigns/tutorial01_basic_control.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
1345@@ -14,22 +14,18 @@
1346 -- =============
1347 scold_player = {
1348 title = _"Nice And Easy Does It All the Time",
1349- body = rt(
1350- p(_[[I am sorry, but will I have to tear this down again. We might need the space here later on. If I am too slow for you, you might want to play a real game and just find everything out for yourself. Otherwise, please bear with me, I am not the youngest and quickest anymore.]]
1351- )
1352- ),
1353+ body =
1354+ p(_[[I am sorry, but will I have to tear this down again. We might need the space here later on. If I am too slow for you, you might want to play a real game and just find everything out for yourself. Otherwise, please bear with me, I am not the youngest and quickest anymore.]]),
1355 h = 300,
1356 show_instantly = true
1357 }
1358
1359 initial_message_01 = {
1360 title = _"Welcome to the Widelands Tutorial!",
1361- body = rt(
1362+ body =
1363 h1(_"Welcome to Widelands!") ..
1364 p(_[[Widelands is a slow-paced build-up strategy game with an emphasis on construction rather than destruction. This tutorial will guide you through the basics of the game.]]) ..
1365- paragraphdivider() ..
1366- listitem_bullet(_[[Dismiss this box by left-clicking on the button below.]])
1367- ),
1368+ li(_[[Dismiss this box by left-clicking on the button below.]]),
1369 h = 300,
1370 w = 400
1371 }
1372@@ -37,31 +33,26 @@
1373 title = _"Diving In",
1374 position = "topright",
1375 field = sf,
1376- body = rt(
1377+ body =
1378 h1(_"Let’s dive right in!") ..
1379 p(_[[There are three different tribes in Widelands: the Barbarians, the Empire and the Atlanteans. All tribes have a different economy, strength and weaknesses, but the general gameplay is the same for all. We will play the Barbarians for now.]]) ..
1380 p(_[[You will usually start the game with one headquarters. This is the big building with the blue flag in front of it. The headquarters is a warehouse that stores wares, workers and soldiers. Some wares are needed for building houses, others for making other wares. Obviously, the wares in the headquarters will not last forever, so you must make sure to replace them. The most important wares in the early game are the basic construction wares: logs and granite. Let’s make sure that we do not run out of logs. For this, we need a lumberjack and a hut for him to stay in.]]) ..
1381 p(_[[We need to find a nice place for the lumberjack’s hut. To make this easier, we can activate ‘Show Building Spaces’. There are two ways you can do this, either by clicking on the ‘Show Building Spaces’ button at the bottom of the screen, which is the fourth one from the left. Or you can use the Space key to toggle it.]]) ..
1382- paragraphdivider() ..
1383- listitem_bullet(_[[Left-click the ‘OK’ button to close this box and then try it.]])
1384- ),
1385+ li(_[[Left-click the ‘OK’ button to close this box and then try it.]]),
1386 obj_name = "enable_buildhelp",
1387 obj_title = _"Enable the showing of building spaces",
1388- obj_body = rt(
1389+ obj_body =
1390 h1(_"Show Building Spaces") ..
1391 p(_[[It is easier to understand what type of buildings can be built on which field when the symbols for the building spaces are enabled.]]) ..
1392- paragraphdivider() ..
1393- listitem_bullet(_[[Do so now, either by pressing Space or by clicking the fourth button from the left at the very bottom of the screen. Right-click on this window and then give it a try.]])
1394- )
1395+ li(_[[Do so now, either by pressing Space or by clicking the fourth button from the left at the very bottom of the screen. Right-click on this window and then give it a try.]])
1396 }
1397
1398 lumberjack_message_01 = {
1399 title = _"Lumberjack’s Spot",
1400 position = "topright",
1401 field = first_lumberjack_field,
1402- body = rt(
1403- p(_[[There you go. I will explain about all those symbols in a minute. First, let me show you how to make a lumberjack’s hut and how to connect it with a road. There is a sweet spot for a lumberjack right next to those trees. I’ll describe the steps I will take and then ask you to click on the ‘OK’ button for me to demonstrate.]])
1404- ),
1405+ body =
1406+ p(_[[There you go. I will explain about all those symbols in a minute. First, let me show you how to make a lumberjack’s hut and how to connect it with a road. There is a sweet spot for a lumberjack right next to those trees. I’ll describe the steps I will take and then ask you to click on the ‘OK’ button for me to demonstrate.]]),
1407 h = 300,
1408 w = 350
1409 }
1410@@ -69,20 +60,17 @@
1411 lumberjack_message_02 = {
1412 title = _"Building the Lumberjack",
1413 position = "topright",
1414- body = rt(
1415+ body =
1416 p(_[[First, I’ll left-click on the symbol where I want the lumberjack’s hut to be built. A window will appear where I can choose between buildings. Because I’ll click a yellow house symbol – which means that its field can house medium and small buildings – I am presented with all the medium buildings that I can build. The lumberjack’s hut is a small building, so I will go on to select the small buildings tab. Then I’ll choose the lumberjack’s hut.]]) ..
1417- paragraphdivider() ..
1418- listitem_bullet(_[[Click the ‘OK’ button to watch me. I’ll go really slowly: I will click – then select the tab – and finally I’ll choose the building.]])
1419- ),
1420+ li(_[[Click the ‘OK’ button to watch me. I’ll go really slowly: I will click – then select the tab – and finally I’ll choose the building.]]),
1421 h = 300
1422 }
1423
1424 lumberjack_message_03a = {
1425 title = _"Building a Connecting Road",
1426 position = "topright",
1427- body = rt(
1428- p(_[[That won’t do yet. I still need to connect the lumberjack’s hut to the rest of my road network. After ordering the construction site, I was automatically put into road building mode, so all I have to do is click on the blue flag in front of my headquarters.]])
1429- ),
1430+ body =
1431+ p(_[[That won’t do yet. I still need to connect the lumberjack’s hut to the rest of my road network. After ordering the construction site, I was automatically put into road building mode, so all I have to do is click on the blue flag in front of my headquarters.]]),
1432 show_instantly = true,
1433 h = 300,
1434 w = 350
1435@@ -91,9 +79,8 @@
1436 lumberjack_message_03b = {
1437 title = _"Building a Connecting Road",
1438 position = "topright",
1439- body = rt(
1440- p(_[[That won’t do yet. I still need to connect the lumberjack’s hut to the rest of my road network. You have disabled the option ‘Start building road after placing a flag’ (to change that, choose ‘Options’ in the Widelands main menu). Therefore, I have entered the road building mode manually. I will tell you later how to do that. To build the road, all I have to do now is click on the blue flag in front of my headquarters.]])
1441- ),
1442+ body =
1443+ p(_[[That won’t do yet. I still need to connect the lumberjack’s hut to the rest of my road network. You have disabled the option ‘Start building road after placing a flag’ (to change that, choose ‘Options’ in the Widelands main menu). Therefore, I have entered the road building mode manually. I will tell you later how to do that. To build the road, all I have to do now is click on the blue flag in front of my headquarters.]]),
1444 show_instantly = true,
1445 h = 300,
1446 w = 350
1447@@ -102,9 +89,8 @@
1448 lumberjack_message_04 = {
1449 title = _"Waiting for the Lumberjack to Go Up",
1450 position = "topright",
1451- body = rt(
1452- p(_[[Now watch closely while a builder leaves the headquarters and goes to the construction site. Also, a carrier will take position in between the two blue flags and carry wares from one blue flag to the other.]])
1453- ),
1454+ body =
1455+ p(_[[Now watch closely while a builder leaves the headquarters and goes to the construction site. Also, a carrier will take position in between the two blue flags and carry wares from one blue flag to the other.]]),
1456 h = 300,
1457 w = 350
1458 }
1459@@ -112,31 +98,25 @@
1460 lumberjack_message_05 = {
1461 title = _"Placing Another Flag",
1462 position = "topright",
1463- body = rt(
1464+ body =
1465 p(_[[Nice how they are working, isn’t it? But the poor carrier has a very long way to go. We can make it easier for him (and more efficient for us) by placing another blue flag on the road.]]) ..
1466- paragraphdivider() ..
1467- listitem_bullet(_[[You try it this time: click on the yellow flag symbol in between the two blue flags we just placed and then click on the]])
1468- ) ..
1469- rt("image=images/wui/fieldaction/menu_build_flag.png", p(_"build flag symbol.")
1470- ),
1471+ li(_[[You try it this time: click on the yellow flag symbol in between the two blue flags we just placed and then click on the]]) ..
1472+ p(img("images/wui/fieldaction/menu_build_flag.png") .. _"build flag symbol."),
1473 h = 300,
1474 obj_name = "build_flag_on_road_to_lumberjack",
1475 obj_title = _"Build a flag to divide the road to the lumberjack",
1476- obj_body = rt(
1477+ obj_body =
1478 h1(_"Build a Flag on the Road") ..
1479 p(_[[The shorter your road segments are, the faster your wares will be transported. You should therefore make sure that your roads have as many flags as possible.]]) ..
1480- paragraphdivider() ..
1481- listitem_bullet(_[[Build a blue flag now in the middle of the road that connects your headquarters to your lumberjack’s hut.]])
1482- )
1483+ li(_[[Build a blue flag now in the middle of the road that connects your headquarters to your lumberjack’s hut.]])
1484 }
1485
1486 lumberjack_message_06 = {
1487 title = _"Waiting For the Hut to be Finished",
1488 position = "topright",
1489- body = rt(
1490+ body =
1491 p(_[[Well done! Let’s wait till the hut is finished.]]) ..
1492- p(_[[If you want things to go faster, simply use the Page Up key on your keyboard to increase the game speed. You can use Page Down to make the game slower again.]])
1493- ),
1494+ p(_[[If you want things to go faster, simply use the Page Up key on your keyboard to increase the game speed. You can use Page Down to make the game slower again.]]),
1495 h = 300,
1496 w = 350
1497 }
1498@@ -144,23 +124,21 @@
1499 flag_built = {
1500 title = _"Waiting for the Hut to be Finished",
1501 position = "topright",
1502- body = rt(
1503+ body =
1504 p(_[[I wanted to teach you how to build new flags, but it seems you have already found out on your own. Well done!]]) ..
1505 p(_[[Now you have split the road in two parts with a carrier each. This means less work for him and higher efficiency for us. You should therefore always place as many flags as possible on your roads.]]) ..
1506 p(_[[Now we only have to wait till the hut is finished.]]) ..
1507- p(_[[If you want things to go faster, simply use the Page Up key on your keyboard to increase the game speed. You can use Page Down to make the game slower again.]])
1508- ),
1509+ p(_[[If you want things to go faster, simply use the Page Up key on your keyboard to increase the game speed. You can use Page Down to make the game slower again.]]),
1510 h = 350
1511 }
1512
1513 construction_site_window = {
1514 title = _"The Construction Site",
1515- body = rt(
1516+ body =
1517 h1(_"Let's see the progress") ..
1518 p(_[[If you click on the construction site, a window opens. You can see the wares that are still missing grayed out. You can also see the progress of this construction site.]]) ..
1519 -- The player doesn't know about the statistics yet. First things first.
1520- p(_[[To close the window, simply right-click on it. All windows in Widelands can be closed that way, except the ones with instructions, like this one. Try it out!]])
1521- ),
1522+ p(_[[To close the window, simply right-click on it. All windows in Widelands can be closed that way, except the ones with instructions, like this one. Try it out!]]),
1523 h = 300,
1524 w = 350
1525 }
1526@@ -168,42 +146,34 @@
1527 lumberjack_message_07 = {
1528 title = _"Lumberjack is Done",
1529 position = "topright",
1530- body = rt(
1531- p(_[[Excellent. The lumberjack’s hut is done. A lumberjack will now move in and start chopping down trees, so our log income is secured for now. Now on to the granite.]])
1532- ),
1533+ body =
1534+ p(_[[Excellent. The lumberjack’s hut is done. A lumberjack will now move in and start chopping down trees, so our log income is secured for now. Now on to the granite.]]),
1535 h = 300,
1536 w = 350
1537 }
1538
1539 inform_about_rocks = {
1540 title = _"Some Rocks Were Found",
1541- body = rt(h1(_"Getting a Quarry Up")) ..
1542- rt(
1543+ h1(_"Getting a Quarry Up") ..
1544 p(_[[Granite can be mined in granite mines, but the easier way is to build a quarry next to some rocks lying around. As it happens, there is a pile of them just to the west (left) of your headquarters. I will teach you now how to move your view over there.]]) ..
1545- paragraphdivider() ..
1546- listitem_arrow(_[[There are three ways to move your view. The first one is using the cursor keys on your keyboard. Go ahead and try this out.]]) ..
1547- listitem_bullet(_[[Click the ‘OK’ button and then move the view using the cursor keys]])
1548- ),
1549+ li_arrow(_[[There are three ways to move your view. The first one is using the cursor keys on your keyboard. Go ahead and try this out.]]) ..
1550+ li(_[[Click the ‘OK’ button and then move the view using the cursor keys]]),
1551 h = 350,
1552 obj_name = "move_view_with_cursor_keys",
1553 obj_title = _"Move your view with the cursor keys",
1554- obj_body = rt(
1555+ obj_body =
1556 h1(_"Moving Your View") ..
1557 p(_[[Moving your view is essential to get a complete overview of your whole economy. There are three ways to move your view in Widelands.]]) ..
1558- paragraphdivider() ..
1559- listitem_arrow(_[[The first one is to use the cursor keys on your keyboard.]]) ..
1560- listitem_arrow(_[[The second one is the more common and faster one: press-and-hold the right mouse button anywhere on the map, then move your mouse around and you’ll see the view scroll.]]) ..
1561- listitem_arrow(_[[The third one is to use the minimap. It is especially useful for traveling big distances.]])
1562- )
1563+ li_arrow(_[[The first one is to use the cursor keys on your keyboard.]]) ..
1564+ li_arrow(_[[The second one is the more common and faster one: press-and-hold the right mouse button anywhere on the map, then move your mouse around and you’ll see the view scroll.]]) ..
1565+ li_arrow(_[[The third one is to use the minimap. It is especially useful for traveling big distances.]])
1566 }
1567
1568 tell_about_right_drag_move = {
1569 title = _"Other Ways to Move the View",
1570- body = rt(
1571+ body =
1572 p(_[[Excellent. Now there is a faster way to move, using the mouse instead:]]) ..
1573- paragraphdivider() ..
1574- listitem_bullet(_[[Simply right-click-and-hold anywhere on the map, then drag the mouse and instead of the cursor, the view will be moved. Try it.]])
1575- ),
1576+ li(_[[Simply right-click-and-hold anywhere on the map, then drag the mouse and instead of the cursor, the view will be moved. Try it.]]),
1577 h = 300,
1578 w = 350,
1579 obj_name = "move_view_with_mouse",
1580@@ -213,30 +183,23 @@
1581
1582 tell_about_minimap = {
1583 title = _"Use the minimap",
1584- body = rt(
1585- p(_[[Very good. And now about the minimap. You can open it by clicking on the]])
1586- ) ..
1587- rt("image=images/wui/menus/menu_toggle_minimap.png", p(_[[minimap button at the bottom of the screen or simply by using the keyboard shortcut ‘m’.]])
1588- ) ..
1589- rt(
1590+ body =
1591+ p(_[[Very good. And now about the minimap. You can open it by clicking on the]]) ..
1592+ p(img("images/wui/menus/menu_toggle_minimap.png") .. _[[minimap button at the bottom of the screen or simply by using the keyboard shortcut ‘m’.]]) ..
1593 p(_[[The minimap shows the complete map in miniature. You can directly jump to any field by left-clicking on it. You can also toggle buildings, roads, flags and player indicators on and off inside the minimap.]]) ..
1594- paragraphdivider() ..
1595- listitem_bullet(_[[Try it out. Open the minimap, click on a few buttons and try moving around. Close it when you have experimented enough.]])
1596- ),
1597+ li(_[[Try it out. Open the minimap, click on a few buttons and try moving around. Close it when you have experimented enough.]]),
1598 h = 350,
1599 obj_name = "use_minimap",
1600 obj_title = _"Learn to use the minimap",
1601- obj_body = rt(
1602- paragraphdivider() ..
1603- listitem_bullet(_[[Open the minimap by using the third button from the left on the bottom of your screen or the ‘m’ key.]]) ..
1604- listitem_bullet(_[[Play around a bit with the different overlays (roads, flags, etc.)]]) ..
1605- listitem_bullet(_[[Close the minimap when you are ready to continue by using the same button or ‘m’ again. Of course, a right-click also works.]])
1606- )
1607+ obj_body =
1608+ li(_[[Open the minimap by using the third button from the left on the bottom of your screen or the ‘m’ key.]]) ..
1609+ li(_[[Play around a bit with the different overlays (roads, flags, etc.)]]) ..
1610+ li(_[[Close the minimap when you are ready to continue by using the same button or ‘m’ again. Of course, a right-click also works.]])
1611 }
1612
1613 congratulate_and_on_to_quarry = {
1614 title = _"Onward to the Quarry",
1615- body = rt(p(_[[Great. Now about that quarry…]])),
1616+ body = p(_[[Great. Now about that quarry…]]),
1617 h = 200,
1618 w = 250
1619 }
1620@@ -245,45 +208,35 @@
1621 field = first_quarry_field,
1622 position = "topright",
1623 title = _"How to Build a Quarry",
1624- body = rt(
1625+ body =
1626 p(_[[Build a quarry next to those rocks here. Remember how I did it earlier?]]) ..
1627 p(_[[Make sure that you are showing the building spaces, then just click on the space were you want the building to be, choose it from the window that appears, and it is placed. Maybe this is a good time to explain about all those building space symbols we activated earlier.]]) ..
1628- p(_[[You can build four things on fields in Widelands: flags, small houses, medium houses and big houses. But not every field can hold everything. The build space symbols ease recognition:]])
1629- ) ..
1630- rt("image=images/wui/overlays/big.png", p(_[[Everything can be built on the green house symbol.]])) ..
1631- rt("image=images/wui/overlays/medium.png", p(_[[Everything except for big buildings can be built on a yellow house symbol.]])) ..
1632- rt("image=images/wui/overlays/small.png", p(_[[Red building symbols can only hold small buildings and flags.]])) ..
1633- rt("image=images/wui/overlays/set_flag.png", p(_[[And finally, the yellow flag symbol only allows for flags.]])) ..
1634- rt(
1635+ p(_[[You can build four things on fields in Widelands: flags, small houses, medium houses and big houses. But not every field can hold everything. The build space symbols ease recognition:]]) ..
1636+ p(img("images/wui/overlays/big.png") .. _[[Everything can be built on the green house symbol.]]) ..
1637+ p(img("images/wui/overlays/medium.png") .. _[[Everything except for big buildings can be built on a yellow house symbol.]]) ..
1638+ p(img("images/wui/overlays/small.png") .. _[[Red building symbols can only hold small buildings and flags.]]) ..
1639+ p(img("images/wui/overlays/set_flag.png") .. _[[And finally, the yellow flag symbol only allows for flags.]]) ..
1640 p(_[[If you place something on a field, the surrounding fields might have less space for holding buildings, so choose your fields wisely.]]) ..
1641- paragraphdivider() ..
1642- listitem_bullet(_[[Now go ahead, try it. The quarry is a small building, so if you click on a medium or big building symbol, you will have to select the small buildings tab first to find it. Go on, check it out!]])
1643- ),
1644+ li(_[[Now go ahead, try it. The quarry is a small building, so if you click on a medium or big building symbol, you will have to select the small buildings tab first to find it. Go on, check it out!]]),
1645 obj_name = "build_a_quarry",
1646 obj_title = _"Build a quarry next to the rocks",
1647- obj_body = rt(
1648+ obj_body =
1649 h1(_"Build a Quarry") ..
1650- paragraphdivider() ..
1651- listitem_bullet(_[[There are some rocks to the west of your headquarters. Build a quarry right next to them.]]) ..
1652- listitem_arrow(_[[The quarry is a small building like the lumberjack’s hut. You can therefore build it on any field that shows a red, yellow or green house when the building spaces symbols are enabled (Press Space for that).]]) ..
1653- listitem_arrow(_[[Just click on any house symbol next to the rocks, select the small buildings tab in the window that opens up, then click on the quarry symbol.]])
1654- )
1655+ li(_[[There are some rocks to the west of your headquarters. Build a quarry right next to them.]]) ..
1656+ li_arrow(_[[The quarry is a small building like the lumberjack’s hut. You can therefore build it on any field that shows a red, yellow or green house when the building spaces symbols are enabled (Press Space for that).]]) ..
1657+ li_arrow(_[[Just click on any house symbol next to the rocks, select the small buildings tab in the window that opens up, then click on the quarry symbol.]])
1658 }
1659
1660 talk_about_roadbuilding_00a = {
1661 position = "topright",
1662 field = wl.Game().map:get_field(9,12),
1663 title = _"Road Building",
1664- body = rt(
1665- p(_[[Excellent! Directly after placing the building, you have been switched into road building mode. The new road will start at the flag in front of your newly placed construction site. You can enter road building mode for any flag by left-clicking on a flag and selecting]])
1666- ) ..
1667- rt("image=images/wui/fieldaction/menu_build_way.png", p(_[[the road building symbol.]])) ..
1668- rt(
1669- p(_[[If you decide you do not want to build a road at this time, you can cancel road building by clicking on the starting flag of the road and selecting]])) ..
1670- rt("image=images/wui/menu_abort.png", p(_[[the abort symbol.]])) ..
1671- rt(
1672- p(_[[Now, about this road. Remember: we are already in road building mode since you just ordered the quarry. You can either make it longer by one field at a time by left-clicking multiple times on neighboring fields for perfect control over the route the road takes, like so:]])
1673- ),
1674+ body =
1675+ p(_[[Excellent! Directly after placing the building, you have been switched into road building mode. The new road will start at the flag in front of your newly placed construction site. You can enter road building mode for any flag by left-clicking on a flag and selecting]]) ..
1676+ p(img("images/wui/fieldaction/menu_build_way.png") .. _[[the road building symbol.]]) ..
1677+ p(_[[If you decide you do not want to build a road at this time, you can cancel road building by clicking on the starting flag of the road and selecting]]) ..
1678+ p(img("images/wui/menu_abort.png") .. _[[the abort symbol.]]) ..
1679+ p(_[[Now, about this road. Remember: we are already in road building mode since you just ordered the quarry. You can either make it longer by one field at a time by left-clicking multiple times on neighboring fields for perfect control over the route the road takes, like so:]]),
1680 show_instantly = true
1681 }
1682
1683@@ -291,16 +244,12 @@
1684 position = "topright",
1685 field = road_building_field,
1686 title = _"Road Building",
1687- body = rt(
1688- p(_[[Excellent! To enter road building mode for any flag, left-click on a flag and select]])
1689- ) ..
1690- rt("image=images/wui/fieldaction/menu_build_way.png", p(_[[the road building symbol.]])) ..
1691- rt(
1692- p(_[[If you decide that you do not want to build a road at this time, you can cancel road building by clicking on the starting flag of the road and selecting]])) ..
1693- rt("image=images/wui/menu_abort.png", p(_[[the abort symbol.]])) ..
1694- rt(
1695- p(_[[Now, about this road. I’ll enter the road building mode and then make it longer by one field at a time by left-clicking multiple times on neighboring fields for perfect control over the route the road takes, like so:]])
1696- ),
1697+ body =
1698+ p(_[[Excellent! To enter road building mode for any flag, left-click on a flag and select]]) ..
1699+ p(img("images/wui/fieldaction/menu_build_way.png") .. _[[the road building symbol.]]) ..
1700+ p(_[[If you decide that you do not want to build a road at this time, you can cancel road building by clicking on the starting flag of the road and selecting]]) ..
1701+ p(img("images/wui/menu_abort.png") .. _[[the abort symbol.]]) ..
1702+ p(_[[Now, about this road. I’ll enter the road building mode and then make it longer by one field at a time by left-clicking multiple times on neighboring fields for perfect control over the route the road takes, like so:]]),
1703 show_instantly = true
1704 }
1705
1706@@ -308,7 +257,7 @@
1707 position = "topright",
1708 field = road_building_field,
1709 title = _"Road Building",
1710- body = rt(p(_[[Or, you can directly click the flag where the road should end, like so:]])),
1711+ body = p(_[[Or, you can directly click the flag where the road should end, like so:]]),
1712 h = 200,
1713 w = 250
1714 }
1715@@ -316,42 +265,34 @@
1716 talk_about_roadbuilding_02 = {
1717 position = "topright",
1718 title = _"Road Building",
1719- body = rt(
1720- p(_[[One more thing: around the field where your road would end, you can see different markers. They have the following meaning:]])
1721- ) ..
1722- rt("image=images/wui/overlays/roadb_green.png", p(_[[The terrain is flat here. Your carriers will be very swift on this terrain.]])) ..
1723- rt("image=images/wui/overlays/roadb_yellow.png", p(_[[There is a small slope to climb to reach this field. This means that your workers will be faster walking downhill than they will be walking uphill.]])) ..
1724- rt("image=images/wui/overlays/roadb_red.png", p(_[[The connection between the fields is extremely steep. The speed increase in one direction is huge while the slowdown in the other is also substantial.]])) ..
1725- rt(
1726+ body =
1727+ p(_[[One more thing: around the field where your road would end, you can see different markers. They have the following meaning:]]) ..
1728+ p(img("images/wui/overlays/roadb_green.png") .. _[[The terrain is flat here. Your carriers will be very swift on this terrain.]]) ..
1729+ p(img("images/wui/overlays/roadb_yellow.png") .. _[[There is a small slope to climb to reach this field. This means that your workers will be faster walking downhill than they will be walking uphill.]]) ..
1730+ p(img("images/wui/overlays/roadb_red.png") .. _[[The connection between the fields is extremely steep. The speed increase in one direction is huge while the slowdown in the other is also substantial.]]) ..
1731 p(_[[Keep the slopes in mind while placing roads and use them to your advantage. Also, try to keep roads as short as possible and always remember to place as many flags as you can on road segments to share the load better. If you hold Ctrl or Shift+Ctrl while you finish the road, flags are placed automatically.]]) ..
1732- paragraphdivider() ..
1733- listitem_bullet(_[[Now please rebuild the road between your quarry and your headquarters.]])
1734- ),
1735+ li(_[[Now please rebuild the road between your quarry and your headquarters.]]),
1736 h = 450,
1737 obj_name = "build_road_to_quarry",
1738 obj_title = _"Connect the quarry to the headquarters",
1739- obj_body = rt(
1740+ obj_body =
1741 h1(_"Connect Your Construction Site") ..
1742 p(_[[Connect your quarry construction site to your headquarters with a road. You would have been put directly into road building mode after ordering a new site. But now, you aren’t.]]) ..
1743- paragraphdivider() ..
1744- listitem_arrow(_[[To build a completely new road, just click on the flag in front of your construction site, click on the build road icon and then click on the flag in front of your headquarters. Wait for the completion of the quarry.]])
1745- )
1746+ li_arrow(_[[To build a completely new road, just click on the flag in front of your construction site, click on the build road icon and then click on the flag in front of your headquarters. Wait for the completion of the quarry.]])
1747 }
1748
1749 quarry_not_connected = {
1750 title = _"Quarry not Connected",
1751- body = rt(
1752- p(_[[Your workers do not like to walk across country. You have to build a road from your headquarters to the construction site so that carriers can transport wares. The simplest way is to click on the construction site’s flag, choose ‘Build road’, and then click on the destination flag (the one in front of your headquarters), just like I’ve demonstrated.]])
1753- ),
1754+ body =
1755+ p(_[[Your workers do not like to walk across country. You have to build a road from your headquarters to the construction site so that carriers can transport wares. The simplest way is to click on the construction site’s flag, choose ‘Build road’, and then click on the destination flag (the one in front of your headquarters), just like I’ve demonstrated.]]),
1756 w = 350,
1757 h = 250
1758 }
1759
1760 quarry_illegally_destroyed = {
1761 title = _"You Destroyed the Construction Site!",
1762- body = rt(
1763- p(_[[It seems like you destroyed a construction site for a quarry we wanted to build. Since we need the granite, I suggest you reload the game from a previous savegame. Luckily, these are created from time to time. To do so, you have to go back to the main menu and choose ‘Single Player’ → ‘Load Game’. And please be a bit more careful next time.]])
1764- ),
1765+ body =
1766+ p(_[[It seems like you destroyed a construction site for a quarry we wanted to build. Since we need the granite, I suggest you reload the game from a previous savegame. Luckily, these are created from time to time. To do so, you have to go back to the main menu and choose ‘Single Player’ → ‘Load Game’. And please be a bit more careful next time.]]),
1767 w = 350,
1768 h = 250
1769 }
1770@@ -359,35 +300,30 @@
1771 build_second_quarry = {
1772 position = "topright",
1773 title = _"Build a second quarry",
1774- body = rt(
1775+ body =
1776 p(_[[When there are many rocks, you can consider building another quarry. This will make the granite production faster.]]) ..
1777- paragraphdivider() ..
1778- listitem_bullet(_[[Build a second quarry near the rocks and connect it to your road network.]])
1779- ),
1780+ li(_[[Build a second quarry near the rocks and connect it to your road network.]]),
1781 obj_name = "build_the_second_quarry",
1782 obj_title = _"Build another quarry",
1783- obj_body = rt(
1784+ obj_body =
1785 h1(_"Build another quarry") ..
1786 p(_[[Build a second quarry next to the rocks. Do not forget to connect it to another flag.]]) ..
1787- paragraphdivider() ..
1788- listitem_arrow(_[[You can connect the new road to any flag of your existing road network. You can create junctions everywhere, not only in front of buildings.]])
1789- ),
1790+ li_arrow(_[[You can connect the new road to any flag of your existing road network. You can create junctions everywhere, not only in front of buildings.]]),
1791 h = 300,
1792 w = 350
1793 }
1794
1795 census_and_statistics_00 = {
1796 title = _"Census and Statistics",
1797- body = rt(
1798+ body =
1799 p(_[[While we wait, I’ll quickly show you another useful feature. All construction sites look the same, and some buildings look alike. It is sometimes hard to tell them apart. Widelands offers a feature to show label texts over the buildings. They are called the ‘census’ and you can toggle them via the ‘c’ key or via the button on the ‘Watch’ tab of any field.]]) ..
1800 p(_[[Similar to this are the building statistics, which are also toggled via a button on the ‘Watch’ tab of any field. The hotkey for it is ‘s’. This will display information about the productivity of buildings or the progress of construction sites.]]) ..
1801 p(_[[Let me quickly enable these two for you. Remember: ‘c’ and ‘s’ are the keys. Alternatively, you can click on any field without a building on it, select the watch tab and then click on the corresponding buttons.]])
1802- )
1803 }
1804
1805 census_and_statistics_01 = {
1806 title = _"Census and Statistics",
1807- body = rt(p(_[[Now we know what’s going on. Let’s wait for the quarries to finish.]])),
1808+ body = p(_[[Now we know what’s going on. Let’s wait for the quarries to finish.]]),
1809 h = 200,
1810 w = 250
1811 }
1812@@ -396,56 +332,45 @@
1813 popup = true,
1814 title = _"Messages",
1815 heading = _"Introducing Messages",
1816- body = rt(
1817+ body =
1818 p(_[[Hi, it’s me again! This time, I have sent you a message. Messages are sent to you by Widelands to inform you about important events: empty mines, attacks on your tribe, won or lost military buildings, resources found…]]) ..
1819 p(_[[The message window can be toggled by the button on the very right at the bottom of the screen. This button will also change appearance whenever new messages are available, but there is also a bell sound played whenever you receive a new message.]]) ..
1820- p(_[[You have two messages at the moment. This one, which you are currently reading, and the one that informed you that a new headquarters was added to your economy. Let’s learn how to archive messages: first, select the message that you wish to archive by clicking on it in the list. Then, click the]])
1821- ) ..
1822- rt("image=images/wui/messages/message_archive.png", p(_[[‘Archive selected message’ button to move it into your archive.]])) ..
1823- rt(
1824+ p(_[[You have two messages at the moment. This one, which you are currently reading, and the one that informed you that a new headquarters was added to your economy. Let’s learn how to archive messages: first, select the message that you wish to archive by clicking on it in the list. Then, click the]]) ..
1825+ p(img("images/wui/messages/message_archive.png") .. _[[‘Archive selected message’ button to move it into your archive.]]) ..
1826 p(_[[Once you have deleted a message, another message will be selected automatically from the list.]]) ..
1827- paragraphdivider() ..
1828- listitem_bullet(_[[Archive all messages that you currently have in your inbox, including this one.]])
1829- ),
1830+ li(_[[Archive all messages that you currently have in your inbox, including this one.]]),
1831 obj_name = "archive_all_messages",
1832 obj_title = _"Archive all messages in your inbox",
1833- obj_body = rt(
1834+ obj_body =
1835 h1(_"Archive Your Inbox Messages") ..
1836 p(_[[The message window is central to fully controlling your tribe’s fortune. However, you will get a lot of messages in a real game. To keep your head straight, you should try to keep the inbox empty.]]) ..
1837- paragraphdivider() ..
1838- listitem_bullet(_[[Archive all your messages in your inbox now.]]) ..
1839- listitem_arrow(_[[To do so, open the message window by pressing ‘n’ or clicking the rightmost button at the very bottom of the screen. The newest message will be marked for you automatically. Keep clicking the ‘Archive selected message’ button until all messages have been archived and the list is empty.]])
1840- )
1841+ li(_[[Archive all your messages in your inbox now.]]) ..
1842+ li_arrow(_[[To do so, open the message window by pressing ‘n’ or clicking the rightmost button at the very bottom of the screen. The newest message will be marked for you automatically. Keep clicking the ‘Archive selected message’ button until all messages have been archived and the list is empty.]])
1843 }
1844
1845 closing_msg_window_00 = {
1846 position = "topright",
1847 field = first_quarry_field,
1848 title = _"Closing Windows",
1849- body = rt(
1850+ body =
1851 p(_[[Excellent. Do you remember how to close windows? You simply have to right-click on them. This will work with all windows except for story message windows like this one. Go ahead and try it.]]) ..
1852- paragraphdivider() ..
1853- listitem_bullet(_[[First, close this window by pressing the button below, then right-click into the messages window to close it.]])
1854- ),
1855+ li(_[[First, close this window by pressing the button below, then right-click into the messages window to close it.]]),
1856 h = 300,
1857 w = 350,
1858 obj_name = "close_message_window",
1859 obj_title = _"Close the messages window",
1860- obj_body = rt(
1861+ obj_body =
1862 h1(_"Close the Messages Window") ..
1863 p(_[[All windows in Widelands can be closed by right-clicking into them. Some windows can also be toggled with the buttons at the very bottom of the screen.]]) ..
1864- paragraphdivider() ..
1865- listitem_bullet(_[[Close the messages window now by right-clicking into it.]])
1866- )
1867+ li(_[[Close the messages window now by right-clicking into it.]])
1868 }
1869
1870 closing_msg_window_01 = {
1871 position = "topright",
1872 field = first_quarry_field,
1873 title = _"Closing Windows",
1874- body = rt(
1875- p(_[[Well done! Let’s see how messages work in a real game, shall we? For this, I’ll take all rocks away from the poor stonemasons in the quarries. They will then send a message each that they can’t find any in their work areas the next time they try to do some work.]])
1876- ),
1877+ body =
1878+ p(_[[Well done! Let’s see how messages work in a real game, shall we? For this, I’ll take all rocks away from the poor stonemasons in the quarries. They will then send a message each that they can’t find any in their work areas the next time they try to do some work.]]),
1879 h = 300,
1880 w = 350
1881 }
1882@@ -453,68 +378,58 @@
1883 destroy_quarries_message = {
1884 position = "topright",
1885 title = _"Messages Arrived!",
1886- body = rt(
1887+ body =
1888 p(_[[You received some messages. See how the button at the bottom of the screen has changed appearance? You can destroy the quarries now as they are no longer of any use and just blocking space. To do so, there are two possibilities:]]) ..
1889- paragraphdivider() ..
1890- listitem_bullet(_[[Burning down the quarry: this is the fastest way of clearing the space. While the worker abandons the building, the wares are lost.]]) ..
1891- listitem_bullet(_[[Dismantling the quarry: a builder will walk from the headquarters to dismantle the quarry piece by piece. Thereby, you regain some of the resources you used for the construction.]])
1892- ),
1893+ li(_[[Burning down the quarry: this is the fastest way of clearing the space. While the worker abandons the building, the wares are lost.]]) ..
1894+ li(_[[Dismantling the quarry: a builder will walk from the headquarters to dismantle the quarry piece by piece. Thereby, you regain some of the resources you used for the construction.]]),
1895 h = 300,
1896 obj_name = "destroy_quarries",
1897 obj_title = "Destroy the two quarries",
1898- obj_body = rt(
1899+ obj_body =
1900 p(_[[Since our quarries are useless now, you can destroy them and reuse the space later on.]]) ..
1901- paragraphdivider() ..
1902- listitem_arrow(_[[There are two different ways of destroying a building: burning down and dismantling. Try them both out on your quarries.]]) ..
1903- listitem_arrow(_[[Burning down the quarry: This is the fastest way of clearing the space. While the worker abandons the building, the wares are lost.]]) ..
1904- listitem_arrow(_[[Dismantling the quarry: A builder will walk from the headquarters to dismantle the quarry piece by piece. Thereby, you regain some of the resources you used for the construction.]])
1905- )
1906+ li_arrow(_[[There are two different ways of destroying a building: burning down and dismantling. Try them both out on your quarries.]]) ..
1907+ li_arrow(_[[Burning down the quarry: This is the fastest way of clearing the space. While the worker abandons the building, the wares are lost.]]) ..
1908+ li_arrow(_[[Dismantling the quarry: A builder will walk from the headquarters to dismantle the quarry piece by piece. Thereby, you regain some of the resources you used for the construction.]])
1909 }
1910
1911 introduce_expansion = {
1912 title = _"Expanding Your Territory!",
1913- body = rt(
1914+ body =
1915 p(_[[There is one more thing I’d like to teach you now: Expanding your territory. The place that we started with around our headquarters is barely enough for a basic building infrastructure, and we do not have access to mountains, which we need to mine minerals and coal. So, we have to expand our territory.]]) ..
1916 p(_[[Expanding is as simple as building a military building at the edge of your territory. The Barbarians have a selection of different military buildings: sentries, barriers, towers, fortresses and citadels. The bigger the building, the more expensive it is to build, but the more land it will conquer around itself and the more soldiers can be stationed there. The buildings also vary in their vision range: buildings with a tower see farther than others.]]) ..
1917 p(_[[As soon as a military building is manned, it will extend your land. I will tell your more about military buildings in another tutorial.]]) ..
1918- paragraphdivider() ..
1919- listitem_bullet(_[[Let’s try it out now: build a military building on your border.]]) ..
1920- listitem_arrow(_[[The sentry is the only military site that fits on a small building plot. If your lumberjack has cleared enough space, you can also build another military building.]])
1921- ),
1922+ li(_[[Let’s try it out now: build a military building on your border.]]) ..
1923+ li_arrow(_[[The sentry is the only military site that fits on a small building plot. If your lumberjack has cleared enough space, you can also build another military building.]]),
1924 obj_name = "expand_territory",
1925 obj_title = _"Expand your territory",
1926- obj_body = rt(
1927+ obj_body =
1928 h1(_"Make your territory grow") ..
1929 p(_[[In Widelands, it is necessary to build many buildings, which take up a lot of space. To expand your territory, you have to build military buildings next to your border. Every tribe has several military buildings.]]) ..
1930- paragraphdivider() ..
1931- listitem_bullet(_[[The Barbarians have four different military buildings you can build: the sentry (small), the barrier and the tower (both medium) and the fortress (big). Just choose the one you like most.]]) ..
1932- listitem_arrow(_[[Remember that big buildings (green icon) cannot be built on small (red) or medium (yellow) building plots, but buildings can be built on a building plot that provides more space than they need. You should always keep that in mind when you search for a suitable place.]])
1933- )
1934+ li(_[[The Barbarians have four different military buildings you can build: the sentry (small), the barrier and the tower (both medium) and the fortress (big). Just choose the one you like most.]]) ..
1935+ li_arrow(_[[Remember that big buildings (green icon) cannot be built on small (red) or medium (yellow) building plots, but buildings can be built on a building plot that provides more space than they need. You should always keep that in mind when you search for a suitable place.]])
1936 }
1937
1938
1939 military_building_finished = {
1940 title = _"Military Site Occupied",
1941- body = rt(
1942+ body =
1943 h1(_"Your territory has just grown!") ..
1944 p(_[[Great. Do you see how your territory has grown since your soldiers entered your new military building?]]) ..
1945- p(_[[Every military building has a certain conquer area – the more expensive the building, the more land it conquers.]])
1946- ),
1947+ p(_[[Every military building has a certain conquer area – the more expensive the building, the more land it conquers.]]),
1948 h = 300,
1949 w = 350
1950 }
1951
1952 conclude_tutorial = {
1953 title = _"Conclusion",
1954- body = rt(
1955+ body =
1956 h1(_"Conclusion") ..
1957 p(_[[This concludes the first tutorial. In order to learn more about the game, I suggest to play one of the other tutorials. Each of them covers a different topic.]]) ..
1958 p(_[[However, since you now know how to control Widelands, you can also start a game (or continue this one) and discover more by yourself.]]) ..
1959- p(_[[To leave this game and return to the main menu, click on the]])
1960- ) ..
1961- rt("image=images/wui/menus/menu_options_menu.png", p(_[[‘Main Menu’ button on the very left at the bottom of the screen. Then click the]])) ..
1962- rt("image=images/wui/menus/menu_exit_game.png", p(_[[‘Exit Game’ button.]])) ..
1963- rt(p(_[[Thanks for playing this tutorial. Enjoy Widelands and remember to visit us at]])) ..
1964- rt("text-align=center", "<p font-size=24 font-decoration=underline>http://www.widelands.org</p>"),
1965+ p(_[[To leave this game and return to the main menu, click on the]]) ..
1966+ p(img("images/wui/menus/menu_options_menu.png") .. _[[‘Main Menu’ button on the very left at the bottom of the screen. Then click the]]) ..
1967+ p(img("images/wui/menus/menu_exit_game.png") .. _[[‘Exit Game’ button.]]) ..
1968+ p(_[[Thanks for playing this tutorial. Enjoy Widelands and remember to visit us at]]) ..
1969+ p("halign=center", "<font size=24 underline=1>http://www.widelands.org</font>"),
1970 h = 450
1971 }
1972
1973=== modified file 'data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua'
1974--- data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua 2016-04-01 19:56:26 +0000
1975+++ data/campaigns/tutorial02_warfare.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
1976@@ -19,207 +19,179 @@
1977
1978 introduction = {
1979 title = _"Introduction",
1980- body = rt(
1981+ body =
1982 h1(_"Soldiers, Training and Warfare") ..
1983 p(_[[In this scenario, I’m going to tell you about soldiers, their training and their profession: warfare. Although Widelands is about building up, not burning down, there is an enemy you sometimes have to defeat. Yet warfare is mainly focused on economics, not on military strategies, and its mechanics deserve explanation.]]) ..
1984- p(_[[I’ve set up a small village that contains the most important buildings. You also have enough wares, so you do not have to take care of your weapons production. In a real game, you will not have this luxury.]])
1985- ),
1986+ p(_[[I’ve set up a small village that contains the most important buildings. You also have enough wares, so you do not have to take care of your weapons production. In a real game, you will not have this luxury.]]),
1987 h = 300
1988 }
1989
1990 abilities = {
1991 position = "topright",
1992 title = _"Soldiers’ abilities",
1993- body = rt(
1994+ body =
1995 p(_[[A new soldier is created like a worker: when a military building needs a soldier, a carrier grabs the needed weapons and armor from a warehouse (or your headquarters) and walks up the road to your new building. Basic Barbarian soldiers do not use armor, they only need an ax.]]) ..
1996 p(_[[Take a look at the soldiers that are on their way to our military buildings. They look different from normal workers: they have a health bar over their head that displays their remaining health, and they have four symbols, which symbolize the individual soldier’s current levels in the four different categories: health, attack, defense and evade.]]) ..
1997 -- TRANSLATORS: the current stats are: 3 health, 5 attack, 0 defense, 2 evade.
1998- p((_[[If a Barbarian soldier is fully trained, he has level %1% health, level %2% attack, level %3% defense and level %4% evade. This is one fearsome warrior then! The individual abilities have the following meaning:]]):bformat(soldier.max_health_level, soldier.max_attack_level, soldier.max_defense_level, soldier.max_evade_level))
1999- ) ..
2000- rt("image=tribes/workers/barbarians/soldier/health_level0.png", h2(_"Health:")) ..
2001- -- TRANSLATORS: the current stats are: 13000 health, 2800 health gain.
2002- rt(p((_[[The total life of a soldier. A Barbarian soldier starts with %1% health, and he will gain %2% health with each health level.]]):bformat(soldier.base_health, soldier.health_incr_per_level))) ..
2003- rt("image=tribes/workers/barbarians/soldier/attack_level0.png", h2(_"Attack:")) ..
2004- -- TRANSLATORS: the current stats are: 1400 damage, gains 850 damage points.
2005- rt(p(_[[The amount of damage a soldier will inflict on the enemy when an attack is successful. A Barbarian soldier with attack level 0 inflicts ~%1% points of health damage when he succeeds in hitting an enemy. For each attack level, he gains %2% damage points.]]):bformat(soldier.base_min_attack + (soldier.base_max_attack - soldier.base_min_attack) / 2, soldier.attack_incr_per_level)) ..
2006- -- The Atlanteans' image, because the Barbarian one has a white background
2007- rt("image=tribes/workers/atlanteans/soldier/defense_level0.png", h2(_"Defense:")) ..
2008- -- TRANSLATORS: the current stats are: 3%. The calculated health value is 3395
2009- -- TRANSLATORS: The last two %% after the placeholder are the percent symbol.
2010- rt(p(_[[The defense is the percentage that is subtracted from the attack value. The Barbarians cannot train in this skill and therefore have always defense level 0, which means that the damage is always reduced by %1%%%. If an attacker with an attack value of 3500 points hits a Barbarian soldier, the Barbarian will lose 3500·%2%%% = %3% health.]]):bformat(soldier.base_defense, (100 - soldier.base_defense), 3500 * (100 - soldier.base_defense) / 100)) ..
2011- rt("image=tribes/workers/barbarians/soldier/evade_level0.png", h2(_"Evade:")) ..
2012- -- TRANSLATORS: the current stats are: 25% evade, increases in steps of 15%.
2013- -- TRANSLATORS: The last two %% after the placeholder are the percent symbol.
2014- rt(p(_[[Evade is the chance that the soldier is able to dodge an attack. A level 0 Barbarian has a %1%%% chance to evade an attack, and this increases in steps of %2%%% for each level.]]):bformat(soldier.base_evade, soldier.evade_incr_per_level))
2015+ p((_[[If a Barbarian soldier is fully trained, he has level %1% health, level %2% attack, level %3% defense and level %4% evade. This is one fearsome warrior then! The individual abilities have the following meaning:]]):bformat(soldier.max_health_level, soldier.max_attack_level, soldier.max_defense_level, soldier.max_evade_level)) ..
2016+ h2(img("tribes/workers/barbarians/soldier/health_level0.png") .. _"Health:") ..
2017+ -- TRANSLATORS: the current stats are: 13000 health, 2800 health gain.
2018+ p((_[[The total life of a soldier. A Barbarian soldier starts with %1% health, and he will gain %2% health with each health level.]]):bformat(soldier.base_health, soldier.health_incr_per_level)) ..
2019+ h2(img("tribes/workers/barbarians/soldier/attack_level0.png") .. _"Attack:") ..
2020+ -- TRANSLATORS: the current stats are: 1400 damage, gains 850 damage points.
2021+ p(_[[The amount of damage a soldier will inflict on the enemy when an attack is successful. A Barbarian soldier with attack level 0 inflicts ~%1% points of health damage when he succeeds in hitting an enemy. For each attack level, he gains %2% damage points.]]):bformat(soldier.base_min_attack + (soldier.base_max_attack - soldier.base_min_attack) / 2, soldier.attack_incr_per_level) ..
2022+ -- The Atlanteans' image, because the Barbarian one has a white background
2023+ h2(img("tribes/workers/atlanteans/soldier/defense_level0.png") .. _"Defense:") ..
2024+ -- TRANSLATORS: the current stats are: 3%. The calculated health value is 3395
2025+ -- TRANSLATORS: The last two %% after the placeholder are the percent symbol.
2026+ p(_[[The defense is the percentage that is subtracted from the attack value. The Barbarians cannot train in this skill and therefore have always defense level 0, which means that the damage is always reduced by %1%%%. If an attacker with an attack value of 3500 points hits a Barbarian soldier, the Barbarian will lose 3500·%2%%% = %3% health.]]):bformat(soldier.base_defense, (100 - soldier.base_defense), 3500 * (100 - soldier.base_defense) / 100) ..
2027+ h2(img("tribes/workers/barbarians/soldier/evade_level0.png") .. _"Evade:") ..
2028+ -- TRANSLATORS: the current stats are: 25% evade, increases in steps of 15%.
2029+ -- TRANSLATORS: The last two %% after the placeholder are the percent symbol.
2030+ p(_[[Evade is the chance that the soldier is able to dodge an attack. A level 0 Barbarian has a %1%%% chance to evade an attack, and this increases in steps of %2%%% for each level.]]):bformat(soldier.base_evade, soldier.evade_incr_per_level)
2031 }
2032
2033 battlearena1 = {
2034 position = "topright",
2035 title = _"The Battle Arena",
2036- body = rt(
2037+ body =
2038 p(_[[Now I have talked about training and levels. Let me elaborate on that.]]) ..
2039 p(_[[A newly created soldier has no experience and is not very good at fighting. To make him stronger, you can build training sites.]]) ..
2040 p(_[[One of these training sites is the battle arena. It is a big and expensive building, and it trains soldiers in evade. Since soldiers get very hungry during their workout, this building needs a lot of food and strong beer. In a real game, you should have a good infrastructure before you build it.]]) ..
2041- paragraphdivider() ..
2042- listitem_bullet(_[[To see evade training in action, build a battle arena.]]) ..
2043- "</p><p font-size=8><br></p>" ..
2044- p(_[[While we’re waiting for the battle arena, you’ll probably notice some soldiers walking around. They are automatically exchanged from time to time. I’ll teach you about that later.]])
2045- ),
2046+ li(_[[To see evade training in action, build a battle arena.]]) ..
2047+ p(_[[While we’re waiting for the battle arena, you’ll probably notice some soldiers walking around. They are automatically exchanged from time to time. I’ll teach you about that later.]]),
2048 h = 400,
2049 obj_name = "build_battlearena",
2050 obj_title = _"Build a battle arena",
2051- obj_body = rt(
2052- paragraphdivider() ..
2053- listitem_bullet(_[[Build a battle arena. It is a big building.]]) ..
2054- listitem_arrow(_[[Since the construction will take some time, you can change the game speed using Page Up and Page Down.]])
2055- )
2056+ obj_body =
2057+ li(_[[Build a battle arena. It is a big building.]]) ..
2058+ li_arrow(_[[Since the construction will take some time, you can change the game speed using Page Up and Page Down.]])
2059 }
2060
2061 battlearena2 = {
2062 position = "topright",
2063 title = _"The Battle Arena",
2064- body = rt(
2065+ body =
2066 h1(_"The Battle Arena Has Been Constructed") ..
2067 p(_[[Very good. Our battle arena has been finished, and the soldiers are already walking towards it.]]) ..
2068 -- Not perfectly correct (some training steps need either bread or meat), but we do not want to confuse new players
2069 p(_[[The needed wares are also delivered there. For successful training, you need pitta bread and strong beer, as well as either fish or meat.]] .. " " ..
2070 _[[For more information, you can have a look at the building’s help window, accessible via the question mark in every building’s window.]]) ..
2071- p(_[[To learn how far your soldiers have progressed in their training, you can have a look at their icons. They are modified by red dots:]])
2072- ) ..
2073- rt("image=tribes/workers/barbarians/soldier/evade_level0.png", p(_[[No red dots means that the soldier is not trained, so he has level 0. All your new recruits have this.]])) ..
2074- rt("image=tribes/workers/barbarians/soldier/evade_level1.png", p(_[[With every successful training step, your soldier becomes stronger. This is indicated by a red dot. This soldier is on level 1 in evade training.]])) ..
2075- rt("image=tribes/workers/barbarians/soldier/evade_level2.png", p(_[[When your soldier has reached the highest possible level (in this case level 2), this is indicated by a white background color.]])),
2076+ p(_[[To learn how far your soldiers have progressed in their training, you can have a look at their icons. They are modified by red dots:]]) ..
2077+ p(img("tribes/workers/barbarians/soldier/evade_level0.png") .._[[No red dots means that the soldier is not trained, so he has level 0. All your new recruits have this.]]) ..
2078+ p(img("tribes/workers/barbarians/soldier/evade_level1.png") .._[[With every successful training step, your soldier becomes stronger. This is indicated by a red dot. This soldier is on level 1 in evade training.]]) ..
2079+ p(img("tribes/workers/barbarians/soldier/evade_level2.png") .._[[When your soldier has reached the highest possible level (in this case level 2), this is indicated by a white background color.]]),
2080 h = 450
2081 }
2082
2083 trainingcamp1 = {
2084 position = "topright",
2085 title = _"The Training Camp",
2086- body = rt(
2087+ body =
2088 h1(_"The Training Camp") ..
2089 p(_[[There is a second training site: the training camp. It is a big building too, and to complement the battle arena, it trains attack and health (remember, the Barbarian soldiers cannot be trained in defense).]]) ..
2090- paragraphdivider() ..
2091- listitem_bullet(_[[Build a training camp.]])
2092- ),
2093+ li(_[[Build a training camp.]]),
2094 h = 300,
2095 obj_name = "build_trainingcamp",
2096 obj_title = _"Build a training camp",
2097- obj_body = rt(
2098+ obj_body =
2099 p(_[[The battle arena only trains the soldiers in evade. To get the strongest possible soldier, you also need to build a training camp, which trains them in attack and health.]]) ..
2100- paragraphdivider() ..
2101- listitem_bullet(_[[Build a training camp.]])
2102- )
2103+ li(_[[Build a training camp.]])
2104 }
2105
2106 trainingcamp2 = {
2107 position = "topright",
2108 title = _"The Training Camp",
2109- body = rt(
2110+ body =
2111 p(_[[Great, our training camp has now been finished, too. Now nothing will hinder us from getting the strongest warriors the world has ever seen.]]) ..
2112 p(_[[To train in the training camp, our soldiers need food like in the battle arena, but no strong beer. Instead, they need different axes for attack training and helmets for health training.]]) ..
2113 p(_[[This equipment is produced in smithies out of coal, iron, and sometimes gold. You will learn more about this in the second scenario of the Barbarian campaign.]]) ..
2114 p(_[[You should also keep in mind that each of the three tribes in Widelands has its own way of training, so the buildings and wares are different. Also, the ability levels cannot be compared: an Imperial soldier with evade level 0 has a 30% chance of evading, while a Barbarian soldier at the same level only has a 25% chance.]])
2115- )
2116 }
2117
2118 heroes_rookies = {
2119 position = "topright",
2120 title = _"Heroes and Rookies",
2121- body = rt(
2122+ body =
2123 h1(_"Heroes and Rookies") ..
2124 p(_[[While our soldiers are training, let me tell you what we can do with them.]]) ..
2125 p(_[[In every military building, you can set the preference for heroes (trained soldiers) or rookies. From time to time, a soldier will walk out of the building and be replaced by a stronger/weaker one automatically – this is what you saw earlier.]]) ..
2126 p(_[[The initial setting depends on the type of the building. For the Barbarians, the sentry is the only building that prefers rookies by default. You should change this setting to fit your current needs.]]) ..
2127 p(_[[When you are expanding into no man’s land, you can make your buildings prefer rookies. When you are planning to attack, send heroes into that region. Conquered buildings always prefer heroes.]])
2128- )
2129 }
2130
2131 soldier_capacity = {
2132 position = "topright",
2133 title = _"Soldier capacity",
2134- body = rt(
2135+ body =
2136 h1(_"Adjusting the number of soldiers") ..
2137 p(_[[There is another way how you can control the strength of a military building: by the number of soldiers stationed there. Just click on the arrow buttons to decrease or increase the desired number of soldiers. Every building has a maximum capacity. In case of the barrier, it is five, for example.]]) ..
2138 p(_[[If you wish to send a certain soldier away, you can simply click on it. It will then be replaced by another soldier.]]) ..
2139 p(_[[Let me also describe what the numbers in the statistics string mean. This string can contain up to three numbers, e.g. ‘1 (+5) soldier (+2)’.]]) ..
2140- paragraphdivider() ..
2141- listitem_bullet(_[[The first number describes how many soldiers are currently in this building. In this example, only one soldier is left inside (each military building is always guarded by at least one soldier).]]) ..
2142- listitem_bullet(_[[The second number tells you how many additional soldiers reside in this building, but are currently outside. The five soldiers may be attacking an enemy. They will return when they have been successful.]]) ..
2143- listitem_bullet(_[[The third number indicates the missing soldiers. From the eight soldiers (1 + 5 + 2) you wish to have here, two may have died. They will be replaced by new soldiers from your warehouse, if possible.]])
2144- )
2145+ li(_[[The first number describes how many soldiers are currently in this building. In this example, only one soldier is left inside (each military building is always guarded by at least one soldier).]]) ..
2146+ li(_[[The second number tells you how many additional soldiers reside in this building, but are currently outside. The five soldiers may be attacking an enemy. They will return when they have been successful.]]) ..
2147+ li(_[[The third number indicates the missing soldiers. From the eight soldiers (1 + 5 + 2) you wish to have here, two may have died. They will be replaced by new soldiers from your warehouse, if possible.]])
2148 }
2149
2150 dismantle = {
2151 position = "topright",
2152 title = _"Dismantle your sentry",
2153- body = rt(
2154+ body =
2155 h1(_"Dismantling military buildings") ..
2156 p(_[[You can only reduce the number of soldiers to one. The last soldier of a building will never come out (unless this building is attacked). If you want to have your soldier elsewhere, you will have to dismantle the building (buildings of an alien tribe cannot be dismantled, only be burned down).]]) ..
2157 p(_[[However, destroying a military building is always linked with a risk: the land is still yours, but it is no longer protected. Any enemy that builds his own military sites can take over that land without a fight, causing your buildings to burst into flames. Furthermore, some parts of the land can now be hidden under the fog of war. You should therefore only dismantle military buildings deep inside your territory where you are safe from enemies.]]) ..
2158 p(_[[Have you seen your sentry? Since it cannot contain many soldiers and is next to a stronger barrier, it is rather useless.]]) ..
2159- paragraphdivider() ..
2160 -- TRANSLATORS: 'it' refers to the Barbarian sentry
2161- listitem_bullet(_[[Dismantle it.]])
2162- ) ..
2163- rt(p(_[[You can also use this opportunity to become familiar with the other options: the heroes/rookies preference and the capacity.]])),
2164+ li(_[[Dismantle it.]]) ..
2165+ p(_[[You can also use this opportunity to become familiar with the other options: the heroes/rookies preference and the capacity.]]),
2166 obj_name = "dismantle_sentry",
2167 obj_title = _"Dismantle your north-western sentry",
2168- obj_body = rt(
2169+ obj_body =
2170 p(_[[You can control the number of soldiers stationed at a military site with the arrow buttons. If you want to get even your last soldier out, you will have to destroy it. However, it then will no longer protect your territory, which will make it vulnerable to hostile attacks.]]) ..
2171- paragraphdivider() ..
2172- listitem_bullet(_[[Dismantle your sentry in the north-west, next to the barrier.]])
2173- )
2174+ li(_[[Dismantle your sentry in the north-west, next to the barrier.]])
2175 }
2176
2177 fortress_enhancement = {
2178 position = "topright",
2179 title = _"Enhance Your Fortress",
2180- body = rt(
2181+ body =
2182 h1(_"Enhancing Buildings") ..
2183 p(_[[Well done. Now you know how to draw back your soldiers from the places where you don’t need them. It is time to tell you how to reinforce your front line.]]) ..
2184 p(_[[Your fortress is already quite strong and conquers a lot of space. But there is an even bigger building: the citadel.]]) ..
2185 p(_[[Citadels can’t be built directly. Instead, you’ll have to construct a fortress first and then enhance it to a citadel. To do so, click on the fortress, then choose the ‘Enhance to Citadel’ button.]]) ..
2186 p(_[[Your soldiers will leave the fortress while the construction is going on. This means that your fortress will lose its military influence, as I described above.]]) ..
2187- listitem_bullet(_[[Enhance your fortress to a citadel now.]])
2188- ),
2189+ li(_[[Enhance your fortress to a citadel now.]]),
2190 obj_name = "enhance_fortress",
2191 obj_title = _"Enhance your fortress to a citadel",
2192- obj_body = rt(
2193+ obj_body =
2194 h1(_"Enhance Your Fortress") ..
2195- paragraphdivider() ..
2196- listitem_bullet(_[[Enhance your fortress to a mighty citadel.]]) ..
2197- listitem_arrow(_[[The citadel can house 12 soldiers, and it is the biggest military building the Barbarians can build. It also costs a lot of resources and takes a long time to build. It is most suited to guard strategically important points like constricted points or mountains.]])
2198- )
2199+ li(_[[Enhance your fortress to a mighty citadel.]]) ..
2200+ li_arrow(_[[The citadel can house 12 soldiers, and it is the biggest military building the Barbarians can build. It also costs a lot of resources and takes a long time to build. It is most suited to guard strategically important points like constricted points or mountains.]])
2201 }
2202
2203 attack_enemy = {
2204 position = "topright",
2205 field = wl.Game().map:get_field(29,4), -- show the lost territory
2206 title = _"Defeat your Enemy",
2207- body = rt(
2208+ body =
2209 h1(_"Defeat the Enemy") ..
2210 p(_[[Great work, the citadel is finished. But what’s that? A hostile tribe has settled next to us while the citadel was under construction! Do you see how they took away a part of our land? And our lumberjack has now lost his place of work. This is what I was talking about. Let’s take our land back and defeat the enemy!]]) ..
2211 p(_[[To attack a building, click on its doors, choose the number of soldiers that you wish to send and click on the ‘Attack’ button.]] .. " " .. _[[Your soldiers will come from all nearby military buildings. Likewise, the defenders will come from all nearby military buildings of the enemy and intercept your forces.]]) ..
2212- paragraphdivider() ..
2213- listitem_bullet(_[[Attack and conquer all military buildings of the enemy and destroy their headquarters.]])
2214- ),
2215+ li(_[[Attack and conquer all military buildings of the enemy and destroy their headquarters.]]),
2216 h = 350,
2217 obj_name = "defeated_the_empire",
2218 obj_title = _"Defeat the enemy tribe",
2219- obj_body = rt(
2220+ obj_body =
2221 h1(_"Defeat Your Enemy") ..
2222- paragraphdivider() ..
2223- listitem_bullet(_[[Defeat the nearby enemy.]]) ..
2224- listitem_arrow(_[[To attack a building, click on its doors, choose the number of soldiers that you wish to send and click on the ‘Attack’ button.]])
2225- )
2226+ li(_[[Defeat the nearby enemy.]]) ..
2227+ li_arrow(_[[To attack a building, click on its doors, choose the number of soldiers that you wish to send and click on the ‘Attack’ button.]])
2228 }
2229
2230 conclude_tutorial = {
2231 title = _"Conclusion",
2232- body = rt(
2233+ body =
2234 h1(_"Conclusion") ..
2235 p(_[[Thank you for playing this tutorial. I hope you enjoyed it and you learned how to create and train soldiers, how to control where they go and how to defeat an enemy. Did you see how easily you could overwhelm your enemy? Having trained soldiers is a huge advantage.]]) ..
2236 p(_[[But a war is expensive, and not always the path leading to the goal. When setting up a new game, you can also choose peaceful win conditions. You should definitely try them out, they’re worth it.]]) ..
2237 p(_[[You are now ready to play the campaigns. They will teach you about the different economies of the tribes. You can also play the remaining tutorials, but they are not crucial for succeeding in the campaigns.]])
2238- )
2239 }
2240
2241=== modified file 'data/campaigns/tutorial03_seafaring.wmf/scripting/texts.lua'
2242--- data/campaigns/tutorial03_seafaring.wmf/scripting/texts.lua 2016-01-28 05:24:34 +0000
2243+++ data/campaigns/tutorial03_seafaring.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
2244@@ -18,11 +18,10 @@
2245 position = "topright",
2246 field = sf,
2247 title = _"Seafaring",
2248- body = rt(
2249+ body =
2250 h1(_"Seafaring Tutorial") ..
2251 p(_[[Welcome back. In this tutorial, you are going to learn the most important things about seafaring, that is ships, ports, and expedition.]]) ..
2252- p(_[[But let me first give you an overview about your territory: here in the south, you have a whole economy with almost everything you need.]])
2253- ),
2254+ p(_[[But let me first give you an overview about your territory: here in the south, you have a whole economy with almost everything you need.]]),
2255 h = 250
2256 }
2257
2258@@ -30,22 +29,20 @@
2259 position = "topright",
2260 field = castle_field,
2261 title = _"The Northern Part",
2262- body = rt(
2263+ body =
2264 p(_[[Here in the northern part, you only have a goldmine and a warehouse. While the miners are supplied well with food, there is no way to transport the gold ore to our smelting works in the southern part.]]) ..
2265 p(_[[We have tried to build a road, but the mountain is too wide and too steep. We therefore have only one possibility: we need to establish a sea lane between these two parts.]]) ..
2266- p(_[[But I don’t want to rush you: you have just arrived here and you would probably like to have a closer look at your camp. I will also take a short break and be back soon.]])
2267- ),
2268+ p(_[[But I don’t want to rush you: you have just arrived here and you would probably like to have a closer look at your camp. I will also take a short break and be back soon.]]),
2269 h = 350
2270 }
2271
2272 tell_about_port = {
2273 position = "topright",
2274 title = _"Ports",
2275- body = rt(
2276+ body =
2277 h1(_"Ports") ..
2278 p(_[[For everything you do on the high seas, you need a port at the shore. Ports are like headquarters: they can store wares, workers and soldiers. The soldiers inside will automatically come out when an enemy attacks the port.]]) ..
2279- p(_[[Additionally, ports offer the possibility of transporting wares via ships. When you click on the port you already have, you will notice two additional tabs: wares and workers in the dock. They are waiting for a ship to transport them to another port. Currently, there are none because we have not yet built a second port. So let’s change this!]])
2280- ),
2281+ p(_[[Additionally, ports offer the possibility of transporting wares via ships. When you click on the port you already have, you will notice two additional tabs: wares and workers in the dock. They are waiting for a ship to transport them to another port. Currently, there are none because we have not yet built a second port. So let’s change this!]]),
2282 h = 350
2283 }
2284
2285@@ -53,82 +50,65 @@
2286 position = "topright",
2287 field = second_port_field,
2288 title = _"Building ports",
2289- body = rt(
2290+ body =
2291 h1(_"How to build a port") ..
2292- p(_[[Ports are big buildings, but they can only be built at special locations: those marked with the]])
2293- ) ..
2294- rt("image=images/wui/overlays/port.png", p(_[[blue port space icon.]])) ..
2295- rt(
2296+ p(_[[Ports are big buildings, but they can only be built at special locations: those marked with the]]) ..
2297+ p(img("images/wui/overlays/port.png") .. _[[blue port space icon.]]) ..
2298 p(_[[Port spaces are set by the map designer, so a map will either contain them or not. They might, however, be hidden under trees or be blocked by surrounding buildings.]]) ..
2299 p(_[[You might already have noticed that you have such an icon next to your castle.]]) ..
2300- paragraphdivider() ..
2301- listitem_bullet(_[[Build a port in the northern part of your camp.]])
2302- ),
2303+ li(_[[Build a port in the northern part of your camp.]]),
2304 obj_name = "build_port",
2305 obj_title = _"Build a port in the northern part of your camp.",
2306- obj_body = rt(
2307+ obj_body =
2308 h1(_"Build a port") ..
2309 p(_[[You always need a port when you want to transport wares with a ship.]]) ..
2310- paragraphdivider() ..
2311- listitem_bullet(_[[Build a port next to your castle, on the blue port space icon.]]) ..
2312- listitem_arrow(_[[Ports are built like normal buildings, but are only available on blue port spaces. Just click on a field with the icon and the building menu automatically offers you to build a port.]]) ..
2313- listitem_arrow(_[[Although ports act as warehouses, you should not build more than necessary: they cost quartz, diamonds and gold, which makes them quite expensive.]])
2314- ),
2315+ li(_[[Build a port next to your castle, on the blue port space icon.]]) ..
2316+ li_arrow(_[[Ports are built like normal buildings, but are only available on blue port spaces. Just click on a field with the icon and the building menu automatically offers you to build a port.]]) ..
2317+ li_arrow(_[[Although ports act as warehouses, you should not build more than necessary: they cost quartz, diamonds and gold, which makes them quite expensive.]]),
2318 }
2319
2320 tell_about_shipyard = {
2321 position = "topright",
2322 title = _"Constructing ships",
2323- body = rt(
2324- h1(_"Let’s build ships") ..
2325+ body = h1(_"Let’s build ships") ..
2326 p(_[[Great. Your port has just been finished. Now we need some ships.]]) ..
2327 p(_[[Ships are constructed in a shipyard by a shipwright. We have to build one somewhere close to the shore.]]) ..
2328- paragraphdivider() ..
2329- listitem_bullet(_[[Build a shipyard close to the coast. It is a medium building.]])
2330- ),
2331+ li(_[[Build a shipyard close to the coast. It is a medium building.]]),
2332 h = 300,
2333 obj_name = "build_shipyard",
2334 obj_title = _"Build a shipyard",
2335- obj_body = rt(
2336- h1(_"Build a shipyard") ..
2337+ obj_body = h1(_"Build a shipyard") ..
2338 p(_[[Ships are produced in a shipyard.]]) ..
2339- paragraphdivider() ..
2340- listitem_bullet(_[[Build a shipyard close to the shore of the southern part of your territory.]]) ..
2341- listitem_arrow(_[[The shipyard is a medium building. Although it can be built everywhere on the map, the shipwright only works when he is close to the water and there are no trees or roads at the shoreline.]])
2342- ),
2343+ li(_[[Build a shipyard close to the shore of the southern part of your territory.]]) ..
2344+ li_arrow(_[[The shipyard is a medium building. Although it can be built everywhere on the map, the shipwright only works when he is close to the water and there are no trees or roads at the shoreline.]]),
2345 }
2346
2347 tell_about_ships = {
2348 position = "topright",
2349 title = _"Constructing ships",
2350- body = rt(
2351+ body =
2352 h1(_"Waiting for the ships") ..
2353 p(_[[Very good. Your shipyard is finished and your shipwright immediately started working. For the construction of ships, he needs logs, planks and spidercloth, which will be transported to the shipyard.]] .. " " ..
2354 _[[The shipwright will take the ware he needs to a free spot at the shoreline and build a ship there. When the first ship is finished, it will launch onto the sea, and the shipwright will construct another one.]]) ..
2355- paragraphdivider() ..
2356- listitem_bullet(_[[We should wait until we have two ships. That should be enough for now.]]) ..
2357- listitem_arrow(_[[You need to stop your shipyard when you have enough ships. Otherwise, your shipwright will consume all your logs and spidercloth, producing dozens of ships.]])
2358- ) ..
2359- rt("image=images/ui_basic/stop.png",p(_[[This is the icon for stopping production. You will find it in the building window.]])),
2360+ li(_[[We should wait until we have two ships. That should be enough for now.]]) ..
2361+ li(_[[You need to stop your shipyard when you have enough ships. Otherwise, your shipwright will consume all your logs and spidercloth, producing dozens of ships.]]) ..
2362+ p(img("images/ui_basic/stop.png") .. _[[This is the icon for stopping production. You will find it in the building window.]]),
2363 obj_name = "wait_for_ships",
2364 obj_title = _"Construct two ships",
2365- obj_body = rt(
2366+ obj_body =
2367 p(_[[Ships are constructed automatically when the shipyard is complete and the needed wares have been delivered.]]) ..
2368- paragraphdivider() ..
2369- listitem_bullet(_[[Wait until the shipwright has constructed two ships.]]) ..
2370- listitem_arrow(_[[Do not forget to stop your shipyard when you have enough ships.]])
2371- )
2372+ li(_[[Wait until the shipwright has constructed two ships.]]) ..
2373+ li_arrow(_[[Do not forget to stop your shipyard when you have enough ships.]])
2374 }
2375
2376 expedition1 = {
2377 position = "topright",
2378 title = _"No Iron",
2379- body = rt(
2380+ body =
2381 h1(_"We lack iron") ..
2382 p(_[[The second ship might not be finished yet, but we have an urgent problem.]]) ..
2383 p(_[[As you surely have already noticed, there is no iron in the mountain in the west. We have plenty of coal and gold ore, but without iron ore, we cannot produce any tools.]]) ..
2384- p(_[[Although it might take long and be expensive and not without dangers – who knows what monsters live in the sea? – I see no other possibility: we will have to undertake an expedition to the unknown seas.]])
2385- ),
2386+ p(_[[Although it might take long and be expensive and not without dangers – who knows what monsters live in the sea? – I see no other possibility: we will have to undertake an expedition to the unknown seas.]]),
2387 h = 300
2388 }
2389
2390@@ -136,57 +116,46 @@
2391 position = "topright",
2392 -- TRANSLATORS: This shall be the beginning of a poem
2393 title = _"A trip by the sea, what fun it can be",
2394- body = rt(
2395+ body =
2396 h1(_"Expeditions") ..
2397- p(_[[During an expedition, you send a ship out to discover new islands and maybe found a colony there.]])
2398- ) ..
2399- rt("image=images/wui/buildings/start_expedition.png",p(_[[Expeditions can be started in every port. Then, all needed wares are transported to that port. The wares are exactly those your tribe needs to build a port (your goal is to build a port far away from home, so this is not surprising), and of course you need a builder, too. When everything is prepared, a ship will come and pick it up.]] .. " " ..
2400+ p(_[[During an expedition, you send a ship out to discover new islands and maybe found a colony there.]]) ..
2401+ p(img("images/wui/buildings/start_expedition.png") .. _[[Expeditions can be started in every port. Then, all needed wares are transported to that port. The wares are exactly those your tribe needs to build a port (your goal is to build a port far away from home, so this is not surprising), and of course you need a builder, too. When everything is prepared, a ship will come and pick it up.]] .. " " ..
2402 _[[You can check out the needed wares in the fifth tab of your port (it will appear when you’ve started an expedition).]]) ..
2403 p(_[[Now try this out. I will tell you later what the next steps are.]]) ..
2404- paragraphdivider() ..
2405- listitem_bullet(_[[Start an expedition in any of your ports.]])
2406- ),
2407+ li(_[[Start an expedition in any of your ports.]]),
2408 obj_name = "start_expedition",
2409 obj_title = _"Start an expedition",
2410- obj_body = rt(
2411- paragraphdivider() ..
2412- listitem_bullet(_[[Start an expedition.]])
2413- ) ..
2414- rt("image=images/wui/buildings/start_expedition.png",p(_[[To do so, click on the ‘Start Expedition’ button in any port. A new tab where you can see the needed wares will appear.]])
2415- )
2416+ obj_body =
2417+ li(_[[Start an expedition.]]) ..
2418+ p(img("images/wui/buildings/start_expedition.png") .. _[[To do so, click on the ‘Start Expedition’ button in any port. A new tab where you can see the needed wares will appear.]])
2419 }
2420
2421 expedition3 = {
2422 position = "topright",
2423 title = _"Off to greener pastures",
2424- body = rt(
2425+ body =
2426 h1(_"Start your expedition") ..
2427 p(_[[Your expedition ship is ready. It is waiting for your orders in front of your port. It isn’t transporting wares anymore. Use its buttons to send your ship in any of the six main directions of the Widelands map. When it has reached a coastline, you can make it travel around the coast, where it will look for suitable places for landing.]] .. " " ..
2428 _[[Once a port space has been found, you can construct a new port with the button in the center of the ship’s control window.]]) ..
2429 p(_[[The wares will then be unloaded, and the ship will take up the task of transporting wares once again. The builder will start his work and build a port.]]) ..
2430- paragraphdivider() ..
2431- listitem_bullet(_[[Search for an island with a mountain, and look for a port space there. Colonize the island.]])
2432- ),
2433+ li(_[[Search for an island with a mountain, and look for a port space there. Colonize the island.]]),
2434 obj_name = "found_settlement",
2435 obj_title = _"Found a settlement",
2436- obj_body = rt(
2437- paragraphdivider() ..
2438- listitem_bullet(_[[Navigate your ship to an island that could contain iron ore.]]) ..
2439- listitem_arrow(_[[When you click on the expedition ship, a window opens where you can control your ship.]]) ..
2440- listitem_bullet(_[[When you have found a suitable port space, build a port there.]])
2441- )
2442+ obj_body =
2443+ li(_[[Navigate your ship to an island that could contain iron ore.]]) ..
2444+ li_arrow(_[[When you click on the expedition ship, a window opens where you can control your ship.]]) ..
2445+ li(_[[When you have found a suitable port space, build a port there.]])
2446 }
2447
2448 conclusion = {
2449 position = "topright",
2450 field = port_on_island,
2451 title = _"Conclusion",
2452- body = rt(
2453+ body =
2454 h1(_"Congratulations") ..
2455 p(_[[You’ve lead the expedition to a successful end and founded a new colony. I’ve sent out some geologists – they already report that they’ve found some iron ore.]]) ..
2456 p(_[[In this scenario, you’ve learned everything about seafaring: how to build ports and ships and how to send out an expedition. Remember that expeditions are sometimes the fastest way to reach essential resources – and sometimes the only one.]]) ..
2457 p(_[[But I want to speak a word of warning. Ports are like headquarters: they can be attacked by a nearby enemy. While your headquarters has soldiers to defend it, your newly built port won’t. You should therefore avoid settling next to an enemy.]]) ..
2458- p(_[[On this map, there is no enemy to fear. As always, you can continue playing and watch how the ships deliver wares to the island when you construct some buildings there. There is also another island where you can build a port.]])
2459- ),
2460+ p(_[[On this map, there is no enemy to fear. As always, you can continue playing and watch how the ships deliver wares to the island when you construct some buildings there. There is also another island where you can build a port.]]),
2461 h = 450
2462 }
2463
2464=== modified file 'data/campaigns/tutorial04_economy.wmf/scripting/texts.lua'
2465--- data/campaigns/tutorial04_economy.wmf/scripting/texts.lua 2016-01-28 05:24:34 +0000
2466+++ data/campaigns/tutorial04_economy.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
2467@@ -16,12 +16,11 @@
2468
2469 intro1 = {
2470 title = _"Your Economy and its Settings",
2471- body = rt(
2472+ body =
2473 h1(_[[Economy]]) ..
2474 p(_[[Welcome back. In this tutorial, I’ll tell you what you can do to check how well your economy works.]]) ..
2475 p(_[[Building your economy up and making it work well and grow is the main part of Widelands. But you can’t control the workers directly – they will follow the general conditions you set.]]) ..
2476- p(_[[This is what I’ll show you in this tutorial: what actions can you take to define those general conditions?]])
2477- ),
2478+ p(_[[This is what I’ll show you in this tutorial: what actions can you take to define those general conditions?]]),
2479 h = 300
2480 }
2481
2482@@ -29,21 +28,19 @@
2483 position = "topright",
2484 field = field_near_border,
2485 title = _"A Peaceful Land",
2486- body = rt(
2487+ body =
2488 p(_[[Now about the map: you have settled in a nice valley between two mountains, rich in marble, iron ore and coal. All were hoping for a peaceful life.]]) ..
2489 p(_[[But one day, you discovered a barren wasteland with abandoned buildings in the east. A strange aura came from there, and no one wanted to set foot there. But the border could not be left undefended, and so you constructed three castles.]]) ..
2490- p(_[[You had not been prepared for war, and you have to hurry now to build up an army.]])
2491- ),
2492+ p(_[[You had not been prepared for war, and you have to hurry now to build up an army.]]),
2493 h = 300
2494 }
2495
2496 tavern_burnt_down = {
2497 position = "topright",
2498 title = _"The Tavern is Burning!",
2499- body = rt(
2500+ body =
2501 h1(_[[An accident]]) ..
2502- p(_[[Oh no, look at this: our tavern is burning! In all the hurry, our innkeeper accidentally dropped a torch. She is fine, but we could not extinguish the fire in time.]])
2503- ),
2504+ p(_[[Oh no, look at this: our tavern is burning! In all the hurry, our innkeeper accidentally dropped a torch. She is fine, but we could not extinguish the fire in time.]]),
2505 w = 300,
2506 h = 250
2507 }
2508@@ -51,61 +48,49 @@
2509 building_stat = {
2510 position = "topright",
2511 title = _"Building statistics",
2512- body = rt(
2513+ body =
2514 h1(_[[Check out your taverns]]) ..
2515- p(_[[At first, we should find out how many taverns we currently have. Widelands offers you a window where you can easily check this.]])
2516- ) ..
2517- rt("image=images/wui/menus/menu_toggle_menu.png",p(_[[First, you will have to open the statistics menu (you can find the corresponding button at the bottom). We will need this menu several times.]])) ..
2518- rt("image=images/wui/menus/menu_building_stats.png",p(_[[Afterwards, choose the ‘Building statistics’.]]) ..
2519- paragraphdivider() ..
2520- listitem_bullet(_[[Open the building statistics window.]]) ..
2521- listitem_arrow(_[[You can also use the hotkey ‘b’.]])
2522- ),
2523+ p(_[[At first, we should find out how many taverns we currently have. Widelands offers you a window where you can easily check this.]]) ..
2524+ p(img("images/wui/menus/menu_toggle_menu.png") .. _[[First, you will have to open the statistics menu (you can find the corresponding button at the bottom). We will need this menu several times.]]) ..
2525+ p(img("images/wui/menus/menu_building_stats.png") .. _[[Afterwards, choose the ‘Building statistics’.]]) ..
2526+ li(_[[Open the building statistics window.]]) ..
2527+ li_arrow(_[[You can also use the hotkey ‘b’.]]),
2528 h = 350,
2529 obj_name = "open_building_stat",
2530 obj_title = _"Open the building statistics window.",
2531 obj_body =
2532- rt("image=images/wui/menus/menu_building_stats.png", p(_[[The building statistics window gives you an overview over the buildings you have.]])) ..
2533- rt(
2534- paragraphdivider() ..
2535+ p(img("images/wui/menus/menu_building_stats.png") .. _[[The building statistics window gives you an overview over the buildings you have.]]) ..
2536 -- TRANSLATORS: "it" refers to the building statistics window
2537- listitem_bullet(_[[Open it. You can access it from the statistics menu.]]) ..
2538- listitem_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])
2539- )
2540+ li(_[[Open it. You can access it from the statistics menu.]]) ..
2541+ li_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])
2542 }
2543
2544 explain_building_stat = {
2545 title = _"Building Statistics",
2546- body = rt(
2547+ body =
2548 p(_[[This is the building statistics window. It shows you all buildings you can own, sorted by their size.]]) ..
2549 p(_[[Let me now explain what all those numbers mean:]]) ..
2550- paragraphdivider() ..
2551- listitem_bullet(_[[‘2/1’ below the quarry: This means that you have two quarries, plus another one which is under construction.]]) ..
2552- listitem_bullet(_[[‘0%’: This indicates the average productivity of all buildings of that type. You have just started this game, therefore none of your buildings has done any work yet, but they are going to start working soon.]]) ..
2553- listitem_bullet(_[[‘2/4’ below your sentry: For military buildings, the stationed soldiers are shown instead of a productivity. You want to have four soldiers in your sentries, but only two soldiers are stationed in this kind of building. This leaves two vacant positions – we really need more soldiers.]]) ..
2554- listitem_arrow(_[[In both cases, the color (green - yellow - red) signals you how good the value is.]]) ..
2555- listitem_bullet(_[[If you click on a building, you can scroll through the buildings of the selected type.]]) ..
2556- listitem_bullet(_[[If you don’t have any building of a particular building type, it will be shown greyed out.]])
2557- ) ..
2558- rt(
2559+ li(_[[‘2/1’ below the quarry: This means that you have two quarries, plus another one which is under construction.]]) ..
2560+ li(_[[‘0%’: This indicates the average productivity of all buildings of that type. You have just started this game, therefore none of your buildings has done any work yet, but they are going to start working soon.]]) ..
2561+ li(_[[‘2/4’ below your sentry: For military buildings, the stationed soldiers are shown instead of a productivity. You want to have four soldiers in your sentries, but only two soldiers are stationed in this kind of building. This leaves two vacant positions – we really need more soldiers.]]) ..
2562+ li_arrow(_[[In both cases, the color (green - yellow - red) signals you how good the value is.]]) ..
2563+ li(_[[If you click on a building, you can scroll through the buildings of the selected type.]]) ..
2564+ li(_[[If you don’t have any building of a particular building type, it will be shown greyed out.]]) ..
2565 h2(_[[Now it’s your turn]]) ..
2566- p(_[[This is enough explanation for now. Now try it out yourself. We want to know whether we still have taverns, so you have to choose the ‘Medium Buildings’ tab. Close the building statistics menu afterwards.]])
2567- ),
2568+ p(_[[This is enough explanation for now. Now try it out yourself. We want to know whether we still have taverns, so you have to choose the ‘Medium Buildings’ tab. Close the building statistics menu afterwards.]]),
2569 obj_name = "check_taverns",
2570 obj_title = _"Look up your number of taverns in the building statistics window.",
2571- obj_body = rt(
2572- listitem_bullet(_[[Choose the ‘Medium Buildings’ tab in the building statistics window.]]) ..
2573- listitem_bullet(_[[Look up how many taverns you have.]]) ..
2574- listitem_arrow(_[[Below every building, there are two lines. The first one shows the number of buildings you own and how many are under construction. The second line shows the average productivity if it is a production site or training site, or the stationed and desired soldiers in military buildings.]]) ..
2575- listitem_bullet(_[[Close the building statistics window when you are done.]])
2576- )
2577+ obj_body =
2578+ li(_[[Choose the ‘Medium Buildings’ tab in the building statistics window.]]) ..
2579+ li(_[[Look up how many taverns you have.]]) ..
2580+ li_arrow(_[[Below every building, there are two lines. The first one shows the number of buildings you own and how many are under construction. The second line shows the average productivity if it is a production site or training site, or the stationed and desired soldiers in military buildings.]]) ..
2581+ li(_[[Close the building statistics window when you are done.]])
2582 }
2583
2584 reopen_building_stat = {
2585 title = _"You closed the building statistics window!",
2586- body = rt(
2587- p(_[[You have closed the building statistics window. I didn’t notice that you switched to the medium buildings to look up the number of taverns. Would you please be so nice and show it to me?]])
2588- ),
2589+ body =
2590+ p(_[[You have closed the building statistics window. I didn’t notice that you switched to the medium buildings to look up the number of taverns. Would you please be so nice and show it to me?]]),
2591 show_instantly = true,
2592 w = 300,
2593 h = 250
2594@@ -114,75 +99,62 @@
2595 reopen_building_stat_obj = {
2596 obj_name = "open_building_stat_again",
2597 obj_title = _"Open the building statistics window again.",
2598- obj_body = rt(
2599+ obj_body =
2600 p(_[[You closed the building statistics window, although you have not yet looked up the number of taverns.]]) ..
2601- paragraphdivider() ..
2602 -- TRANSLATORS: "it" refers to the building statistics window.
2603- listitem_bullet(_[[Please reopen it and choose the second tab (medium buildings).]])
2604- ),
2605+ li(_[[Please reopen it and choose the second tab (medium buildings).]]),
2606 h = 250
2607 }
2608
2609 inventory1 = {
2610 position = "topright",
2611 title = _"Stock",
2612- body = rt(
2613+ body =
2614 h1(_[[Check for rations]]) ..
2615- p(_[[OK. In the list, you’ve seen that you have no more taverns or inns. That means that you’re not producing any rations. But let’s see what we still have in stock.]])
2616- ) ..
2617- rt("image=images/wui/menus/menu_stock.png",p(_[[Click on the ‘Stock’ button.]])) ..
2618- rt(
2619- paragraphdivider() ..
2620- listitem_arrow(_[[You can also use the hotkey ‘i’ (as in ‘inventory’) to access this window quickly.]])
2621- ),
2622+ p(_[[OK. In the list, you’ve seen that you have no more taverns or inns. That means that you’re not producing any rations. But let’s see what we still have in stock.]]) ..
2623+ p(img("images/wui/menus/menu_stock.png") .. _[[Click on the ‘Stock’ button.]]) ..
2624+ li_arrow(_[[You can also use the hotkey ‘i’ (as in ‘inventory’) to access this window quickly.]]),
2625 h = 300,
2626 obj_name = "open_inventory",
2627 obj_title = _"Open your stock window.",
2628- obj_body = rt(
2629+ obj_body =
2630 p(_[[The stock menu window gives you an overview over the wares you currently have.]]) ..
2631- paragraphdivider() ..
2632 -- TRANSLATORS: "it" refers to the stock menu window
2633- listitem_bullet(_[[Open it. You can access it from the statistics menu.]]) ..
2634- listitem_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])
2635- )
2636+ li(_[[Open it. You can access it from the statistics menu.]]) ..
2637+ li_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])
2638 }
2639
2640 inventory2 = {
2641 title = _"Stock",
2642- body = rt(
2643+ body =
2644 p(_[[The stock menu window has four tabs. The first (and currently selected) one shows you all your current wares, including those on roads, at flags and inside buildings waiting for processing.]]) ..
2645 p(_[[Looking at the rations, there are currently only five in total, probably on their way to somewhere. Five rations are not much for such a big economy.]]) ..
2646 p(_[[The second tab shows you all your workers, again those on roads and in buildings summed up.]]) ..
2647- p(_[[Now have a look at these two tabs. When you click on the]])) ..
2648- rt("image=images/wui/stats/menu_tab_wares_warehouse.png",p(_[[third tab (‘Wares in warehouses’), I’ll continue.]])
2649- ),
2650+ p(_[[Now have a look at these two tabs. When you click on the]]) ..
2651+ p(img("images/wui/stats/menu_tab_wares_warehouse.png") .. _[[third tab (‘Wares in warehouses’), I’ll continue.]]),
2652 h = 350,
2653 show_instantly = true,
2654 obj_name = "switch_stock_tab",
2655 obj_title = _"Switch to the third tab in the stock menu window.",
2656- obj_body = rt(
2657+ obj_body =
2658 p(_[[Have a look at the first two tabs in the stock menu window. They show all the wares and workers you have.]]) ..
2659- paragraphdivider() ..
2660- listitem_bullet(_[[When you have seen enough, switch to the third tab.]])
2661- ),
2662+ li(_[[When you have seen enough, switch to the third tab.]]),
2663 }
2664
2665 inventory3 = {
2666 title = _"Stock",
2667- body = rt(
2668+ body =
2669 p(_[[The third tab shows you the wares that are stored in your headquarters, your warehouses and ports. They are not needed anywhere and are therefore your reserve.]]) ..
2670 p(_[[The fourth tab shows the same thing for workers.]]) ..
2671- p(_[[The third tab tells you that there are no rations left in your headquarters – that’s not good!]])
2672- ),
2673+ p(_[[The third tab tells you that there are no rations left in your headquarters – that’s not good!]]),
2674 show_instantly = true,
2675 h = 300
2676 }
2677
2678 reopen_stock_menu = {
2679 title = _"You closed the stock window!",
2680- body = rt(
2681- p(_[[You have closed the stock menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]])
2682- ),
2683+ body =
2684+ p(_[[You have closed the stock menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]]),
2685 show_instantly = true,
2686 w = 300,
2687 h = 250
2688@@ -191,51 +163,43 @@
2689 reopen_stock_menu_obj = {
2690 obj_name = "open_stock_menu_again",
2691 obj_title = _"Open the stock window again.",
2692- obj_body = rt(
2693+ obj_body =
2694 p(_[[You closed the stock menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..
2695- paragraphdivider() ..
2696 -- TRANSLATORS: "it" refers to the stock menu window.
2697- listitem_bullet(_[[Otherwise, please reopen it and choose the third tab.]])
2698- ),
2699+ li(_[[Otherwise, please reopen it and choose the third tab.]]),
2700 h = 250
2701 }
2702
2703 build_taverns = {
2704 position = "topright",
2705 title = _"New taverns",
2706- body = rt(
2707+ body =
2708 h1(_[[We need new taverns]]) ..
2709 p(_[[Now that you have an overview, you should act. I think we should build more than one tavern – two or three are better. Remember: as long as we don’t produce rations, our miners won’t dig for ore. And without iron, we cannot forge a single helm.]]) ..
2710- paragraphdivider() ..
2711- listitem_bullet(_[[Build at least two taverns.]])
2712- ),
2713+ li(_[[Build at least two taverns.]]),
2714 h = 300,
2715 obj_name = "build_taverns",
2716 obj_title = _"Build new taverns.",
2717- obj_body = rt(
2718+ obj_body =
2719 p(_[[To make our mines work, we need rations again – the more, the better.]]) ..
2720- paragraphdivider() ..
2721- listitem_bullet(_[[Build at least two taverns.]])
2722- )
2723+ li(_[[Build at least two taverns.]])
2724 }
2725
2726 ware_encyclopedia = {
2727 title = _"Ware Encyclopedia",
2728- body = rt(
2729+ body =
2730 p(_[[I am not sure if you could follow my remarks. Why do we need rations to get soldiers?]]) ..
2731 p(_[[When you’ve played a lot, you will know such things by heart. But when you’re unsure what this tribe needs for a special ware, you can easily look it up in your tribe’s ware encyclopedia.]]) ..
2732- p(_[[This encyclopedia can be accessed via]])
2733- ) ..
2734- rt("image=images/ui_basic/menu_help.png",p(_[[the help button at the bottom. For all your tribe’s wares, it shows a short help text, a list of buildings that produces the ware and the needed wares.]]) ..
2735- p(_[[If you want, you can try it out. A soldier needs a wooden spear and a helmet – from there on out, you can search backwards.]])
2736- ),
2737+ p(_[[This encyclopedia can be accessed via]]) ..
2738+ p(img("images/ui_basic/menu_help.png") .. _[[the help button at the bottom. For all your tribe’s wares, it shows a short help text, a list of buildings that produces the ware and the needed wares.]]) ..
2739+ p(_[[If you want, you can try it out. A soldier needs a wooden spear and a helmet – from there on out, you can search backwards.]]),
2740 h = 350
2741 }
2742
2743 building_priority_settings = {
2744 position = "topright",
2745 title = _"Priority Settings",
2746- body = rt(
2747+ body =
2748 h1(_[[Send the wares where they’re needed]]) ..
2749 p(_[[Great. Our taverns have now been built up and are supplying us with rations.]]) ..
2750 p(_[[At the moment, all mines are supplied with rations. If you want to prioritize a special mine, you simply have to open its window. In the wares tab, behind every ware, you can see ‘traffic lights’.]]) ..
2751@@ -243,91 +207,73 @@
2752 p(_[[In our situation, you might want to work the bakeries as fast as possible because they supply our taverns, so you could set water to the highest priority for them. The other buildings (for example the donkey farm) would then get less water, but the bakery could work faster.]])
2753 -- we cannot check whether the user does this, so no objective
2754 -- see bug https://bugs.launchpad.net/widelands/+bug/1380288
2755- )
2756 }
2757
2758 ware_stats1 = {
2759 position = "top",
2760 title = _"Ware Statistics",
2761- body = rt(
2762- p(_[[In the statistics menu, there is also a]])) ..
2763- rt("image=images/wui/menus/menu_ware_stats.png",p(_[[‘Ware statistics’ button.]])) ..
2764- rt(paragraphdivider() ..
2765+ body =
2766+ p(_[[In the statistics menu, there is also a]]) ..
2767+ p(img("images/wui/menus/menu_ware_stats.png") .. _[[‘Ware statistics’ button.]]) ..
2768 -- TRANSLATORS: "it" refers to the ware statistics button
2769- listitem_bullet(_[[Click on it.]])
2770- ),
2771+ li(_[[Click on it.]]),
2772 w = 200,
2773 h = 200,
2774 obj_name = "open_ware_stat",
2775 obj_title = _"Open the ware statistics window.",
2776- obj_body = rt(
2777- paragraphdivider() ..
2778- listitem_bullet(_[[Open the ‘Ware statistics’ window, accessed via the statistics menu.]])
2779- )
2780+ obj_body =
2781+ li(_[[Open the ‘Ware statistics’ window, accessed via the statistics menu.]])
2782 }
2783
2784 ware_stats2 = {
2785 title = _"Ware Statistics",
2786- body = rt(
2787+ body =
2788 p(_[[In this menu window, you can select wares to see how their production or consumption has changed over time. Try it out with some wares.]]) ..
2789- paragraphdivider() ..
2790- listitem_bullet(_[[I’ll continue as soon as you click on the]])) ..
2791- rt("image=images/wui/stats/menu_tab_wares_econ_health.png",p(_[[third tab (‘Economy Health’).]])
2792- ),
2793+ li(_[[I’ll continue as soon as you click on the]]) ..
2794+ p(img("images/wui/stats/menu_tab_wares_econ_health.png") .. _[[third tab (‘Economy Health’).]]),
2795 h = 250,
2796 show_instantly = true,
2797 obj_name = "switch_ware_stat_tab_to_third",
2798 obj_title = _"Switch to the third tab in the ware statistics menu window.",
2799- obj_body = rt(
2800+ obj_body =
2801 p(_[[The first two tabs show you the production and consumption of any ware. You can toggle them by simply clicking on them.]]) ..
2802- paragraphdivider() ..
2803 listitem_bullet(_[[When you have seen enough, switch to the third tab.]])
2804- )
2805 }
2806
2807 ware_stats3 = {
2808 title = _"Ware Statistics",
2809- body = rt(
2810+ body =
2811 p(_[[In this tab, you can see the difference between production and consumption, called ‘economy health’. You can see at one glance which one of those two is higher for the selected ware, that means whether the amount increases or decreases.]]) ..
2812 p(_[[Now try this out. You can also compare it with the two previous tabs.]]) ..
2813- paragraphdivider() ..
2814- listitem_bullet(_[[Click on the last tab when I should continue.]])
2815- ),
2816+ li(_[[Click on the last tab when I should continue.]]),
2817 h = 250,
2818 show_instantly = true,
2819 obj_name = "switch_ware_stat_tab_to_forth",
2820 obj_title = _"Switch to the last tab in the ware statistics menu window.",
2821- obj_body = rt(
2822+ obj_body =
2823 p(_[[The third tab shows you the economy health of the ware. When the value is positive, this means your stock is growing.]]) ..
2824- paragraphdivider() ..
2825- listitem_bullet(_[[When you have seen enough, switch to the fourth tab.]])
2826- )
2827+ li(_[[When you have seen enough, switch to the fourth tab.]])
2828 }
2829
2830 ware_stats4 = {
2831 title = _"Ware Statistics",
2832- body = rt(
2833+ body =
2834 p(_[[In the last tab, you can also see your absolute stock. It will increase when the economy health is positive, and decrease otherwise. Compare the two graphs!]]) ..
2835 p(_[[The last two tabs are good indicators to see whether shortages are about to come. Don’t forget to check them regularly!]]) ..
2836- paragraphdivider() ..
2837- listitem_bullet(_[[Close this window when you’re done.]])
2838- ),
2839+ li(_[[Close this window when you’re done.]]),
2840 h = 250,
2841 show_instantly = true,
2842 obj_name = "close_ware_stats",
2843 obj_title = _"Close the ware statistics window.",
2844- obj_body = rt(
2845+ obj_body =
2846 p(_[[The stock tab shows you how many wares you have. Compare the information from the four tabs to understand the correlation.]]) ..
2847- paragraphdivider() ..
2848- listitem_bullet(_[[When you have finished, close the ware statistics window.]])
2849- ),
2850+ li(_[[When you have finished, close the ware statistics window.]]),
2851 }
2852
2853 reopen_ware_stats1 = {
2854 title = _"You closed the ware statistics window!",
2855- body = rt(
2856- p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]])
2857- ),
2858+ body =
2859+ p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]]),
2860 show_instantly = true,
2861 w = 300,
2862 h = 250
2863@@ -336,19 +282,16 @@
2864 reopen_ware_stats1_obj = {
2865 obj_name = "open_ware_stats_menu_again1",
2866 obj_title = _"Open the ware statistics window again.",
2867- obj_body = rt(
2868+ obj_body =
2869 p(_[[You closed the ware statistics menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..
2870- paragraphdivider() ..
2871 -- TRANSLATORS: "it" refers to the ware statistics window.
2872- listitem_bullet(_[[Otherwise, please reopen it and choose the third tab.]])
2873- )
2874+ li(_[[Otherwise, please reopen it and choose the third tab.]])
2875 }
2876
2877 reopen_ware_stats2 = {
2878 title = _"You closed the ware statistics window!",
2879- body = rt(
2880- p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the fourth tab?]])
2881- ),
2882+ body =
2883+ p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the fourth tab?]]),
2884 show_instantly = true,
2885 w = 300,
2886 h = 250
2887@@ -357,100 +300,84 @@
2888 reopen_ware_stats2_obj = {
2889 obj_name = "open_ware_stats_menu_again2",
2890 obj_title = _"Open the ware statistics window again.",
2891- obj_body = rt(
2892+ obj_body =
2893 p(_[[You closed the ware statistics menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..
2894- paragraphdivider() ..
2895 -- TRANSLATORS: "it" refers to the ware statistics window.
2896- listitem_bullet(_[[Otherwise, please reopen it and choose the fourth tab.]])
2897- )
2898+ li(_[[Otherwise, please reopen it and choose the fourth tab.]])
2899 }
2900
2901 economy_settings1 = {
2902 position = "topright",
2903 title = _"Economy options",
2904- body = rt(
2905+ body =
2906 p(_[[I’ve shown you our stock menu window, where you could see which wares are at the warehouses. You remember?]]) ..
2907- p(_[[Now I’ll tell you how you can determine how many wares you want to have. The menu window for this purpose can be accessed via any flag and is called ‘Configure economy’.]])) ..
2908- -- Yup, that's indeed the correct icon
2909- rt("image=images/wui/stats/genstats_nrwares.png",p(_[[This is the icon.]])) ..
2910- rt(
2911- paragraphdivider() ..
2912- listitem_bullet(_[[Open this window.]])
2913- ),
2914+ p(_[[Now I’ll tell you how you can determine how many wares you want to have. The menu window for this purpose can be accessed via any flag and is called ‘Configure economy’.]]) ..
2915+ -- Yup, that's indeed the correct icon
2916+ p(img("images/wui/stats/genstats_nrwares.png") .. _[[This is the icon.]]) ..
2917+ li(_[[Open this window.]]),
2918 h = 350,
2919 obj_name = "open_economy_settings",
2920 obj_title = _"Open the ‘Configure economy’ window.",
2921- obj_body = rt(
2922- paragraphdivider() ..
2923- listitem_bullet(_[[Open the ‘Configure economy’ window.]]) ..
2924- listitem_arrow(_[[The window can be accessed by clicking on any flag you own.]])
2925- )
2926+ obj_body =
2927+ li(_[[Open the ‘Configure economy’ window.]]) ..
2928+ li_arrow(_[[The window can be accessed by clicking on any flag you own.]])
2929 }
2930
2931 economy_settings2 = {
2932 title = _"Economy options",
2933- body = rt(
2934+ body =
2935 p(_[[This window looks similar to the stock window, but it has additional buttons at the bottom.]]) ..
2936 p(_[[You first have to select one or more wares (you can also left-click and drag). Then you can set the desired target quantity for the selected wares.]]) ..
2937 p(_[[Most buildings will only produce something when the stock level in your warehouses falls below the target quantity, so you should indicate the reserve you want to stockpile.]]) ..
2938 p(_[[An example: the default value for scythes is 1. If you build a farm, a carrier will take a scythe and become a farmer. Then there will be no scythes left, but the target quantity is 1, therefore your toolsmith will start producing another one.]]) ..
2939- p(_[[If you build two farms, only one of them will start working immediately. The second farm will have to wait for its worker, who will lack a scythe. If you had set the target quantity to 2 before, two scythes would have been available and both farms would have been able to start working right away.]])
2940- ),
2941+ p(_[[If you build two farms, only one of them will start working immediately. The second farm will have to wait for its worker, who will lack a scythe. If you had set the target quantity to 2 before, two scythes would have been available and both farms would have been able to start working right away.]]),
2942 h = 450
2943 }
2944
2945 economy_settings3 = {
2946 title = _"Economy options",
2947- body = rt(
2948+ body =
2949 p(_[[By changing the target quantity, you can therefore decide which wares/tools your resources (in this case: iron) should be turned into or whether you would like to save your iron and wait until you know what you will need it for.]]) ..
2950 p(_[[Only buildings that consume wares care about this setting. Buildings that produce wares for free (e.g. your farms or wells) will always keep working.]]) ..
2951 p(_[[Now let’s try it out: the current target quantity for marble columns is 10. Increase it to be prepared in case you will have to build up your fortifications quickly.]]) ..
2952- paragraphdivider() ..
2953- listitem_bullet(_[[Set the target quantity for marble columns to 20 and wait for your stonemason to produce them.]])
2954- ),
2955+ li(_[[Set the target quantity for marble columns to 20 and wait for your stonemason to produce them.]]),
2956 obj_name = "produce_marble_columns",
2957 obj_title = "Produce 20 marble columns.",
2958- obj_body = rt(
2959+ obj_body =
2960 p(_[[Sometimes, you will need many wares at the same time quickly – faster than they can be produced. In this case, it is good to have enough on reserve.]]) ..
2961- paragraphdivider() ..
2962- listitem_bullet(_[[To be prepared for additional fortifications, you should produce 20 marble columns.]]) ..
2963- listitem_arrow(_[[Your stonemason will not produce marble columns when they are not needed. You have to increase the target quantity.]]) ..
2964- listitem_arrow(_[[To do so, click on any flag and choose ‘Configure economy’. In this menu window, you can decide how many wares of each type you wish to have in stock.]])
2965- )
2966+ li(_[[To be prepared for additional fortifications, you should produce 20 marble columns.]]) ..
2967+ li_arrow(_[[Your stonemason will not produce marble columns when they are not needed. You have to increase the target quantity.]]) ..
2968+ li_arrow(_[[To do so, click on any flag and choose ‘Configure economy’. In this menu window, you can decide how many wares of each type you wish to have in stock.]])
2969 }
2970
2971 warehouse_preference_settings = {
2972 field = warehouse_field,
2973 position = "topright",
2974 title = _"Warehouse Preferences",
2975- body = rt(
2976+ body =
2977 h1(_[[Bring the marble columns to the front line]]) ..
2978 p(_[[The production of marble columns is working fine now, but it would be great if they were stored where we need them.]]) ..
2979 p(_[[Normally, produced wares are brought to the closest warehouse if they are not needed elsewhere. In this case, this means our headquarters. But we would like to have them in the warehouse near our fortresses.]]) ..
2980 p(_[[Every warehouse has four buttons to set the preference. If you move your mouse pointer over them, you will see tooltips that explain what the buttons do.]]) ..
2981- paragraphdivider() ..
2982- listitem_bullet(_[[Bring all the marble columns to the warehouse near the front line.]]) ..
2983- listitem_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..
2984- listitem_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])
2985- ),
2986+ li(_[[Bring all the marble columns to the warehouse near the front line.]]) ..
2987+ li_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..
2988+ li_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]]),
2989 obj_name = "bring_marble_columns_to_front",
2990 obj_title = _"Bring 20 marble columns to the front line.",
2991- obj_body = economy_settings3.obj_body .. rt(
2992+ obj_body = economy_settings3.obj_body ..
2993 p(_[[To decide where your wares get stored, you can use the preference buttons in the warehouses.]]) ..
2994- listitem_bullet(_[[Bring all the marble columns to the warehouse near the front line.]]) ..
2995- listitem_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..
2996- listitem_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])
2997- )
2998+ li(_[[Bring all the marble columns to the warehouse near the front line.]]) ..
2999+ li_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..
3000+ li_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])
3001 }
3002
3003 conclusion = {
3004 title = _"Borders Secured",
3005- body = rt(
3006+ body =
3007 h1(_[[We’re safe now]]) ..
3008 p(_[[Great. We now have enough marble columns so that in case of an aggressor, we can build up our fortifications. But I do not think that that will be necessary. So far, no enemy has shown up.]]) ..
3009 p(_[[I hope I could teach you how you can control the economy in Widelands. There are many options and they can be confusing at first. Even if you’ve only understood a few concepts, you mustn’t give up. Try them out in some games, become familiar with them and experience the possibilities. Then, return to this tutorial and learn the rest!]]) ..
3010 p([[]]) ..
3011- p(_[[This was the last tutorial I had prepared for you. I’ve now taught you everything I know. There are still secrets hidden in this world even I don’t know about. I will now search for a quiet place to spend my sunset years. If you have still questions, the Widelands community will surely help you. You can find it at:]])
3012- ) ..
3013- rt("text-align=center", "<p font-size=24 font-decoration=underline>http://www.widelands.org</p>")
3014+ p(_[[This was the last tutorial I had prepared for you. I’ve now taught you everything I know. There are still secrets hidden in this world even I don’t know about. I will now search for a quiet place to spend my sunset years. If you have still questions, the Widelands community will surely help you. You can find it at:]]) ..
3015+ p("halign=center", "<font size=24 underline=1>http://www.widelands.org</font>")
3016 }
3017
3018=== modified file 'data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/first_island.lua'
3019--- data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/first_island.lua 2016-01-29 16:36:12 +0000
3020+++ data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/first_island.lua 2016-08-05 05:28:30 +0000
3021@@ -21,10 +21,10 @@
3022 _nplayers_finished_island[island_idx] = rank
3023
3024 local rewards = _finish_rewards[island_idx][rank]
3025- send_to_all(rt(
3026- p(msgs_finished_island[rank]:bformat(plr.name, island_idx + 1)) ..
3027- p(finished_island_continues:format(format_rewards(rewards)))
3028- ))
3029+ send_to_all(
3030+ msgs_finished_island[rank]:bformat(plr.name, island_idx + 1) ..
3031+ finished_island_continues:format(format_rewards(rewards))
3032+ )
3033
3034 local new_hq = hop_to_next_island(plr, island_idx)
3035 add_wares(new_hq, rewards)
3036
3037=== modified file 'data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/multiplayer_init.lua'
3038--- data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/multiplayer_init.lua 2016-01-28 05:24:34 +0000
3039+++ data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/multiplayer_init.lua 2016-08-05 05:28:30 +0000
3040@@ -109,7 +109,7 @@
3041 for name,count in pairs(r) do
3042 local ware_description = wl.Game():get_ware_description(name)
3043 -- TRANSLATORS: number + resource name, e.g. '1x Log'
3044- rv[#rv + 1] = _"%1$dx %2$s":bformat(count, ware_description.descname) .. "<br>\n"
3045+ rv[#rv + 1] = li(_"%1$dx %2$s":bformat(count, ware_description.descname))
3046 end
3047 return table.concat(rv)
3048 end
3049
3050=== modified file 'data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/texts.lua'
3051--- data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/texts.lua 2016-02-03 09:18:52 +0000
3052+++ data/maps/MP_Scenarios/Island_Hopping.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
3053@@ -3,7 +3,7 @@
3054 -- =======================================================================
3055 welcome_msg = {
3056 heading = _"Welcome to Island Hopping",
3057- body = rt(
3058+ body =
3059 h2(_"Rules") ..
3060 p(_(
3061 [[Island Hopping is a traditional tournament in Atlantean culture. ]] ..
3062@@ -37,22 +37,21 @@
3063 h4(_"2nd to finish") .. p(format_rewards(_finish_rewards[2][2])) ..
3064 h4(_"3rd to finish") .. p(format_rewards(_finish_rewards[2][3])) ..
3065 h4(_"4th to finish") .. p(format_rewards(_finish_rewards[2][4]))
3066- )
3067 }
3068
3069 msgs_finished_island = {
3070- _"%1$s was the first to reach Island number %2$i.",
3071- _"%1$s was the second to reach Island number %2$i.",
3072- _"%1$s was the third to reach Island number %2$i.",
3073- _"%1$s was the fourth to reach Island number %2$i."
3074+ p(_"%1$s was the first to reach Island number %2$i."),
3075+ p(_"%1$s was the second to reach Island number %2$i."),
3076+ p(_"%1$s was the third to reach Island number %2$i."),
3077+ p(_"%1$s was the fourth to reach Island number %2$i.")
3078 }
3079-finished_island_continues = _ "The reward for this feat amounts to:" .. "<br>%s"
3080-
3081-player_claims_hill = rt(p(_
3082-[[%s is now King of the Hill and will win the game in 20 minutes, if nobody takes over the hill before then.]]
3083-))
3084-lost_control = rt(p(_
3085-[[%s lost control of the hill.]]
3086-))
3087-had_control_for = rt(p(_[[%1$s has been King of the Hill for %2$s!]]))
3088-player_won = rt(p(_[[%s has won the game. Congratulations!]]))
3089+
3090+finished_island_continues = p(_"The reward for this feat amounts to:") .. p("%s")
3091+
3092+player_claims_hill = p(_[[%s is now King of the Hill and will win the game in 20 minutes, if nobody takes over the hill before then.]])
3093+
3094+lost_control = p(_[[%s lost control of the hill.]])
3095+
3096+had_control_for = p(_[[%1$s has been King of the Hill for %2$s!]])
3097+
3098+player_won = p(_[[%s has won the game. Congratulations!]])
3099
3100=== modified file 'data/maps/MP_Scenarios/Smugglers.wmf/scripting/texts.lua'
3101--- data/maps/MP_Scenarios/Smugglers.wmf/scripting/texts.lua 2015-12-03 09:56:01 +0000
3102+++ data/maps/MP_Scenarios/Smugglers.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
3103@@ -4,17 +4,17 @@
3104
3105 welcome_msg = {
3106 heading = _"Smugglers",
3107- body = rt(
3108+ body =
3109 h2(_"Rules") ..
3110 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.]])) ..
3111 p(_([[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.]])) ..
3112 -- TRANSLATORS: %s = '<number> points'
3113 p(_([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]])) ..
3114- rt(h2(_"A sending spot")) .. rt("image=map:send_spot.png", p(" ")) ..
3115- rt(h2(_"A receiving spot")) .. rt("image=map:recv_spot.png", p(" ")) ..
3116- rt(h2(_"Notes") ..
3117- 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.]]))) ..
3118- p(_([[You can see the number of wares traded at any time in the general statistics menu. Good luck!]])))
3119+ h2(img("map:send_spot.png") .. _"A sending spot") ..
3120+ h2(img("map:recv_spot.png") .. _"A receiving spot") ..
3121+ h2(_"Notes") ..
3122+ 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.]])) ..
3123+ p(_([[You can see the number of wares traded at any time in the general statistics menu. Good luck!]]))
3124 }
3125
3126 smuggling_route_established_other_team = rt(
3127
3128=== modified file 'data/maps/The_Green_Plateau.wmf/scripting/texts.lua'
3129--- data/maps/The_Green_Plateau.wmf/scripting/texts.lua 2016-03-21 19:29:24 +0000
3130+++ data/maps/The_Green_Plateau.wmf/scripting/texts.lua 2016-08-05 05:28:30 +0000
3131@@ -26,7 +26,7 @@
3132 title = _"Capture the Ancient Castle",
3133 number = 1,
3134 body = objective_text(_"Capture the Ancient Castle",
3135- listitem_bullet(_[[Defeat Lanissa and capture the ancient castle.]])
3136+ li(_[[Defeat Lanissa and capture the ancient castle.]])
3137 ),
3138 }
3139
3140@@ -35,7 +35,7 @@
3141 title = _"Defeat Erwyn",
3142 number = 1,
3143 body = objective_text(_"Defeat Erwyn",
3144- listitem_bullet(_[[Defeat Erwyn. He commands the strongest opposing military force left on this island.]])
3145+ li(_[[Defeat Erwyn. He commands the strongest opposing military force left on this island.]])
3146 ),
3147 }
3148 obj_defeat_jomo = {
3149@@ -43,7 +43,7 @@
3150 title = _"Defeat Jomo",
3151 number = 1,
3152 body = objective_text(_"Defeat Jomo",
3153- listitem_bullet(_[[Defeat Jomo. He is taking care of the soldiers’ food supply.]])
3154+ li(_[[Defeat Jomo. He is taking care of the soldiers’ food supply.]])
3155 ),
3156 }
3157
3158@@ -53,11 +53,7 @@
3159
3160 function obj_message(title, text)
3161 return
3162- rt("<p font-size=20 font-weight=bold font-face=serif font-color=3333FF>"
3163- .. title ..
3164- "</p><p font-size=10> <br></p>"
3165- .. p(text)
3166- )
3167+ h1("3333FF", title) .. p(text)
3168 end
3169
3170 briefing_1_the_forbidden_island = {
3171@@ -76,7 +72,7 @@
3172 height = 300,
3173 posy = 1,
3174 body = obj_message(_"An Ancient Castle",
3175- _([[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() ..
3176+ _([[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.]]) ..
3177 _([[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!]]))
3178 .. new_objectives(obj_capture_ancient_castle)
3179 }
3180@@ -87,7 +83,7 @@
3181 height = 300,
3182 posy = 1,
3183 body = obj_message(_"Ancient Castle Captured",
3184- _([[Wonderful! Our troops have finally defeated Lanissa and her soldiers. The ancient castle is ours!]]) .. paragraphdivider() ..
3185+ _([[Wonderful! Our troops have finally defeated Lanissa and her soldiers. The ancient castle is ours!]]) ..
3186 _([[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.]]))
3187 .. new_objectives(obj_defeat_erwyn) .. new_objectives(obj_defeat_jomo)
3188 }
3189@@ -116,6 +112,6 @@
3190 height = 300,
3191 posy = 1,
3192 body = obj_message(_"Victory!",
3193- _([[Finally! The island is completely ours. Now we just have to defend it better than the warlords did.]]) .. paragraphdivider() ..
3194+ _([[Finally! The island is completely ours. Now we just have to defend it better than the warlords did.]]) ..
3195 _("Congratulations! You have mastered this scenario. You may play on if you like!"))
3196 }
3197
3198=== modified file 'data/scripting/editor/editor_controls.lua'
3199--- data/scripting/editor/editor_controls.lua 2016-05-01 09:57:58 +0000
3200+++ data/scripting/editor/editor_controls.lua 2016-08-05 05:28:30 +0000
3201@@ -10,42 +10,40 @@
3202 return {
3203 title = _"Controls",
3204 text =
3205- rt(
3206- h2(_"Keyboard Shortcuts") ..
3207- p(
3208- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3209- dl(help_format_hotkey("F1"), _"Help") ..
3210- -- TRANSLATORS: This is an access key combination.
3211- dl(help_format_hotkey("H"), _"Toggle main menu") ..
3212- -- TRANSLATORS: This is an access key combination. The hotkey is 't'
3213- dl(help_format_hotkey("T"), _"Toggle tools menu") ..
3214- toggle_minimap_hotkey ..
3215- toggle_building_spaces_hotkey ..
3216- -- TRANSLATORS: This is an access key combination. The hotkey is 'p'
3217- dl(help_format_hotkey("P"), _"Toggle player menu") ..
3218- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3219- dl(help_format_hotkey("Ctrl + Z"), _"Undo") ..
3220- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3221- dl(help_format_hotkey("Ctrl + Y"), _"Redo") ..
3222- -- TRANSLATORS: This is an access key combination. The hotkey is 'i'
3223- dl(help_format_hotkey("I"), _"Activate information tool") ..
3224- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3225- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + L")), _"Load map") ..
3226- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3227- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + S")), _"Save map") ..
3228- toggle_fullscreen_hotkey
3229- ) ..
3230+ h2(_"Keyboard Shortcuts") ..
3231+ p(
3232+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3233+ dl(help_format_hotkey("F1"), _"Help") ..
3234+ -- TRANSLATORS: This is an access key combination.
3235+ dl(help_format_hotkey("H"), _"Toggle main menu") ..
3236+ -- TRANSLATORS: This is an access key combination. The hotkey is 't'
3237+ dl(help_format_hotkey("T"), _"Toggle tools menu") ..
3238+ toggle_minimap_hotkey ..
3239+ toggle_building_spaces_hotkey ..
3240+ -- TRANSLATORS: This is an access key combination. The hotkey is 'p'
3241+ dl(help_format_hotkey("P"), _"Toggle player menu") ..
3242+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3243+ dl(help_format_hotkey("Ctrl + Z"), _"Undo") ..
3244+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3245+ dl(help_format_hotkey("Ctrl + Y"), _"Redo") ..
3246+ -- TRANSLATORS: This is an access key combination. The hotkey is 'i'
3247+ dl(help_format_hotkey("I"), _"Activate information tool") ..
3248+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3249+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + L")), _"Load map") ..
3250+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3251+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + S")), _"Save map") ..
3252+ toggle_fullscreen_hotkey
3253+ ) ..
3254
3255- h2(_"Tools") ..
3256- p(
3257- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3258- dl(help_format_hotkey(pgettext("hotkey", "1-0")), _"Change tool size") ..
3259- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3260- dl(help_format_hotkey(pgettext("hotkey", "Click")), _"Place new elements on the map, or increase map elements by the value selected by ‘Increase/Decrease value’") ..
3261- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3262- dl(help_format_hotkey(pgettext("hotkey", "Shift + Click")), _"Remove elements from the map, or decrease map elements by the value selected by ‘Increase/Decrease value’") ..
3263- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3264- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Click")), _"Set map elements to the value selected by ‘Set Value’")
3265- )
3266+ h2(_"Tools") ..
3267+ p(
3268+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3269+ dl(help_format_hotkey(pgettext("hotkey", "1-0")), _"Change tool size") ..
3270+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3271+ dl(help_format_hotkey(pgettext("hotkey", "Click")), _"Place new elements on the map, or increase map elements by the value selected by ‘Increase/Decrease value’") ..
3272+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3273+ dl(help_format_hotkey(pgettext("hotkey", "Shift + Click")), _"Remove elements from the map, or decrease map elements by the value selected by ‘Increase/Decrease value’") ..
3274+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
3275+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Click")), _"Set map elements to the value selected by ‘Set Value’")
3276 )
3277 }
3278
3279=== modified file 'data/scripting/editor/editor_introduction.lua'
3280--- data/scripting/editor/editor_introduction.lua 2016-05-01 09:57:58 +0000
3281+++ data/scripting/editor/editor_introduction.lua 2016-08-05 05:28:30 +0000
3282@@ -8,13 +8,11 @@
3283 return {
3284 title = _"The Widelands Editor",
3285 text =
3286- rt(
3287- h1(_"Introduction") ..
3288-
3289- p(_"This editor is intended for players who would like to design their own maps to use with Widelands.") ..
3290- p(_"As you can see, this editor is heavy work in progress and as the editor becomes better and better, this text will also get longer and more complete.") ..
3291-
3292- online_help ..
3293- p(_"The wiki also includes a short tutorial on how to build a map.")
3294- )
3295+ h1(_"Introduction") ..
3296+
3297+ p(_"This editor is intended for players who would like to design their own maps to use with Widelands.") ..
3298+ p(_"As you can see, this editor is heavy work in progress and as the editor becomes better and better, this text will also get longer and more complete.") ..
3299+
3300+ online_help ..
3301+ p(_"The wiki also includes a short tutorial on how to build a map.")
3302 }
3303
3304=== modified file 'data/scripting/editor/format_editor.lua'
3305--- data/scripting/editor/format_editor.lua 2016-02-10 14:45:46 +0000
3306+++ data/scripting/editor/format_editor.lua 2016-08-05 05:28:30 +0000
3307@@ -7,27 +7,13 @@
3308 include "scripting/formatting.lua"
3309
3310 -- RST
3311--- .. function picture_li(imagepath, text)
3312---
3313--- Places a paragraph of text to the right of an image
3314-
3315--- :arg imagepath: the full path to the image file
3316--- :arg text: the text to be placed next to the image
3317---
3318--- :returns: the text wrapped in a paragraph and placed next to the image
3319-function picture_li(imagepath, text)
3320- return "<rt image=" .. imagepath .. " image-align=left>"
3321- .. p(text) .. "</rt>"
3322-end
3323-
3324--- RST
3325 -- .. function spacer()
3326 --
3327 -- Adds a little space between two paragraphs
3328 --
3329 -- :returns: a small empty paragraph
3330 function spacer()
3331- return rt(p("font-size=3", ""))
3332+ return "<vspace gap=12>"
3333 end
3334
3335 -- RST
3336@@ -42,13 +28,8 @@
3337 --
3338 function text_line(t1, t2, imgstr)
3339 if imgstr then
3340- return "<rt text-align=left image=" .. imgstr ..
3341- " image-align=right><p font-size=13 font-color=D1D1D1>" ..
3342- t1 .. "</p><p line-spacing=3 font-size=12>" ..
3343- t2 .. "<br></p><p font-size=8> <br></p></rt>"
3344+ return h3(t1 .. img(imgstr)) .. p(t2)
3345 else
3346- return "<rt text-align=left><p font-size=13 font-color=D1D1D1>" ..
3347- t1 .. "</p><p line-spacing=3 font-size=12>" ..
3348- t2 .. "<br></p><p font-size=8> <br></p></rt>"
3349+ return h3(t1) .. p(t2)
3350 end
3351 end
3352
3353=== modified file 'data/scripting/editor/terrain_help.lua'
3354--- data/scripting/editor/terrain_help.lua 2016-04-02 07:33:57 +0000
3355+++ data/scripting/editor/terrain_help.lua 2016-08-05 05:28:30 +0000
3356@@ -13,19 +13,19 @@
3357 local world = wl.World();
3358 local terrain = wl.Editor():get_terrain_description(terrain_name)
3359
3360- local result = picture_li(terrain.representative_image, "")
3361+ local result = p(vspace(6) .. img(terrain.representative_image))
3362
3363 -- Resources
3364 local valid_resources = terrain.valid_resources
3365 if (#valid_resources > 0) then
3366- result = result .. spacer() .. rt(h2(_"Resources"))
3367+ result = result .. spacer() .. h2(_"Resources")
3368 if (#valid_resources > 0) then
3369 -- TRANSLATORS: A header in the editor help
3370- result = result .. rt(h3(ngettext(
3371- "Valid Resource:", "Valid Resources:", #valid_resources)))
3372+ result = result .. h3(ngettext(
3373+ "Valid Resource:", "Valid Resources:", #valid_resources))
3374 for count, resource in pairs(valid_resources) do
3375- result = result .. picture_li(
3376- resource.representative_image, resource.descname)
3377+ result = result .. li_image(
3378+ resource.representative_image, 70, resource.descname)
3379 end
3380 end
3381
3382@@ -59,17 +59,17 @@
3383
3384 local tree_string = ""
3385 for k,v in ipairs(tree_list) do
3386- tree_string = tree_string .. picture_li(v.tree.representative_image,
3387+ tree_string = tree_string .. li_image(v.tree.representative_image, 70,
3388 v.tree.species .. ("<br>%2.1f%%"):bformat(100 * v.probability)) .. spacer()
3389 end
3390
3391 -- TRANSLATORS: A header in the editor help
3392- result = result .. spacer() .. rt(h2(_"Probability of trees growing")) .. spacer()
3393+ result = result .. spacer() .. h2(_"Probability of trees growing") .. spacer()
3394
3395 if (tree_string ~="") then
3396 result = result .. tree_string
3397 else
3398- result = result .. rt(p(_"No trees will grow here."))
3399+ result = result .. p(_"No trees will grow here.")
3400 end
3401 return {
3402 title = terrain.descname,
3403
3404=== modified file 'data/scripting/editor/tree_help.lua'
3405--- data/scripting/editor/tree_help.lua 2016-04-02 07:33:57 +0000
3406+++ data/scripting/editor/tree_help.lua 2016-08-05 05:28:30 +0000
3407@@ -11,10 +11,10 @@
3408 set_textdomain("widelands_editor")
3409 local world = wl.World();
3410 local tree = wl.Editor():get_immovable_description(tree_name)
3411- local result = picture_li(tree.representative_image, "")
3412+ local result = p(vspace(6) .. img(tree.representative_image))
3413
3414 -- TRANSLATORS: A header in the editor help. Terrains preferred by a type of tree.
3415- result = result .. rt(p("font-size=3", "")) .. rt(h2(_"Preferred terrains")) .. spacer()
3416+ result = result .. spacer() .. h2(_"Preferred terrains") .. spacer()
3417 terrain_list = {}
3418 for i, terrain in ipairs(world.terrain_descriptions) do
3419 local probability = tree:probability_to_grow(terrain)
3420@@ -33,7 +33,7 @@
3421 end
3422
3423 for k,v in ipairs(terrain_list) do
3424- result = result .. picture_li(v.terrain.representative_image,
3425+ result = result .. li_image(v.terrain.representative_image, 70,
3426 -- TRANSLATORS: Terrain name (Climate)
3427 (_"%1% (%2%)"):bformat(v.terrain.descname, v.terrain.editor_category.descname) ..
3428 "<br>" .. ("%2.1f%%"):bformat(100 * v.probability)
3429
3430=== modified file 'data/scripting/format_scenario.lua'
3431--- data/scripting/format_scenario.lua 2016-04-02 10:53:01 +0000
3432+++ data/scripting/format_scenario.lua 2016-08-05 05:28:30 +0000
3433@@ -18,14 +18,14 @@
3434 -- return speech("map:princess.png", "2F9131", title, text)
3435 -- end
3436 --
3437--- :arg img: name of the image to use for this speaker
3438+-- :arg image: name of the image to use for this speaker
3439 -- :arg clr: a valid 6 char hex color to use for the name of this speaker
3440 -- :arg title: Title of this text.
3441 -- :arg text: The text itself. If this is nil, :const:`title` is used as text
3442 -- instead and there will not be any title.
3443 -- :returns: the formatted text.
3444 --
3445-function speech(img, clr, g_title, g_text)
3446+function speech(image, clr, g_title, g_text)
3447 local title, text = g_title, g_text
3448 if not text then
3449 title = nil
3450@@ -37,25 +37,10 @@
3451
3452 local s = ""
3453 if title then
3454- s = rt("<p font-size=20 font-weight=bold font-face=serif " ..
3455- ("font-color=%s>"):format(clr) .. title ..
3456- "</p><p font-size=8> <br></p>"
3457- )
3458+ s = h1(clr, title)
3459 end
3460-
3461- return s .. rt(("image=%s"):format(img), p(text))
3462-end
3463-
3464-
3465--- RST
3466--- .. function:: paragraphdivider()
3467---
3468--- Closes a paragraph and opens a new paragraph. Use this when you format a string with the speech function
3469--- and need to divide the speech into multiple paragraphs.
3470---
3471--- :returns: <br></p><p font-size=8><br></p><p line-spacing=3 font-size=12>
3472-function paragraphdivider()
3473- return ("<br></p><p font-size=8><br></p><p line-spacing=3 font-size=12>")
3474+ -- NOCOM(GunChleoc): This only works because all images are the same width...
3475+ return s .. li_image(image, 63, text)
3476 end
3477
3478
3479@@ -68,7 +53,7 @@
3480 -- objective text.
3481 --
3482 function objective_text(heading, body)
3483- return rt(h2(heading) .. p(body))
3484+ return h2(heading) .. p(body)
3485 end
3486
3487
3488@@ -91,7 +76,5 @@
3489 s = s .. obj.body
3490 sum = sum + obj.number
3491 end
3492- return rt("<p font-size=10> <br></p>" ..
3493- "<p font=serif font-size=18 font-weight=bold font-color=D1D1D1>"
3494- .. ngettext("New Objective", "New Objectives", sum) .. "</p>") .. s
3495+ return h1(ngettext("New Objective", "New Objectives", sum)) .. s
3496 end
3497
3498=== modified file 'data/scripting/formatting.lua'
3499--- data/scripting/formatting.lua 2016-04-02 10:53:01 +0000
3500+++ data/scripting/formatting.lua 2016-08-05 05:28:30 +0000
3501@@ -1,3 +1,4 @@
3502+-- NOCOM(GunChleoc): Wrap all tags and document allowed attributes when we're done
3503 -- RST
3504 -- formatting.lua
3505 -- --------------
3506@@ -5,6 +6,7 @@
3507 -- Function to simplify and unique text formatting in scenarios and help files.
3508 -- Most of these functions are simple wrapper functions that make working with
3509 -- widelands rich text formatting system more bearable.
3510+-- Function names generally follow HTML names.
3511
3512
3513 -- RST
3514@@ -45,195 +47,362 @@
3515
3516
3517 -- RST
3518--- .. function:: rt(text_or_options[, text = nil])
3519---
3520--- Wraps a block of text into Lua rich text: <rt>%s</rt>.
3521---
3522--- :arg text_or_options: either the text of this rich text
3523--- or any options you care to give it (e.g. image=pic.png).
3524--- :type text_or_options: :class:`string`
3525--- :arg text: if text_or_options is given, this will be the text of the
3526--- rich text.
3527+-- .. function:: rt(text_or_attributes[, text = nil])
3528+--
3529+-- Wraps a block of text into Lua rich text.
3530+-- Only call this once for the whole text that gets sent to the backend.
3531+-- There is no general need to wrap an rt tag around your text,
3532+-- because the backend will take care of it.
3533+-- So, only use this function if you wish to add some attributes to the tag.
3534+--
3535+-- Allowed attributes are:
3536+-- padding, padding_r, padding_l, padding_b, padding_t: NOCOM(GunChleoc): Document
3537+-- background: a background color or image
3538+-- debug: add visual debug information and debug log
3539+-- editor_mode: allow multiple blank spaces for editing
3540+--
3541+-- :arg attributes: the attributes for the rt tag.
3542+-- :type attributes: :class:`string`
3543+-- :arg text: the text to be enclosed in rich text tags.
3544+-- :type text: :class:`string`
3545 -- :returns: the wrapped rich text.
3546 --
3547-function rt(text_or_opts, text)
3548- local k = "<rt>"
3549+function rt(text_or_attributes, text)
3550 if text then
3551- k = ("<rt %s>"):format(text_or_opts)
3552- else
3553- text = text_or_opts
3554- end
3555-
3556- return k .. text .. "</rt>"
3557-end
3558-
3559-
3560--- RST
3561--- .. function:: title(s)
3562---
3563--- Returns a paragraph formatted as a center-aligned green title heading with a small gap after it.
3564---
3565--- :returns: An rt section with s formatted as a title.
3566-function title(s)
3567- return "<rt text-align=center><p font-size=28 font-decoration=bold font-face=serif font-color=2F9131>" .. s .. "</p></rt>"
3568-end
3569-
3570--- RST
3571--- .. function:: h1(s)
3572+ return "<rt " .. text_or_attributes .. ">" .. text .. "</rt>"
3573+ else
3574+ return "<rt>" .. text_or_attributes .. "</rt>"
3575+ end
3576+end
3577+
3578+
3579+-- RST
3580+-- .. function:: img(src[, attributes = nil])
3581+--
3582+-- Turns an image src path into an image tag for richtext.
3583+--
3584+-- :arg src: the file path to the image.
3585+-- :type src: :class:`string`
3586+-- :arg attributes: the attributes for the div tag.
3587+-- :type attributes: :class:`string`
3588+--
3589+-- Allowed attributes are:
3590+-- color: a hex color to be applied to the image's player color mask, if it has any
3591+-- ref: NOCOM(GunChleoc): I have no idea what it does.
3592+--
3593+-- :returns: the img tag.
3594+--
3595+function img(src, attributes)
3596+ if attributes then
3597+ return "<img src=" .. src .." " .. attributes .. ">"
3598+ else
3599+ return "<img src=" .. src .. ">"
3600+ end
3601+end
3602+
3603+
3604+function title(font_face, text)
3605+ return p_font("align=center", "size=38 face=".. font_face .. " color=2F9131", text)
3606+end
3607+
3608+
3609+-- RST
3610+-- .. function:: h1(text_or_color[, text = nil])
3611 --
3612 -- Returns a paragraph formatted as a big heading with a small gap after it.
3613 -- The mnemonic comes from HTML.
3614 --
3615--- :returns: A paragraph with s formatted as heading.
3616-function h1(s)
3617- return "<p font-size=18 font-weight=bold font-color=D1D1D1>"
3618- .. s .. "<br></p><p font-size=8> <br></p>"
3619+-- :returns: A paragraph with text formatted as heading.
3620+function h1(text_or_color, text)
3621+ if text then
3622+ return p_font("", "size=18 bold=1 color=".. text_or_color .. " face=serif", vspace(6) .. text .. vspace(1))
3623+ else
3624+ return p_font("", "size=18 bold=1 color=D1D1D1 face=serif", vspace(6) .. text_or_color .. vspace(1))
3625+ end
3626 end
3627
3628 -- RST
3629--- .. function:: h2(s)
3630+-- .. function:: h2(text)
3631 --
3632 -- Like :func:`h1` but smaller.
3633 --
3634--- :returns: A paragraph with s formatted as heading.
3635-function h2(s)
3636- return "<p font-size=2> <br></p><p font-size=14 font-weight=bold font-color=D1D1D1>"
3637- .. s .. "<br></p><p font-size=4> <br></p>"
3638+-- :returns: A paragraph with text formatted as heading.
3639+function h2(text)
3640+ return p_font("", "size=14 bold=1 color=D1D1D1 face=serif", vspace(6) .. text .. vspace(1))
3641 end
3642
3643 -- RST
3644--- .. function:: h3(s)
3645+-- .. function:: h3(text)
3646 --
3647 -- Like :func:`h2` but smaller.
3648 --
3649--- :returns: A paragraph with s formatted as heading.
3650+-- :returns: A paragraph with text formatted as heading.
3651 --
3652-function h3(s)
3653- return "<p font-size=13 font-color=D1D1D1>"
3654- .. s .. "<br></p><p font-size=4> <br></p>"
3655+function h3(text)
3656+ return p_font("", "size=13 color=D1D1D1 face=serif", vspace(4) .. text .. vspace(1))
3657 end
3658
3659 -- RST
3660--- .. function:: h4(s)
3661+-- .. function:: h4(text)
3662 --
3663 -- Like :func:`h3` but smaller.
3664 --
3665--- :returns: A paragraph with s formatted as heading.
3666+-- :returns: A paragraph with text formatted as heading.
3667 --
3668-function h4(s)
3669- return "<p font-size=12 font-style=italic font-color=D1D1D1>"
3670- .. s .. "<br></p><p font-size=4> <br></p>"
3671+function h4(text)
3672+ return p_font("", "size=12 italic=1 color=D1D1D1 face=serif", text)
3673 end
3674
3675 -- RST
3676--- .. function:: p(text_or_options[, text = nil])
3677+-- .. function:: p(text_or_attributes[, text = nil])
3678 --
3679 -- Returns one paragraph with text followed by a small vertical gap. Options
3680--- can be given as first argument similar to :func:`rt`, otherwise the
3681--- default options will be :const:`line-spacing=3 font-size=12`.
3682+-- can be given as first argument similar to :func:`rt`.
3683+--
3684+-- Allowed attributes are documented in the open_p function.
3685 --
3686 -- :returns: The text wrapped in <p>%s</p>
3687-function p(text_or_opts, text)
3688- local opts = "line-spacing=3 font-size=12"
3689- if text then
3690- opts = text_or_opts
3691- else
3692- text = text_or_opts
3693- end
3694-
3695- return ("<p %s>"):format(opts) .. text .. "<br></p>" ..
3696- "<p font-size=8> <br></p>"
3697-end
3698-
3699--- RST
3700--- .. function:: a(text)
3701---
3702--- Underlines the text to show links. Only words with default paragraph text style.
3703---
3704--- :returns: Underlined text within a default paragraph
3705-function a(text)
3706- return "</p><p font-size=12 font-decoration=underline>" .. text .. "</p><p font-size=12>"
3707-end
3708-
3709--- RST
3710--- .. function:: b(text)
3711---
3712--- Makes the text bold. Only words with default paragraph text style.
3713---
3714--- :returns: Bold text within a default paragraph
3715+function p(text_or_attributes, text)
3716+ if text then
3717+ return open_p(text_or_attributes) .. text .. close_p()
3718+ else
3719+ return open_p() .. text_or_attributes .. close_p()
3720+ end
3721+end
3722+
3723+
3724+-- RST
3725+-- .. function:: p(text_or_attributes[, text = nil])
3726+--
3727+-- Returns one paragraph with text followed by a small vertical gap. Options
3728+-- can be given as first argument similar to :func:`rt`.
3729+--
3730+-- Allowed p attributes are documented in the open_p function.
3731+--
3732+-- Allowed font attributes are are documented in the font function.
3733+--
3734+-- :returns: The text wrapped in <p attributes><font attributes>text</font></p>
3735+function p_font(p_or_font_or_attributes, text_or_font_attributes, text)
3736+ if text then
3737+ return ("<p %s>"):format(p_or_font_or_attributes) .. "<font " .. text_or_font_attributes .. ">" .. text .. close_p()
3738+ else
3739+ return "<p><font " .. p_or_font_or_attributes .. ">" .. text_or_font_attributes .. close_p()
3740+ end
3741+end
3742+
3743+
3744+-- RST
3745+-- .. function:: open_p([attributes = nil])
3746+--
3747+-- Returns a paragraph open tag and default font size. Options
3748+-- can be given as first argument similar to :func:`rt`.
3749+--
3750+-- Allowed attributes are:
3751+-- indent: indents the first line of the paragraph
3752+-- align: horizontal alignment (left, center, right)
3753+-- valign: vertical alignment (top, middle, bottom)
3754+-- spacing: line spacing in pixels
3755+--
3756+-- :returns: <p> with added attributes and default font
3757+function open_p(attributes)
3758+ if attributes then
3759+ return ("<p %s>"):format(attributes) .. "<font size=12>"
3760+ else
3761+ return "<p><font size=12>"
3762+ end
3763+end
3764+
3765+
3766+-- RST
3767+-- .. function:: close_p(t)
3768+--
3769+-- Closes a paragraph.
3770+--
3771+-- :returns: The closing tags for a paragraph
3772+function close_p(t)
3773+ return vspace(6) .. "</font></p>"
3774+end
3775+
3776+-- RST
3777+-- .. function:: font(attributes, text)
3778+--
3779+-- Wraps the text in font tags.
3780+--
3781+-- Allowed attributes are:
3782+-- size: the font size in pt
3783+-- face: sans, serif or condensed
3784+-- color: a hex color
3785+-- bold: if you add bold=1, the text will be bold
3786+-- italic: if you add italic=1, the text will be italic
3787+-- underline: if you add underline=1, the text will be underlined
3788+-- shadow: if you add shadow=1, the text will have a shadow
3789+-- ref: NOCOM(GunChleoc): I don't know what this does.
3790+--
3791+-- :returns: The text wrapped in font tags with the given attributes
3792+--
3793+function font(attributes, text)
3794+ return ("<font %s>"):format(attributes) .. text .. "</font>"
3795+end
3796+
3797+-- RST
3798+-- .. function:: space(gap)
3799+--
3800+-- Adds a horizontal space
3801+-- :arg gap: the size of the space as pixels.
3802+--
3803+-- :returns: a space tag
3804+--
3805+function space(gap)
3806+ return "<space gap="..gap..">"
3807+end
3808+
3809+-- RST
3810+-- .. function:: vspace(gap)
3811+--
3812+-- Adds a vertical space
3813+-- :arg gap: the size of the space as pixels.
3814+--
3815+-- :returns: a vspace tag
3816+--
3817+function vspace(gap)
3818+ return "<vspace gap="..gap..">"
3819+end
3820+
3821+-- RST
3822+-- .. function:: dl(dt, dd)
3823+--
3824+-- This function imitates a HTML description list
3825+-- :arg dt: "description term", will be rendered in bold.
3826+-- :arg dd: "description data", will be rendered normally.
3827+--
3828+-- :returns: a p tag containing the formatted text
3829+--
3830+function dl(dt, dd)
3831+ return p(b(dt) .. " " .. dd)
3832+end
3833+
3834+-- RST
3835+-- .. function:: li(text_or_symbol[, text = nil])
3836+--
3837+-- Adds the symbol in front of the text to create a list item and
3838+-- wraps it in a paragraph
3839+--
3840+-- :arg symbol: the item symbol for the list, e.g. "•" or "→"
3841+-- :arg text: the text of the list item
3842+--
3843+-- :returns: a p tag containint the formatted text
3844+function li(text_or_symbol, text)
3845+ if text then
3846+ return p(text_or_symbol .. " " .. text)
3847+ else
3848+ return p("• " .. text_or_symbol)
3849+ end
3850+end
3851+
3852+-- RST
3853+-- .. function:: li_arrow(text)
3854+--
3855+-- Creates a list item with an arrow
3856+--
3857+-- :arg text: the text of the list item
3858+--
3859+-- :returns: li("→", text)
3860+function li_arrow(text)
3861+ -- TODO(GunChleoc): Reverse arrow for rtl languages.
3862+ return li("→", text)
3863+end
3864+
3865+-- RST
3866+-- .. function li_image(imagepath, text)
3867+--
3868+-- Places a paragraph of text to the right of an image
3869+
3870+-- :arg imagepath: the full path to the image file
3871+-- :arg text_width_percent: the percentatge of space that the text will occupy
3872+-- :arg text: the text to be placed next to the image
3873+--
3874+-- :returns: the text wrapped in a paragraph and placed next to the image, The outer tag is a div.
3875+function li_image(imagepath, text_width_percent, text)
3876+ return p("<br>") .. div("width=100%", "") ..
3877+ div(p(img(imagepath))) ..
3878+ div(p(space(6))) ..
3879+ div("width="..text_width_percent.."%", p(text)) ..
3880+ div("width=100%", "")
3881+end
3882+
3883+-- RST
3884+-- .. function:: a(link)
3885+--
3886+-- This function imitates a HTML link. We can't do real links yet, so the text just gets underlines.
3887+-- :arg link: the text to format
3888+--
3889+-- :returns: a font tag containing the underlined text
3890+--
3891+function a(link)
3892+ return font("underline=1", link)
3893+end
3894+
3895+-- RST
3896+-- .. function:: b(link)
3897+--
3898+-- This makes the text bold.
3899+-- :arg link: the text to format
3900+--
3901+-- :returns: a font tag containing the bold text
3902+--
3903 function b(text)
3904- return "</p><p font-size=12 font-weight=bold>" .. text .. "</p><p font-size=12>"
3905+ return font("bold=1", text)
3906 end
3907
3908 -- RST
3909--- .. function:: i(text)
3910---
3911--- Makes the text italic. Only words with default paragraph text style.
3912---
3913--- :returns: Italic text within a default paragraph
3914+-- .. function:: i(link)
3915+--
3916+-- This makes the text italic.
3917+-- :arg link: the text to format
3918+--
3919+-- :returns: a font tag containing the italic text
3920+--
3921 function i(text)
3922- return "</p><p font-size=12 font-style=italic>" .. text .. "</p><p font-size=12>"
3923-end
3924-
3925--- RST
3926--- .. function:: listdivider()
3927---
3928--- Closes a paragraph and opens a new paragraph.
3929--- Use this before starting a list when it doesn't create a paragraph.
3930--- If you want more space, before the list, use paragraphdivider().
3931---
3932--- :returns: <br></p><p font-size=4><br></p><p line-spacing=3 font-size=12>
3933-function listdivider()
3934- return ("<br></p><p font-size=4><br></p><p line-spacing=3 font-size=12>")
3935-end
3936-
3937-
3938--- RST
3939--- .. function:: listitem(symbol, text)
3940---
3941--- Adds the symbol in front of the text to create a list item and adds a paragraphdivider
3942---
3943--- :arg symbol: the item symbol for the list, e.g. "•" or "→"
3944--- :arg text: the text of the list item
3945---
3946--- :returns: symbol .. " " .. text .. paragraphdivider()
3947-function listitem(symbol, text)
3948- return symbol .. " " .. text .. listdivider()
3949-end
3950-
3951--- RST
3952--- .. function:: listitem_bullet(text)
3953---
3954--- Creates a list item with an arrow
3955---
3956--- :arg text: the text of the list item
3957---
3958--- :returns: listitem("→", text)
3959-function listitem_arrow(text)
3960- return listitem("→", text)
3961-end
3962-
3963--- RST
3964--- .. function:: listitem_bullet(text)
3965---
3966--- Creates a list item with a bullet point
3967---
3968--- :arg text: the text of the list item
3969---
3970--- :returns: listitem("•", text)
3971-function listitem_bullet(text)
3972- return listitem("•", text)
3973-end
3974-
3975--- RST
3976--- .. function:: dl(dt, dd)
3977---
3978--- Creates a description list item
3979---
3980--- :arg dt: description term, will be shown in bold
3981--- :arg dd: description data - the text of the list item
3982---
3983--- :returns: b(dt) .. " " .. dd .. "<br>"
3984-function dl(dt, dd)
3985- return b(dt) .. " " .. dd .. "<br>"
3986+ return font("italic=1", text)
3987+end
3988+
3989+-- RST
3990+-- .. function:: u(link)
3991+--
3992+-- This underlines the text.
3993+-- :arg link: the text to format
3994+--
3995+-- :returns: a font tag containing the underlined text
3996+--
3997+function u(text)
3998+ return font("underline=1", text)
3999+end
4000+
4001+-- RST
4002+-- .. function:: div(text_or_attributes[, text = nil])
4003+--
4004+-- Wraps a block of text into a div tag.
4005+--
4006+-- :arg attributes: the attributes for the div tag.
4007+-- :type attributes: :class:`string`
4008+--
4009+-- Allowed attributes are:
4010+-- padding, padding_r, padding_l, padding_b, padding_t: NOCOM(GunChleoc): Document
4011+-- margin: NOCOM(GunChleoc): Document
4012+-- float: NOCOM(GunChleoc): this does not work yet
4013+-- margin: inner margin for the div
4014+-- valign: vertical alignment
4015+-- background: a background color or image
4016+-- width: the width of the div in pixels or percent
4017+--
4018+-- :arg text: the text to be enclosed in div tags.
4019+-- :type text: :class:`string`
4020+-- :returns: the text wrapped in a div tag.
4021+--
4022+function div(text_or_attributes, text)
4023+ if text then
4024+ return ("<div %s>"):format(text_or_attributes) .. text .. "</div>"
4025+ else
4026+ return ("<div>") .. text_or_attributes .. "</div>"
4027+ end
4028 end
4029
4030=== modified file 'data/scripting/messages.lua'
4031--- data/scripting/messages.lua 2016-01-28 05:24:34 +0000
4032+++ data/scripting/messages.lua 2016-08-05 05:28:30 +0000
4033@@ -5,6 +5,7 @@
4034 -- Functions to send messages to the player and to add objectives to campaigns.
4035
4036 include "scripting/coroutine.lua"
4037+include "scripting/formatting.lua"
4038 include "scripting/table.lua"
4039 include "scripting/ui.lua"
4040
4041@@ -51,7 +52,7 @@
4042 -- While the message box is shown, the user cannot do anything else anyway.
4043 local user_input = wl.ui.get_user_input_allowed()
4044 wl.ui.set_user_input_allowed(true)
4045- player:message_box(title, body, parameters)
4046+ player:message_box(title, rt(body), parameters)
4047 wl.ui.set_user_input_allowed(user_input)
4048 end
4049
4050@@ -80,9 +81,9 @@
4051 --
4052 function add_campaign_objective(objective)
4053 if objective.obj_name then
4054- return wl.Game().players[1]:add_objective(objective.obj_name, objective.obj_title, objective.obj_body)
4055+ return wl.Game().players[1]:add_objective(objective.obj_name, objective.obj_title, rt(objective.obj_body))
4056 else
4057- return wl.Game().players[1]:add_objective(objective.name, objective.title, objective.body)
4058+ return wl.Game().players[1]:add_objective(objective.name, objective.title, rt(objective.body))
4059 end
4060 end
4061
4062@@ -148,7 +149,7 @@
4063 message.obj_number = message.obj_number or message.number or 1
4064 -- because new_objectives needs a body
4065 local obj = {body = objective_text(message.obj_title, message.obj_body), number = message.obj_number}
4066- message.body = message.body .. new_objectives(obj)
4067+ message.body = rt(message.body .. new_objectives(obj))
4068 end
4069
4070 if message.show_instantly then
4071
4072=== modified file 'data/scripting/win_conditions/collectors.lua'
4073--- data/scripting/win_conditions/collectors.lua 2016-05-20 21:03:41 +0000
4074+++ data/scripting/win_conditions/collectors.lua 2016-08-05 05:28:30 +0000
4075@@ -3,6 +3,7 @@
4076 -- =======================================================================
4077
4078 include "scripting/coroutine.lua" -- for sleep
4079+include "scripting/formatting.lua"
4080 include "scripting/messages.lua"
4081 include "scripting/formatting.lua"
4082 include "scripting/format_scenario.lua"
4083@@ -108,7 +109,7 @@
4084 plr:get_buildings(plr.tribe_name .. "_headquarters"), plr:get_buildings(plr.tribe_name .. "_warehouse"), plr:get_buildings(plr.tribe_name .. "_port")
4085 )
4086
4087- descr = descr .. h2((_"Status for %s"):format(plr.name)) .. "<p line-spacing=3 font-size=12>"
4088+ descr = descr .. h2((_"Status for %s"):format(plr.name)) .. open_p()
4089 local points = 0
4090 for idx, ware in ipairs(point_table[plr.tribe_name .. "_order"]) do
4091 local value = point_table[plr.tribe_name][ware]
4092@@ -121,14 +122,13 @@
4093
4094 local warename = wl.Game():get_ware_description(ware).descname
4095 -- TRANSLATORS: For example: 'gold (3 P) x 4 = 12 P', P meaning 'Points'
4096- descr = descr .. listitem_bullet(_"%1$s (%2$i P) x %3$i = %4$i P"):bformat(
4097+ descr = descr .. li(_"%1$s (%2$i P) x %3$i = %4$i P"):bformat(
4098 warename, value, count, lpoints
4099 )
4100 end
4101- descr = descr .. "</p>" .. h3(ngettext("Total: %i point", "Total: %i points", points)):format(points)
4102+ descr = descr .. close_p() .. h3(ngettext("Total: %i point", "Total: %i points", points)):format(points)
4103 team_points = team_points + points
4104 end
4105-
4106 return team_points, descr
4107 end
4108
4109@@ -159,7 +159,7 @@
4110 for idx, plr in ipairs(plrs) do
4111 if (plr.team == 0) then
4112 local points, pstat = _calc_points({plr})
4113- msg = msg .. "<p font-size=8> <br></p>" .. pstat
4114+ msg = msg .. vspace(8) .. pstat
4115 end
4116 end
4117 -- Team points
4118@@ -168,11 +168,11 @@
4119 local message = h1((_"Status for Team %d"):format(idx))
4120 .. pstat
4121 .. h2(ngettext("Team Total: %i point", "Team Total: %i points", points)):format(points)
4122- msg = msg .. "<p font-size=8> <br></p>" .. message
4123+ msg = msg .. vspace(8) .. message
4124 end
4125
4126 for idx, plr in ipairs(plrs) do
4127- send_message(plr, game_status.title, "<rt>" .. msg .. "</rt>", {popup = true})
4128+ send_message(plr, game_status.title, msg, {popup = true})
4129 end
4130 end
4131
4132
4133=== modified file 'data/scripting/win_conditions/defeat_all.lua'
4134--- data/scripting/win_conditions/defeat_all.lua 2016-03-15 08:42:41 +0000
4135+++ data/scripting/win_conditions/defeat_all.lua 2016-08-05 05:28:30 +0000
4136@@ -3,6 +3,7 @@
4137 -- =======================================================================
4138
4139 include "scripting/coroutine.lua" -- for sleep
4140+include "scripting/formatting.lua"
4141 include "scripting/win_conditions/win_condition_functions.lua"
4142
4143 set_textdomain("win_conditions")
4144
4145=== modified file 'data/scripting/win_conditions/endless_game.lua'
4146--- data/scripting/win_conditions/endless_game.lua 2016-03-15 08:42:41 +0000
4147+++ data/scripting/win_conditions/endless_game.lua 2016-08-05 05:28:30 +0000
4148@@ -3,6 +3,7 @@
4149 -- =======================================================================
4150
4151 include "scripting/coroutine.lua" -- for sleep
4152+include "scripting/formatting.lua"
4153 include "scripting/win_conditions/win_condition_functions.lua"
4154
4155 set_textdomain("win_conditions")
4156
4157=== modified file 'data/scripting/win_conditions/endless_game_fogless.lua'
4158--- data/scripting/win_conditions/endless_game_fogless.lua 2016-03-15 08:42:41 +0000
4159+++ data/scripting/win_conditions/endless_game_fogless.lua 2016-08-05 05:28:30 +0000
4160@@ -3,6 +3,7 @@
4161 -- =======================================================================
4162
4163 include "scripting/coroutine.lua" -- for sleep
4164+include "scripting/formatting.lua"
4165 include "scripting/win_conditions/win_condition_functions.lua"
4166
4167 set_textdomain("win_conditions")
4168
4169=== modified file 'data/scripting/win_conditions/territorial_lord.lua'
4170--- data/scripting/win_conditions/territorial_lord.lua 2016-03-15 08:42:41 +0000
4171+++ data/scripting/win_conditions/territorial_lord.lua 2016-08-05 05:28:30 +0000
4172@@ -3,6 +3,7 @@
4173 -- =======================================================================
4174
4175 include "scripting/coroutine.lua" -- for sleep
4176+include "scripting/formatting.lua"
4177 include "scripting/messages.lua"
4178 include "scripting/table.lua"
4179 include "scripting/win_conditions/win_condition_functions.lua"
4180
4181=== modified file 'data/scripting/win_conditions/win_condition_functions.lua'
4182--- data/scripting/win_conditions/win_condition_functions.lua 2016-03-15 08:42:41 +0000
4183+++ data/scripting/win_conditions/win_condition_functions.lua 2016-08-05 05:28:30 +0000
4184@@ -1,3 +1,4 @@
4185+include "scripting/formatting.lua"
4186 include "scripting/messages.lua"
4187
4188 -- RST
4189
4190=== modified file 'data/scripting/win_conditions/win_condition_texts.lua'
4191--- data/scripting/win_conditions/win_condition_texts.lua 2016-03-15 08:42:41 +0000
4192+++ data/scripting/win_conditions/win_condition_texts.lua 2016-08-05 05:28:30 +0000
4193@@ -2,25 +2,25 @@
4194
4195 won_game = {
4196 title = _"Congratulations!",
4197- body = rt(p(_"You have won this game!"))
4198+ body = p(_"You have won this game!")
4199 }
4200
4201 lost_game = {
4202 title = _"You are defeated!",
4203- body = rt(p(_"You lost your last warehouse and are therefore defeated. You may continue as spectator if you want."))
4204+ body = p(_"You lost your last warehouse and are therefore defeated. You may continue as spectator if you want.")
4205 }
4206
4207 won_game_over = {
4208 title = _"You won",
4209- body = rt(p(_"You are the winner!"))
4210+ body = p(_"You are the winner!")
4211 }
4212
4213 lost_game_over = {
4214 title = _"You lost",
4215- body = rt(p(_"You’ve lost this game!"))
4216+ body = p(_"You’ve lost this game!")
4217 }
4218
4219 game_status = {
4220 title = _"Status",
4221- body = rt(p(_"Player overview:"))
4222+ body = h2(_"Player overview:")
4223 }
4224
4225=== modified file 'data/scripting/win_conditions/wood_gnome.lua'
4226--- data/scripting/win_conditions/wood_gnome.lua 2016-05-17 16:40:22 +0000
4227+++ data/scripting/win_conditions/wood_gnome.lua 2016-08-05 05:28:30 +0000
4228@@ -1,8 +1,8 @@
4229 -- =======================================================================
4230 -- Wood Gnome win condition
4231 -- =======================================================================
4232-
4233 include "scripting/coroutine.lua" -- for sleep
4234+include "scripting/formatting.lua"
4235 include "scripting/table.lua"
4236 include "scripting/win_conditions/win_condition_functions.lua"
4237
4238
4239=== modified file 'data/tribes/scripting/help/building_help.lua'
4240--- data/tribes/scripting/help/building_help.lua 2016-03-22 07:32:14 +0000
4241+++ data/tribes/scripting/help/building_help.lua 2016-08-05 05:28:30 +0000
4242@@ -1,4 +1,5 @@
4243 -- TODO(GunChleoc): get resi_00.png from C++
4244+-- NOCOM(GunChleoc):: Convert when we have image alignment. Test all help scripts.
4245
4246 include "tribes/scripting/help/format_help.lua"
4247
4248@@ -13,21 +14,18 @@
4249 -- =======================================================
4250
4251 -- RST
4252--- .. function text_line(t1, t2[, imgstr = nil])
4253---
4254--- Creates a line of h3 formatted text followed by normal text and an image.
4255---
4256--- :arg t1: text in h3 format.
4257+-- .. function text_line(t1, t2)
4258+--
4259+-- Creates a line of header colored formatted text followed by normal text and an image.
4260+--
4261+-- :arg t1: text in colored p format.
4262 -- :arg t2: text in p format.
4263--- :arg imgstr: image aligned right.
4264--- :returns: header followed by normal text and image.
4265+-- :returns: header followed by normal text.
4266 --
4267-function text_line(t1, t2, imgstr)
4268- if imgstr then
4269- return "<rt text-align=left image=" .. imgstr .. " image-align=right><p font-size=13 font-color=D1D1D1>" .. t1 .. "</p><p line-spacing=3 font-size=12>" .. t2 .. "<br></p><p font-size=8> <br></p></rt>"
4270- else
4271- return "<rt text-align=left><p font-size=13 font-color=D1D1D1>" .. t1 .. "</p><p line-spacing=3 font-size=12>" .. t2 .. "<br></p><p font-size=8> <br></p></rt>"
4272- end
4273+function text_line(t1, t2)
4274+ -- NOCOM(GunChleoc): Whitespace gets consumed, so we have to add space(2)
4275+ return p(vspace(4) .. font("size=13 color=D1D1D1 face=serif", t1 .. space(2)) ..
4276+ font("size=13", t2))
4277 end
4278
4279
4280@@ -41,6 +39,7 @@
4281 -- Creates a dependencies line of any length.
4282 --
4283 -- :arg images: images in the correct order from left to right as table (set in {}).
4284+-- Images need to be wrapped in img tag already.
4285 -- :arg text: comment of the image.
4286 -- :returns: a row of pictures connected by arrows.
4287 --
4288@@ -49,17 +48,15 @@
4289 text = ""
4290 end
4291
4292- local string = "image=" .. images[1]
4293+ local string = images[1]
4294 for k,v in ipairs({table.unpack(images,2)}) do
4295- string = string .. ";images/richtext/arrow-right.png;" .. v
4296+ string = string .. img("images/richtext/arrow-right.png") .. v
4297 end
4298-
4299- return rt(string, text)
4300+ return p(string .. " " .. text)
4301 end
4302
4303-
4304 -- RST
4305--- .. function:: dependencies_resi(resource, items[, text = nil])
4306+-- .. function:: dependencies_resi(tribename, resource, items[, text = nil])
4307 --
4308 -- Creates a dependencies line of any length for resources (that don't have menu.png files).
4309 --
4310@@ -72,11 +69,11 @@
4311 if not text then
4312 text = ""
4313 end
4314- local string = "image=tribes/immovables/" .. resource .. "/idle_00.png"
4315+ local string = img("tribes/immovables/" .. resource .. "/idle_00.png")
4316 for k,v in ipairs({table.unpack(items)}) do
4317- string = string .. ";images/richtext/arrow-right.png;" .. v.icon_name
4318+ string = string .. img("images/richtext/arrow-right.png") .. img(v.icon_name)
4319 end
4320- return rt(string, p(text))
4321+ return p(string .. " " .. text)
4322 end
4323
4324
4325@@ -107,14 +104,14 @@
4326 if (countlist > 1) then
4327 text = _"%s and":bformat(text)
4328 end
4329- local images = food_images[1]
4330+ local images = {food_images[1]}
4331 for k,v in ipairs({table.unpack(food_images,2)}) do
4332- images = images .. ";" .. v
4333+ table.insert(images, v)
4334 end
4335 result = image_line(images, 1, p(text)) .. result
4336 end
4337 if (result ~= "") then
4338- result = rt(h3(_"Food:")) .. result
4339+ result = h3(_"Food:") .. result
4340 end
4341 return result
4342 end
4343@@ -128,41 +125,37 @@
4344 -- :arg weapons: an array of weapon names
4345 -- :returns: a list weapons images with the producing and receiving building
4346 --
4347+-- NOCOM(GunChleoc): get rid of the line break
4348 function dependencies_training_weapons(weapons)
4349- local result = "";
4350- local producers = {};
4351+ local result = ""
4352+ local producers = {}
4353 for count, weaponname in pairs(weapons) do
4354 local weapon_description = wl.Game():get_ware_description(weaponname)
4355 for i, producer in ipairs(weapon_description.producers) do
4356 if (producers[producer.name] == nil) then
4357 producers[producer.name] = {}
4358 end
4359- producers[producer.name][weaponname] = true;
4360+ producers[producer.name][weaponname] = true
4361 end
4362 end
4363
4364- local building_count = 0;
4365 for producer, weaponnames in pairs(producers) do
4366 local producer_description = wl.Game():get_building_description(producer)
4367 local weaponsstring = ""
4368 for weaponname, hasweapon in pairs(weaponnames) do
4369 if (hasweapon) then
4370- if(weaponsstring ~= "") then
4371- weaponsstring = weaponsstring .. ";"
4372- end
4373 local weapon_description = wl.Game():get_ware_description(weaponname)
4374- weaponsstring = weaponsstring .. weapon_description.icon_name
4375+ weaponsstring = weaponsstring .. img(weapon_description.icon_name)
4376 end
4377 end
4378- building_count = building_count + 1;
4379 result = result ..
4380 dependencies_basic(
4381- {producer_description.icon_name, weaponsstring},
4382- rt(p(producer_description.descname))
4383+ {img(producer_description.icon_name), weaponsstring},
4384+ p(producer_description.descname)
4385 )
4386 end
4387 if (result ~= "") then
4388- result = rt(h3(_"Equipment:")) .. result
4389+ result = h3(_"Equipment:") .. result
4390 end
4391 return result
4392 end
4393@@ -185,16 +178,14 @@
4394 --
4395 function building_help_general_string(tribe, building_description)
4396 -- TRANSLATORS: Heading for a flavour text in the building help.
4397- local result = rt(h2(_"Lore")) ..
4398- rt("image=" .. building_description.representative_image, p(building_helptext_lore()))
4399+ local result = h2(_"Lore") ..
4400+ li_image(building_description.representative_image, 60, p(building_helptext_lore()))
4401 if (building_helptext_lore_author() ~= "") then
4402- result = result .. rt("text-align=right",
4403- p("font-size=10 font-style=italic",
4404- building_helptext_lore_author()))
4405+ result = result .. p_font("align=right", "size=10 italic=1", building_helptext_lore_author())
4406 end
4407
4408- result = result .. rt(h2(_"General"))
4409- result = result .. rt(h3(_"Purpose:"))
4410+ result = result .. h2(_"General")
4411+ result = result .. h3(_"Purpose:")
4412
4413 -- TODO(GunChleoc) "carrier" for headquarters, "ship" for ports, "scout" for scouts_hut, "shipwright" for shipyard?
4414 -- TODO(GunChleoc) use aihints for gamekeeper, forester?
4415@@ -215,14 +206,14 @@
4416 representative_resource = wl.Game():get_ware_description("log")
4417 end
4418
4419- if(representative_resource) then
4420- result = result .. image_line(representative_resource.icon_name, 1, p(building_helptext_purpose()))
4421+ if (representative_resource) then
4422+ result = result .. image_line({representative_resource.icon_name}, 0, p(building_helptext_purpose()))
4423 else
4424- result = result .. rt(p(building_helptext_purpose()))
4425+ result = result .. p(building_helptext_purpose())
4426 end
4427
4428 if (building_helptext_note() ~= "") then
4429- result = result .. rt(h3(_"Note:")) .. rt(p(building_helptext_note()))
4430+ result = result .. text_line(_"Note:", building_helptext_note())
4431 end
4432
4433 if(building_description.type_name == "productionsite") then
4434@@ -231,13 +222,13 @@
4435 end
4436
4437 elseif(building_description.type_name == "warehouse") then
4438- result = result .. rt(h3(_"Healing:")
4439- .. p(ngettext("Garrisoned soldiers heal %d health point per second", "Garrisoned soldiers heal %d health points per second", building_description.heal_per_second):bformat(building_description.heal_per_second)))
4440+ result = result .. text_line(_"Healing:",
4441+ ngettext("Garrisoned soldiers heal %d health point per second", "Garrisoned soldiers heal %d health points per second", building_description.heal_per_second):bformat(building_description.heal_per_second))
4442 result = result .. text_line(_"Conquer range:", building_description.conquers)
4443
4444 elseif(building_description.type_name == "militarysite") then
4445- result = result .. rt(h3(_"Healing:")
4446- .. p(ngettext("Garrisoned soldiers heal %d health point per second", "Garrisoned soldiers heal %d health points per second", building_description.heal_per_second):bformat(building_description.heal_per_second)))
4447+ result = result .. text_line(_"Healing:",
4448+ ngettext("Garrisoned soldiers heal %d health point per second", "Garrisoned soldiers heal %d health points per second", building_description.heal_per_second):bformat(building_description.heal_per_second))
4449 result = result .. text_line(_"Capacity:", building_description.max_number_of_soldiers)
4450 result = result .. text_line(_"Conquer range:", building_description.conquers)
4451
4452@@ -276,11 +267,11 @@
4453 end
4454 if (hasinput) then
4455 -- TRANSLATORS: Heading in the building help for wares that a building accepts (e.g. wheat for a mill).
4456- result = rt(h3(_"Incoming:")) .. result
4457+ result = h3(_"Incoming:") .. result
4458 end
4459
4460 if ((not hasinput) and building_description.output_ware_types[1]) then
4461- result = result .. rt(h3(_"Collects:"))
4462+ result = result .. h3(_"Collects:")
4463 for i, ware_description in ipairs(building_description.output_ware_types) do
4464 result = result ..
4465 dependencies({building_description, ware_description}, ware_description.descname)
4466@@ -292,7 +283,7 @@
4467
4468 elseif (building_description.is_mine) then
4469 -- TRANSLATORS: This is a verb (The miner mines)
4470- result = result .. rt(h3(_"Mines:"))
4471+ result = result .. h3(_"Mines:")
4472 for i, ware_description in ipairs(building_description.output_ware_types) do
4473
4474 -- Need to hack this, because resource != produced ware.
4475@@ -312,7 +303,7 @@
4476
4477 else
4478 if(building_description.output_ware_types[1] or building_description.output_worker_types[1]) then
4479- result = result .. rt(h3(_"Produces:"))
4480+ result = result .. h3(_"Produces:")
4481 end
4482 for i, ware_description in ipairs(building_description.output_ware_types) do
4483 result = result ..
4484@@ -354,10 +345,10 @@
4485 end
4486 end
4487 end
4488- if (outgoing ~= "") then result = result .. rt(h3(_"Outgoing:")) .. outgoing end
4489+ if (outgoing ~= "") then result = result .. h3(_"Outgoing:") .. outgoing end
4490
4491- if (result == "") then result = rt(p(_"None")) end
4492- return rt(h2(_"Dependencies")) .. result
4493+ if (result == "") then result = p(_"None") end
4494+ return h2(_"Dependencies") .. result
4495 end
4496
4497 -- RST
4498@@ -373,54 +364,54 @@
4499 function building_help_dependencies_training(tribe, building_description)
4500 local result = ""
4501 if (building_description.max_health and building_description.min_health) then
4502- result = result .. rt(h2(_"Health Training"))
4503- result = result .. rt(p(_"Trains ‘Health’ from %1% up to %2%":
4504- bformat(building_description.min_health, building_description.max_health+1)))
4505- result = result .. rt(h3(_"Soldiers:"))
4506+ result = result .. h2(_"Health Training")
4507+ result = result .. p(_"Trains ‘Health’ from %1% up to %2%":
4508+ bformat(building_description.min_health, building_description.max_health+1))
4509+ result = result .. h3(_"Soldiers:")
4510 result = result ..
4511 dependencies_basic({
4512- "tribes/workers/" .. tribe.name .. "/soldier/health_level" .. building_description.min_health .. ".png",
4513- building_description.icon_name,
4514- "tribes/workers/" .. tribe.name .. "/soldier/health_level" .. (building_description.max_health + 1) ..".png"})
4515+ img("tribes/workers/" .. tribe.name .. "/soldier/health_level" .. building_description.min_health .. ".png"),
4516+ img(building_description.icon_name),
4517+ img("tribes/workers/" .. tribe.name .. "/soldier/health_level" .. (building_description.max_health + 1) ..".png")})
4518 result = result .. dependencies_training_food(building_description.food_health)
4519 result = result .. dependencies_training_weapons(building_description.weapons_health)
4520 end
4521 if (building_description.max_attack and building_description.min_attack) then
4522- result = result .. rt(h2(_"Attack Training"))
4523+ result = result .. h2(_"Attack Training")
4524 -- TRANSLATORS: %1$s = Health, Evade, Attack or Defense. %2$s and %3$s are numbers.
4525- result = result .. rt(p(_"Trains ‘Attack’ from %1% up to %2%":
4526- bformat(building_description.min_attack, building_description.max_attack+1)))
4527- result = result .. rt(h3(_"Soldiers:")) ..
4528+ result = result .. p(_"Trains ‘Attack’ from %1% up to %2%":
4529+ bformat(building_description.min_attack, building_description.max_attack+1))
4530+ result = result .. h3(_"Soldiers:") ..
4531 dependencies_basic({
4532- "tribes/workers/" .. tribe.name .. "/soldier/attack_level" .. building_description.min_attack .. ".png",
4533- building_description.icon_name,
4534- "tribes/workers/" .. tribe.name .. "/soldier/attack_level" .. (building_description.max_attack + 1) ..".png"})
4535+ img("tribes/workers/" .. tribe.name .. "/soldier/attack_level" .. building_description.min_attack .. ".png"),
4536+ img(building_description.icon_name),
4537+ img("tribes/workers/" .. tribe.name .. "/soldier/attack_level" .. (building_description.max_attack + 1) ..".png")})
4538 result = result .. dependencies_training_food(building_description.food_attack)
4539 result = result .. dependencies_training_weapons(building_description.weapons_attack)
4540 end
4541 if (building_description.max_defense and building_description.min_defense) then
4542- result = result .. rt(h2(_"Defense Training"))
4543- result = result .. rt(p( _"Trains ‘Defense’ from %1% up to %2%":
4544- bformat(building_description.min_defense, building_description.max_defense+1)))
4545- result = result .. rt(h3(_"Soldiers:"))
4546+ result = result .. h2(_"Defense Training")
4547+ result = result .. p( _"Trains ‘Defense’ from %1% up to %2%":
4548+ bformat(building_description.min_defense, building_description.max_defense+1))
4549+ result = result .. h3(_"Soldiers:")
4550 result = result ..
4551 dependencies_basic({
4552- "tribes/workers/" .. tribe.name .. "/soldier/defense_level" .. building_description.min_defense .. ".png",
4553- building_description.icon_name,
4554- "tribes/workers/" .. tribe.name .. "/soldier/defense_level" .. (building_description.max_defense + 1) ..".png"})
4555+ img("tribes/workers/" .. tribe.name .. "/soldier/defense_level" .. building_description.min_defense .. ".png"),
4556+ img(building_description.icon_name),
4557+ img("tribes/workers/" .. tribe.name .. "/soldier/defense_level" .. (building_description.max_defense + 1) ..".png")})
4558 result = result .. dependencies_training_food(building_description.food_defense)
4559 result = result .. dependencies_training_weapons(building_description.weapons_defense)
4560 end
4561 if (building_description.max_evade and building_description.min_evade) then
4562- result = result .. rt(h2(_"Evade Training"))
4563- result = result .. rt(p( _"Trains ‘Evade’ from %1% up to %2%":
4564- bformat(building_description.min_evade, building_description.max_evade+1)))
4565- result = result .. rt(h3(_"Soldiers:"))
4566+ result = result .. h2(_"Evade Training")
4567+ result = result .. p( _"Trains ‘Evade’ from %1% up to %2%":
4568+ bformat(building_description.min_evade, building_description.max_evade+1))
4569+ result = result .. h3(_"Soldiers:")
4570 result = result ..
4571 dependencies_basic({
4572- "tribes/workers/" .. tribe.name .. "/soldier/evade_level" .. building_description.min_evade .. ".png",
4573- building_description.icon_name,
4574- "tribes/workers/" .. tribe.name .. "/soldier/evade_level" .. (building_description.max_evade + 1) ..".png"})
4575+ img("tribes/workers/" .. tribe.name .. "/soldier/evade_level" .. building_description.min_evade .. ".png"),
4576+ img(building_description.icon_name),
4577+ img("tribes/workers/" .. tribe.name .. "/soldier/evade_level" .. (building_description.max_evade + 1) ..".png")})
4578 result = result .. dependencies_training_food(building_description.food_evade)
4579 result = result .. dependencies_training_weapons(building_description.weapons_evade)
4580 end
4581@@ -440,39 +431,48 @@
4582 --
4583 function building_help_building_section(building_description)
4584 -- TRANSLATORS: This is the header for the "Building" section in the building help, containing size info, buildcost etc.
4585- local result = rt(h2(_"Building"))
4586+ local result = h2(_"Building")
4587
4588 -- Space required
4589+ local space_required_image = ""
4590+ local space_required_text = ""
4591 if (building_description.is_mine) then
4592- result = result .. text_line(_"Space required:",_"Mine plot","images/wui/overlays/mine.png")
4593+ space_required_text = _"Mine plot"
4594+ space_required_image = "images/wui/overlays/mine.png"
4595 elseif (building_description.is_port) then
4596- result = result .. text_line(_"Space required:",_"Port plot","images/wui/overlays/port.png")
4597+ space_required_text = _"Port plot"
4598+ space_required_image = "images/wui/overlays/port.png"
4599 else
4600 if (building_description.size == "small") then
4601- result = result .. text_line(_"Space required:",_"Small plot","images/wui/overlays/small.png")
4602+ space_required_text = _"Small plot"
4603+ space_required_image = "images/wui/overlays/small.png"
4604 elseif (building_description.size == "medium") then
4605- result = result .. text_line(_"Space required:",_"Medium plot","images/wui/overlays/medium.png")
4606+ space_required_text = _"Medium plot"
4607+ space_required_image = "images/wui/overlays/medium.png"
4608 elseif (building_description.size == "big") then
4609- result = result .. text_line(_"Space required:",_"Big plot","images/wui/overlays/big.png")
4610- else
4611- result = result .. p(_"Space required:" .. _"Unknown")
4612+ space_required_text = _"Big plot"
4613+ space_required_image = "images/wui/overlays/big.png"
4614 end
4615 end
4616+ if space_required_text == "" or space_required_image == "" then
4617+ result = result .. text_line(_"Space required:", _"Unknown")
4618+ else
4619+ result = result .. image_line({space_required_image}, 1, text_line(_"Space required:", space_required_text))
4620+ end
4621
4622 -- Enhanced from
4623 if (building_description.buildable or building_description.enhanced) then
4624
4625 if (building_description.buildable and building_description.enhanced) then
4626- result = result .. text_line(_"Note:",
4627- _"This building can either be built directly or obtained by enhancing another building.")
4628+ result = result .. h3(_"Note:") .. p(_"This building can either be built directly or obtained by enhancing another building.")
4629 end
4630
4631 if (building_description.buildable) then
4632 -- Build cost
4633 if (building_description.buildable and building_description.enhanced) then
4634- result = result .. rt(h3(_"Direct build cost:"))
4635+ result = result .. h3(_"Direct build cost:")
4636 else
4637- result = result .. rt(h3(_"Build cost:"))
4638+ result = result .. h3(_"Build cost:")
4639 end
4640 for ware, amount in pairs(building_description.build_cost) do
4641 local ware_description = wl.Game():get_ware_description(ware)
4642@@ -483,9 +483,9 @@
4643 if (building_description.enhanced) then
4644 former_building = building_description.enhanced_from
4645 if (building_description.buildable) then
4646- result = result .. text_line(_"Or enhanced from:", former_building.descname)
4647+ result = result .. image_line({former_building.icon_name}, 1, h3(_"Or enhanced from:") .. p(former_building.descname))
4648 else
4649- result = result .. text_line(_"Enhanced from:", former_building.descname)
4650+ result = result .. image_line({former_building.icon_name}, 1, h3(_"Enhanced from:") .. p(former_building.descname))
4651 end
4652
4653 for ware, amount in pairs(building_description.enhancement_cost) do
4654@@ -494,7 +494,7 @@
4655 end
4656
4657 -- Cumulative cost
4658- result = result .. rt(h3(_"Cumulative cost:"))
4659+ result = result .. h3(_"Cumulative cost:")
4660 local warescost = {}
4661 for ware, amount in pairs(building_description.enhancement_cost) do
4662 if (warescost[ware]) then
4663@@ -504,7 +504,7 @@
4664 end
4665 end
4666
4667- local former_buildings = {};
4668+ local former_buildings = {}
4669 former_building = building_description
4670
4671 while former_building.enhanced do
4672@@ -539,20 +539,20 @@
4673 result = result .. help_ware_amount_line(ware_description, amount)
4674 end
4675 else
4676- result = result .. rt(p(_"Unknown"))
4677+ result = result .. p(_"Unknown")
4678 end
4679
4680 -- Dismantle yields
4681 if (building_description.buildable) then
4682- result = result .. rt(h3(_"If built directly, dismantle yields:"))
4683+ result = result .. h3(_"If built directly, dismantle yields:")
4684 for ware, amount in pairs(building_description.returned_wares) do
4685 local ware_description = wl.Game():get_ware_description(ware)
4686 result = result .. help_ware_amount_line(ware_description, amount)
4687 end
4688- result = result .. rt(h3(_"If enhanced, dismantle yields:"))
4689+ result = result .. h3(_"If enhanced, dismantle yields:")
4690 else
4691 -- TRANSLATORS: This is a heading for the resources that you will get back when you dismantle a building of this type. What dismantling will give you.
4692- result = result .. rt(h3(_"Dismantle yields:"))
4693+ result = result .. h3(_"Dismantle yields:")
4694 end
4695 local warescost = {}
4696 for ware, amount in pairs(building_description.returned_wares_enhanced) do
4697@@ -588,12 +588,12 @@
4698 result = result .. help_ware_amount_line(ware_description, amount)
4699 end
4700 else
4701- result = result .. rt(p(_"Unknown"))
4702+ result = result .. p(_"Unknown")
4703 end
4704 -- Buildable
4705 else
4706 -- Dismantle yields
4707- result = result .. rt(h3(_"Dismantle yields:"))
4708+ result = result .. h3(_"Dismantle yields:")
4709 for ware, amount in pairs(building_description.returned_wares) do
4710 local ware_description = wl.Game():get_ware_description(ware)
4711 result = result .. help_ware_amount_line(ware_description, amount)
4712@@ -602,7 +602,8 @@
4713
4714 -- Can be enhanced to
4715 if (building_description.enhancement) then
4716- result = result .. text_line(_"Can be enhanced to:", building_description.enhancement.descname)
4717+ result = result .. image_line({building_description.enhancement.icon_name}, 1, h3(_"Can be enhanced to:") .. p(building_description.enhancement.descname))
4718+
4719 for ware, amount in pairs(building_description.enhancement.enhancement_cost) do
4720 local ware_description = wl.Game():get_ware_description(ware)
4721 result = result .. help_ware_amount_line(ware_description, amount)
4722@@ -632,7 +633,7 @@
4723
4724 if(building_description.type_name == "productionsite" or building_description.type_name == "trainingsite") then
4725
4726- result = result .. rt(h2(_"Workers")) .. rt(h3(_"Crew required:"))
4727+ result = result .. h2(_"Workers") .. h3(_"Crew required:")
4728
4729 local worker_description = building_description.working_positions[1]
4730 local becomes_description = nil
4731@@ -652,24 +653,26 @@
4732 number_of_workers = number_of_workers + 1
4733
4734 if(becomes_description) then
4735- result = result .. image_line(worker_description.icon_name, 1,
4736+ result = result .. image_line({worker_description.icon_name}, 1,
4737 -- TRANSLATORS: %s is a worker name, e.g. "Chief Miner" or "Brewer".
4738 p(_"%s or better":bformat(worker_description.descname)))
4739 else
4740- result = result .. image_line(worker_description.icon_name, 1,
4741+ result = result .. image_line({worker_description.icon_name}, 1,
4742 p(worker_description.descname))
4743 end
4744 end
4745
4746 if (number_of_workers > 0) then
4747 local tool_string = help_tool_string(tribe, toolnames, number_of_workers)
4748- -- TRANSLATORS: Tribal Encyclopedia: Heading for which tool workers use
4749- result = result .. rt(h3(ngettext("Worker uses:","Workers use:", number_of_workers))) .. tool_string
4750+ if (tool_string ~= "") then
4751+ -- TRANSLATORS: Tribal Encyclopedia: Heading for which tool workers use
4752+ result = result .. h3(ngettext("Worker uses:","Workers use:", number_of_workers)) .. tool_string
4753+ end
4754 end
4755
4756 if(becomes_description) then
4757
4758- result = result .. rt(h3(_"Experience levels:"))
4759+ result = result .. h3(_"Experience levels:")
4760 -- TRANSLATORS: EP = Experience Points
4761 local exp_string = _"%s to %s (%s EP)":format(
4762 worker_description.descname,
4763@@ -686,7 +689,7 @@
4764 worker_description.needed_experience
4765 )
4766 end
4767- result = result .. rt("text-align=right", p(exp_string))
4768+ result = result .. p("align=right", exp_string)
4769 end
4770 end
4771
4772@@ -703,7 +706,7 @@
4773 --
4774 function building_help_production_section()
4775 if (building_helptext_performance() ~= "") then
4776- return rt(h2(_"Production")) ..
4777+ return h2(_"Production") ..
4778 text_line(_"Performance:", building_helptext_performance())
4779 else
4780 return ""
4781
4782=== modified file 'data/tribes/scripting/help/controls.lua'
4783--- data/tribes/scripting/help/controls.lua 2016-05-17 16:40:22 +0000
4784+++ data/tribes/scripting/help/controls.lua 2016-08-05 05:28:30 +0000
4785@@ -12,82 +12,80 @@
4786 return {
4787 title = _"Controls",
4788 text =
4789- rt(
4790- h2(_"Window Control") ..
4791- p(
4792- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4793- dl(help_format_hotkey(pgettext("hotkey", "Right-click")), _"Close window") ..
4794- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4795- dl(help_format_hotkey(pgettext("hotkey", "Middle-click or Ctrl + Left-click")), _"Minimize/Maximize window") ..
4796- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4797- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Left-click on Button")), _"Skip confirmation dialog")) ..
4798-
4799- h2(_"Road Control") ..
4800- p(
4801- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4802- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Left-click")), _"While connecting two flags: Place flags automatically") ..
4803- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4804- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Left-click")), _"While removing a flag: Remove all flags up to the first junction")) ..
4805-
4806- h2(_"Keyboard Shortcuts") ..
4807- p(
4808- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4809- dl(help_format_hotkey(pgettext("hotkey", "Page Up")), _"Increase game speed") ..
4810- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4811- dl(help_format_hotkey(pgettext("hotkey", "Page Down")), _"Decrease game speed") ..
4812- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4813- dl(help_format_hotkey(pgettext("hotkey", "Pause")), _"Pause the game") ..
4814- -- TRANSLATORS: This is an access key combination. The hotkey is 'c'
4815- dl(help_format_hotkey("C"), _"Toggle census") ..
4816- -- TRANSLATORS: This is an access key combination. The hotkey is 's'
4817- dl(help_format_hotkey("S"), _"Toggle statistics") ..
4818- toggle_minimap_hotkey ..
4819- toggle_building_spaces_hotkey ..
4820- -- TRANSLATORS: This is an access key combination. The hotkey is 'o'
4821- dl(help_format_hotkey("O"), _"Toggle objectives") ..
4822- -- TRANSLATORS: This is an access key combination. The hotkey is 'n'
4823- dl(help_format_hotkey("N"), _"Toggle messages (‘news’)") ..
4824- -- TRANSLATORS: This is an access key combination.
4825- dl(help_format_hotkey("F1"), _"Tribal Encyclopedia") ..
4826- -- TRANSLATORS: This is an access key combination. The hotkey is 'i'
4827- dl(help_format_hotkey("I"), _"Toggle stock inventory") ..
4828- -- TRANSLATORS: This is an access key combination. The hotkey is 'b'
4829- dl(help_format_hotkey("B"), _"Toggle building statistics") ..
4830- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4831- dl(help_format_hotkey(pgettext("hotkey", "Home")), _"Center main mapview on starting location") ..
4832- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4833- dl(help_format_hotkey(pgettext("hotkey", "(Ctrl +) 0-9")), _"Remember and go to previously remembered locations") ..
4834- -- TRANSLATORS: This is an access key combination.
4835- dl(help_format_hotkey(","), _"Go to the previous location") ..
4836- -- TRANSLATORS: This is an access key combination.
4837- dl(help_format_hotkey("."), _"Go to the next location") ..
4838- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4839- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + F11")), _"Take a screenshot") ..
4840- toggle_fullscreen_hotkey ..
4841- -- TRANSLATORS: This is an access key combination.
4842- dl(help_format_hotkey(pgettext("hotkey", "Ctrl + F10")), _"Quit the game immediately") ..
4843- -- TRANSLATORS: This is an access key combination.
4844- dl(help_format_hotkey(pgettext("hotkey", "F6")), _"Show the debug console (only in debug-builds)")
4845- ) ..
4846-
4847- h3(_"In the message window, the following additional shortcuts are available:") ..
4848- p(
4849- -- TRANSLATORS: This is the helptext for an access key combination.
4850- dl(help_format_hotkey("0"), _"Show all messages") ..
4851- -- TRANSLATORS: This is the helptext for an access key combination.
4852- dl(help_format_hotkey("1"), _"Show geologists’ messages only") ..
4853- -- TRANSLATORS: This is the helptext for an access key combination.
4854- dl(help_format_hotkey("2"), _"Show economy messages only") ..
4855- -- TRANSLATORS: This is the helptext for an access key combination.
4856- dl(help_format_hotkey("3"), _"Show seafaring messages only") ..
4857- -- TRANSLATORS: This is the helptext for an access key combination.
4858- dl(help_format_hotkey("4"), _"Show warfare messages only") ..
4859- -- TRANSLATORS: This is the helptext for an access key combination.
4860- dl(help_format_hotkey("5"), _"Show scenario messages only") ..
4861- -- TRANSLATORS: This is the helptext for an access key combination.
4862- dl(help_format_hotkey("G"), _"Jump to the location corresponding to the current message") ..
4863- -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4864- dl(help_format_hotkey(pgettext("hotkey", "Delete")), _"Archive/Restore the current message")
4865- )
4866+ h2(_"Window Control") ..
4867+ p(
4868+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4869+ dl(help_format_hotkey(pgettext("hotkey", "Right-click")), _"Close window") ..
4870+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4871+ dl(help_format_hotkey(pgettext("hotkey", "Middle-click or Ctrl + Left-click")), _"Minimize/Maximize window") ..
4872+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4873+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Left-click on Button")), _"Skip confirmation dialog")) ..
4874+
4875+ h2(_"Road Control") ..
4876+ p(
4877+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4878+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Left-click")), _"While connecting two flags: Place flags automatically") ..
4879+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4880+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + Left-click")), _"While removing a flag: Remove all flags up to the first junction")) ..
4881+
4882+ h2(_"Keyboard Shortcuts") ..
4883+ p(
4884+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4885+ dl(help_format_hotkey(pgettext("hotkey", "Page Up")), _"Increase game speed") ..
4886+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4887+ dl(help_format_hotkey(pgettext("hotkey", "Page Down")), _"Decrease game speed") ..
4888+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4889+ dl(help_format_hotkey(pgettext("hotkey", "Pause")), _"Pause the game") ..
4890+ -- TRANSLATORS: This is an access key combination. The hotkey is 'c'
4891+ dl(help_format_hotkey("C"), _"Toggle census") ..
4892+ -- TRANSLATORS: This is an access key combination. The hotkey is 's'
4893+ dl(help_format_hotkey("S"), _"Toggle statistics") ..
4894+ toggle_minimap_hotkey ..
4895+ toggle_building_spaces_hotkey ..
4896+ -- TRANSLATORS: This is an access key combination. The hotkey is 'o'
4897+ dl(help_format_hotkey("O"), _"Toggle objectives") ..
4898+ -- TRANSLATORS: This is an access key combination. The hotkey is 'n'
4899+ dl(help_format_hotkey("N"), _"Toggle messages (‘news’)") ..
4900+ -- TRANSLATORS: This is an access key combination.
4901+ dl(help_format_hotkey("F1"), _"Tribal Encyclopedia") ..
4902+ -- TRANSLATORS: This is an access key combination. The hotkey is 'i'
4903+ dl(help_format_hotkey("I"), _"Toggle stock inventory") ..
4904+ -- TRANSLATORS: This is an access key combination. The hotkey is 'b'
4905+ dl(help_format_hotkey("B"), _"Toggle building statistics") ..
4906+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4907+ dl(help_format_hotkey(pgettext("hotkey", "Home")), _"Center main mapview on starting location") ..
4908+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4909+ dl(help_format_hotkey(pgettext("hotkey", "(Ctrl +) 0-9")), _"Remember and go to previously remembered locations") ..
4910+ -- TRANSLATORS: This is an access key combination.
4911+ dl(help_format_hotkey(","), _"Go to the previous location") ..
4912+ -- TRANSLATORS: This is an access key combination.
4913+ dl(help_format_hotkey("."), _"Go to the next location") ..
4914+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4915+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + F11")), _"Take a screenshot") ..
4916+ toggle_fullscreen_hotkey ..
4917+ -- TRANSLATORS: This is an access key combination.
4918+ dl(help_format_hotkey(pgettext("hotkey", "Ctrl + F10")), _"Quit the game immediately") ..
4919+ -- TRANSLATORS: This is an access key combination.
4920+ dl(help_format_hotkey(pgettext("hotkey", "F6")), _"Show the debug console (only in debug-builds)")
4921+ ) ..
4922+
4923+ h3(_"In the message window, the following additional shortcuts are available:") ..
4924+ p(
4925+ -- TRANSLATORS: This is the helptext for an access key combination.
4926+ dl(help_format_hotkey("0"), _"Show all messages") ..
4927+ -- TRANSLATORS: This is the helptext for an access key combination.
4928+ dl(help_format_hotkey("1"), _"Show geologists’ messages only") ..
4929+ -- TRANSLATORS: This is the helptext for an access key combination.
4930+ dl(help_format_hotkey("2"), _"Show economy messages only") ..
4931+ -- TRANSLATORS: This is the helptext for an access key combination.
4932+ dl(help_format_hotkey("3"), _"Show seafaring messages only") ..
4933+ -- TRANSLATORS: This is the helptext for an access key combination.
4934+ dl(help_format_hotkey("4"), _"Show warfare messages only") ..
4935+ -- TRANSLATORS: This is the helptext for an access key combination.
4936+ dl(help_format_hotkey("5"), _"Show scenario messages only") ..
4937+ -- TRANSLATORS: This is the helptext for an access key combination.
4938+ dl(help_format_hotkey("G"), _"Jump to the location corresponding to the current message") ..
4939+ -- TRANSLATORS: This is an access key combination. Localize, but do not change the key.
4940+ dl(help_format_hotkey(pgettext("hotkey", "Delete")), _"Archive/Restore the current message")
4941 )
4942 }
4943
4944=== modified file 'data/tribes/scripting/help/format_help.lua'
4945--- data/tribes/scripting/help/format_help.lua 2016-02-27 08:43:39 +0000
4946+++ data/tribes/scripting/help/format_help.lua 2016-08-05 05:28:30 +0000
4947@@ -11,28 +11,70 @@
4948 -- =======================================================
4949
4950 -- RST
4951+-- .. function:: two_divs(text1, text2, text1_width, text2_width, space_width, text2_alignment)
4952+--
4953+-- Returns 2 divs with the specified texts and widths, separated by space_width
4954+--
4955+-- :arg text1: Text for the first div.
4956+-- :arg text2: Text for the second div.
4957+-- :arg text1_width: Width of the first div.
4958+-- :arg text2_width: Width of the second div.
4959+-- :arg space_width: Width of the soace between the two divs.
4960+-- :arg text2_alignment: Alignment of the second div (left, right, center).
4961+--
4962+-- :returns: the text on the left and a picture row on the right.
4963+--
4964+function two_divs(text1, text2, text1_width, text2_width, space_width, text2_alignment)
4965+ return p("<br>") .. div("width=100%", "") ..
4966+ div("width=" .. text1_width, p(text1)) ..
4967+ div(p(space(space_width))) ..
4968+ div("width=" .. (text2_width), p("align=" .. text2_alignment, text2)) ..
4969+ div("width=100%", "")
4970+end
4971+
4972+
4973+-- RST
4974 -- .. function:: image_line(image, count[, text = nil])
4975 --
4976 -- Aligns the image to a row on the right side with text on the left.
4977 --
4978--- :arg image: the picture to be aligned to a row.
4979+-- :arg image: an array of the pictures to be aligned to a row.
4980 -- :arg count: length of the picture row.
4981 -- :arg text: if given the text aligned on the left side, formatted via
4982 -- formatting.lua functions.
4983 -- :returns: the text on the left and a picture row on the right.
4984 --
4985-function image_line(image, count, text)
4986- local imgs={}
4987- for i=1,count do
4988- imgs[#imgs + 1] = image
4989- end
4990- local imgstr = table.concat(imgs, ";")
4991-
4992- if text then
4993- return rt("image=" .. imgstr .. " image-align=right", " " .. text)
4994- else
4995- return rt("image=" .. imgstr .. " image-align=right", "")
4996- end
4997+function image_line(images, count, text)
4998+ -- NOCOM(GunChleoc): We are operating with hard-coded width here
4999+ local available_width = 312
5000+ local imgstr = ""
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: