Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#4384 closed defect (fixed)

[PATCH] How to survive defeat (post mortem building capturing)

Reported by: elexis Owned by:
Priority: Must Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by elexis)

In this alpha 21 replay, the teal player cocacola has resigned, yet had buildings with 50% < x < 100% capture points remaining afterwards.

Same in green: #4491

Attachments (5)

a21_replay.zip (508.1 KB ) - added by elexis 7 years ago.
Thanks siole and mapkoc for reporting and uploading.
screenshot2050.jpg (278.5 KB ) - added by elexis 7 years ago.
screenshot2052.jpg (261.4 KB ) - added by elexis 7 years ago.
commands.txt (21.7 KB ) - added by elexis 7 years ago.
Minimal r19041 replay
remove_caputre_points_of_defeated_players_v1.patch (5.7 KB ) - added by elexis 7 years ago.

Download all attachments as: .zip

Change History (20)

by elexis, 7 years ago

Attachment: a21_replay.zip added

Thanks siole and mapkoc for reporting and uploading.

by elexis, 7 years ago

Attachment: screenshot2050.jpg added

by elexis, 7 years ago

Attachment: screenshot2052.jpg added

comment:1 by elexis, 7 years ago

Milestone: BacklogAlpha 22
Summary: Player still owns buildings after defeatHow to survive defeat (post mortem building capturing)

Observation:

  • cocacola (teal, player 5) is the one owning buildings after defeat
  • palank (purple, player 6), grugnas (blue, player 7), jeanclaude (green, player 8) are allies of cocacola
  • grugnas resigns turn 8221 (1h 8min 30s). The range manager returns the following list of entities to be converted to gaia:
    428, 8311, 8376, 8565, 8566, 8567, 8607, 8623, 8624, 8711, 8714, 8740, 8805, 8853, 8854, 8855, 8856, 8857, 8893, 8950, 8951, 8996, 9060, 9063, 9065, 9070, 9078, 9081, 9083, 9292, 9347, 9417, 9438, 9441, 9467, 9468, 9469, 9491, 9520, 9523, 9545, 9659, 9685, 9686, 9695, 9702, 9707, 9708, 9709, 9710, 9711, 9856, 9857, 9858, 9859, 9860, 9865, 9952, 10002, 10003, 10005, 10006, 10095, 10202, 10203, 10204, 10205, 10206, 10565, 10576, 10577, 10578, 10579, 10580, 10598, 10816, 10817, 10865, 10999, 11142, 11160, 11173, 11185, 11260, 11276, 11312, 11388, 11389, 11391, 11392, 11393, 11394, 11395, 11396, 11433, 11556, 11569, 11592, 11593, 11603, 11658, 11712, 11714, 11851, 11899, 12208, 12272, 12603, 12639, 12925, 13107, 13418, 13430, 13431, 13432, 13448, 13449, 13453, 13454, 13467, 13940, 14249, 14545, 14706, 14707, 14708, 14709, 14769, 15056, 15222, 15223, 15224, 15225, 15226, 15227, 15228, 15229, 15230, 15231, 15456, 16336, 16370, 16450, 16530, 16700, 17349, 17357, 17358, 17359, 17361, 17362, 17363, 17365, 17366, 17565, 17718, 18031, 18618, 18619, 18620, 18621, 18622, 18857, 19111, 19113, 19114, 19270, 19271, 19272, 19273, 19500, 19631, 20008, 20009, 20010, 20011, 20012, 20450, 20542, 20543, 20544, 20545, 20643, 20644, 20645, 20646, 21178, 22313, 22590, 22591, 22592, 22593, 22597, 22598, 22599, 22600, 22644, 22645, 22646, 22647, 23362, 24423, 24695, 26619, 26620, 26621, 26622, 28053, 28942, 29920, 29986, 31443, 32691, 33565, 33774, 33775, 33776, 33777, 33778, 33779, 33780, 33781, 33933, 33934, 33935, 33936, 34209, 34616, 34622, 34624, 34626, 34629, 34693, 34749, 34752, 34753, 34792, 35056, 35175, 35176, 35177, 35178, 35186, 35187, 35188, 35189, 35191, 35203, 35204, 35205, 35206, 35475, 35476, 35477, 35478, 35622, 35623, 35624, 35625, 35626, 35627, 35628, 35629, 35644, 35646, 35708, 35887, 36012, 36013, 36014, 36015, 36193, 36220, 36221, 36222, 36223, 36323, 36324, 36325, 36326, 36404, 37409, 37414, 37415, 37416, 37471, 37472, 37473, 37474, 37475, 37476, 37477, 37478, 37479, 37480, 37481, 37482, 37483, 37484, 37485, 37486, 37487, 37488, 37489, 37490, 37491, 37492, 37493, 37494, 37495, 37496, 37497, 37498, 37499, 37500, 37501, 37502, 37503, 37504, 37505, 37506, 37508, 37509, 37510, 37511, 37514, 37515, 37516, 37517, 37518, 37519, 37520, 37521, 37522, 37523, 37524, 37525, 37526, 37527, 37528, 37529, 37531, 37532, 37533, 37534, 37535, 37536, 37537, 37538, 37539, 37540, 37541, 37542, 37544, 37545, 37546, 37547, 37548, 37549, 37550, 37551, 37552, 37553, 37554, 37555, 37556, 37557, 37558, 37559, 37569, 37570, 37571, 37572, 37573, 37574, 37575, 37576, 37577, 37578, 37579, 37580, 37581, 37582, 37583, 37584, 37586, 37587, 37588, 37589, 37590, 37591, 37592, 37593, 37594, 37595, 37596, 37597, 37598, 37599, 37600, 37601, 37602, 37603, 37604, 37605, 37606, 37607, 37608, 37609, 37610, 37611, 37612, 37613, 37615, 37616, 37617, 37618, 37619, 37620, 37621, 37622, 37624, 37625, 37626, 37627, 37640, 37641, 37642, 37643, 38126, 38127, 38128, 38129, 38288, 38351, 38352, 38353, 38354, 38390, 38391, 38392, 38393, 38395, 38396, 38397, 38398, 38413, 38414, 38415, 38416, 38455, 38456, 38457, 38458, 38464, 38531, 38532, 38533, 38534, 38540, 38541, 38542, 38543, 38566, 38569, 38572, 38575, 38595, 38596, 38597, 38598
    
  • palank resigns turn 8225 (1h 8min 33s) with entities
    382, 384, 385, 8098, 8127, 8128, 8129, 8130, 8131, 8157, 8259, 8262, 8279, 8286, 8323, 8537, 8596, 8605, 8608, 8735, 8789, 8867, 8984, 8988, 8994, 9011, 9014, 9024, 9061, 9186, 9393, 9405, 9426, 9427, 9431, 9533, 9590, 9788, 9951, 10244, 10271, 10272, 10349, 10383, 10549, 10566, 10667, 10831, 10962, 11213, 11287, 11309, 11310, 11311, 11316, 11323, 11326, 11362, 11367, 11604, 11825, 11931, 12439, 12440, 12489, 12490, 12561, 12562, 12563, 12564, 12572, 12573, 12574, 12576, 12577, 12578, 12579, 12622, 12623, 12628, 12629, 12630, 12631, 12650, 12651, 12652, 12653, 12654, 12655, 12656, 12657, 12662, 12665, 12679, 12681, 12682, 12683, 12687, 12689, 12692, 12693, 12694, 12695, 12696, 12697, 12706, 12707, 12710, 12711, 14975, 15649, 15650, 15651, 15652, 18649, 19735, 19736, 19737, 19738, 22422, 22423, 22424, 22425, 22844, 22845, 22988, 22989, 23111, 23112, 23423, 23424, 23425, 23426, 25322, 25324, 26091, 26092, 26097, 26098, 26099, 26100, 26124, 26125, 26126, 26127, 26240, 26241, 26242, 26243, 26289, 26290, 26576, 26577, 26578, 26579, 30612, 30613, 30614, 30615, 33566, 33567, 33568, 33569, 33762, 33763, 33822, 33834, 33843, 33845, 33849, 34147, 34148, 34287, 34288, 34290, 34291, 34292, 34293, 34295, 35495, 35496, 35497, 35498, 35640, 35641, 35649, 35650, 35651, 35652, 35653, 35654, 35655, 35656, 35659, 35660, 35664, 35665, 35666, 35667, 35668, 35669, 35674, 35675, 35727, 35728, 35732, 35733, 35736, 35737, 35751, 35752, 35753, 35754, 35755, 35756, 35774, 35775, 35776, 35777, 36016, 36017, 36376, 36435, 36436, 36525, 36526, 36588, 36589, 36800, 36801, 36888, 36889, 36943, 36944, 37054, 37055, 37126, 37127, 37151, 37211, 37326, 37339, 37340, 37341, 37342, 37343, 37897, 37898, 37899, 37900, 38086, 38087, 38306, 38307, 38308, 38309, 38312, 38358, 38359, 38360
    
  • In the replay we see that the buildings built by Grugnas that became gaia now receive capture points from cocacola (territory influence), for example the mauryan blacksmith (entity 12272), but also the mauryan tower, market, houses, storehouses and other ungarrisoned buildings in the territory of jean-claude (cocacola's fortress has a stronger territory influence than the jean-claudes civic center, despite the territory being colored green)
  • cocacola resigns turn 8261 (1h 8min 50s) with entities
    336, 337, 340, 8098, 8117, 8162, 8164, 8188, 8267, 8275, 8279, 8311, 8387, 8389, 8537, 8596, 8667, 8735, 8736, 8745, 8759, 8768, 8773, 8781, 8845, 8881, 8897, 8956, 9024, 9025, 9026, 9027, 9061, 9172, 9186, 9196, 9283, 9310, 9515, 9590, 9714, 9715, 9716, 9717, 9769, 9788, 10383, 10549, 10564, 10667, 10776, 10864, 10900, 10962, 11086, 11094, 11172, 11288, 11330, 11407, 11408, 11440, 11465, 11507, 12273, 12658, 12659, 12684, 12685, 12690, 12691, 12698, 12699, 12700, 12701, 12703, 12704, 12712, 12713, 12714, 12715, 12716, 12717, 12718, 12719, 12921, 13557, 13752, 13790, 13958, 14259, 14740, 14798, 15141, 15384, 15578, 15624, 15625, 15626, 15627, 17718, 18857, 19744, 20231, 22850, 22851, 22852, 22853, 22932, 22933, 22934, 22935, 22940, 22941, 22942, 22943, 22976, 22977, 22978, 22979, 23006, 23007, 23008, 23009, 23014, 23015, 23016, 23017, 23028, 23029, 23030, 23031, 23032, 23033, 23038, 23039, 23047, 23048, 23049, 23050, 23068, 23069, 23070, 23071, 23073, 23074, 23075, 23076, 23085, 23086, 23087, 23088, 23089, 23090, 23091, 23092, 23097, 23098, 23099, 23100, 23103, 23104, 23105, 23106, 23114, 23115, 23117, 23118, 23119, 23120, 23121, 23122, 23132, 23133, 23138, 23139, 23140, 23141, 23142, 23143, 23144, 23145, 23146, 23147, 23148, 23149, 23150, 23151, 23152, 23153, 23166, 23167, 23168, 23169, 23170, 23171, 23172, 23173, 23217, 23218, 23219, 23220, 23221, 23222, 23223, 23224, 23229, 23230, 23231, 23232, 23241, 23242, 23243, 23244, 23253, 23254, 23255, 23256, 23257, 23258, 23259, 23260, 23300, 23301, 23302, 23303, 28373, 28374, 28480, 30884, 33234, 33235, 33236, 33237, 33238, 33239, 33240, 33241, 33242, 33243, 35730, 35731, 35958, 35959, 35960, 35961, 36232, 36235, 36268, 36269, 36271, 36272, 36273, 36274, 36275, 36277, 36895, 36896, 36897, 36898, 36976, 37212, 37213, 37214, 37215, 37326, 37746, 37827, 37874, 38213, 38399, 38400, 38401, 38476, 38477, 38478, 38479, 38480, 38481, 38482, 38483, 38484, 38485, 38486, 38487, 38488, 38489, 38490, 38492, 38493, 38494, 38495, 38805, 38806, 38807, 38808
    
  • The blacksmith does not appear in the list returned by the rangemanager (since it is owned by gaia). cocacola still has capture points everywhere.
  • We see the capture points of cocacola on these gaia buildings that reside in the green players territory increasing up to the point where the defeated player captured them post mortem. The barracks can be used to train units, the blacksmith and tower can research techs (according to the GUI), the population count says 0/10 due to the houses.

http://trac.wildfiregames.com/raw-attachment/ticket/4384/screenshot2050.jpg

http://trac.wildfiregames.com/raw-attachment/ticket/4384/screenshot2052.jpg

comment:2 by elexis, 7 years ago

Reproduce:

  1. Find a gaia building, for example when a player has lost a civic center, no defeat needed.
  2. Capture the building partially (so that you don't own it) and have the majority of capture points.
  3. Resign or become defeated.
  4. Have an ally adding territory influence (or regular capture points with units?) to that building.
  5. Once the building has 100% capture points of that team, it will switch the owner to the one with the most capture points, which can be the defeated player with some good timing.

by elexis, 7 years ago

Attachment: commands.txt added

Minimal r19041 replay

comment:3 by elexis, 7 years ago

Territory influence is not needed. As the GUI assumes observermode, the selection panels are disabled. So someone who would want to abuse this would have to modify the GUI or use the developer "control-all-units" cheat to circumvent. Other than that, units can still be trained, so defeated players can still defeat others.

To fix the bug, we not only need to change ownership of the player's buildings, but also remove capture points of other entities on defeat.

comment:4 by elexis, 7 years ago

Keywords: patch rfc added
Summary: How to survive defeat (post mortem building capturing)[PATCH] How to survive defeat (post mortem building capturing)

Suspecting that the CheckTimer call is unneeded.

in reply to:  4 comment:5 by bb, 7 years ago

Replying to elexis:

Suspecting that the CheckTimer call is unneeded.

The CheckTimer call can be useful when the entity in under capture or something, So I wouldn't remove it as a it won't hurt anywhere.

With this patch we create some duplicate code: the lines in RemovePlayer or doing the same as some in OnOwnershipChange, would be nice to merge those.

Also I am not entirely liking the loop over all players: can we call some RangeManager.GetEntitiesByMask() for !player? or use RemovePlayer for all capturable entities (so the capture component will trigger onOwnershipChange messages when we have a player's entity) and do direct ownership change for player's uncapturable units?

comment:6 by fatherbushido, 7 years ago

That seems better than listening to MT_PlayerDefeated message in Capturable component. (it's just to follow the ticket, I will look at it later :p)

comment:8 by elexis, 7 years ago

Description: modified (diff)

comment:9 by elexis, 7 years ago

Milestone: Alpha 22Work In Progress

Moving to the Work In Progress milestone, since there is a patch asking for feedback, but since it is not strictly bound to a specific release.

comment:10 by elexis, 7 years ago

Description: modified (diff)
Milestone: Work In ProgressAlpha 22

comment:11 by fatherbushido, 7 years ago

Looking at it again, I would just listen to MT_PlayerDefeated (which is not a message sent a lot of times).

comment:12 by elexis, 7 years ago

Milestone: Alpha 22Work In Progress

comment:13 by mimo, 6 years ago

Milestone: Work In ProgressAlpha 23

See #5115 for an a23 way to reproduce the problem.

comment:14 by mimo, 6 years ago

See phab:D1444 for a patch, inspired by the one given here, but using PlayerDefeated messages instead.

Last edited 6 years ago by mimo (previous) (diff)

comment:15 by mimo, 6 years ago

Keywords: patch rfc removed
Resolution: fixed
Status: newclosed
Last edited 6 years ago by mimo (previous) (diff)
Note: See TracTickets for help on using tickets.