1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

A doubt about paratroopers.

Discussion in 'Civ4 - Road to War' started by msvargas, Jun 21, 2008.

  1. msvargas

    msvargas Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    5
    Hi guys!

    In the EXCELLENT "Road to War" scenario the paratroopers can drop and attack in the same turn... how do you do this? I look over the XML but the only difference I noticed is the two points in movement, which does not make the service (I have tried it).

    I am using the last patch in the "Beyond the Sword".

    Thanks in advance.
     
  2. sangeli

    sangeli Major General

    Joined:
    Jan 2, 2008
    Messages:
    170
    Location:
    Los Angeles
    I believe what you're looking for is in the promotions xml file, because you can only move after landing with that promotion (don't remember the name though). However, that itself could be an SDK change, but i doubt it.
     
  3. msvargas

    msvargas Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    5
    Hum... It is true Sangeli, thanks. I have forgotten it. But in this case, what I need to do to put this promotion in other MOD? I am trying to put it only for the paratrooper in the NEXT WAR MOD. I know how to make a promotion exclusive and free for a unit but I do not know how to "copy and paste" the promotion from ROAD TO WAR to NEXT WAR.
     
  4. sangeli

    sangeli Major General

    Joined:
    Jan 2, 2008
    Messages:
    170
    Location:
    Los Angeles
    Well, its not that difficult. I recommend just trying it yourself and seeing what works and what doesn't. XML is not very hard to learn and I think you'll find if you just experiment around a little you should have no trouble. And by the way, you can just copy and paste but make sure the art tags and stuff are correct.
     
  5. msvargas

    msvargas Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    5
    Thanks again Sangeli. I am reading some tutorials right now. Anyway, it seems that there is something more than the promotion itself. I will put here the "how to" if I get this.

    Have anyone another clue?
     
  6. sangeli

    sangeli Major General

    Joined:
    Jan 2, 2008
    Messages:
    170
    Location:
    Los Angeles
    I think I know what it is :). It is the promotion, but the promotion itself is defined by the SDK. I looked around awhile in the SDK, becuase I was curious myself, and found the answer. Dale didn't make it any easier by naming the paratroop promotion 54 (lol I don't know why) but whatever. In the CvUnit.cpp file you should notice

    if (!isHasPromotion((PromotionTypes)54))
    {
    setMadeAttack(true);
    finishMoves();
    }

    Basically meaning that if a paratrooper unit has already paradropped and it doesn't have the promotion, it can't move. My guess is that the original SDK, that is before Dale changed it, didn't put the if before the code thus meaning that after paradropping, all units run out of moves. If you want to know how to actually implement this into the mod, you need to go into the SDK files and edit them. At a glance (that is by searching all the files for the number 54 and finding the relevent code) he only changed two things, the code in bool Cv:: paradrop (the space isn't actually there because if I don' put it :p happens) and something in CvGameTextMgr, which isn't essential to change, plus the XML files, which i'm sure you know how to change.

    Note: make sure when you're adding the promotion to the units to add the promotion in the elements list!!!
     
  7. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    The 54 refers to the promotion index of PARADROP in the promotions xml file.

    Basically it means it is the 54th promotion in the file. :)

    Because you can't declare PROMOTION_PARADROP in the CvEnums file you need to refer to its index location.
     
  8. sangeli

    sangeli Major General

    Joined:
    Jan 2, 2008
    Messages:
    170
    Location:
    Los Angeles
    Ok that makes sense.
     
  9. msvargas

    msvargas Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    5
    Hum... it sounds quite simple... but I know it is not... which means you are a good guy :clap: Sangeli

    I think that now I can manage the rest of things (at least I hope it so).

    Thanks Sangeli and Dale.
     
  10. sangeli

    sangeli Major General

    Joined:
    Jan 2, 2008
    Messages:
    170
    Location:
    Los Angeles
    It is actually simple. All you need to do is replace this:

    changeMoves(GC.getMOVE_DENOMINATOR() / 2);
    setMadeAttack(true);

    with:

    if (!isHasPromotion((PromotionTypes)54))
    {
    setMadeAttack(true);
    finishMoves();
    }

    in the CvUnit.cpp under CvUnit::paradrop and add the promotion in the promotioninfo xml file. The promotion is actually the 55th, not 54th promotion, because in strings and arrays the first element is actually 0, the second is 1 etc. So, to make it easy, In the SDK I'd change the 54 to a 0 and then, in the xml file, make it the first promotion.

    Thank you msvargas, for brining up the topic paratroopers. If you had not brought it up, my mod wouldn't have worked because I didn't realize that paradrop had to be the 55th promotion, and in my modification of Dale's mod I added two promotions at the top :)
     

Share This Page