Jump to content

Petra AI: How to make the AI prioritize more Docks/Shipyards/Ships on 'Naval' maps?


Recommended Posts

Is there a way to make the Petra AI prioritize building (more) Docks/Shipyards and Ships on maps keyworded as "Naval"? It already does a good job at amphibious landings, choosing islands to take over, etc. It just doesn't seem to build enough Docks (and Shipyards in DE) and Ships in general. It trains a lot of Merchant Ships, but not enough Warships to protect them, and maybe 1 or 2 fishing boats even when there is an overabundance of fish on the map. 

Are there simple values that can be tweaked in the files or will there need to be new code and logic? It's already building ships and docks (and shipyards in DE), just not enough of them to be competitive on the water. i suspect (hope) that fiddling with some numbers will do it.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
On 25/12/2023 at 9:44 PM, wowgetoffyourcellphone said:

Is there a way to make the Petra AI prioritize building (more) Docks/Shipyards and Ships on maps keyworded as "Naval"? It already does a good job at amphibious landings, choosing islands to take over, etc. It just doesn't seem to build enough Docks (and Shipyards in DE) and Ships in general. It trains a lot of Merchant Ships, but not enough Warships to protect them, and maybe 1 or 2 fishing boats even when there is an overabundance of fish on the map. 

Are there simple values that can be tweaked in the files or will there need to be new code and logic? It's already building ships and docks (and shipyards in DE), just not enough of them to be competitive on the water. i suspect (hope) that fiddling with some numbers will do it.

Fishing boats and some other parameters can be customized in the AI/Perta/config.js file

sample code
this.Economy = {
        "popPhase2": 80,    // How many units we want before aging to phase2.
        "workPhase3": 160,    // How many workers we want before aging to phase3.
        "workPhase4": 300,    // How many workers we want before aging to phase4 or higher.
        "popForDock": 25,
        "targetNumWorkers": 800,    // dummy, will be changed later
        "targetNumTraders": 40,    // Target number of traders
        "targetNumFishers": 30,    // Target number of fishers per sea
        "supportRatio": 0.35,    // fraction of support workers among the workforce
        "provisionFields": 4
    };

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...