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

Commanders v. 0.1

Discussion in 'Civ4 - Mod Components' started by killmeplease, Jan 31, 2010.

  1. Jennvare

    Jennvare Chieftain

    Joined:
    Jan 10, 2010
    Messages:
    371
    If I remember right, Orbis was also a modmod for FfH2. If the 3K mod's hero system belonged anywhere else, it would here. The heroes for FfH2 should have been more involved that just as one-unit wonders.

    As for Orbis, I hope you do well with it. The AI seemed way too easy to beat and seemed to declare war even when they didnt have the units to really wage it. Think had to do with the combined power of all their armies, but hundreds of strength 3 archers wont do much against an SoD of str 8 items with siege equipment and spells.

    I'll keep an eye out for it and good luck!
     
  2. Jennvare

    Jennvare Chieftain

    Joined:
    Jan 10, 2010
    Messages:
    371
    Kill,

    Have you had a chance to check it out and see if you can work something similar?
     
  3. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    i havent checked it yet
    but i have to say i wont work on modding anything in the near future
    too busy with other things :(
     
  4. stolenrays

    stolenrays Chieftain

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  5. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    You are referring to the distance which commanders can influence units? If so, it is Line 9832 in CvUnit.cpp in the modcomp.

    Code:
    if (pCommander->controlPointsLeft() <= 0 || iDistance > pCommander->commandRange()) 
    
    The second half of that OR statement checks the command range.
     
  6. stolenrays

    stolenrays Chieftain

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  7. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    That's not how it works, you won't find it because that doesn't exist.

    What happens is when a unit checks its first strikes, combat strength, etc, it is interrupted and calls getCommander(). If there is a commander nearby, the nearest commanders additional first strikes, or combat strength, or whatever, is added to the units own, then the value is returned.

    I imagine Great Commanders was written that way to be fully compatible with Better AI or any mod that changes how combat might work. It doesn't have to rewrite the combat code this way.
     
  8. stolenrays

    stolenrays Chieftain

    Joined:
    Aug 2, 2009
    Messages:
    2,061

Share This Page