1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Land carrier AI?

Discussion in 'Civ4 - SDK/Python' started by TC01, Jul 30, 2011.

  1. TC01

    TC01 Deity

    Jun 28, 2009
    Irregularly Online
    So, it's fairly common knowledge that Civ 4 lacks land transport AI. This has been discussed before, and as far as I am aware, never resolved. (There was a thread in the modcomps forum some time ago by someone who had attempted to but not succeeded in solving the problem, I think).

    However, what about land carrier AI?

    The main problem with land transport AI (as I understand it, from previous discussions) is the calculation of when it would be faster to move a unit in a transport or have that unit move overland on foot. With carrier AI, though, this problem shouldn't exist. Air units can't move over land or water like normal units, they can only rebase and be moved around by missile carriers.

    I haven't looked into this at all yet: but would it be possible to get the AI to use land units as missile transports? Would it only be a matter of editing some domain checks in unit AI for missile carriers, and not land unit transports? Or would it be more complicated? Has it already been done somewhere? (If it has, I'd prefer to know before I started messing around with the DLL).

    The reason why I'm mentioning this, by the way, is because Final Frontier has a number of units that can carry air units, and they are all land units because space terrain is "land", so the AI never uses them.
  2. ChrisAdams3997

    ChrisAdams3997 Prince

    Jun 5, 2010
    Houma, LA
    Well, Dune Wars has 'all-terrain' transports that can travel over land and 'water'(desert in DuneWars) and it works pretty well. But it's not a 'fix' that can be summed up in a few key lines of code, it's the culmination of a lot of work by multiple developers over a long period of time spread throughout the DLL code, and might not even be directly useful in the way transports and terrain is handled in Final Frontier. But at any rate, the source code is packaged with each patch, so you can download the latest (in my sig) and take a look.

    Most of the relevant changes are commented, search for 'all-terrain'.
  3. vincentz

    vincentz Programmer

    Feb 4, 2009
    It is possible to get AI to use landbased units to carry missiles. (I have a rocketvehicle in my mod)
    But, then there is the problem with the missiles. They only fire at ships. So a new AI for the missiles is needed.

Share This Page