View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0021178 | AI War 2 | Bug - Gameplay | May 3, 2019 1:34 am | May 8, 2019 7:12 pm | |
Reporter | DEMOCRACY_DEMOCRACY | Assigned To | |||
Status | resolved | Resolution | fixed | ||
Product Version | BETA 0.855 Galactic Markings | ||||
Fixed in Version | BETA 0.857 The AI Strikes Back... Hard | ||||
Summary | 0021178: Units that cost metal to claim are actually are free to claim | ||||
Description | So it turns out you can claim units with a metal cost for free. on planet Zanovar, at the very top there is a neutral spire frigate. build a command station on the planet, and watch as you instantly claim it, despite not having 2 million metal. | ||||
Tags | No tags attached. | ||||
|
|
|
I confirm. Maybe lift the severity to major? |
|
Why? It's not particularly affecting gameplay negatively |
|
Because it is relevant for balancing and pacing of the game? |
|
Honestly, I think the cost to build the fleet units/turrets provide enough of a balance/pacing bump on claiming a new centerpiece. |
|
If unit should have a metal cost to claim, add it in, if not, remove the text indicating they do cost metal to claim. |
|
Well, if the people demand it, I know what the issue is but I don't know the best way to fix. GameEntity_Squad.cs - line 414: if ( TypeData.RevertsToNeutralOnDeath && PFaction.Faction.Type == FactionType.NaturalObject ) { result.HullPointsLost = result.DataForMark.HullPoints - 1; result.ShieldPointsLost = result.DataForMark.ShieldPoints; result.HasNotYetBeenFullyClaimed = true; } Arks, Golems, etc don't revert to neutral on death anymore, so their HP doesn't properly get set to 1 HP. I can't really think of a good OR statement that captures everything though, best I could come up with is ( TypeData.RevertsToNeutralOnDeath || TypeData.Tags.Contains("Capturable") ) && PFaction.Faction.Type == FactionType.NaturalObject, but I don't know if there will ever be capturable stuff that doesn't contain Capturable, and there's also probably a better way to check for this that I don't see. |
|
There's also some weirdness with the way the healing done by claiming is calculated. Right now in MetalFlowPlanning, neutral claiming always heals maxFlowRate HP/s, with a cost of maxFlowRate Metal/s, always 1:1 metal to hp cost. This means that you're almost always paying less metal than you should be, because metal costs are almost always larger than the HP of the ship. |
|
Does that explain why the first time you claim a flagship it's free? |
|
This first bit of code is what runs when running the reclaim flow planning in the core, OnClaim sets the ships so its no longer disabled. Faction.cs - Line 1357 if ( claimable.HullPointsLost <= 0 && claimable.HasNotYetBeenFullyClaimed ) claimable.OnClaim( Context ); So when the HP reaches 100%, and the ships receives a ClaimingNeutrals flow, it immediately gets claimed and can build things. You end up only paying 1 metal to claim things with 100% hp. If the metal cost (or really HP since the code is bugged) is less than 1, but yet it's still claimable, the cost gets set to 1. So the way to fix things is to fix what's not properly setting the ship's HP to 0 when it gets created. |
|
Actually, looking through the code again, the ships don't even need to have 1 metal paid. The flag HasNotYetBeenFullyClaimed never gets set to true, so really all of the ships just automatically become yours when you capture the planet. |
|
Fixed the bug with the metal cost to claim, now the only issue left is the HP not properly being set to 1. |
|
I decided on having the script check if there's a defined metal cost to claim, TypeData.MetalCostToClaim > 0. I can't test it since I get errors about something Unity related when building, but it should work. This can be marked fixed. |
Date Modified | Username | Field | Change |
---|---|---|---|
May 3, 2019 1:34 am | DEMOCRACY_DEMOCRACY | New Issue | |
May 3, 2019 1:34 am | DEMOCRACY_DEMOCRACY | File Added: free spire frigate.save | |
May 3, 2019 1:34 am | DEMOCRACY_DEMOCRACY | File Added: free spire frigate.savemet | |
May 5, 2019 6:21 pm | Bummeri | Note Added: 0051524 | |
May 5, 2019 10:14 pm | BadgerBadger | Note Added: 0051525 | |
May 6, 2019 6:37 am | Bummeri | Note Added: 0051527 | |
May 7, 2019 6:09 pm | vinco | Note Added: 0051540 | |
May 8, 2019 3:03 am | DEMOCRACY_DEMOCRACY | Note Added: 0051543 | |
May 8, 2019 6:44 am | wm46 | Note Added: 0051544 | |
May 8, 2019 6:53 am | wm46 | Note Added: 0051545 | |
May 8, 2019 10:24 am | BadgerBadger | Note Added: 0051546 | |
May 8, 2019 2:47 pm | wm46 | Note Added: 0051547 | |
May 8, 2019 3:11 pm | wm46 | Note Added: 0051548 | |
May 8, 2019 3:37 pm | wm46 | Note Added: 0051549 | |
May 8, 2019 5:59 pm | wm46 | Note Added: 0051550 | |
May 8, 2019 7:12 pm | RocketAssistedPuffin | Status | new => resolved |
May 8, 2019 7:12 pm | RocketAssistedPuffin | Resolution | open => fixed |
May 8, 2019 7:12 pm | RocketAssistedPuffin | Fixed in Version | => BETA 0.857 The AI Strikes Back... Hard |