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

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,868
    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:
    1,084
    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,868
    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:
    1,084
    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:
    1,084
    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,868
    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:
    1,084
    what is the error you get exactly ? C does have good error messages ^^
     
  10. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,868
    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:
    1,084
    well, it's very simple, there's no canUpgrade in CvCity in the default dll. you can declare it in Cvcity.h .
     
  12. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,868
    So, I've got the code partially working. Predecessor units are still buildable even with the upgrades available. I don't have the disabled building + level-blocking working yet. Maybe it's something obvious that I'm missing, but I've been looking at it quite and have no idea what to do. I've put the raw dll files on mediafire, so that someone more experienced can see what I'm missing.
     
  13. Maatissi

    Maatissi Turvenuija

    Joined:
    Oct 3, 2006
    Messages:
    143
    Location:
    Jyväskylä, Finland
    Hi everyone,

    I would like to edit worked water tiles fishing boat graphics so that it would be the Medieval Era one from the original game.

    What would be the best way to do this?

    Thanks!
     
  14. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    1,084
    well, if you're lucky, you just have to go to the fishing boat art xml (which you'll find in XML/Art/Civ4ArtDefines_Improvements.xml) and replace the info for the fishing boat in the mod by the info for the medieval fishing boat in the game.
     
  15. Maatissi

    Maatissi Turvenuija

    Joined:
    Oct 3, 2006
    Messages:
    143
    Location:
    Jyväskylä, Finland
    It refers as such:

    <NIF>Art/Structures/Improvements/Nets/Nets.nif</NIF>
    <KFM>Art/Structures/Improvements/Nets/Nets.kfm</KFM>

    However, no such files exist anywehere in the vanilla or in the BtS or in the mod...

    Might these be packed in some one grand files like in the mod Rise of Mankind?

    (Besides, for my logic it would appear the graphics for worked water tiles is elsewhere. After all, a worked water tile is NOT an "improvement" in game logic, will conduct a quick test to verify if so.)
     
  16. Maatissi

    Maatissi Turvenuija

    Joined:
    Oct 3, 2006
    Messages:
    143
    Location:
    Jyväskylä, Finland
    Confirmed that XML/Art/Civ4ArtDefines_Improvements.xml affects only the IMPROVEMENT fishing boats (on resource, built by work boat), not the graphics of a worked water tile.

    Must be somewhere in the Era defininitions or perhaps elsewhere? :confused:
     
  17. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    1,084
    There is apparently an IMPROVEMENT_WATER_WORKED, that might be what you're looking for.
     
  18. Maatissi

    Maatissi Turvenuija

    Joined:
    Oct 3, 2006
    Messages:
    143
    Location:
    Jyväskylä, Finland
    That is indeed the correct section, but it has no value to be set for how "advanced" the boats are (it seems the boats get upgraded by Era advance)

    Thus, my guess would be these following files have all the boat graphics for a worked tile, but the Era value for them must be set from some place other?

    <NIF>Art/Structures/Improvements/WaterWorked/WaterWorked.nif</NIF>
    <KFM>Art/Structures/Improvements/WaterWorked/WaterWorked.kfm</KFM>
     
  19. black_imperator

    black_imperator Chieftain

    Joined:
    Dec 4, 2005
    Messages:
    1,084
    looking at the game's files, i see that the CIV4PlotLsystem.xml is handling something similar to what you want for other improvements :

    Code:
    <LNode Name="Leaf_Water_Improvement_4x4">
            <Width>4</Width>
            <Height>4</Height>
            <Attribute Class="Scalar">bNotBFS:1</Attribute>
            <Attribute Class="RegionTest">0NW</Attribute>
            <ArtRef Name="goal:IMPROVEMENT_WHALING_BOATS">
                <Attribute Class="Improvement">IMPROVEMENT_WHALING_BOATS</Attribute>
                <Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL,ERA_RENAISSANCE</Attribute>
                <Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
                <Attribute Class="Scalar">bApplyRotation:1</Attribute>
            </ArtRef>
            <ArtRef Name="goal:IMPROVEMENT_WHALING_BOATS">
                <Attribute Class="Improvement">IMPROVEMENT_WHALING_BOATS</Attribute>
                <Attribute Class="Era">ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
                <Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
                <Attribute Class="Scalar">bApplyRotation:1</Attribute>
                <Attribute Class="Scalar">NIF:Art/Structures/Improvements/Whalingboat_Modern/WhalingBoat_Modern.nif</Attribute>
                <Attribute Class="Scalar">KFM:Art/Structures/Improvements/Whalingboat_Modern/WhalingBoat_Modern.kfm</Attribute>
            </ArtRef>
        </LNode>
    basically that means that if the ear is ancient, classical or renaissance, the whaling boats use their default version, otherwise they use the modern one defined in the file, but i don't see anything similar for IMPROVEMENT_WATER_WORKED ( it's present in the file, but no differences based on era)
     

Share This Page