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

Modders Guide to FfH2

Discussion in 'Civ4 - Fall from Heaven' started by Kael, Aug 14, 2007.

  1. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,859
    While this isn't modding Fall from Heaven, this is the best thread I could think to post this question.

    I'd like to use the minimum level requirements for units in my Star Wars mod. Aside from the XML files, what specific DLL and Python files would I need to alter to make it work.
     
  2. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    887
    No need for any python, for the DLL, CvInfos to define the new tag, CvGameTextMgr to display the info, CvUnit to handle upgrades, CvCity to block basic construction, that should be all. You can look for getMinLevel to see where it's used in the files. Beware, there may be a getMinLevel for promotions too.
     
  3. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,859
    Thanks. Aside from the UnitInfos and Schema, are there any other XML files that need edited?
     
  4. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    887
    Nope, that should be enough
     
    Dumanios likes this.
  5. Zerver

    Zerver CIV4 Unit-Maker

    Joined:
    May 24, 2007
    Messages:
    549
    Location:
    unidentified
    I'm confused. I assume that these are sort of new files previously absent in the original release.
    However what I find is big pack of python files and no XML within... What have I misunderstood?
     
  6. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    887
    no, the files are new files referenced in the source code compared to the base BtS source code. and the download is the DLL source code of the mod in C++.
     
    Last edited: Feb 11, 2017
  7. Zerver

    Zerver CIV4 Unit-Maker

    Joined:
    May 24, 2007
    Messages:
    549
    Location:
    unidentified
    Thank you!
     
  8. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,859
    So I've altered the files in the DLL. I've encountered a bit of trouble with the CvCity file (all the other ones worked just fine.)

    While I know there are some FfH-specific things that will need removed (references to settlements + gameoptions I don't plan on including), there's some other things that are puzzling me. Visual Studio is giving me trouble from CanUpgrade in the CvCity file. I've attached the altered DLL files (the rest that isn't included is currently the same as the default game). Will I have to edit some additional files to account for CanUpgrade?

    Note that the CvCity file's segment I took from FfH's code is unaltered, even still including the obvious stuff. That's just because I'm worried that I'd end up removing something I do need.
     

    Attached Files:

  9. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    887
    what is the error you get exactly ? C does have good error messages ^^
     
  10. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,859
    Spoiler :

    1>CvCity.cpp(1714): error C2065: 'GAMEOPTION_AI_NO_MINIMUM_LEVEL' : undeclared identifier
    1>CvCity.cpp(1719): error C3861: 'isSettlement': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1723): error C3861: 'canUpgrade': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1726): error C2039: 'canUpgrade' : is not a member of 'CvCity'
    1> c:\Users\Luke\Documents\My Games\Beyond the Sword\MODS\Star Wars\CvGameCoreDLL\CvCity.h(17) : see declaration of 'CvCity'
    1>CvCity.cpp(1729): error C2270: 'canUpgrade' : modifiers not allowed on nonmember functions
    1>CvCity.cpp(1729): error C2365: 'canUpgrade' : redefinition; previous definition was a 'formerly unknown identifier'
    1>CvCity.cpp(1737): error C2673: 'canUpgrade' : global functions do not have 'this' pointers
    1>CvCity.cpp(1754): error C2228: left of '.canTrain' must have class/struct/union type
    1>CvCity.cpp(1754): error C3861: 'getOwnerINLINE': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1764): error C2679: binary '!=' : no operator found which takes a right-hand operand of type 'UnitTypes' (or there is no acceptable conversion)
    1>CvCity.cpp(1764): error C2039: 'isNeverObsolete' : is not a member of 'CvUnitInfo'
    1> c:\Users\Luke\Documents\My Games\Beyond the Sword\MODS\Star Wars\CvGameCoreDLL\CvInfos.h(798) : see declaration of 'CvUnitInfo'
    1>CvCity.cpp(1761): error C3861: 'allUpgradesAvailable': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1773): error C2227: left of '->canTrain' must point to class/struct/union
    1> type is ''unknown-type''
    1>CvCity.cpp(1773): error C3861: 'plot': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1779): error C2039: 'getPrereqCiv' : is not a member of 'CvUnitInfo'
    1> c:\Users\Luke\Documents\My Games\Beyond the Sword\MODS\Star Wars\CvGameCoreDLL\CvInfos.h(798) : see declaration of 'CvUnitInfo'
    1>CvCity.cpp(1781): error C2039: 'getPrereqCiv' : is not a member of 'CvUnitInfo'
    1> c:\Users\Luke\Documents\My Games\Beyond the Sword\MODS\Star Wars\CvGameCoreDLL\CvInfos.h(798) : see declaration of 'CvUnitInfo'
    1>CvCity.cpp(1781): error C3861: 'getCivilizationType': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1786): error C2065: 'GAMEOPTION_NO_SETTLERS' : undeclared identifier
    1>CvCity.cpp(1796): error C2228: left of '.getCivilizationType' must have class/struct/union type
    1>CvCity.cpp(1796): error C2228: left of '.getCivilizationUnits' must have class/struct/union type
    1>CvCity.cpp(1796): error C3861: 'getOwnerINLINE': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1804): error C2039: 'getUpgradeCiv' : is not a member of 'CvUnitInfo'
    1> c:\Users\Luke\Documents\My Games\Beyond the Sword\MODS\Star Wars\CvGameCoreDLL\CvInfos.h(798) : see declaration of 'CvUnitInfo'
    1>CvCity.cpp(1806): error C2228: left of '.getCivilizationUnits' must have class/struct/union type
    1>CvCity.cpp(1807): error C2228: left of '.getCivilizationType' must have class/struct/union type
    1>CvCity.cpp(1807): error C2228: left of '.getCivilizationUnits' must have class/struct/union type
    1>CvCity.cpp(1806): error C3861: 'getCivilizationType': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1807): error C3861: 'getOwnerINLINE': identifier not found, even with argument-dependent lookup
    1>CvCity.cpp(1814): error C2039: 'getUpgradeCiv' : is not a member of 'CvUnitInfo'
    1> c:\Users\Luke\Documents\My Games\Beyond the Sword\MODS\Star Wars\CvGameCoreDLL\CvInfos.h(798) : see declaration of 'CvUnitInfo'
    1>CvCity.cpp(1814): error C2228: left of '.getCivilizationUnits' must have class/struct/union type
    1>CvCity.cpp(1824): error C2673: 'canUpgrade' : global functions do not have 'this' pointers
    1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Civ4SDK\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
    1> Stop.
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5): error MSB3073: The command "set TARGET=Debug
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5): error MSB3073: nmake clean /NOLOGO
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5): error MSB3073: nmake source_list /NOLOGO
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5): error MSB3073: nmake fastdep /NOLOGO
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(43,5): error MSB3073: nmake dll /NOLOGO" exited with code 2.


    Like I said, this does still include all the stuff that's definitely going (references to gameoptions + settlements).
     
  11. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    887
    well, it's very simple, there's no canUpgrade in CvCity in the default dll. you can declare it in Cvcity.h .
     

Share This Page