Help for a noob beginning a mod

Calavente

Richard's voice
Joined
Jun 4, 2006
Messages
2,880
Location
France
Hi,
I'm trying to begin a mode in xml, but I do not understand clearly how I can create the whole folder paths to make a mod without copy-pasting the whole Asset folder : 1.2 Go is a bit too much.

Am I supposed to only create the folder I'm currently using for the mod I want to make? But if my mode thouchs a lot of files, I would have to create a lot of folder myself while the whole folders architecture already exists so it seems an ugly way to do it..
is there a better way ?
 
I've got an other question:
I'm tweaking religions..

I wanted taoisme to do -1commerce if non state religion instead of +1culture

and I can't see it
Ive done this modification in CIV4ReligionInfo.xml:
Code:
             <ReligionInfo>
			<Type>RELIGION_TAOISM</Type>
			...
			<GlobalReligionCommerces>
				<iGlobalReligionCommerce>-1</iGlobalReligionCommerce> 
                #instead of : <iGlobalReligionCommerce>1</iGlobalReligionCommerce> 
				<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
				<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
			</GlobalReligionCommerces>
			...
			<StateReligionCommerces>
				<iStateReligionCommerce>0</iStateReligionCommerce>
				<iStateReligionCommerce>0</iStateReligionCommerce>
				<iStateReligionCommerce>1</iStateReligionCommerce>
			</StateReligionCommerces>
			...
		</ReligionInfo>
I may try it on the <iStateReligionCommerce> but I don't want this -1 commerce to appear when tao is state religion...
Do you know a way to help me ?
Further more, it seems that the 1 culture disapear when I choose a state religion, even if not the Tao one, ==> How to make the -1gold existe in cities with tao but another state religion?
 
I'm not quite sure what you mean...

but download some simple mod for example adding one nation more to the game

see there's only few files (not 1.2 gb)
to mod folder you put files only you change (remeber to use directories tree from the game (but you also makes folder only with contains changed files) you don't have to add all folders in game)

I can' t help you with second question
 
sorry, but my question is "how to make the directory tree?" I am not sure I have to manually create the 500+ folders of the directory tree ... or must I ?

I understand I have to put only the files I changed, but createing all the folders...eeek :cry:
 
500+! To start a basic mod you only need the folders that you modify. So You don't need to create 500 folders unless you are making a whole new game. I suggest start with a few, then slowly build up. Before you know it, you'll have quite a lot already!
 
oki

thx
I won't try to make all the folder if I only use a few of them..[party]
 
Code:
int CvCity::getReligionCommerceByReligion(CommerceTypes eIndex, ReligionTypes eReligion)
{
	int iCommerce;

	FAssertMsg(eIndex >= 0, "eIndex expected to be >= 0");
	FAssertMsg(eIndex < NUM_COMMERCE_TYPES, "eIndex expected to be < NUM_COMMERCE_TYPES");
	FAssertMsg(eReligion >= 0, "eReligion expected to be >= 0");
	FAssertMsg(eReligion < GC.getNumReligionInfos(), "GC.getNumReligionInfos expected to be >= 0");

	iCommerce = 0;

	if ((GET_PLAYER(getOwnerINLINE()).getStateReligion() == eReligion) || (GET_PLAYER(getOwnerINLINE()).getStateReligion() == NO_RELIGION))
	{
		if (isHasReligion(eReligion))
		{
			iCommerce += GC.getReligionInfo(eReligion).getStateReligionCommerce(eIndex);

			if (isHolyCity(eReligion))
			{
				iCommerce += GC.getReligionInfo(eReligion).getHolyCityCommerce(eIndex);
			}
		}
	}

	return iCommerce;
}

If I am reading this right it looks like the commerce result is only applied if the player has no state religion (then whatever commerce if given by the religions in the city are applied) or if the religion is the state religion.

I also see a lot of the following in the SDK:

Code:
	if (getReligionCommerce(eIndex) != iNewReligionCommerce)
	{
		m_aiReligionCommerce[eIndex] = iNewReligionCommerce;
		FAssert(getReligionCommerce(eIndex) >= 0);

		updateCommerce(eIndex);
	}

Which makes me think that the oly values it may accept are 0 or higher (I had the same problems with buildings in FfH that weren't giving negative iCommerce values but I reported it to Firaxis with a code fix and they were good enough to check it into 1.61).

So the bad news is if I am reading the code correctly it looks like you are going to have to do an SDK change to do what you want. I would recommend talking to the community enhancement guys about it, if it truely cannot be done with xml it sounds just like something they would like to add.

I do have a religion in FfH that drain culture from the cities it is in under certain circumstances. I do that in the python onCityDoTurn check as follows:

Code:
		if (pCity.isHasReligion(gc.getInfoTypeForString('RELIGION_CULT_OF_THE_DRAGON')) and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_KURIOTATES') and pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_SHEAIM')):
			pCity.changeCulture(pCity.getOwner(), -2, True)

Basically if the civilization isnt the Sheaim or the Kuriotates the city gets -2 culture per turn. You could do the same to steal a gold per turn from the player but it will be a bit ugly becauce the missing gold won't be reported in the players income numbers. So if he has 5 tao cities an his income shows he is supposed to be making 13 golf a turn he will only be making 8 gold a turn. Which will confuse players.

Sorry there is no good news there, hopefully it helps though.
 
thx

no good news... is still not bad news :)
gonna try it other ways..
gonna try your python trick if nothing works.
where can I talk to these "community enhancement guys"?
 
The Great Apple, Impaler, Lord Olleus, SimCutie and others are working on a project where they use the SDK to increase the amount of functional options available to modmakers without changing the vanilla game at all. So you as a modmaker can decide what you want to use and not use. Asking if they could allow negative iCommerce values for religions sounds perfect for them.
 
Back
Top Bottom