Modders Guide to FfH2

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.
 
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.
 
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.

Thanks. Aside from the UnitInfos and Schema, are there any other XML files that need edited?
 
New Files:

CIV4SpellInfos.xml-
CIV4UnitSpellSchema.xml-
CIV4AlignmentInfos.xml-
CIV4DamageInfos.xml-

CvSpellInterface.py-
CvPediaSpell.py-

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?
 
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.
 

Attachments

  • CvGameCoreDLL.rar
    235 KB · Views: 199
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).
 
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.
 
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!
 
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.
 
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.)
 
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:
 
There is apparently an IMPROVEMENT_WATER_WORKED, that might be what you're looking for.

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>
 
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)
 
Not really sure where to post this, so i'll give this thread a try.
I really love the cast ArenaBattle spell. Has anyone incorporated into BtS? I'm not the best a coding and cant figure out what I need to do to move it over to a BtS mod.
 
Top Bottom