They're superfluous in the savefile; their values can be deserialized from the
existing [attacks]/[defends] tags and the new [attacks_taken]/[defends_taken]
info.
Currently, while watching a replay of Scenario N, the statistics dialog
has the following options:
- All scenarios
- S1
- S2
- ...
- SN
- SN
The last option shows the statistics of Scenario N from the beginning
through the current point in the replay. The other options show
end-of-scenario stats of each scenario and the cumulative stats of all
scenarios through the end of SN.
This patch causes the stats shown by the the second SN option to reset
to zero when the "reset replay" ("stop") button is selected.
ee50171d13 broke some codes that relied on
unique save ids, that is in particular the statistic code and
scoped_recall_unit, so now these codes fallback to the side number if
the save id is empty.
(cherry-picked from commit c79e1645c8)
Looks like un_recall_unit_cost() is used to retrieve the unit cost of the recalled unit but it also decrements the recall count, duplicating the decrement in un_recall_unit().
This is the result of running this command in directory src/
find . -type f -exec sed -i 's/\(ERR.*\)\\n\"\;/\1\" << std::endl\;/g' '{}' \;
and carefully inspecting the results.
Actually allows for the unit instance recall costs to be used. Proper
taking of the gold and undoing the cost for each unit is implemented
and works. At advancement if the unit's current recall matches their
unit_type's recall_cost then it takes the new unit_type's recall_cost
otherwise it keeps whatever value it currently has until it fails this
check. Recall costs are also now persistant and will carry over from
one scenario into the next as well.
If a cost is not set, it will continue to use the team/side/default
costs, these changes should not affect the current workings when
dealing with unaltered scenarios, and unit config files. I repeat This
will not affect or change the currently way things work UNLESS a user
alters a file or includes the new recall_cost (as in copies and
modifies a unit in the scenario unit files) for a unit instance in
their scenario file(s).