View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0019482 | AI War 2 | Bug - Gameplay | Mar 12, 2018 9:47 pm | Mar 14, 2018 4:58 pm | |
Reporter | elcommendante | Assigned To | BadgerBadger | ||
Status | closed | Resolution | fixed | ||
Product Version | 0.710 | ||||
Fixed in Version | 0.712 | ||||
Summary | 0019482: Zombified ships fight the allied Dyson Sphere ships | ||||
Description | Shouldn't the two fleets recognize each other as "the friend of a friend is my friend" and not fight, thereby sapping allied resources? | ||||
Tags | No tags attached. | ||||
related to | 0019481 | closed | Michael | Zombified ships don't fight the Warden Fleet |
related to | 0019483 | resolved | keith.lamothe | Zombified AI command 1) should it exist, and 2) is still generating non-zombified AI ships |
related to | 0019491 | resolved | keith.lamothe | Zombified AI - a neverending story |
|
This is also currently an issue for HRF (the Human Resistance Forces will fight allied Dyson Sphere ships). I think we need a function like AllyMyFactionToThisFaction(Faction alliedFaction) { iterate over all factions. For each faction, if it is Friendly to alliedFaction then make sure you are friendly to it and it is friendly to you } Chris/Keith, if you agree then you can throw this bug at me. |
|
Added to Trello card for 19481 |
|
I agree with that fix, however my only caveat is that we need to be really careful with iterations and the expense that comes with it. So basically if this is called frequently (such as during targeting logic), it's going to potentially cause this to loop millions of times per second. In that sort of case, we'd instead need to have a bool[] FactionsIAmIndirectlyFriendsWith that we simply update once per frame or similar, and then it can just index into that. Something along those lines. But if the calls to this are infrequent-enough, then an iteration is fine as well as simpler. |
|
Scratch that. Keith notes: Transforming allegiance into a calculated property should not be necessary, and it will likely lead to inconsistent behavior down the road, because then the gamestate will have at least two conflicting answers to the question "am I allied with faction X?" There are two main things that need to happen: 1) The faction implementation's SetStartingFactionRelationships logic needs to be correct for the initial state of the game. - I'm guessing this is already true, from what I'm hearing. 2) For factions that need to function as "ally to allies of my ally", etc, in that faction implementation's DoPerSimStepLogic (or potentially DoPerSecondLogic) it should check the relationship between its "parent" faction and each other faction, and if necessary update its allegiance via MakeFriendlyTo/MakeHostileTo/MakeNeutralTo . With those two things, the normal allegiance checks will return the correct results. |
|
Yeah, what I was proposing was Keith's option number 2. Won't be done any more often than DoPerSecond |
|
Any chance you have a save game for this, elcommendante? I have a fix but I'd like to check for sure |
|
Should be in one of the prior issues I filed a day or two ago. May be on .710 so you'll need to convert. Let me know if you find it. |
|
Shuold be fixed in .712 |
Date Modified | Username | Field | Change |
---|---|---|---|
Mar 12, 2018 9:47 pm | elcommendante | New Issue | |
Mar 12, 2018 9:50 pm | BadgerBadger | Note Added: 0047131 | |
Mar 13, 2018 11:27 am | Michael | Relationship added | related to 0019481 |
Mar 13, 2018 11:28 am | Michael | Assigned To | => keith.lamothe |
Mar 13, 2018 11:28 am | Michael | Status | new => assigned |
Mar 13, 2018 11:28 am | Michael | Note Added: 0047145 | |
Mar 13, 2018 11:30 am | Michael | Relationship added | related to 0019483 |
Mar 14, 2018 10:19 am | Michael | Relationship added | related to 0019491 |
Mar 14, 2018 12:42 pm | Chris_McElligottPark | Assigned To | keith.lamothe => BadgerBadger |
Mar 14, 2018 12:44 pm | Chris_McElligottPark | Note Added: 0047163 | |
Mar 14, 2018 12:55 pm | Chris_McElligottPark | Note Added: 0047164 | |
Mar 14, 2018 1:42 pm | BadgerBadger | Note Added: 0047165 | |
Mar 14, 2018 3:10 pm | BadgerBadger | Note Added: 0047172 | |
Mar 14, 2018 3:11 pm | elcommendante | Note Added: 0047173 | |
Mar 14, 2018 4:58 pm | BadgerBadger | Status | assigned => closed |
Mar 14, 2018 4:58 pm | BadgerBadger | Resolution | open => fixed |
Mar 14, 2018 4:58 pm | BadgerBadger | Fixed in Version | => 0.712 |
Mar 14, 2018 4:58 pm | BadgerBadger | Note Added: 0047178 |