Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Yitzi on October 23, 2013, 10:00:08 pm

Title: A bug, and a maybe bug, when it comes to disbanding units.
Post by: Yitzi on October 23, 2013, 10:00:08 pm
As we all know, if a base isn't producing enough minerals to support its units, it will begin disbanding them, starting with those that are furthest away, until it has enough.  (Well, actually it starts with ending all mineral convoys to other bases, but once that's done it begins disbanding.)

However, there are two eccentricities:
1. If it's an AI-owned base and the unit disbanded is a colony pod (includes sea colony pods, i.e. anything that can make a base), then it treats it as though it disbanded two units for purposes of determining how many more it needs to disband.  (i.e. if it's producing 2 minerals and spending 4 on support, and the first unit it disbands is a colony pod, it'll stop there and not disband any more.)  I'm fairly sure this is a bug.
2. When determining what to disband, anything exempted due to SUPPORT rating is not disbanded, even if it's further away.  Thus, if the faction has support rating 0, and the base has three units in the field and 3 in the base itself, in that order (i.e. the first three to be build were the field units) and is producing 2 minerals, it will disband the third field unit and the third unit in the base itself.  I'm not sure if this counts as a bug, though.
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: ete on October 23, 2013, 10:17:12 pm
First seems likely to be a buff for AI who often have support problems, unless it looks like the colony pod thing is unintentional from the code? Second I'd actually think of as more likely to be a bug.
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: Yitzi on October 23, 2013, 11:39:21 pm
First seems likely to be a buff for AI who often have support problems

How would allowing them to end up with negative net minerals be a good buff?
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: ete on October 24, 2013, 12:23:36 pm
Hm, maybe I've misunderstood, but.. would the effect of that be basically: If an AI CP gets disbanded, less units need disbanding.
If yes.. that seems like an odd, but not entirely crazy, buff for AI.
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: Yitzi on October 24, 2013, 02:19:10 pm
Hm, maybe I've misunderstood, but.. would the effect of that be basically: If an AI CP gets disbanded, less units need disbanding.
If yes.. that seems like an odd, but not entirely crazy, buff for AI.

Exactly.  If the AI is supporting 4 more units than it can afford, but one of the first 3 units it disbands is a colony pod, it will only disband 3 units that turn.  (Next turn, it's still supporting more units than it can afford, so it will disband the last one...and of course either way it's not building anything.)
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: Nexii on November 14, 2013, 05:44:51 pm
#1 definately sounds like a bug as described

#2 is probably also a bug.  I would make it always based on distance.  Usually you would not want your home troops (i.e. police) getting disbanded...they are worse to lose than military far from your borders typically.  Even if maintenance scaling up with unit costs is implemented I think that would be fine.
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: ariete on December 01, 2013, 04:41:25 pm
i always try to have control of the situation under those terms. this case happen to me when a stupid AI continue to transfer troops and i can't or i have no time to relocated in other home base. i know it's not properly the answer you want receive, this is just a consideration, maybe an intelligent AI should know when stop transfer control of troops to an allied base which don't have necessary minerals support.
Title: Re: A bug, and a maybe bug, when it comes to disbanding units.
Post by: Yitzi on December 01, 2013, 04:55:34 pm
Yeah, well teaching the AI is well beyond what I'm doing at this stage.  If I come across a simple matter, that's one thing, but anything beyond that is not on the priority list.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 15.

[Show Queries]