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

Proposed by hessenfarmer
Status: Merged
Merged at revision: 8735
Proposed branch: lp:~widelands-dev/widelands/empire04_bugfix
Merge into: lp:widelands
Diff against target: 242 lines (+107/-27)
8 files modified
data/campaigns/emp04.wmf/player_names (+2/-2)
data/campaigns/emp04.wmf/scripting/helper_functions.lua (+1/-1)
data/campaigns/emp04.wmf/scripting/init.lua (+1/-0)
data/campaigns/emp04.wmf/scripting/mission_thread.lua (+21/-22)
data/campaigns/emp04.wmf/scripting/starting_conditions.lua (+19/-2)
data/campaigns/emp04.wmf/scripting/tribes/init.lua (+6/-0)
data/campaigns/emp04.wmf/scripting/tribes/temple_of_vesta.lua (+30/-0)
data/campaigns/emp04.wmf/scripting/tribes/vesta_helptexts.lua (+27/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/empire04_bugfix
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+347308@code.launchpad.net

Commit message

fixes bug #1770901
removed sentry
added Temple of vesta (warehouse with HQ properties)
set AI of P3 (julia/vesta) to "empty"

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

Continuous integration builds have changed state:

Travis build 3573. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/386821126.
Appveyor build 3376. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_empire04_bugfix-3376.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

I have done a playtest going the cooperative route. All worked well. No more yellow people going around roadsystem as it was before and the temple fitted well into the economy. No other problems detected. If someone would like to test the non cooperative route (i.e. attacking the temple) that would be appreciated.

Revision history for this message
GunChleoc (gunchleoc) wrote :

1 nit, not tested

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3579. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/387947458.
Appveyor build 3382. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_empire04_bugfix-3382.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3610. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/391986964.
Appveyor build 3412. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_empire04_bugfix-3412.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Can't do any testing for the next 2 weeks.
I don't like to approve my own work.
But from my perspective this is mature to be merged

Revision history for this message
ypopezios (ypopezios) wrote :

I tested it (both paths) and I found it to be a mature improvement. A few points:

- I would like a tiny battle to take place, instead of conquering through a mere touch.

- The following comment doesn't reflect what actually happens:

"remove all workers from p3 to avoid having them wandering around"

They still wander around. That's not too bad, but their number should be smaller.

- I would like the curse to target a different type of building each time.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

hm when I tested the cooperative way I had maximum 1 or 2 workers going around after the buildings switched sides to blue. When it is conquered there should actually be a lot of them as intended. This happens normally if you conquer/destroy a warehouse doesn't it. are you sure there are much of them in the cooperative scenario?

about the battle this would be possible how much soldiers should be garrisoned in the monastery? 2 maybe 3? Remember we removed the sentry also for having a more peaceful look of the monastery.

The curse is targeting different buildings. It determines the type of building the player has most of and takes one of them.

thanks for testing

Revision history for this message
ypopezios (ypopezios) wrote :

My bad. I thought that the code-comment was for both paths. There is no crowd in the cooperative way.

So my own comment was about the conquering. I would expect less people in a monastery, especially if some of them get killed during the attack. Or you could make it so as most of them to be female workers. As about the number of defenders, I think 3 is fine.

Concerning the curse, normally the player will rebuild the lost building. But then the same building gets targeted, so it gets boring after the first time. Maybe after each fire you could remove the chosen building-type from the list.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Okay I will add 3 soldiers to the temple of vesta to give a little fight.

probably I could implement mor randomness in the curse as well.

Its difficult to mreduce the workers though cause carriers are recruited automatically in a warehouse. Perhaps I can try to fiddle with target economy settings to reduce this number but I am not sure.

Anyhow this will have to wait for at least 2 weeks as I am on holiday for this period with no access to my computer.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Let's have it now - the additional fix ideas can always be implemented in a follow-up branch.

Thanks for testing! :)

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/campaigns/emp04.wmf/player_names'
2--- data/campaigns/emp04.wmf/player_names 2018-01-10 21:08:05 +0000
3+++ data/campaigns/emp04.wmf/player_names 2018-06-13 21:24:10 +0000
4@@ -12,11 +12,11 @@
5 [player_2]
6 name="Runeth"
7 tribe="barbarians"
8-ai=
9+ai="normal"
10 closeable="false"
11
12 [player_3]
13 name="Vesta"
14 tribe="empire"
15-ai=
16+ai="empty"
17 closeable="false"
18
19=== modified file 'data/campaigns/emp04.wmf/scripting/helper_functions.lua'
20--- data/campaigns/emp04.wmf/scripting/helper_functions.lua 2017-12-27 15:19:45 +0000
21+++ data/campaigns/emp04.wmf/scripting/helper_functions.lua 2018-06-13 21:24:10 +0000
22@@ -28,7 +28,7 @@
23 for x=32, 90 do
24 for y=20, 175 do
25 local field = map:get_field(x,y)
26- if field.owner == p2 and p1:sees_field(field) then
27+ if field.owner == p2 and p1:sees_field(field) then
28 return field
29 end
30 end
31
32=== modified file 'data/campaigns/emp04.wmf/scripting/init.lua'
33--- data/campaigns/emp04.wmf/scripting/init.lua 2018-05-15 04:52:49 +0000
34+++ data/campaigns/emp04.wmf/scripting/init.lua 2018-06-13 21:24:10 +0000
35@@ -20,3 +20,4 @@
36 map = wl.Game().map
37 mv = wl.ui.MapView()
38 sf = map.player_slots[1].starting_field
39+
40
41=== modified file 'data/campaigns/emp04.wmf/scripting/mission_thread.lua'
42--- data/campaigns/emp04.wmf/scripting/mission_thread.lua 2017-12-24 16:09:44 +0000
43+++ data/campaigns/emp04.wmf/scripting/mission_thread.lua 2018-06-13 21:24:10 +0000
44@@ -24,6 +24,7 @@
45 p1:allow_buildings("all")
46 p1:forbid_buildings{"empire_farm", "empire_mill", "empire_brewery", "empire_trainingcamp", "empire_colosseum"}
47 o.done = true
48+
49 campaign_message_box(amalea_3)
50 run(clear_roads)
51 run(quarries_lumberjacks)
52@@ -395,21 +396,6 @@
53 sleep(2500)
54 end
55
56- local field_well = map:get_field(17, 182)
57- place_building_in_region(p3, "empire_well", {field_well})
58-
59- local field_brewery = map:get_field(19, 183)
60- place_building_in_region(p3, "empire_brewery", {field_brewery})
61-
62- local fiel_mill = map:get_field(18, 184)
63- place_building_in_region(p3, "empire_mill", {fiel_mill})
64-
65- local field_warehouse = map:get_field(21, 186)
66- place_building_in_region(p3, "empire_warehouse", {field_warehouse}, {workers = {empire_carrier = 0, empire_recruit = 0}})
67-
68- local field_sentry = map:get_field(19, 185)
69- place_building_in_region(p3, "empire_sentry", {field_sentry}, {soldiers = {[{0,0,0,0}] = 1}})
70-
71 o.done = true
72 sleep(4000)
73
74@@ -425,7 +411,7 @@
75 scroll_to_map_pixel(prior_center)
76
77 local hq = p1:get_buildings("empire_headquarters")
78- local wh = p3:get_buildings("empire_warehouse")
79+ local wh = p3:get_buildings("empire_temple_of_vesta")
80 while not ((hq[1]:get_wares("wheat") > 34 and hq[1]:get_wares("wine") > 14) or p3.defeated) do sleep(4000) end
81 if p3.defeated then
82 o1.done = true
83@@ -446,17 +432,30 @@
84 p1:allow_buildings{"empire_mill", "empire_brewery"}
85 campaign_message_box(julia_1)
86
87- -- replace Julias buildings with similar ones of the player
88+ --remove all workers from p3 to avoid having them wandering around
89+ field_brewery.immovable:set_workers("empire_brewer", 0)
90+ field_mill.immovable:set_workers("empire_miller", 0)
91+ wh[1]:set_workers("empire_carrier", 0)
92+ wh[1]:set_workers("empire_recruit", 0)
93+ field_well.immovable:set_workers("empire_carrier", 0)
94+ r1:set_workers("empire_carrier", 0)
95+ r2:set_workers("empire_carrier", 0)
96+ r3:set_workers("empire_carrier", 0)
97+ r4:set_workers("empire_carrier", 0)
98+ --replace Julias buildings with similar ones of the player
99 field_well.immovable:remove()
100 field_brewery.immovable:remove()
101- fiel_mill.immovable:remove()
102+ field_mill.immovable:remove()
103 field_warehouse.immovable:remove()
104- field_sentry.immovable:remove()
105 place_building_in_region(p1, "empire_well", {field_well})
106 place_building_in_region(p1, "empire_brewery", {field_brewery})
107- place_building_in_region(p1, "empire_mill", {fiel_mill})
108- place_building_in_region(p1, "empire_warehouse", {field_warehouse}, {wares = {water = 30, flour = 30, beer = 40,}})
109- place_building_in_region(p1, "empire_sentry", {field_sentry})
110+ place_building_in_region(p1, "empire_mill", {field_mill})
111+ place_building_in_region(p1, "empire_temple_of_vesta", {field_warehouse}, {wares = {water = 30, flour = 30, beer = 40,}})
112+ connected_road(p1, field_warehouse.immovable.flag, "l, tl", true)
113+ connected_road(p1, field_mill.immovable.flag, "tr, r", true)
114+ connected_road(p1, field_mill.immovable.flag, "l, tl, tr", true)
115+ connected_road(p1, field_mill.immovable.flag, "br, r", true)
116+
117
118 campaign_message_box(amalea_12)
119 campaign_message_box(saledus_3)
120
121=== modified file 'data/campaigns/emp04.wmf/scripting/starting_conditions.lua'
122--- data/campaigns/emp04.wmf/scripting/starting_conditions.lua 2017-12-18 06:26:49 +0000
123+++ data/campaigns/emp04.wmf/scripting/starting_conditions.lua 2018-06-13 21:24:10 +0000
124@@ -1,10 +1,27 @@
125 -- =======================================================================
126 -- Player 3
127 -- =======================================================================
128--- Player 3 (Vesta) will be introduced to the game when discovered
129--- So, for the beginning we forbid everything and do not place any buildings
130+-- AI for P3 is set to "empty" therefore we place the buildings and the roads and let the economy flow a bit
131+field_well = map:get_field(17, 182)
132+place_building_in_region(p3, "empire_well", {field_well})
133+
134+field_brewery = map:get_field(19, 183)
135+place_building_in_region(p3, "empire_brewery", {field_brewery})
136+
137+field_mill = map:get_field(18, 184)
138+place_building_in_region(p3, "empire_mill", {field_mill})
139+
140+field_warehouse = map:get_field(21, 186)
141+place_building_in_region(p3, "empire_temple_of_vesta", {field_warehouse}, {workers = {empire_carrier = 0, empire_recruit = 0}, wares = {wheat = 200}})
142+
143+ r1 = p3:place_road(field_warehouse.immovable.flag, "l", "tl", true)
144+ r2 = p3:place_road(field_mill.immovable.flag, "tr", "r", true)
145+ r3 = p3:place_road(field_mill.immovable.flag, "l", "tl", "tr", true)
146+ r4 = p3:place_road(field_mill.immovable.flag, "br", "r", true)
147
148 p3:forbid_buildings("all")
149+local eco = field_warehouse.brn.immovable.economy
150+eco:set_ware_target_quantity("beer", 180)
151
152 -- =======================================================================
153 -- Player 1
154
155=== modified file 'data/campaigns/emp04.wmf/scripting/tribes/init.lua'
156--- data/campaigns/emp04.wmf/scripting/tribes/init.lua 2017-12-17 13:25:46 +0000
157+++ data/campaigns/emp04.wmf/scripting/tribes/init.lua 2018-06-13 21:24:10 +0000
158@@ -18,6 +18,7 @@
159 include "map:scripting/tribes/trainingcamp1.lua"
160 include "map:scripting/tribes/well2.lua"
161 include "map:scripting/tribes/well1.lua"
162+ include "map:scripting/tribes/temple_of_vesta.lua"
163 end)
164
165 tribes:add_custom_building {
166@@ -54,3 +55,8 @@
167 tribename = "empire",
168 buildingname = "empire_well2",
169 }
170+
171+tribes:add_custom_building {
172+ tribename = "empire",
173+ buildingname = "empire_temple_of_vesta",
174+}
175\ No newline at end of file
176
177=== added file 'data/campaigns/emp04.wmf/scripting/tribes/temple_of_vesta.lua'
178--- data/campaigns/emp04.wmf/scripting/tribes/temple_of_vesta.lua 1970-01-01 00:00:00 +0000
179+++ data/campaigns/emp04.wmf/scripting/tribes/temple_of_vesta.lua 2018-06-13 21:24:10 +0000
180@@ -0,0 +1,30 @@
181+dirname = "tribes/buildings/warehouses/empire/warehouse/"
182+
183+tribes:new_warehouse_type {
184+ msgctxt = "empire_building",
185+ name = "empire_temple_of_vesta",
186+ -- TRANSLATORS: This is a building name used in lists of buildings
187+ descname = pgettext("empire_building", "Temple of Vesta"),
188+ helptext_script = "campaigns/emp04.wmf/scripting/tribes/vesta_helptexts.lua",
189+ icon = dirname .. "menu.png",
190+ size = "medium",
191+
192+ return_on_dismantle = {
193+ planks = 1,
194+ granite = 2,
195+ marble = 2,
196+ marble_column = 1
197+ },
198+
199+ animations = {
200+ idle = {
201+ pictures = path.list_files(dirname .. "idle_??.png"),
202+ hotspot = { 58, 55 },
203+ },
204+ },
205+
206+ aihints = {},
207+
208+ heal_per_second = 220,
209+ conquers = 7,
210+}
211
212=== added file 'data/campaigns/emp04.wmf/scripting/tribes/vesta_helptexts.lua'
213--- data/campaigns/emp04.wmf/scripting/tribes/vesta_helptexts.lua 1970-01-01 00:00:00 +0000
214+++ data/campaigns/emp04.wmf/scripting/tribes/vesta_helptexts.lua 2018-06-13 21:24:10 +0000
215@@ -0,0 +1,27 @@
216+-- This include can be removed when all help texts have been defined.
217+include "tribes/scripting/help/global_helptexts.lua"
218+
219+function building_helptext_lore()
220+ -- TRANSLATORS#: Lore helptext for a building
221+ return no_lore_text_yet()
222+end
223+
224+function building_helptext_lore_author()
225+ -- TRANSLATORS#: Lore author helptext for a building
226+ return no_lore_author_text_yet()
227+end
228+
229+function building_helptext_purpose()
230+ -- TRANSLATORS: Purpose helptext for a building
231+ return pgettext("building", "In the temple of Vesta, the wares to worship are stored. It is the home of the priestesses and the guards of the goddess.")
232+end
233+
234+function building_helptext_note()
235+ -- TRANSLATORS#: Note helptext for a building
236+ return ""
237+end
238+
239+function building_helptext_performance()
240+ -- TRANSLATORS#: Performance helptext for a building
241+ return ""
242+end

Subscribers

People subscribed via source and target branches

to status/vote changes: