Author Topic: Something I noticed in a bit of code (I think it's part of AI for native life)  (Read 2398 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

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?

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49272
  • €442
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Is that how you intended the last sentence of the first paragraph to be phrased, or am I missing something?

Offline Yitzi

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.

Offline Nexii

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

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49272
  • €442
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Ah.  Now I get it.

No, that doesn't make sense; sloppy design at the very best.

Offline gwillybj

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.
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline Yitzi

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.
« Last Edit: April 23, 2013, 12:00:55 AM by Yitzi »

Offline Yitzi

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.

Offline Guv’ner

Could the effect be life cycle of spawned life forms, or life cycle of fungal bloom spawned life forms?

Offline Yitzi

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.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

The popular stereotype of the researcher is that of a skeptic and a pessimist. Nothing could be further from the truth! Scientists must be optimists at heart, in order to block out the incessant chorus of those who say: It cannot be done.
~Academician Prokhor Zakharov @ University Commencement

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 41.

[Show Queries]