Modders Guide to FfH2

I am trying to add more lairs in python and I'm hitting a problem - it is hard to track down when I can't google on my PC (still no line). I want to remove all lairs around the starting locations, but I can't figure out how to track this down and where to out the code. Any clues?
 
I am trying to add more lairs in python and I'm hitting a problem - it is hard to track down when I can't google on my PC (still no line). I want to remove all lairs around the starting locations, but I can't figure out how to track this down and where to out the code. Any clues?

This is the code I use in one of the ice scenarios to remove all forests and jungles from around the player starting locations, it should be similar to strip improvements:

Code:
	iForest = gc.getInfoTypeForString('FEATURE_FOREST')
	iJungle = gc.getInfoTypeForString('FEATURE_JUNGLE')
	for iPlayer in range(gc.getMAX_PLAYERS()):
		pPlayer = gc.getPlayer(iPlayer)
		if pPlayer.isAlive():
			pPlot = pPlayer.getStartingPlot()
			iX = pPlot.getX()
			iY = pPlot.getY()
			for iiX in range(iX-1, iX+2, 1):
				for iiY in range(iY-1, iY+2, 1):
					pLoopPlot = CyMap().plot(iiX,iiY)
					if not pLoopPlot.isNone():
						iFeature = pLoopPlot.getFeatureType()
						if (iFeature == iForest or iFeature == iJungle):
							pLoopPlot.setFeatureType(-1, -1)
 
This is the code I use in one of the ice scenarios to remove all forests and jungles from around the player starting locations, it should be similar to strip improvements:

Code:
	iForest = gc.getInfoTypeForString('FEATURE_FOREST')
	iJungle = gc.getInfoTypeForString('FEATURE_JUNGLE')
	for iPlayer in range(gc.getMAX_PLAYERS()):
		pPlayer = gc.getPlayer(iPlayer)
		if pPlayer.isAlive():
			pPlot = pPlayer.getStartingPlot()
			iX = pPlot.getX()
			iY = pPlot.getY()
			for iiX in range(iX-1, iX+2, 1):
				for iiY in range(iY-1, iY+2, 1):
					pLoopPlot = CyMap().plot(iiX,iiY)
					if not pLoopPlot.isNone():
						iFeature = pLoopPlot.getFeatureType()
						if (iFeature == iForest or iFeature == iJungle):
							pLoopPlot.setFeatureType(-1, -1)
Thanks Kael, I'll write that down and have a try. It's similar to what I had, I'll just have to spot the difference (and probably put it in a different place, had it in OnGameStart)
 
iCloseBordersAttitudeChange in CIV4LeaderHeadInfos.xml.
CvPlayerAI::AI_getCloseBordersAttitude in CvPlayerAI.cpp.

...or if you meant the text for it and not the variable itself then it's TXT_KEY_MISC_ATTITUDE_LAND_TARGET in CIV4GameTextInfos.xml in your civ 4 directory.
 
How does the ability to see CoE cities if you have the Nox Noctis work? I was wanting to let the Infernals see all AV cities (probably by giving their Palace that ability), but I haven't found how it works yet.
 
How does the ability to see CoE cities if you have the Nox Noctis work? I was wanting to let the Infernals see all AV cities (probably by giving their Palace that ability), but I haven't found how it works yet.

Its an intercept in CvPlot::updateSight()
 
Hmm... That looks a lot harder than I was expecting. I wasn't really wanting to get back into C++ modding until I had a lot of free time, and updated FF source code to work with.

Could it be done in python without too much trouble? I remember that the Elohim's ability to see unique features used to actually keep the plot visible instead of having the terrain shown but covered in fog. What function would that be? Would applying that per turn on on religion spread and when they first enter the world work?
 
I want to give a civilization for my modmod a doubled effect for Golden Ages. How can I do this? I only can find how to change the duration of Golden Ages.
 
That only increases the duration. Imuratep wants to increase the effect.
 
In CvUnitAI::AI_update() I found this code. What is it's purpose? It's preventing the AI from settling (or doing anything else) on one tile islands...

Spoiler Code :
Code:
//FfH: Added by Kael 12/22/2007
    CvPlot* pPlot = plot();
    CvPlot* pLoopPlot;
    bool bValid = false;
	for (int iDX = -1; iDX <= 1; iDX++)
	{
		for (int iDY = -1; iDY <= 1; iDY++)
		{
			pLoopPlot = plotXY(pPlot->getX_INLINE(), pPlot->getY_INLINE(), iDX, iDY);
			if (pLoopPlot != NULL)
			{
			    if (canMoveInto(pLoopPlot))
			    {
			        bValid = true;
			    }
			}
		}
	}
    if (bValid == false)
    {
		getGroup()->pushMission(MISSION_SKIP);
        return false;
    }
//FfH: End Add
 
Its a fix to prevent units who are unable to move into any surrounding tiles (say in a city surrounded by fires) from causing CtD's.
 
Hrm.... anyone know where the .ini is accessed from? I am getting annoyed enough by the saved Gameoptions that I am inclined to go out and fix it myself to load on a per-mod basis. Problem is I am not entirely sure of any location it is directly accessed, so fear it might all be .exe (not that such a thing entirely stops me anyway...)
 
not strictly FfH question - but - is there a way to alter the number of figures which "do battle" when two units fight? If I alter the warrior so instead of 3 big guys there are 30 guys in a unit, and scale the art def down, it looks more like a small army. But, only 2 or 3 of them step forward to smack each other at a time, meaning the combat anims take much longer.
 
I don't know how to do that but keep in mind some units, like heroes, are single unit graphics. 30 vs 1 is going to take a long time.
 
I don't know how to do that but keep in mind some units, like heroes, are single unit graphics. 30 vs 1 is going to take a long time.

yeah, this was inspired by a friend saying he wanted a different style of graphics - sort of epic-er. Feeling less like a bunch of guys and more like an army. Heroes are a problem in this, if we did this in a game which has heroes (or even Mages) we would need a workaround. Like for mage types, a number of units springing up to do the fighting - swarms or fireballs etc - but I suspect this would require big SDK changes. (Thought on this, some unit art for battle spells could keep the unit hidden deep underground, only the combat anims pop them up... but still, needs work)

If we did this, maybe the Hero unit is the Hero and his or her retinue, so the actual unit could be multiple figs.
 
The problem then becomes the number of polygons, 30 guys will slow your graphics down considerably compared to 3.

If you did this you would probably need to do low poly versions of each unit.
 
Back
Top Bottom