Page 1 of 1

adding the fleet upkeep multiplier to colony pod parts

Posted: Wed Aug 09, 2017 9:43 pm
by Dilvish
redacted since my original post was too much the product of a misunderstanding and therefor distracting/unhelpful.

Re: adding the fleet upkeep multiplier to colony pod parts

Posted: Wed Aug 09, 2017 10:17 pm
by Geoff the Medio
FLEET_UPKEEP_MULTIPLICATOR and SHIP_PART_COST_MULTIPLIER are not the same thing. The latter is only affected by the ship part cost scaling game rule.

Re: adding the fleet upkeep multiplier to colony pod parts

Posted: Thu Aug 10, 2017 12:47 am
by Dilvish
Ah, OK, I guess that was a bad inference on my part. I do think we should still plan to (at least at some point) add AI support for such potential gameplay variances, and in my response on your PR I mentioned a bit more of an idea on how to help organize tracking such tasks.

Re: adding the fleet upkeep multiplier to colony pod parts

Posted: Thu Aug 10, 2017 8:38 am
by Geoff the Medio
Does the AI already consider the costs of parts / hulls / designs when choosing what to produce? If so, it's already somewhat considering the changes introduces by a rule tweak...

Re: adding the fleet upkeep multiplier to colony pod parts

Posted: Thu Aug 10, 2017 11:10 am
by Dilvish
The AI does check actual ship cost at specific locations In the most directly production-related code, when it is trying to decide things like "what is my best bang-for-buck ship design for role Y", or "what's the best location for me to build a ship for role Y". So for those no special adjustment is needed for the scaled cost rule you describe (though its my recollection that for assessing the cost efficiency of a number of types of ships like warships, where we might build a lot of them, that the efficiency calc works with an adjusted cost that has an additional adjustment based on the current upkeep rate).

There are some other places, though, where it is dealing with more general decisions (and perhaps also partly as a holdover from when the players couldn't even build outpost pods at the outset), that it uses generalized costs. Like when the AI is trying to decide its overall priority for building outposts/colonies and assessing estimated outpost cost relative to total PP available, it uses a general calculation based on base cost and upkeep info from AIDependencies.py, or when setting a minimum colony valuation to consider for possible outposting or colonization I think it is currently using a hardcoded floor that was once loosely derived from the respective pod cost. That's what comes to mind at the moment, anyway. I suppose those cases could be swapped to a dynamic calculation without being aware of the game rule by either averaging across all possible build locs or else choosing a sample location (and probably having a default value as a safety backup).

Re: adding the fleet upkeep multiplier to colony pod parts

Posted: Thu Aug 10, 2017 11:45 am
by Geoff the Medio
The game rules should be exposed to the Python API...