• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

Does it matter how civilizations or anything else for that matter are listed in the xml? In civilizations, the civilizations are sorted alphabetically organized, if I reorder them into cultural groups, will that make a difference of any kind?

I think it matters for the selection screens when you launch your games. Well maybe not for Civilizations but for Leaders.

Buildings and units appear in your lists of stuff to build in the cities as per their order in the class infos files (after the sorting of units, buildings & wonders).
 
Question for Programmers:
1) In BTS we have one barbarian civilization, i want to put one or two barbarian civilizations like in Rise from Erebus. Which .cpp; .h; and .py; files have relation with barbarian civ?

2) I don't understand something, programmer write codes in C++ (for example all source .cpp and .h files like in civilization and make game engine). What draw sea, forest, User Interface, buttons (like military advistor, economy advistor, end turn button, command buttons like move, kill, sentry, patrol etc..), civic screen and other screens, progress bar and etc. How is linked that all, which program draw this. Is maybe python do that?
 
Question for Programmers:
1) In BTS we have one barbarian civilization, i want to put one or two barbarian civilizations like in Rise from Erebus. Which .cpp; .h; and .py; files have relation with barbarian civ?

2) I don't understand something, programmer write codes in C++ (for example all source .cpp and .h files like in civilization and make game engine). What draw sea, forest, User Interface, buttons (like military advistor, economy advistor, end turn button, command buttons like move, kill, sentry, patrol etc..), civic screen and other screens, progress bar and etc. How is linked that all, which program draw this. Is maybe python do that?
1) Do a search through the code for BARBARIAN_PLAYER (in VS you can search entire solution) and start from where it's defined as the LAST player in the sequence. There, you can define a new one. Then go through everywhere where there is reference to BARBARIAN_PLAYER (and you'll want to review isBarbarian() as well) if you're looking to add another. Not ALL will be applicable places perhaps to duplicate depending on what you have in mind for the new 'non-player AI' but this would be a good start on getting it setup.

2) There are popup panels that can be called and managed entirely in the dll, like the tech selection or city build popups. Otherwise almost all UI (user interface) is handled in the python. Hover information panels are largely controlled in the dll under the term 'widgets'.
 
Click Civ4 - Terrain Graphics - Download new terrain graphics and tile improvements for Civ4. on that page. You should find lots of things. Just read the descriptions and click the links to see what they have.
 
Thanks, I found some stuff there. There's not too many things. Only two pages worth of downloads. Ultimately I'm hoping to find a graphic for an IMPROVEMENT_CITY which would be a step up from _TOWN, and I'm also hoping to find a way to make the buildings on farms smaller in size so they're not noticeable. I wish I knew how to edit these files in general. Other things I'm looking for. Something for IMPROVEMENT_LARGE_MINE, LARGE_FARM, MINING_TOWN, etc.
 
Does anyone know of any mod or mod component that would create a longbow UU? I find it weird that there's so many units with multiple UUs and a few that lack a matching UU, the longbow being the one that stands out the most to me.
 
No I don't know, but making a UU is actually a really easy modification, all it requires is a bit of copy paste and word processing, a handful of files.

I am too sleepy to remember all of them now but.. unit and civilization xml are the main two. Not including art changes (if they were wanted)

Have I missed any?
 
Quick question

How come some buildings, when scaled to match how big it should be in the city, they appear very large in the pedia?Most buildings are fine but there are a couple where the pedia size and the size in the city don't seem to correspond


Look at the Civ4ArtDefines.xml

<fScale>1.5</fScale> <<<< Scale in City
<fInterfaceScale>0.13</fInterfaceScale> <<<<<<< Scale in Pedia
 
can anyone tell me what the purpose of:

FAssert(isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0) || isAnarchy());

is in CvPlayer::doGold()?

I am triggering it but its not causing a crash

here is the whole function:

Spoiler :
Code:
void CvPlayer::doGold()
{
	bool bStrike;
	int iGoldChange;
	int iDisbandUnit;
	int iI;

	CyArgsList argsList;
	argsList.add(getID());
	long lResult=0;
	gDLL->getPythonIFace()->callFunction(PYGameModule, "doGold", argsList.makeFunctionArgs(), &lResult);
	if (lResult == 1)
	{
		return;
	}

	iGoldChange = calculateGoldRate();

	[COLOR="Red"]FAssert(isHuman() || isBarbarian() || ((getGold() + iGoldChange) >= 0) || isAnarchy());[/COLOR]

	changeGold(iGoldChange);

	bStrike = false;

	if (getGold() < 0)
	{
		setGold(0);

		if (!isBarbarian() && (getNumCities() > 0))
		{
			bStrike = true;
		}
	}

	if (bStrike)
	{
		setStrike(true);
		changeStrikeTurns(1);

		if (getStrikeTurns() > 1)
		{
			iDisbandUnit = (getStrikeTurns() / 2); // XXX mod?

			for (iI = 0; iI < iDisbandUnit; iI++)
			{
				disbandUnit(true);

				if (calculateGoldRate() >= 0)
				{
					break;
				}
			}
		}
	}
	else
	{
		setStrike(false);
	}
}
 
It looks like it might simply be there to let you know that a non-human, non-barb player civ is about to go into anarchy (this is a warning that there may be something wrong in the AI as it probably should've adapted to whatever was causing it to hemorrhage gold by now.)

There's some other things it could mean that could be pointing to bugs elsewhere. I guess it's just a warning that something may be amiss elsewhere as it looks like the code adapts to it just fine here.
 
How could I use the Earth map (used in Rhye's and Fall and the 1000 A.D.
scenarios) while choosing which civilisations and leaders are used? I know
how to design cities and place units via WorldBuilder, but I can't find a way
to bring up a downloaded map and then create a scenario while choosing
which civs and leaders to include.
 
one way (although this might be over kill) would be to make a mod with just the civs you want, so copy and modify the civilization info file and delete all the unwanted civs, then load up your mod and map and you will only have those you want on the map and you can deploy them however you wish. (this might cause a problem from civs appearing when released from colony status though...)
 
You can edit the World Builder Save (.wbs) file with a text editor. The civs in the game are listed somewhere in there, just replace them with other civs. Same with leaders.
 
I'll post this here too, because I need a solution ASAP. It's about my Ancient Middle East mod and I'm desperate for help.
I have a very bad problem...now the game crashes when I go to the next turn, the first turn after 3000 BC!(Civilization IV has stopped working...)
It crashes in both scenario and game mode...what could it be?
What would be the possible causes for this?
This has never happened in any mod before this, this is quite depressing and demotivating.
Also, this does not happen (or has ever happened) on any other mod I've played/made) and also not in the base game (BtS).
 
Back
Top Bottom