View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0020810 | AI War 2 | Bug - Gameplay | Nov 30, 2018 5:33 pm | Apr 22, 2019 11:45 am | |
Reporter | wm46 | Assigned To | Chris_McElligottPark | ||
Status | resolved | Resolution | fixed | ||
Product Version | 0.807 Cyber Command | ||||
Fixed in Version | BETA 0.853 An Officer And A Bunch Of Fleets | ||||
Summary | 0020810: Minor Faction AIP applies to player when spawning instigators | ||||
Description | Had a game with Nanocaust present, was doing deep strikes after taking my first planet for metal generation. The first instigator base spawns and it was 4 hops away at only 30 AIP? Ended up losing just because it was the base that spawns 1 strength of guardians every 20 seconds, it spawned behind a planet with a Fortress, so by the time I got there it had over 200 guardians (and that was with me cheating and using "give metal") | ||||
Tags | No tags attached. | ||||
|
I had a large post ready to go and explain how I found things, but then I got a token error and it disappeared... The jist of the issue, the instigator base script is exclusive rather than inclusive at the minimum. Below 150 AIP it tries to search a range of [2,2], but because of the way things work out, it searches (2,2] which will never have any results. This means the script then retries with a range of (1,3], leading to an effective search range of [2,3] when below 150 AIP, a range of [4,4] from 150 to 300, and a range of [6, inf] past that. Proposed solution, subtract 1 from the min range before feeding it to the XHopsFromPlanet method: if(minHopsFromHumanPlanet > 1) { //this planet must not be too close to a player planet bool foundPlayerPlanetWithinMinHops = false; planet.DoForPlanetsWithinXHops( Context, minHopsFromHumanPlanet - 1, delegate (Planet otherPlanet, int distance ) { if(otherPlanet.GetControllingFaction().Type == FactionType.Player) foundPlayerPlanetWithinMinHops = true; return DelReturn.Continue; } ); if(foundPlayerPlanetWithinMinHops) continue; You should also change the criteria for checking the minimum hops from "MinHops > 0" to "MinHops > 1", because every planet is at least 1 hop away from another planet. |
|
I want to bump this, as its still a problem in the new version. The fix should still work |
|
I would submit this as a commit to the repository, but I realized that in the current game version you are checking (2,3], meaning you always place the instigator base 3 hops away. Is this intended? |
|
I don't think that's intended, and please feel free to commit the fix. :) |
|
Done, revision 0005170 |
|
* Instigator bases should now seed at more appropriate distances from you. ** Thanks to WeaponMaster for finding and fixing, and reporting. Thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
Nov 30, 2018 5:33 pm | wm46 | New Issue | |
Dec 3, 2018 10:54 am | Michael | Assigned To | => Chris_McElligottPark |
Dec 3, 2018 10:54 am | Michael | Status | new => acknowledged |
Mar 22, 2019 6:24 am | wm46 | Note Added: 0051033 | |
Apr 20, 2019 10:20 pm | wm46 | Note Added: 0051250 | |
Apr 21, 2019 10:05 pm | wm46 | Note Added: 0051255 | |
Apr 22, 2019 9:24 am | Chris_McElligottPark | Note Added: 0051260 | |
Apr 22, 2019 11:33 am | wm46 | Note Added: 0051272 | |
Apr 22, 2019 11:45 am | Chris_McElligottPark | Status | acknowledged => resolved |
Apr 22, 2019 11:45 am | Chris_McElligottPark | Resolution | open => fixed |
Apr 22, 2019 11:45 am | Chris_McElligottPark | Fixed in Version | => BETA 0.853 An Officer And A Bunch Of Fleets |
Apr 22, 2019 11:45 am | Chris_McElligottPark | Note Added: 0051275 |