Merge lp:~widelands-dev/widelands/Economy_tutorial_fix into lp:widelands
- Economy_tutorial_fix
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 8680 |
Proposed branch: | lp:~widelands-dev/widelands/Economy_tutorial_fix |
Merge into: | lp:widelands |
Diff against target: |
296 lines (+109/-34) 2 files modified
data/campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua (+26/-6) data/campaigns/tutorial04_economy.wmf/scripting/texts.lua (+83/-28) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/Economy_tutorial_fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
hessenfarmer | Needs Resubmitting | ||
GunChleoc | Approve | ||
Review via email: mp+343770@code.launchpad.net |
Commit message
fixes Bug #1624001
explains the new enhanced encyclopedia within the economy tutorial
Description of the change
explain the additional tabs of the encyclopedia
changes the way how the set target amount for marble columns is checked
hessenfarmer (stephan-lutz) wrote : | # |
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 3402. State: passed. Details: https:/
Appveyor build 3208. State: success. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
Stared proofreading. A bit cumbersome, since I can't hack on the code directly right now :(
hessenfarmer (stephan-lutz) wrote : | # |
Read your comments so far. They will be implemented tonight. Just give me a hint when you are finished. Sorry for my grammar. I even can't set the commas in German. Regarding tone and language I tried to be in line with the rest of the tutorial. Hope it seems ´to be ok for you. Thanks for the first review
GunChleoc (gunchleoc) wrote : | # |
I have done some edits - please proofread my changes.
I also noticed that the objective titles had . at the end of them, and I fixed those too.
Merge if you're happy with my changes.
hessenfarmer (stephan-lutz) wrote : | # |
Have you checked how it looks like in the Game. Li_image with text looks only good with short texts in my eyes. If not I will test on Tuesday and merge then
GunChleoc (gunchleoc) wrote : | # |
Yes, I have tested everything in-game. Do feel free to make further changes though if you don't like the result, I can then take another look when you're happy.
Marcus Bell (marcuspbell) wrote : | # |
unsubscribe
On Sun, Apr 29, 2018 at 12:21 PM, GunChleoc <email address hidden>
wrote:
> Yes, I have tested everything in-game. Do feel free to make further
> changes though if you don't like the result, I can then take another look
> when you're happy.
> --
> https:/
> Economy_
> You are subscribed to branch lp:widelands.
>
hessenfarmer (stephan-lutz) wrote : | # |
Ok now it looks good. I am happy now. just have a look at my new code
GunChleoc (gunchleoc) wrote : | # |
Yes, that looks a lot nicer :)
@bunnybot merge
Preview Diff
1 | === modified file 'data/campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua' |
2 | --- data/campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua 2017-12-19 23:25:05 +0000 |
3 | +++ data/campaigns/tutorial04_economy.wmf/scripting/mission_thread.lua 2018-05-01 20:41:09 +0000 |
4 | @@ -41,6 +41,24 @@ |
5 | end |
6 | end |
7 | |
8 | +function encyclopedia_tutorial() |
9 | + sleep(100*1000) |
10 | + local o = message_box_objective(plr, ware_encyclopedia) -- where to get help |
11 | + while not mv.windows.encyclopedia do sleep(200) end |
12 | + set_objective_done(o, wl.Game().real_speed) |
13 | + |
14 | + o = message_box_objective(plr, explain_encyclopedia) -- what information is available |
15 | + local o2 = add_campaign_objective(reopen_encyclopedia_obj) |
16 | + o2.visible = false |
17 | + wait_for_window_and_tab_or_complain( |
18 | + "encyclopedia", |
19 | + "encyclopedia_wares", |
20 | + o2, reopen_encyclopedia |
21 | + ) |
22 | + while mv.windows.encyclopedia do sleep(200) end |
23 | + set_objective_done(o, wl.Game().real_speed) |
24 | +end |
25 | + |
26 | function burn_tavern_down() |
27 | sleep(500) |
28 | scroll_to_field(tavern_field) |
29 | @@ -86,8 +104,7 @@ |
30 | sleep(2000) |
31 | o = message_box_objective(plr, build_taverns) |
32 | |
33 | - sleep(100*1000) |
34 | - message_box_objective(plr, ware_encyclopedia) -- a small insert |
35 | + encyclopedia_tutorial() |
36 | |
37 | while #plr:get_buildings("empire_tavern") < 2 do sleep(500) end |
38 | set_objective_done(o, 0) |
39 | @@ -135,11 +152,14 @@ |
40 | message_box_objective(plr, economy_settings2) |
41 | o = message_box_objective(plr, economy_settings3) |
42 | |
43 | - while sf.immovable:get_wares("marble_column") < 12 do sleep(500) end |
44 | + local eco = sf.brn.immovable.economy |
45 | + while eco:ware_target_quantity("marble_column") ~= 20 do |
46 | + sleep(200) |
47 | + end |
48 | -- wait that the player has really changed the target quantity |
49 | - |
50 | - o.visible = false |
51 | - -- just forget about the old objective, the new one includes the old one |
52 | + set_objective_done(o) |
53 | + |
54 | + -- new objective all has to be transported to the front |
55 | o = message_box_objective(plr, warehouse_preference_settings) |
56 | |
57 | local enough_wares = false |
58 | |
59 | === modified file 'data/campaigns/tutorial04_economy.wmf/scripting/texts.lua' |
60 | --- data/campaigns/tutorial04_economy.wmf/scripting/texts.lua 2018-01-18 08:26:38 +0000 |
61 | +++ data/campaigns/tutorial04_economy.wmf/scripting/texts.lua 2018-05-01 20:41:09 +0000 |
62 | @@ -60,7 +60,7 @@ |
63 | ), |
64 | h = 350, |
65 | obj_name = "open_building_stat", |
66 | - obj_title = _"Open the building statistics window.", |
67 | + obj_title = _"Open the building statistics window", |
68 | obj_body = |
69 | li_image("images/wui/menus/menu_building_stats.png", _[[The building statistics window gives you an overview over the buildings you have.]]) .. |
70 | -- TRANSLATORS: "it" refers to the building statistics window |
71 | @@ -83,7 +83,7 @@ |
72 | 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.]]) |
73 | ), |
74 | obj_name = "check_taverns", |
75 | - obj_title = _"Look up how many taverns you have.", |
76 | + obj_title = _"Look up how many taverns you have", |
77 | obj_body = ( |
78 | li(_[[Choose the ‘Medium buildings’ tab in the building statistics window.]]) .. |
79 | li(_[[Look up how many taverns you have.]]) .. |
80 | @@ -104,7 +104,7 @@ |
81 | |
82 | reopen_building_stat_obj = { |
83 | obj_name = "open_building_stat_again", |
84 | - obj_title = _"Open the building statistics window again.", |
85 | + obj_title = _"Open the building statistics window again", |
86 | obj_body = ( |
87 | p(_[[You closed the building statistics window, although you have not yet looked up the number of taverns.]]) .. |
88 | -- TRANSLATORS: "it" refers to the building statistics window. |
89 | @@ -124,7 +124,7 @@ |
90 | ), |
91 | h = 300, |
92 | obj_name = "open_inventory", |
93 | - obj_title = _"Open your stock window.", |
94 | + obj_title = _"Open your stock window", |
95 | obj_body = ( |
96 | p(_[[The stock menu window gives you an overview over the wares you currently have.]]) .. |
97 | -- TRANSLATORS: "it" refers to the stock menu window |
98 | @@ -145,7 +145,7 @@ |
99 | h = 350, |
100 | show_instantly = true, |
101 | obj_name = "switch_stock_tab", |
102 | - obj_title = _"Switch to the third tab in the stock menu window.", |
103 | + obj_title = _"Switch to the third tab in the stock menu window", |
104 | obj_body = ( |
105 | p(_[[Have a look at the first two tabs in the stock menu window. They show all the wares and workers you have.]]) .. |
106 | li(_[[When you have seen enough, switch to the third tab.]]) |
107 | @@ -175,7 +175,7 @@ |
108 | |
109 | reopen_stock_menu_obj = { |
110 | obj_name = "open_stock_menu_again", |
111 | - obj_title = _"Open the stock window again.", |
112 | + obj_title = _"Open the stock window again", |
113 | obj_body = ( |
114 | 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.]]) .. |
115 | -- TRANSLATORS: "it" refers to the stock menu window. |
116 | @@ -194,7 +194,7 @@ |
117 | ), |
118 | h = 300, |
119 | obj_name = "build_taverns", |
120 | - obj_title = _"Build new taverns.", |
121 | + obj_title = _"Build new taverns", |
122 | obj_body = ( |
123 | p(_[[To make our mines work, we need rations again – the more, the better.]]) .. |
124 | li(_[[Build at least two taverns.]]) |
125 | @@ -202,15 +202,70 @@ |
126 | } |
127 | |
128 | ware_encyclopedia = { |
129 | - title = _"Ware Encyclopedia", |
130 | - body = ( |
131 | - p(_[[I am not sure if you could follow my remarks. Why do we need rations to get soldiers?]]) .. |
132 | - 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.]]) .. |
133 | - p(_[[This encyclopedia can be accessed via]]).. |
134 | - li_image("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.]]) .. |
135 | - 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.]]) |
136 | - ), |
137 | - h = 350 |
138 | + title = _"Encyclopedia", |
139 | + body = ( |
140 | + h1(_[[How to get help]]) .. |
141 | + p(_[[Of course, it is difficult to remember all of my remarks and advice. For example, you might ask yourself: ‘Why do we need rations to get soldiers?’]]) .. |
142 | + p(_[[When you’ve played a lot, you will know all these things by heart. But until then or if you’re unsure about your tribe’s needs and abilities and how its buildings and workers operate, you can look it up easily in our tribe-specific in-game help and encyclopedia.]]) .. |
143 | + p(_[[This encyclopedia can be accessed via the help button at the bottom right.]]).. |
144 | + li_image("images/ui_basic/menu_help.png", _[[Please open the in-game help, and I’ll explain its contents to you.]]) |
145 | + ), |
146 | + h = 350, |
147 | + show_instantly = true, |
148 | + obj_name = "open_encyclopedia", |
149 | + obj_title = _"Open the in-game help window", |
150 | + obj_body = ( |
151 | + li_image("images/ui_basic/menu_help.png", _[[The encyclopedia window contains the in-game help and an encyclopedia of the tribe you’re currently playing.]]) .. |
152 | + -- TRANSLATORS: "it" refers to the encyclopedia window |
153 | + li(_[[Open it. You can access it via the button at the bottom of the screen.]]) .. |
154 | + li_arrow(_[[Alternatively, you can access it directly with the ‘F1’ key.]]) |
155 | + ), |
156 | +} |
157 | + |
158 | +explain_encyclopedia = { |
159 | + position = "topright", |
160 | + title = _"Encyclopedia details", |
161 | + body = ( |
162 | + h1(_[[The Encyclopedia Categories]]) .. |
163 | + p(_[[The encyclopedia has five tabs:]]).. |
164 | + div("width=100%", div("float=left padding_r=14 padding_t=5",p(img("images/logos/wl-ico-32.png"))) .. p(_[[The ‘General’ tab contains information about all the basic interface controls for Widelands. Furthermore, you can find tips that are relevant for your tribe there.]])) .. |
165 | + div("width=100%", div("float=left padding_r=18 padding_t=15 padding_b=15 padding_l=4",p(img("images/wui/buildings/menu_tab_wares.png"))) .. p(_[[The ‘Wares’ tab shows information about the wares that your tribe needs, including a short help text, a list of buildings that produce each ware, the needed wares to produce it and where the ware is consumed.]])) .. |
166 | + div("width=100%", div("float=left padding_r=16",p(img("images/wui/buildings/menu_tab_workers.png"))) .. p(_[[The ‘Workers’ tab shows information about your tribe’s workers in a similar manner to the wares in the second tab.]])) .. |
167 | + div("width=100%", div("float=left padding_r=18 padding_t=5 padding_l=4",p(img("images/wui/stats/genstats_nrbuildings.png"))) .. p(_[[The ‘Buldings’ tab contains all the necessary information about the buildings of your tribe.]])) .. |
168 | + li_image("tribes/immovables/field_harvested/idle_00.png", _[[Finally, the ‘Immovables’ tab shows information about the specific immovables that your tribe’s workers can place on the map.]]) .. |
169 | + li(_[[Now use the encyclopedia to find out how to create new soldiers.]]) .. |
170 | + li_arrow(_[[A soldier needs a wooden spear and a helmet – from there on out, you can search backwards to find the wares and the buildings you need to supply your barracks where the soldier is recruited. When you are finished, just close the encyclopedia window.]]) |
171 | + ), |
172 | + h = 450, |
173 | + show_instantly = true, |
174 | + obj_name = "check_wares", |
175 | + obj_title = _"Look up which wares are needed to recruit soldiers", |
176 | + obj_body = ( |
177 | + li(_[[Choose the ‘Wares’ tab in the encyclopedia window.]]) .. |
178 | + li(_[[Look up what is needed to produce a helmet and what is needed to produce a wooden spear.]]) .. |
179 | + li_arrow(_[[If you want, you may further look up what is needed to produce the wares you just looked up.]]) .. |
180 | + li(_[[Close the encyclopedia window when you are done.]]) |
181 | + ) |
182 | +} |
183 | + |
184 | +reopen_encyclopedia = { |
185 | + title = _"You closed the encyclopedia!", |
186 | + body = ( |
187 | + p(_[[You have closed the encyclopedia window, but I didn’t notice that you were trying to find out which wares are needed to recruit a soldier. Would you please reopen it and do so?]]) |
188 | + ), |
189 | + show_instantly = true, |
190 | + w = 300, |
191 | + h = 250 |
192 | +} |
193 | + |
194 | +reopen_encyclopedia_obj = { |
195 | + obj_name = "open_encyclopedia_again", |
196 | + obj_title = _"Open the encyclopedia window again", |
197 | + obj_body = ( |
198 | + p(_[[You closed the encyclopedia window without searching for the information we need. If you already know everything, please feel free to leave this tutorial at any time.]]) .. |
199 | + li(_[[Otherwise, please reopen the encyclopedia window and choose the second tab.]]) |
200 | + ), |
201 | + h = 250 |
202 | } |
203 | |
204 | building_priority_settings = { |
205 | @@ -239,7 +294,7 @@ |
206 | w = 200, |
207 | h = 200, |
208 | obj_name = "open_ware_stat", |
209 | - obj_title = _"Open the ware statistics window.", |
210 | + obj_title = _"Open the ware statistics window", |
211 | obj_body = ( |
212 | li(_[[Open the ‘Ware statistics’ window, accessed via the statistics menu.]]) |
213 | ) |
214 | @@ -255,7 +310,7 @@ |
215 | h = 250, |
216 | show_instantly = true, |
217 | obj_name = "switch_ware_stat_tab_to_third", |
218 | - obj_title = _"Switch to the third tab in the ware statistics menu window.", |
219 | + obj_title = _"Switch to the third tab in the ware statistics menu window", |
220 | obj_body = ( |
221 | p(_[[The first two tabs show you the production and consumption of any ware. You can toggle them by simply clicking on them.]]) .. |
222 | li(_[[When you have seen enough, switch to the third tab.]]) |
223 | @@ -272,7 +327,7 @@ |
224 | h = 250, |
225 | show_instantly = true, |
226 | obj_name = "switch_ware_stat_tab_to_forth", |
227 | - obj_title = _"Switch to the last tab in the ware statistics menu window.", |
228 | + obj_title = _"Switch to the last tab in the ware statistics menu window", |
229 | obj_body = ( |
230 | p(_[[The third tab shows you the economy health of the ware. When the value is positive, this means your stock is growing.]]) .. |
231 | li(_[[When you have seen enough, switch to the fourth tab.]]) |
232 | @@ -289,7 +344,7 @@ |
233 | h = 250, |
234 | show_instantly = true, |
235 | obj_name = "close_ware_stats", |
236 | - obj_title = _"Close the ware statistics window.", |
237 | + obj_title = _"Close the ware statistics window", |
238 | obj_body = ( |
239 | p(_[[The stock tab shows you how many wares you have. Compare the information from the four tabs to understand the correlation.]]) .. |
240 | li(_[[When you have finished, close the ware statistics window.]]) |
241 | @@ -308,7 +363,7 @@ |
242 | |
243 | reopen_ware_stats1_obj = { |
244 | obj_name = "open_ware_stats_menu_again1", |
245 | - obj_title = _"Open the ware statistics window again.", |
246 | + obj_title = _"Open the ware statistics window again", |
247 | obj_body = ( |
248 | 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.]]) .. |
249 | -- TRANSLATORS: "it" refers to the ware statistics window. |
250 | @@ -328,7 +383,7 @@ |
251 | |
252 | reopen_ware_stats2_obj = { |
253 | obj_name = "open_ware_stats_menu_again2", |
254 | - obj_title = _"Open the ware statistics window again.", |
255 | + obj_title = _"Open the ware statistics window again", |
256 | obj_body = ( |
257 | 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.]]) .. |
258 | -- TRANSLATORS: "it" refers to the ware statistics window. |
259 | @@ -348,7 +403,7 @@ |
260 | ), |
261 | h = 350, |
262 | obj_name = "open_economy_settings", |
263 | - obj_title = _"Open the ‘Configure economy’ window.", |
264 | + obj_title = _"Open the ‘Configure economy’ window", |
265 | obj_body = ( |
266 | li(_[[Open the ‘Configure economy’ window.]]) .. |
267 | li_arrow(_[[The window can be accessed by clicking on any flag you own.]]) |
268 | @@ -376,7 +431,7 @@ |
269 | li(_[[Set the target quantity for marble columns to 20 and wait for your stonemason to produce them.]]) |
270 | ), |
271 | obj_name = "produce_marble_columns", |
272 | - obj_title = _"Produce 20 marble columns.", |
273 | + obj_title = _"Produce 20 marble columns", |
274 | obj_body = ( |
275 | 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.]]) .. |
276 | li(_[[To be prepared for additional fortifications, you should produce 20 marble columns.]]) .. |
277 | @@ -394,15 +449,15 @@ |
278 | p(_[[The production of marble columns is working fine now, but it would be great if they were stored where we need them.]]) .. |
279 | 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.]]) .. |
280 | 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.]]) .. |
281 | - li(_[[Bring all the marble columns to the warehouse near the front line.]]) .. |
282 | + li(_[[Bring all of the 20 marble columns to the warehouse near the front line.]]) .. |
283 | 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.]]) .. |
284 | li_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]]) |
285 | ), |
286 | obj_name = "bring_marble_columns_to_front", |
287 | - obj_title = _"Bring 20 marble columns to the front line.", |
288 | - obj_body = economy_settings3.obj_body .. ( |
289 | + obj_title = _"Bring 20 marble columns to the front line", |
290 | + obj_body = ( |
291 | p(_[[To decide where your wares get stored, you can use the preference buttons in the warehouses.]]) .. |
292 | - li(_[[Bring all the marble columns to the warehouse near the front line.]]) .. |
293 | + li(_[[Bring all of the 20 marble columns to the warehouse near the front line.]]) .. |
294 | 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.]]) .. |
295 | li_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]]) |
296 | ) |
branch is playtested
however grammar and language should be checked