Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Yitzi on April 22, 2013, 10:04:21 PM

Title: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Yitzi on April 22, 2013, 10:04:21 PM
It determines something (I'm not sure what) based on a number of factors, including the year, whether the faction it's looking at (probably to attack) has any major atrocities, and whether said faction has used any tectonic missiles (which act like major atrocities for purposes of ecodamage).  It doesn't count how many, just +1 to the score if there are any atrocities, and +1 if there are any tectonic missiles.  What this means is that having used one Planet Buster and one tectonic missile is treated more harshly than 100 Planet Busters or 100 tectonic missiles.

The question is: Is this a bug and I can get rid of it and just count once for both, or do I need to keep it in some way?
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Buster's Uncle on April 22, 2013, 10:28:47 PM
Is that how you intended the last sentence of the first paragraph to be phrased, or am I missing something?
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Yitzi on April 22, 2013, 10:39:05 PM
Is that how you intended the last sentence of the first paragraph to be phrased, or am I missing something?

I think so.  Basically:

-If you used planet busters, that's 1 mark of "treat this harshly".  If you used tectonic missiles, it's another.  But it doesn't matter how many of each you used; only how many of the two types.  So one of each is worth 2 "points", whereas 100 of one type is worth only one.
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Nexii on April 22, 2013, 10:54:15 PM
Seems like a bug.  Though logically it wouldn't be just a 'yes/no' flag, but rather increment by 1 for each Planet Buster and Tectonic
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Buster's Uncle on April 22, 2013, 10:58:09 PM
Ah.  Now I get it.

No, that doesn't make sense; sloppy design at the very best.
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: gwillybj on April 22, 2013, 11:07:33 PM
It depends on what is being determined by the outcome of the question.
If it is a yes-or-no situation, such as whether or not to react a certain way at all (raise sea level?, attack or don't attack?), it seems right to get one point for having used any number of PB and another for TM. If it is a more complex question, such as how much to react (raise sea level by how much?, send how many attackers?), it should need to count each use and scale the response accordingly.
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Yitzi on April 22, 2013, 11:40:03 PM
It depends on what is being determined by the outcome of the question.
If it is a yes-or-no situation, such as whether or not to react a certain way at all (raise sea level?, attack or don't attack?), it seems right to get one point for having used any number of PB and another for TM.

I don't see why...if it doesn't matter how many PB or TM you used, it seems it also shouldn't matter whether they were all of the same type or not.

In any case, it is unit-specific, i.e. each unit looks at it individually, and I think it's to determine the unit's actions.  However, I think it does it based on a "find a value for each action and then pick the highest one" method, and this is part of finding the value for certain actions.
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Yitzi on April 23, 2013, 12:06:16 AM
Seems like a bug.  Though logically it wouldn't be just a 'yes/no' flag, but rather increment by 1 for each Planet Buster and Tectonic

Considering that the absolute maximum is 6, that's way too much.  (Some of the other variables that affect it are: +1 if the year is at least 45, another +1 if it's at least year 90, +1 more (+3 total) for year 170 or later, year 250 raises it to 4, and year 330 raises it to its maximum of 6.  Another +1 if it had a monolith upgrade, so I think the year+upgrade is to determine its lifecycle level.  Then another +1 if the unit in question is locusts, and some more that I haven't identified.)

So I think it's something like: If you've used Planet busters, native life gets a virtual +1 lifecycle when determining aggressiveness, and if you've used tectonic missiles it gets another +1.  What I'd like to change this to is "if you are getting any bonus ecodamage from missiles/atrocities*, they get a virtual +1."

*I'm making an option that fungal pops, instead of increasing clean minerals, create "forgiveness" for past missiles/atrocities.
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Guv’ner on May 19, 2013, 05:21:41 PM
Could the effect be life cycle of spawned life forms, or life cycle of fungal bloom spawned life forms?
Title: Re: Something I noticed in a bit of code (I think it's part of AI for native life)
Post by: Yitzi on May 19, 2013, 08:30:20 PM
I don't think so, as the same segment has a piece "if it's a fungal tower, ignore the above and instead spawn fungus", suggesting that it's a question of what it does on its turn.
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: 16.

[Show Queries]