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

[SDK AI inquiry] Overland transport?

Discussion in 'Civ4 - Creation & Customization' started by Padmewan, Jul 12, 2006.

  1. Padmewan

    Padmewan King

    Joined:
    Nov 26, 2003
    Messages:
    748
    Location:
    Planet
    As we all know, the AI doesn't know how to use land transport to move, e.g., an infantry with an APC. From a quick scan of the transport AI, it seems to be hard-coded around multi-domain movement.

    So... I was wondering if anyone has a guess how hard it would be to tweak the transport AI so that a DOMAIN_LAND transport unit would know how to pick up and move a DOMAIN_IMMOBILE unit, or something like that?

    In terms of understanding the existing AI, is it accurate to say that a unit that's prevented from getting to its destination due to intervening water "calls out" for a transport?
     
  2. Chalid

    Chalid Black Dragon

    Joined:
    Nov 24, 2005
    Messages:
    1,742
    Location:
    Munich, Germany
    No it works a bit different. The Transport states that it want to transport units somewhere (MISSIONAI_ASSAULT_SEA or similar) then every AI_Attack or AI_City_Attack unit that has no more urgent tasks checks if it can board that transport. If it can it will run to the transport and board. The transport then decides where the units will be unloaded. The Land unit has no say in the matter.

    That system obviosly cannot easily be reused for landtransports.
    One thing is that your immobiles can not board a transport. Another thing is that for mobile units the waiting times might be longer than the effective transport times (when realized like for sea transports).

    I would realise it the following way:

    You would need a new Unit_AI with a pickup function that collects the Immobile units and a drop function that selects where to transport them.

    For the Immobile Unit you need a new Ai that triggers a MISSIONAI_PICKMEUP. The pickup function would then look for units with MISSIONAI_PICKMEUP and collect them.

    So it is more or less inverted to the sea transport.
     
  3. The Great Apple

    The Great Apple Big Cheese

    Joined:
    Mar 24, 2002
    Messages:
    3,361
    Location:
    Oxford, England
    I was going to have a go at making this work for the CCP. I'll move it up a bit on my todo list.
     
  4. Padmewan

    Padmewan King

    Joined:
    Nov 26, 2003
    Messages:
    748
    Location:
    Planet
    Thanks for the info Chalid. Obviously I gave it a VERY cursory scan.

    Wow... that would be really awesome!

    Of course, I don't know that such an idea is Fun :confused:
     

Share This Page