Modders Guide to FfH2

Could also be a read/write of another file. Those also need to be in the same order.

OK. But just to clarify, I'm having trouble loading saves from the same build. IE, I start a game, play for a while then try to reload an autosave game and I get a failure to uncompress data error. If I try to load the Turn 0 autosave, it works fine. I'm not trying to load a game from a previous build. So I'm not really sure what you mean by 'in the same order'.
 
The variable entries for every stream->Read need to be in the same order as the entries for every stream->Write. If they aren't, it will be impossible to load save games even within the same build. I'm not sure why the initial autosave works.

problem is probably in CvCity or CvCityAI. Since no City Object exists at gamestart that save can still be loaded.
 
Can anyone tell me how I would, using python get the number of a specific resource owned by a specific player.

Like if the target player is iPPQ and the target resource is Fire Mana, and if PPQ has 3 Fire Mana the function returns 3.
 
Is there a python accessible function that returns what a unit has it its <Capture> field?

Based on one online API I tried using INT getUnitCaptureClassType() (I tried with both iUnit and pUnit), but they don't work.

If I can't find an easy way to do this my new resurrection system may have to rely (more) heavily on python card coding.





Also, does the <PromotionCombatApply> tag in a promotion make it give that promotion to unit it defeats before they pass through CvEventManager.py's onUnitKilled? I hope so, or else my job may be rather difficult as base FfH does not have a <PythonPostCombatWon> for promotions.

Spoiler current resurrection code :
CvSpellInterface.py
Code:
def reqResurrection(pCaster, sSluagh):
	iUnit = gc.getInfoTypeForString(sSluagh)
	iLL = gc.getInfoTypeForString('PROMOTION_LAROTH_LEGIONNAIRE')
	pPlot = CyMap().plot(0,0)
	for i in range(pPlot.getNumUnits()):
		pUnit = pPlot.getUnit(i)
		if pUnit.getUnitType() == iUnit:
			if pUnit.isHasPromotion(iLL):
				return False
			if not pUnit.isDelayedDeath():
				return true
	return false


def spellResurrection(pCaster,sSluagh):
	pPlotC = pCaster.plot()
	pPlayer = gc.getPlayer(pCaster.getOwner())
	iUnit = gc.getInfoTypeForString(sSluagh)
	iLL = gc.getInfoTypeForString('PROMOTION_LAROTH_LEGIONNAIRE')
	pPlot = CyMap().plot(0,0)
	for i in range(pPlot.getNumUnits()):
		pUnit = pPlot.getUnit(i)
		if pUnit.getUnitType() == iUnit:
			if not pUnit.isHasPromotion(iLL):
				break
	infoCiv = gc.getCivilizationInfo(pPlayer.getCivilizationType())
	iUnit = infoCiv.getCivilizationUnits(gc.getUnitInfo(iUnit).getUnitCaptureClassType())
	if iUnit == -1:
		iUnit = gc.getInfoTypeForString('UNIT_CHAMPION')
	newUnit = pPlayer.initUnit(iUnit, pPlotC.getX(), pPlotC.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
	newUnit.convert(pUnit)
	for iProm in range(gc.getNumPromotionInfos()):
		if gc.getPromotionInfo(iProm).isEquipment():
			newUnit.setHasPromotion(iProm, False)
CvEventManager.py, in onUnitKilled
Code:
				if unit.getUnitType() == gc.getInfoTypeForString('UNIT_DONAL'):
					newUnit= bPlayer.initUnit(gc.getInfoTypeForString('UNIT_SLUAGH_DONAL'), 0,0, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
					newUnit.setLevel(unit.getLevel())
					newUnit.setExperience(unit.getExperience(), -1)
					newUnit.setName(unit.getNameNoDesc())
					for iCount in range(gc.getNumPromotionInfos()):
						if (unit.isHasPromotion(iCount)):
							newUnit.setHasPromotion(iCount, True)
CIV4SpellInfos.xml
Code:
        <SpellInfo>
            <Type>SPELL_RESURRECTION_DONAL</Type>
            <Description>TXT_KEY_SPELL_RESURRECTION</Description>
            <Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
            <Help>TXT_KEY_SPELL_RESSURECTION_HELP</Help>
            <PromotionPrereq1>PROMOTION_LIFE3</PromotionPrereq1>
            <CivilizationPrereq>CIVILIZATION_BANNOR</CivilizationPrereq>
            <bDisplayWhenDisabled>1</bDisplayWhenDisabled>
            <bHasCasted>1</bHasCasted>
            <bAllowAI>1</bAllowAI>
            <iAIWeight>300</iAIWeight>
            <PyResult>spellResurrection(pCaster, 'UNIT_SLUAGH_DONAL')</PyResult>
            <PyRequirement>reqResurrection(pCaster, 'UNIT_SLUAGH_DONAL')</PyRequirement>
            <Effect>EFFECT_RESSURECTION</Effect>
            <Sound>AS3D_SPELL_CURE_DISEASE</Sound>
            <bGraphicalOnly>1</bGraphicalOnly>
            <Button>Art/Interface/Buttons/Units/Donal.dds</Button>
        </SpellInfo>
CIV4UnitInfos.xml
Code:
		<UnitInfo>
			<Class>UNITCLASS_SLUAGH</Class>
			<Type>UNIT_SLUAGH_DONAL</Type>
			<UniqueNames>
			</UniqueNames>
			<Special>NONE</Special>
			<Capture>UNITCLASS_DONAL</Capture>
			<Combat>NONE</Combat>
			<Domain>DOMAIN_IMMOBILE</Domain>
			<DefaultUnitAI>UNITAI_UNKNOWN</DefaultUnitAI>
			<Invisible>INVISIBLE_SPECIAL</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>TXT_KEY_SLUAGH_DONAL</Description>
			<Civilopedia>TXT_KEY_UNIT_SLUAGH_PEDIA</Civilopedia>
			<Strategy></Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			<bNoBadGoodies>0</bNoBadGoodies>
			<bOnlyDefensive>1</bOnlyDefensive>
			<bNoCapture>1</bNoCapture>
			<bQuickCombat>1</bQuickCombat>
			<bRivalTerritory>0</bRivalTerritory>
			<bMilitaryHappiness>0</bMilitaryHappiness>
			<bMilitarySupport>0</bMilitarySupport>
			<bMilitaryProduction>0</bMilitaryProduction>
			<bPillage>0</bPillage>
			<bSpy>0</bSpy>
			<bSabotage>0</bSabotage>
			<bDestroy>0</bDestroy>
			<bStealPlans>0</bStealPlans>
			<bInvestigate>0</bInvestigate>
			<bCounterSpy>0</bCounterSpy>
			<bFound>0</bFound>
			<bGoldenAge>0</bGoldenAge>
			<bInvisible>0</bInvisible>
			<bFirstStrikeImmune>0</bFirstStrikeImmune>
			<bNoDefensiveBonus>0</bNoDefensiveBonus>
			<bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
			<bCanMoveImpassable>0</bCanMoveImpassable>
			<bCanMoveAllTerrain>0</bCanMoveAllTerrain>
			<bFlatMovementCost>0</bFlatMovementCost>
			<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
			<bNukeImmune>0</bNukeImmune>
			<bPrereqBonuses>0</bPrereqBonuses>
			<bPrereqReligion>0</bPrereqReligion>
			<bMechanized>1</bMechanized>
			<bSuicide>0</bSuicide>
			<bHiddenNationality>0</bHiddenNationality>
			<bAlwaysHostile>0</bAlwaysHostile>
			<UnitClassUpgrades>
			</UnitClassUpgrades>
			<UnitClassTargets>
			</UnitClassTargets>
			<UnitCombatTargets>
			</UnitCombatTargets>
			<UnitClassDefenders>
			</UnitClassDefenders>
			<UnitCombatDefenders>
			</UnitCombatDefenders>
			<FlankingStrikes>
			</FlankingStrikes>
			<UnitAIs>
				<UnitAI>
					<UnitAIType>UNITAI_UNKNOWN</UnitAIType>
					<bUnitAI>1</bUnitAI>
				</UnitAI>
			</UnitAIs>
			<NotUnitAIs>
			</NotUnitAIs>
			<Builds>
			</Builds>
			<ReligionSpreads>
			</ReligionSpreads>
			<CorporationSpreads>
			</CorporationSpreads>
			<GreatPeoples>
			</GreatPeoples>
			<Buildings>
			</Buildings>
			<ForceBuildings>
			</ForceBuildings>
			<HolyCity>NONE</HolyCity>
			<ReligionType>NONE</ReligionType>
			<StateReligion>NONE</StateReligion>
			<PrereqReligion>NONE</PrereqReligion>
			<PrereqCorporation>NONE</PrereqCorporation>
			<PrereqBuilding>NONE</PrereqBuilding>
			<PrereqTech>NONE</PrereqTech>
			<TechTypes>
			</TechTypes>
			<BonusType>NONE</BonusType>
			<PrereqBonuses>
			</PrereqBonuses>
			<ProductionTraits>
			</ProductionTraits>
			<Flavors>
			</Flavors>
			<iAIWeight>0</iAIWeight>
			<iCost>-1</iCost>
			<iHurryCostModifier>0</iHurryCostModifier>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iMinAreaSize>-1</iMinAreaSize>
			<iMoves>0</iMoves>
			<bNoRevealMap>1</bNoRevealMap>
			<iAirRange>0</iAirRange>
			<iAirUnitCap>0</iAirUnitCap>
			<iDropRange>0</iDropRange>
			<iNukeRange>-1</iNukeRange>
			<iWorkRate>0</iWorkRate>
			<iBaseDiscover>0</iBaseDiscover>
			<iDiscoverMultiplier>0</iDiscoverMultiplier>
			<iBaseHurry>0</iBaseHurry>
			<iHurryMultiplier>0</iHurryMultiplier>
			<iBaseTrade>0</iBaseTrade>
			<iTradeMultiplier>0</iTradeMultiplier>
			<iGreatWorkCulture>0</iGreatWorkCulture>
			<iEspionagePoints>0</iEspionagePoints>
			<TerrainImpassables>
			</TerrainImpassables>
			<FeatureImpassables>
			</FeatureImpassables>
			<TerrainPassableTechs>
			</TerrainPassableTechs>
			<FeaturePassableTechs>
			</FeaturePassableTechs>
			<iCombat>0</iCombat>
			<iCombatLimit>100</iCombatLimit>
			<iAirCombat>0</iAirCombat>
			<iAirCombatLimit>0</iAirCombatLimit>
			<iXPValueAttack>0</iXPValueAttack>
			<iXPValueDefense>0</iXPValueDefense>
			<iFirstStrikes>0</iFirstStrikes>
			<iChanceFirstStrikes>0</iChanceFirstStrikes>
			<iInterceptionProbability>0</iInterceptionProbability>
			<iEvasionProbability>0</iEvasionProbability>
			<iWithdrawalProb>0</iWithdrawalProb>
			<iCollateralDamage>0</iCollateralDamage>
			<iCollateralDamageLimit>0</iCollateralDamageLimit>
			<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
			<iCityAttack>0</iCityAttack>
			<iCityDefense>0</iCityDefense>
			<iAnimalCombat>0</iAnimalCombat>
			<iHillsAttack>0</iHillsAttack>
			<iHillsDefense>0</iHillsDefense>
			<TerrainNatives>
			</TerrainNatives>
			<FeatureNatives>
			</FeatureNatives>
			<TerrainAttacks>
			</TerrainAttacks>
			<TerrainDefenses>
			</TerrainDefenses>
			<FeatureAttacks>
			</FeatureAttacks>
			<FeatureDefenses>
			</FeatureDefenses>
			<UnitClassAttackMods>
			</UnitClassAttackMods>
			<UnitClassDefenseMods>
			</UnitClassDefenseMods>
			<UnitCombatMods>
			</UnitCombatMods>
			<UnitCombatCollateralImmunes>
			</UnitCombatCollateralImmunes>
			<DomainMods>
			</DomainMods>
			<BonusProductionModifiers>
			</BonusProductionModifiers>
			<iBombRate>0</iBombRate>
			<iBombardRate>0</iBombardRate>
			<SpecialCargo>NONE</SpecialCargo>
			<DomainCargo>NONE</DomainCargo>
			<iCargo>0</iCargo>
			<iConscription>0</iConscription>
			<iCultureGarrison>0</iCultureGarrison>
			<iExtraCost>0</iExtraCost>
			<iAsset>0</iAsset>
			<iPower>0</iPower>
			<UnitMeshGroups>
			<iGroupSize>1</iGroupSize>
			<fMaxSpeed>1.75</fMaxSpeed>
			<fPadTime>1</fPadTime>
			<iMeleeWaveSize>1</iMeleeWaveSize>
			<iRangedWaveSize>0</iRangedWaveSize>
				<UnitMeshGroup>
					<iRequired>1</iRequired>
					<EarlyArtDefineTag>ART_DEF_UNIT_SPECTRE</EarlyArtDefineTag>
				</UnitMeshGroup>
			</UnitMeshGroups>
			<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
			<HotKey></HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<bGraphicalOnly>1</bGraphicalOnly>
			<iHotKeyPriority>0</iHotKeyPriority>
			<FreePromotions>
			</FreePromotions>
			<LeaderPromotion>NONE</LeaderPromotion>
			<iLeaderExperience>0</iLeaderExperience>
			<bNeverObsolete>1</bNeverObsolete>
		</UnitInfo>
CIV4PromotionInfos.xml
Code:
        <PromotionInfo>
            <Type>PROMOTION_NETHER_BLADE</Type>
            <Description>TXT_KEY_EQUIPMENT_NETHER_BLADE</Description>
            <Sound>AS2D_IF_LEVELUP</Sound>
            <TechPrereq>TECH_NEVER</TechPrereq>
            <Button>Art/Interface/Buttons/Equipment/NetherBlade.dds</Button>
            <bEquipment>1</bEquipment>
            <PromotionCombatType>PROMOTION_HERO</PromotionCombatType>
            <iPromotionCombatMod>80</iPromotionCombatMod>
            <PromotionCombatApply>PROMOTION_LAROTH_LEGIONNAIRE</PromotionCombatApply>
            <DamageTypeCombats>
                <DamageTypeCombat>
                    <DamageType>DAMAGE_DEATH</DamageType>
                    <iCombat>2</iCombat>
                </DamageTypeCombat>
            </DamageTypeCombats>
        </PromotionInfo>




        <PromotionInfo>
            <Type>PROMOTION_LAROTH_LEGIONNAIRE</Type>
            <Description>TXT_KEY_PROMOTION_LAROTH_LEGIONNAIRE</Description>
            <Sound>AS2D_IF_LEVELUP</Sound>
            <TechPrereq>TECH_NEVER</TechPrereq>
            <iCombatPercent>10</iCombatPercent>
            <iCityAttack>10</iCityAttack>
            <UnitCombats>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_ADEPT</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_DISCIPLE</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
                <UnitCombat>
                    <UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
                    <bUnitCombat>1</bUnitCombat>
                </UnitCombat>
            </UnitCombats>
            <Button>,Art/Interface/Buttons/Promotions/Combat5.dds,Art/Interface/Buttons/Warlords_Atlas_1.dds,7,16</Button>
            <bImmuneToFear>1</bImmuneToFear>
            <bNotAlive>1</bNotAlive>
            <iMinLevel>-1</iMinLevel>
			<DamageTypeCombats>
                <DamageTypeCombat>
                    <DamageType>DAMAGE_DEATH</DamageType>
                    <iCombat>1</iCombat>
                </DamageTypeCombat>
            </DamageTypeCombats>
            <DamageTypeResists>
                <DamageTypeResist>
                    <DamageType>DAMAGE_DEATH</DamageType>
                    <iResist>100</iResist>
                </DamageTypeResist>
            </DamageTypeResists>
        </PromotionInfo>


Edit: I just solved the original problem, realizing that I should be using CvUnit instead of CyUnit and then figuring out how to do so.

I also found the annoying issue of needing to make sure the tile I keep the dummy units on is land, even when they are immobile rather than land units. I figure a tile of Shallows at plot (0,0) won't hurt much though.


Unfortunately, the Netherblade is not passing on its promotion to the units it kills. I just realized that the way it is currently set up the promotion if passed on would prevent the creation of a sluagh completely instead of making one reserved for Laroth's use, but as the unit is being made properly that is not the issue. My job would be nearly done if only FfH allowed promotions to have <PythonPostCombatWon> like units can, but I don't want to deal with DLL work yet.


It would also really be useful if onUnitKilled kept track of whether the unit had been captured.
 
Is there any way to make a promotion on a unit pass a promotion to the units that unit killed, short of editing the DLL?

Doing so is very important to my modmod. I've tried a bunch of odd workarounds, but none worked.



p.s. What good is the <PromotionCombatApply> field of a promotion if the unit with that promotion must die and the unit getting the applied promotion must survive in order for it to be passed?


Edit: I just tried giving Rathus himself the PythonPostCombatWon call, and found he did not pass on the promotion to his victims either. I know you said that that call is made before immortal checks so I assumed that I could edit promotions there between losing and death too. Was I mistaken?


Code:
def postCombatBindLaroth(pCaster,pOpponent):
	if pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_NETHER_BLADE')):
		pOpponent.changeImmortal(-1)
		pOpponent.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAROTH_LEGIONNAIRE'), true)
 
Yeah, so? Death isn't the end of a unit in Erebus. Its data still has to pass through CvEventManager.py's onUnitKilled function, to have it's afterlife decided. I'm looking for a way to make the Netherblade (and possibly also a different piece of equipment to be given to Basium) effect where the unit goes after death, by applying a promotion which will be checked in onUnitKilled().


Edit: Since I don't see much chance of a way to pass on a promotion to the loser though a post combat python function, I have tentatively decided to take a more complicated approach (which makes the artifact more powerful). I gave the Netherblade an uncastable spell whose prereq applies a dummy promotion to all enemy units within a one tile range. The promotion has a 100% chance of wearing off, but if the unit dies first it it switched with a more permanent one marking the souls belonging to Laroth. There is however still no way to distinguish though between units killed by the Netherblade and units that just happened to die near the Netherblade.
 
Couple of questions:


Does the specialist part of the city interface work differently than the usual game? I'm adding some extra specialists for a mod, but they stack up in a column, and some cannot actually be selected because they seem to get covered by the resource happiness screen. Other threads on civfanatics seem to just assume that the specialists will organize themselves as necessary, so I was curious if something was different in this mod.


What do these functions do?:

Code:
setGreatPeopleCreated(0)
pPlayer.setGreatPeopleThresholdModifier(0)

I know what the Ardor spell does in game, so overall what this spell does, but am not as sure what each of these particular functions are needed, or what exactly they do. (It looks like the first one sets a counter to 0, and another one sets the required great people points needed to 0, but it is good to know for sure, and the functions list for Civ4 that I've been looking at doesn't seem to mention these.)

(The use for this information is a spell that reduces the great person requirements by1, rather than setting it to a particular number, if anyone's interested.)
 
I need some help with my code. I'm trying to get the AI to use Inquisition when pursuing religious strategies using the following code.

Code:
void CvUnitAI::AI_InquisitionMove()
{

	CvCity* pLoopCity;
	CvCity* pBestCity;
	CvPlot* pBestPlot;

	int iValue;
	int iBestValue;
	int iLoop;

	iBestValue = 0;
	pBestCity = NULL;
	iValue = 0;

	int iStateRel = GET_PLAYER(getOwnerINLINE()).getStateReligion();

	if (iStateRel != NO_RELIGION)
	{
		CvCity* pCity = plot()->getPlotCity();
	
        bool bValidTargetForInquisition=false;
		int iNumHeathenRels = 0;

		for (pLoopCity = GET_PLAYER(getOwnerINLINE()).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(getOwnerINLINE()).nextCity(&iLoop))
		{

			bValidTargetForInquisition=false;
			iNumHeathenRels = 0;
			//iValue = 0;

			for (int iTarget=0;iTarget<GC.getNumReligionInfos();iTarget++)
			{
				if (iStateRel != ((ReligionTypes)iTarget) && pLoopCity->isHasReligion((ReligionTypes)iTarget) && (!pLoopCity->isHolyCity((ReligionTypes)iTarget)))
				{
					bValidTargetForInquisition=true;
					iNumHeathenRels ++;
				}
			}

			if (bValidTargetForInquisition)
			{
				if (pCity != NULL && pCity == pLoopCity)
				{
					if (canCast((SpellTypes)GC.getInfoTypeForString("SPELL_INQUISITION"), false))
					{
						cast((SpellTypes)GC.getInfoTypeForString("SPELL_INQUISITION"));
						return;
					}
				}

				iValue = pLoopCity->getPopulation() * (iNumHeathenRels * 2);
				
				if (pCity->isHolyCity((ReligionTypes)iStateRel))
				{
					iValue *= 2;
				}

				if (iValue > iBestValue)
				{
					iBestValue = iValue;
					pBestCity = pLoopCity;
				}
			}
		}

		if (pBestCity != NULL)
		{
			pBestPlot = pBestCity->plot();
			getGroup()->pushMission(MISSION_MOVE_TO, pBestPlot->getX_INLINE(), pBestPlot->getY_INLINE());
			return;
		}
	}
    getGroup()->pushMission(MISSION_SKIP);
    return;
}

I know that it's working partially, as a priest with the Inquisition promotion will cast the spell if it finds itself in a city with a heathen religion, but for some reason, the priests will never purposefully seek out other targets for Inquisition. Any suggestions would be much appreciated!
 
You don't even have a check if the unit CAN move to the city. So the unit could potentially be trying to move to a city on another continent, or something like that.

Other then that I don't know. Run a debug build if you can or spam logMsgs if you can't, is my recommendation.
 
Right now I'm trying to figure out main menu screen editing... and I've looked high and low and still havent found a tutorial on here for that, but I'm sure its probably right under my nose somewhere (or just too straightforward?)...

After several attempts I managed to get a new display on startup... but I was using the FFH2 as an example and I'm totally perplexed... where exactly IS the information for the menu screen stored on that mod anyways?? It doesnt seem to be in the usual location?
 
Right now I'm trying to figure out main menu screen editing... and I've looked high and low and still havent found a tutorial on here for that, but I'm sure its probably right under my nose somewhere (or just too straightforward?)...

After several attempts I managed to get a new display on startup... but I was using the FFH2 as an example and I'm totally perplexed... where exactly IS the information for the menu screen stored on that mod anyways?? It doesnt seem to be in the usual location?

Do you mean the xml info, or the actual art for the menu? Suppose I'll answer both.

The xml info is in XML/Art and XML/Audio.

Two relevant files in the first folder: ArtDefinesInterface, where you define the art itself, and MainMenus, where you define the menu, with it's art and music.

ArtDefinesInterface:
Code:
		<InterfaceArtInfo>
			<Type>MAINMENU_SCENE_RIFE</Type>
			<Path>Art/Interface/Main Menu/RifE/CIV4MainMenuBG.nif</Path>
		</InterfaceArtInfo>

MainMenus:
Code:
		<MainMenu>
			<Type>MAIN_MENU_RIFE</Type>
			<Description>Rise from Erebus</Description>
			<Scene>MAINMENU_SCENE_RIFE</Scene>
			<SceneNoShader>MAINMENU_SCENE_RIFE</SceneNoShader>
			<Soundtrack>AS2D_DIPLO_DTESH</Soundtrack>
			<Loading>MAINMENU_LOAD_BTS</Loading>
			<LoadingSlideshow>MAINMENU_SLIDESHOW_LOAD_BTS</LoadingSlideshow>
		</MainMenu>

In audio, there are also two files. AudioDefines, where you list the path to the music, and Audio2DScripts, where you define how it is played in game.

AudioDefines:
Code:
		<SoundData>
			<SoundID>DIPLO_DTESH</SoundID>
			<Filename>Sounds/Diplomacy/Dtesh</Filename>
			<LoadType>STREAMED</LoadType>
			<bIsCompressed>1</bIsCompressed>
			<bInGeneric>1</bInGeneric>
		</SoundData>

Audio2DScripts:
Code:
	<Script2DSound>
		<ScriptID>AS2D_DIPLO_DTESH</ScriptID>
		<SoundID>DIPLO_DTESH</SoundID>
		<SoundType>GAME_MUSIC</SoundType>
		<iMinVolume>75</iMinVolume>
		<iMaxVolume>75</iMaxVolume>
		<iPitchChangeDown>0</iPitchChangeDown>
		<iPitchChangeUp>0</iPitchChangeUp>
		<iMinLeftPan>-1</iMinLeftPan>
		<iMaxLeftPan>-1</iMaxLeftPan>
		<iMinRightPan>-1</iMinRightPan>
		<iMaxRightPan>-1</iMaxRightPan>
		<bLooping>1</bLooping>
		<iMinTimeDelay>0</iMinTimeDelay>
		<iMaxTimeDelay>0</iMaxTimeDelay>
		<bTaperForSoundtracks>0</bTaperForSoundtracks>
		<iLengthOfSound>0</iLengthOfSound>
		<fMinDryLevel>1.0</fMinDryLevel>
		<fMaxDryLevel>1.0</fMaxDryLevel>
		<fMinWetLevel>0.0</fMinWetLevel>
		<fMaxWetLevel>0.0</fMaxWetLevel>
		<iNotPlayPercent>0</iNotPlayPercent>
	</Script2DSound>



Now, where is the interface art itself stored? In the fpak file (check the Assets folder, fpak will be at the bottom; Grab the PakBuild utility from the download section of CfC to unpack it), it is in Art\Interface\Main Menu
 
At this point I know just enough to be dangerous (hasnt been a week since I've started)... and that actually answers a lot more than you perhaps intended... cant believe I missed that 392mb pak file... or that I hadnt heard of it until you told me, now I see it's pretty significant.

Either way, I was able to find everything you mentioned except the civ4mainmenus file in the art folder... im assuming that FFH is just using the file from bts unaltered then?

Thanks again for your prompt and helpful response!!!
 
I lied sorry,
FFH2... and Ive checked FFH2/assets/art and all the subfolders.
under assets/art all i have is four folders, no files, and none of the folders contain the file in question.

ive checked assets/xml/art for it too, (my second to last file is CIV4artdefines_units)
Ive even checked the pak0 file under /art, art/interface, and just about all the other folders therein as well.

What I have found is a couple of civ4mainmenubg.nif files in the assets/art/interface folders (some packed, some unpacked)... but I dont think thats what Im looking for??

On the other hand, for other mods and in the bts/assets folder I have found the following:

a bts/assets/art/interface/civ4 main menus folder, but not a file,
as well as a:
bts/assets/xml/art/civ4mainmenus.xml file that is second to last in the list... but under ffh2... nothing. Other mods do have it, such as final frontier... but I dont have them for FFH2... Is it right under my nose?

The code that you indicated way above is also found in this bts/assets/xml/art/civ4mainmenus.xml file (as well as the same file in the other mods...) ... but nowhere can i find this file under ffh2 (even ran a search...)
 
Back
Top Bottom