Modders Guide to FfH2

I'm making a total conversion modmod of FFH and I have a couple questions:
1. When I check FFH with civchecker, I get a bunch of missing art. I've included it below. It appears that at least some are in art defines that are no longer used (can they be deleted safely?) but there are so many things mentioned in python that I can't be sure. Which brings me to my next question...
Spoiler :
MissingArt: Art/Interface/Buttons/Buildings/Councilofesus.dds
Used: roa art/civ4artdefines_building.xml at line 297
MissingArt: Art/Interface/Buttons/Buildings/Wyrmhold.dds
Used: roa art/civ4artdefines_building.xml at line 347
MissingArt: Art/Interface/Buttons/Buildings/City.dds
Used: roa art/civ4artdefines_building.xml at line 437
MissingArt: Art/Interface/Buttons/Buildings/Settlement.dds
Used: roa art/civ4artdefines_building.xml at line 447
MissingArt: Art/Interface/Buttons/Buildings/Theaterofdreams.dds
Used: roa art/civ4artdefines_building.xml at line 547
MissingArt: Art/Interface/Buttons/Buildings/Guardstation.dds
Used: roa art/civ4artdefines_building.xml at line 847
MissingArt: Art/structures/buildings/Yggdrasil/HimalayanPine_Alpine.nif
Used: roa art/civ4artdefines_building.xml at line 1015
MissingArt: Art/Interface/Buttons/Buildings/Yggdrasil.dds
Used: roa art/civ4artdefines_building.xml at line 1017
MissingArt: Art/Interface/Buttons/Improvements/Smoke.dds
Used: roa art/civ4artdefines_improvement.xml at line 673
MissingArt: Art/Units/Selection Effect/Selection_Above.nif
Used: roa art/civ4artdefines_misc.xml at line 146
MissingArt: Art/Units/Selection Effect/Selection_Above.kfm
Used: roa art/civ4artdefines_misc.xml at line 147
MissingArt: Art/Units/Flag/Mediallion.nif
Used: roa art/civ4artdefines_misc.xml at line 153
MissingArt: Art/Interface/Buttons/Units/Copper Golem.dds
Used: roa art/civ4artdefines_unit.xml at line 4865
MissingArt: Art/Units/CopperGolem/Swordsman.nif
Used: roa art/civ4artdefines_unit.xml at line 4870
MissingArt: Art/Units/CopperGolem/Swordsman_FX.nif
Used: roa art/civ4artdefines_unit.xml at line 4872
MissingArt: Art/Units/Summons/Griffon/Illusion/griffon.nif
Used: roa art/civ4artdefines_unit.xml at line 6944
MissingArt: Art/Units/Civs/Grigori/Phalanx/spear.nif
Used: roa art/civ4artdefines_unit.xml at line 11078
MissingArt: Art/Units/Civs/Grigori/Phalanx/spear_fx.nif
Used: roa art/civ4artdefines_unit.xml at line 11080
MissingArt: Art/Units/Civs/Ljosalfar/Phalanx/Pikeman.nif
Used: roa art/civ4artdefines_unit.xml at line 11243
MissingArt: Art/Units/Civs/Ljosalfar/Phalanx/Pikeman_FX.nif
Used: roa art/civ4artdefines_unit.xml at line 11245
MissingArt: Art/Interface\Buttons\BaseTerrain\Marsh.dds
Used: roa terrain/civ4terraininfos.xml at line 520
MissingArt: Art/Interface\Buttons\WorldBuilder\Terrain_Peak.dds
Used: roa terrain/civ4terraininfos.xml at line 1867

2. There are a LOT of python references. Any recommendations on the best way to remove them? At this point my thoughts are to comment most everything out (except stuff like return statements) but I'm fearful I'll break something.
3. Any recommendation on an image to use for Ceridwen? Yeah, this is a total conversion mod, but she appears as a leader anyways. This might be more appropriate for the lore forum though...
 
I'm making a total conversion modmod of FFH and I have a couple questions:
1. When I check FFH with civchecker, I get a bunch of missing art. I've included it below. It appears that at least some are in art defines that are no longer used (can they be deleted safely?) but there are so many things mentioned in python that I can't be sure.

No idea about the art. Can you give an example of what sort of python errors are showing up?
 
Does anyone know what file the code is in that controls display of the player's mana on the left side of the screen?

Part of it at least is in the main interface python file. There's a couple on lines that allow particular bonuses to be shown, that includes all the mana.
 
Does anyone know what file the code is in that controls display of the player's mana on the left side of the screen?

Should be in CvMainInterface.py; I can't give you specific functions though, don't have FfH installed to check and that file is a bit different in RifE.
 
I'm making a total conversion modmod of FFH and I have a couple questions:
1. When I check FFH with civchecker, I get a bunch of missing art. I've included it below. It appears that at least some are in art defines that are no longer used (can they be deleted safely?) but there are so many things mentioned in python that I can't be sure. Which brings me to my next question...
Spoiler :
MissingArt: Art/Interface/Buttons/Buildings/Councilofesus.dds
Used: roa art/civ4artdefines_building.xml at line 297
MissingArt: Art/Interface/Buttons/Buildings/Wyrmhold.dds
Used: roa art/civ4artdefines_building.xml at line 347
MissingArt: Art/Interface/Buttons/Buildings/City.dds
Used: roa art/civ4artdefines_building.xml at line 437
MissingArt: Art/Interface/Buttons/Buildings/Settlement.dds
Used: roa art/civ4artdefines_building.xml at line 447
MissingArt: Art/Interface/Buttons/Buildings/Theaterofdreams.dds
Used: roa art/civ4artdefines_building.xml at line 547
MissingArt: Art/Interface/Buttons/Buildings/Guardstation.dds
Used: roa art/civ4artdefines_building.xml at line 847
MissingArt: Art/structures/buildings/Yggdrasil/HimalayanPine_Alpine.nif
Used: roa art/civ4artdefines_building.xml at line 1015
MissingArt: Art/Interface/Buttons/Buildings/Yggdrasil.dds
Used: roa art/civ4artdefines_building.xml at line 1017
MissingArt: Art/Interface/Buttons/Improvements/Smoke.dds
Used: roa art/civ4artdefines_improvement.xml at line 673
MissingArt: Art/Units/Selection Effect/Selection_Above.nif
Used: roa art/civ4artdefines_misc.xml at line 146
MissingArt: Art/Units/Selection Effect/Selection_Above.kfm
Used: roa art/civ4artdefines_misc.xml at line 147
MissingArt: Art/Units/Flag/Mediallion.nif
Used: roa art/civ4artdefines_misc.xml at line 153
MissingArt: Art/Interface/Buttons/Units/Copper Golem.dds
Used: roa art/civ4artdefines_unit.xml at line 4865
MissingArt: Art/Units/CopperGolem/Swordsman.nif
Used: roa art/civ4artdefines_unit.xml at line 4870
MissingArt: Art/Units/CopperGolem/Swordsman_FX.nif
Used: roa art/civ4artdefines_unit.xml at line 4872
MissingArt: Art/Units/Summons/Griffon/Illusion/griffon.nif
Used: roa art/civ4artdefines_unit.xml at line 6944
MissingArt: Art/Units/Civs/Grigori/Phalanx/spear.nif
Used: roa art/civ4artdefines_unit.xml at line 11078
MissingArt: Art/Units/Civs/Grigori/Phalanx/spear_fx.nif
Used: roa art/civ4artdefines_unit.xml at line 11080
MissingArt: Art/Units/Civs/Ljosalfar/Phalanx/Pikeman.nif
Used: roa art/civ4artdefines_unit.xml at line 11243
MissingArt: Art/Units/Civs/Ljosalfar/Phalanx/Pikeman_FX.nif
Used: roa art/civ4artdefines_unit.xml at line 11245
MissingArt: Art/Interface\Buttons\BaseTerrain\Marsh.dds
Used: roa terrain/civ4terraininfos.xml at line 520
MissingArt: Art/Interface\Buttons\WorldBuilder\Terrain_Peak.dds
Used: roa terrain/civ4terraininfos.xml at line 1867

2. There are a LOT of python references. Any recommendations on the best way to remove them? At this point my thoughts are to comment most everything out (except stuff like return statements) but I'm fearful I'll break something.


1. If there's a huge amount of stuff it's probably the things in the .pak file. Civchecker afaik cannot read packed files, so it won't notice all those files exist.
It is unlikely that they are referenced in python, very little art is. If the actual art file is missing that makes it even less likely.


2. General tips:
Don't change the python files in the screens directory.

CustomFunctions.py - you can remove a lot in this file. iirc the addPopup function is used by the religious screen so keep it. Can keep the other add* functions to minimize the risk. Remove functions in this file AFTER you've removed stuff in other files.

CvAdvisorUtils.py - Kael turned off the "your population has reached XYZ people!" popups. Keep it or remove it, as you wish.

CvEventManager.py, CvGameUtils.py - I suggest you use a compare program to compare them to the BtS files. Keep everything that's also in the BtS file. Keep the stuff related to somnium, if you keep somnium. (note that it's spelled Solmnium in some places.) For the rest, you'll have to figure out yourself if it should stay or not. At least it should be safe to remove.

CvUtil.py - used for somnium. I recommend you keep it.

ScenarioFunctions.py - can safely remove. Remember to remove all references to the file as well.

Trophies.py, entrypoints/CvDataStorageInterface.py - someone else will have to answer, I haven't modded trophies.

OOSLogger.py - no reason to remove, unless it's a single player only mod.

pyWB/CvWBDesc.py, entrypoints/CvGameInterface.py - keep.

entrypoints/CvPopupInterface.py - dunno what's changed. Probably keep it.

entrypoints/CvRandomEventInterface.py - if you remove all events and add in your own you'll want to remove everything below line 20. If you keep some event and remove some, remove the things related to the events you remove.

entrypoints/CvScreensInterface.py - trophy/somnium. Depend on what you do with trophies and somnium.

entrypoints/CvSomniumInterface.py - pretty obvious, isn't it? Do you want somnium or not? (if not, remove it from other places too!)

entrypoints/CvSpellInterface.py - keep everything above and including postCombatWon. Not sure about findClearPlot, so suggest you keep it too. If you keep any spells keep their entries here too. Remove everything else.
 
Thanks, the python breakdown was very helpful.
1. If there's a huge amount of stuff it's probably the things in the .pak file. Civchecker afaik cannot read packed files, so it won't notice all those files exist.
It is unlikely that they are referenced in python, very little art is. If the actual art file is missing that makes it even less likely.
I have the .fpk file unpacked and pointed civchecker to the directory (there's a lot more files that go detected otherwise. I guess those are just art defines for art that is no longer used and no longer in the .fpk file. A few of those are actually carried over from vanilla BtS anyways.
 
I am writing a python callback function for a Cult of the Dragon event and would like to have someone look at the code below and give me an idea if it's correct, please.
Basically when the event is chosen, it may give an attitude modifier to a specific civ. I want it when it fires for the Sheaim to give it to the Kuriotates, and vice versa. It only fires for those two in EventTriggersInfo, but since I can't guarantee they'll both be in the game I have a number of options in the EventInfos. (1 for no other civ, 2-3 for Sheaim, +/-1 Kurio, 4-5 Kurio, +/-1 Sheaim.

Code:
def applyFuedSheaim2(argsList):
	iEvent = argsList[0]
	kTriggeredData = argsList[1]
	iPlayer = kTriggeredData.ePlayer
	pPlayer = gc.getPlayer(iPlayer)
	iPlayer2 = cf.getCivilization(gc.getInfoTypeForString('CIVILIZATION_KURIOTATES'))
	if 	iPlayer2 != -1:
		pPlayer2.AI_changeAttitudeExtra(iPlayer,1)

So I have four of these callbacks total, each giving a +/- modifier to/from Sheaim/Kurio.
 
Hopefully a simple question - I want to mod an event so that it checks for a building in a city and if it finds, allows the event to trigger.
Code:
   <BuildingsRequired>					   
         <BuildingClass>BUILDINGCLASS_PAGAN_TEMPLE</BuildingClass>				
   </BuildingsRequired>
<iNumBuildings>0</iNumBuildings>

Would that work? Or does this tag ignore the zero and fail since it is only to check for the presence, not absence, of the building?
 
Would that work? Or does this tag ignore the zero and fail since it is only to check for the presence, not absence, of the building?

If you put a number in there, it will actually check to make sure you have that many of the required buildings.

I haven't done much with events myself, but looking at some other FFH events, it seems that leaving <iNumBuildings> at 0 will work.
 
if you want to test some events, you can always set the weight to -1 and the eventtrigger will automatically fire at entturn (in case all other requirements are met)
 
Hello.

Can you make a building that gives happiness via the presence of another building?

For instance, I make a Bank that gives +1 happiness with presence of a market.
 
With just XML I don't think so. You could write some python and add a happiness building to all cities that have both a bank and a market (similar to how the happiness for khazad gold treasury works).
 
Hello, where do you find/create the textfiles?

I'm getting rather tired of writing pedia entries directly into the XML, and would like to start creating some text files if at all possible within reasonable effort :)
 
I like the FFH way on upgrades. Your units never lose their hard-gained XP.

I'd like to modify some other Mod in this way, but i can't find anything in the XML or in the Python. Wherecan i find this feature?

Thanks in advance for the answer.
 
in globaldefinesalt.xml change MAX_EXPERIENCE_AFTER_UPGRADE from 10 to whatever value you want.
 
Where are event triggers handled if they aren't defined in CvRandomInterface.py? in particular, I'm looking at the event where a Giant wants to eat your pigs. There are 3 possible options, but only one of them is defined in the RandomInterface file (the one where you keep the pigs and a barbarian Giant is spawned)!! How does the game know what to do for the other two results?!
 
Back
Top Bottom