1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Additional Unit Classes?

Discussion in 'Civ4 - Final Frontier Plus' started by PsiCorps, May 28, 2012.

  1. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,421
    Location:
    Britain
    Hi all
    At present the FFP Mod contains all of the standard FF Unit Classes. So we have the following:-
    • Planetary Defense I-III
    • Invasion Ship I-III
    • Destroyer I-III
    • Cruiser I-III
    • Battleship I-III
    • Carrier I-III
    • Scout I-III
    • Stealth Ship I-III
    • Starbase I-III
    • Missile I-III
    • Fighter I-III
    • Bomber I-III

    Is it possible to add a new Unit Class eg. Frigate I-III or alternatively can the Unit Classes already in game have their number increased eg instead of Cruiser I-III we have Cruiser I-V?

    I'm asking because I need to add some additional units for each Civ in the B5 mod but don't have enough spare Unit Classes to use.
     
  2. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    It should not be a problem.

    The only things I can think of right now that may have any complications are starbases and anything that the Python in doCityAIProduction (in CvAI.py) might be better off knowing about. For starbases, you probably just need to make sure it is set up like the other ones (especially the new tags like making sure the bStarbase tag is set to 1 plus setting the iCultureRange to 2 and maybe specifying an iUpgradePriceOverride and, if it is not a regular starbase, along the lines of the sensor station, the bOtherStation is also set to 1). For the Python AI issue, my main concern is for adding additional generations of ship classes since the current checks for fighter and bomber squadrons use only the specific generations that already exist in FFP when deciding which unit type to force a build for. It is possible that this issue is irrelevant to the B5 mod, especially since, as of v1.8, the DLL now takes more things into account (specifically, ships that can carry them that don't have the special carrier unit AI type) when determining how many squadrons to build so that particular override is not as important as it used to be.

    I'd just try adding 1 or 2 unit classes, and the associated unit types, and give it a try to rule out any immediate problems. I'd then add a couple more (making sure to include some sort of squadron and a starbase, if they are on the list of things to add) and then play a game to the point where I, and various AIs, can build all of them to make sure no Python errors pop up, and nothing odd happens.

    I do not expect any serious problems with new unit classes.
     
  3. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,421
    Location:
    Britain
    That's excellent news God-Emperor, I'll not be adding Starbases or Fighters it's purely down to the ship units themselves. I can start work on this tonight now you've clarified this for me. Thanks again.
     
  4. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    I have thought of one more thing.

    The data for the advanced unit naming feature uses the unit class, so you should probably add some entries for each unit class into the Adv Unit Naming.ini file in the UserSettings folder. One entry per unit class per era is the way that goes.
     
  5. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,421
    Location:
    Britain
    Hi God-Emperor
    Just to update you, I tried adding a new unit class but the Mod decided it didn't like that and refused to cooperate. What I did manage to do though was add additional units to the already existing classes. So Destroyer I-III is now Destroyer I-V and everything is working fine. I suspect a new unit class would need to have something added into the C++ and therefore a change to the DLL.

    Thanks again for the help.
     
  6. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    It is definitely possible to add unit classes without C++, there isn't a list of all unit class types in the DLL.

    Would you care to post your XML?
     
  7. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,421
    Location:
    Britain
    I've uploaded the latest version of the Mod where, if you DL it, you can see what I've done.

    What I wanted to do was have the planetary combat troops as a new unit class and the Battleship III & IV as a a Command Ship Class. Just trying to add one unit class caused me the problem so I tried it the way I have it in the Mod and it all works fine.
     

Share This Page