New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combat targets also defenseless planet if targeting planet fails #2872
Combat targets also defenseless planet if targeting planet fails #2872
Conversation
250c8b5
to
c4807de
Compare
This doesn't work. Tested as follows: Turn 20:
Turn 21:
Turn 22
|
Cant load the savefiles. I see you some state of the master plus my changes (according the entry in the savefile 2020-04-18.c4807de). I think i branched of 49d3259. I am bit surprised. mmetz only did GUI stuff changes AFAICS. Can you tell me the last commit of non-PR changes in master, i would rebase my branch there. Also I spotted the usual mistake of not making OrderedAlternativesOf toplevel. This could lead to targeting untargetable targets in the first tier in the OrderedAlternativesOf (e.g. your own ship), so not trying the second tier (so not including the defenseless planets). COMBAT_TARGETS_VISIBLE_ENEMY would then remove all that targets which are not enemy (e.g. your ship) or not visible. Also swaqs use of LastTurnColonized breaks the species/happiness parsing for me. Edit: Added a commit with OrderedAlternativesOf toplevel for mass driver - so we can check if that works |
Currently only MD for testing (Oberlus playtest feedback sais the PR is not working yet) I spotted the usual mistake of not making OrderedAlternativesOf toplevel. This could lead to targeting untargetable targets in the first tier in the OrderedAlternativesOf (e.g. your own ship), so not trying the second tier (so not including the defenseless planets). COMBAT_TARGETS_VISIBLE_ENEMY would then remove all that targets which are not enemy (e.g. your ship) or not visible.
I lack git experience for this. |
I did the following:
Seems it is fixed now. |
weekly test branch is quite sensible/stable enough it would be just good if you could mention the revision of that weekly test branch (because that is going to stay if we want to test the next week)
That actually does pull the latest master with my changes. Checking out the weekly test branch before does not have any influence.
Great, I will move all the OrderedAlternativeTo conditions to toplevel. I should really add a "filterFirst"/"checkOnly"/"common" condition attribute to OrderedAlternativeTo if I get around to it. |
I rebased to 4da892b and with that I can load your savegame. Also actually "System X" is not helpful, I guess you meant Centauri alpha. I am actually not sure that the savegame does help much, I see the behaviour i would expect without my fix (own planet gets attacked by ship). Probably the combatTarget conditions get serialized into the savegame(?). In that case I would need to build a new ship for testing. |
Before only MD for testing I spotted the usual mistake of not making OrderedAlternativesOf toplevel. This could lead to targeting untargetable targets in the first tier in the OrderedAlternativesOf (e.g. your own ship), so not trying the second tier (so not including the defenseless planets). COMBAT_TARGETS_VISIBLE_ENEMY would then remove all that targets which are not enemy (e.g. your ship) or not visible.
fe1ac38
to
c4f9839
Compare
So I did a small playtest c4f9839 which contains "Make OrderedAlternativesOf toplevel for all combatTargets." This seems to do what we want for invasion. So far so great. But it does also something more: it attacks also neutral defenseless planets (which might be what we want if that is a planet with regenerating defenses/natives). The main downside is that practically your ships do everywhere combat. |
I guess the alternative fix in #2879 (merged) is better than this one, which can be closed. |
Addresses #2488 which was not really fixed for outposts.
This thread
forum thread
Current state: should be complete, but only smoketested. I.e. somebody should playtest the effect