View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0019522 | AI War 2 | Gameplay Issue | Mar 21, 2018 10:51 pm | Jun 28, 2018 5:48 pm | |
Reporter | ZeusAlmighty | Assigned To | BadgerBadger | ||
Status | resolved | Resolution | fixed | ||
Product Version | 0.715 | ||||
Summary | 0019522: Units won't go to (right) planet using galaxy map | ||||
Description | Units are either not responding to orders vis a vis galaxy map or going to an entirely wrong planet--this isn't because they are pathing through a different route Moreover, units that are sent using the galaxy map should have a highlighted route so it's obvious where they are going and how they are getting there | ||||
Tags | No tags attached. | ||||
related to | 0019413 | resolved | keith.lamothe | Galaxy map move commands don't path through AI Planets |
|
Added link to this case to the Trello card for 19413 |
|
The code for highlighting a units route on the galaxy map exists. Sometimes the route finding code does not seem to work right. |
|
Seems like sometimes we aren't clearing the previous selection somehow. I select units on planet A. Then I go to planet B and select those units. Then I try to issue a move command for the units on B to go to A and it fails saying "Can't find a path from A to A" |
|
So here's what I think is happening. When the player issues a move command via the galaxy map, it does the following: Choose a single random entity from the currently selected units: List<Planet> planetsWithSelection = new List<Planet>(); Engine_AIW2.Instance.DoForSelected( SelectionCommandScope.AllPlanets, delegate ( GameEntity selected ) { if(!planetsWithSelection.Contains(selected.Planet)) planetsWithSelection.Add(selected.Planet); entity = selected; return DelReturn.Break; } ); if ( entity == null ) break; Then it finds the path for that unit, then uses that path for the move command for every unit in the selection. The problem is if you have units on multiple planets, sometimes the generated commands aren't meaningful. Also if the randomly chosen unit happens to already be at the planet then nothing will happen when the move command is issued (even if other units are on another planet and could take a move order). Naturally this only happens when your fleet gets spread out, and generally when there's a crisis battle going on and you need to send reinforcements desperately. Proposed fix: instead of just generating a single Path and a single CoreFunction.SetWormholePath Command, instead loop over every unit in the Selection to figure out how many different planets they are on. Generate paths for each planet, then issue a series of GameCommands for each Planet with units in the selection on it. If this sounds good to Keith then he can assign it to me to wrangle if he desires. |
|
I have fixed the bug I mentioned above. It is possible there are other issues in this area, so please try it again in .716 and let us know if it's still being confusing. |
Date Modified | Username | Field | Change |
---|---|---|---|
Mar 21, 2018 10:51 pm | ZeusAlmighty | New Issue | |
Mar 21, 2018 11:21 pm | BadgerBadger | Relationship added | related to 0019413 |
Mar 21, 2018 11:38 pm | ZeusAlmighty | Category | Gameplay Idea => Gameplay Issue |
Mar 22, 2018 8:47 am | Chris_McElligottPark | Assigned To | => keith.lamothe |
Mar 22, 2018 8:47 am | Chris_McElligottPark | Status | new => assigned |
Mar 22, 2018 11:48 am | Michael | Note Added: 0047267 | |
Mar 22, 2018 1:22 pm | BadgerBadger | Note Added: 0047268 | |
Mar 23, 2018 5:46 pm | BadgerBadger | Note Added: 0047280 | |
Mar 23, 2018 10:08 pm | BadgerBadger | Note Added: 0047290 | |
Mar 23, 2018 10:13 pm | BadgerBadger | Note Edited: 0047290 | |
Mar 23, 2018 11:14 pm | BadgerBadger | Status | assigned => feedback |
Mar 23, 2018 11:14 pm | BadgerBadger | Note Added: 0047292 | |
Jun 28, 2018 5:48 pm | Chris_McElligottPark | Assigned To | keith.lamothe => BadgerBadger |
Jun 28, 2018 5:48 pm | Chris_McElligottPark | Status | feedback => resolved |
Jun 28, 2018 5:48 pm | Chris_McElligottPark | Resolution | open => fixed |