If I change values of the gains from industry/research techs and buildings in my default/... folders, will AI take that into account or will it play considering the standard values?
I noticed that the descriptions won't change. For example, if I change Quantum Networking to give +0.2 per pop instead of +0.5, the Pedia will still tell me that it gives +0.5 (I haven't tried, I just saw that the value is literal in the stringtables instead of a variable). May I assume that AI uses values that are hardcoded in its C++ and python files and that it won't consult the focs files?
Do AIs notice changes in local default folder?
Moderator: Oberlus
Re: Do AIs notice changes in local default folder?
For the most part, right. For some things, like ship hull stats and ship part stats, the AI can do in-game queries for their values, but for the most part it works with hard-coded values.Oberlus wrote:If I change values of the gains from industry/research techs and buildings in my default/... folders, will AI take that into account or will it play considering the standard values...and that it won't consult the focs files?
To make things a bit easier on folks making customizations, we try to group all the various hardcoded stats that the AI relies on into one location -- AIDependencies.py. But that doesn't really cover everything, at least not yet.
Regarding your example, although the tech name "LRN_QUANT_NET" is specified in that file, there is no research bonus value specified for it there, because there is no place that the AI makes a calculation/decision explicitly dependent on that bonus value. There is at least one place where it makes a decision that is at least somewhat implicitly dependent on that value, which you can find by searching for that tech name. If you did make the tech a lot less valuable like in your example, without making it also a lot cheaper, then an appropriate AI adjustment would be to move the tech farther down in the AI research lists in TechListsAI.py.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Do AIs notice changes in local default folder?
Thank you very much, Dilvish. I'll find time to mess with those files and try to make things harder for/against my gameplay style.
Re: Do AIs notice changes in local default folder?
Yeah, we want/need to have the Pedia take more actual data from the FOCS files and/or have the specific numbers done as macros and have them linked from both, but it's an ongoing project and tends to happen when one of us is adjusting things anyway (or Ouaz gets a good idea on how to do it while updating a translation).Oberlus wrote: I noticed that the descriptions won't change. For example, if I change Quantum Networking to give +0.2 per pop instead of +0.5, the Pedia will still tell me that it gives +0.5 (I haven't tried, I just saw that the value is literal in the stringtables instead of a variable). May I assume that AI uses values that are hardcoded in its C++ and python files and that it won't consult the focs files?
In the meantime stringtable updates are a pain and most of us forget bits of them fairly regularly.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.