Quick Modding Questions Thread

It apparently isn't possible to have an event that changes an improvement (a Cottage) into another (a Hamlet), it seems - is that correct? Well, I suppose it'd be possible with Python, but...
Can anyone confirm this? :p
 
But how would I make sure it selects the same plot?
 
Why complicates matters when most events use python anyway.
Just a few lines will do.
 
As far as I know there is a restriction in the DLL that limits the number of civs that can be in the same game to 18. Where do I change that?

Also can anyone recommend a good Earth map? I am planning to create a scenario about the cold war, so the resource placement should reflect the situation in the 20th century, so horses in the new world etc.
 
CvDefines.h: #define MAX_CIV_PLAYERS.
 
As far as I know there is a restriction in the DLL that limits the number of civs that can be in the same game to 18. Where do I change that?

Also can anyone recommend a good Earth map? I am planning to create a scenario about the cold war, so the resource placement should reflect the situation in the 20th century, so horses in the new world etc.

Or find the 50civs dll on here when you dont want to mess around in the dll.
 
Or find the 50civs dll on here when you dont want to mess around in the dll.

Nah, a little compiling never hurt anybody. (Okay that's a lie, DoC's DLL hurts me whenever I so much as look at it.)

CvDefines.h: #define MAX_CIV_PLAYERS.

Is there something else I would have to do? It seems that one little change breaks scenarios. I tried it around a dozen times, and then again with the 40Civs mod I already have, and every single time when I try to start a scenario, be it a custom made or just Earth18Civs, I get two Python exceptions ("CvWBInterface", line 65 and "CvUtil", line 172") and RuntimeError: unidentifiable C++ exception. Custom Games work fine, but whenever MAX_CIV_PLAYERS is set to something higher than 18 I get the same error even when trying to just launch Vanilla scenarios like Earth or Earth18Civs. Changing the value back to 18 and recompiling makes scenarios work again, but obviously that defeats the entire point.

Edit: The same thing happens when I try the 50Civs DLL I downloaded from here.
 
There is nothing else to do in the dll.

The problem lies with scenarios: they are "defined" with a certain number of players. You have to adapt them to the number of players you want. Look at tutorials but in short, you need to have as many player/team slots as in the dll, even if you leave them almost empty.
 
Got it, thanks. :goodjob:
 
What precisely does the "<LSystem>" line mean in CIV4ArtDefines_Buildings? I assume it has something to do with how the building is placed, but I really don't get how it works. I'm trying to make invisible buildings by setting the NIF to Art/Empty, but even though they don't have a model they still appear to have an effect on cities.
 
The <LSystem> is the worst nightmare a modder can experience. :devil:

It points to the CIV4CityLSystem.xml (for buildings in cities) and CIV4PlotLSystem.xml (for improvements and resources).
It will then lookup that building/improvement/resource and see if it should be placed a special way (most are turned 45 degrees) and what era/ethnic group they should show (some buildings and improvements change graphics depending on era). It also changes resource graphics if an improvement is defined (f.ex. horses, cows and pigs gets into the fencing with pastures).

The reason why its such a nightmare is, ah well, look for yourself, the files are a mess ;)

The reason why they still show, is because it overrides artdefine settings.
 
Uh, OK, but what exactly do I do to stop invisible buildings from affecting my cities? Do I set it to 0x0 in ArtDefines? Do I have to go into CIV4CityLSystem? What?
 
Maybe this thread can help you.
 
Uh, OK, but what exactly do I do to stop invisible buildings from affecting my cities? Do I set it to 0x0 in ArtDefines? Do I have to go into CIV4CityLSystem? What?

there is no 0x0. take a look at the files as I suggested.
Best thing is to use one of the 1x1, though it will still affect your city, and what I also tried to tell you is that if it a Era or Ethnic specific building you need to change all of those too.
Since you are VERY sparse in info about the building(s) you want to add/change, its pretty hard giving you direct advice....
 
Uh, OK, but what exactly do I do to stop invisible buildings from affecting my cities? Do I set it to 0x0 in ArtDefines? Do I have to go into CIV4CityLSystem? What?

The smallest I have done is
Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_XXXX</Type>
			<LSystem/>
			<bAnimated/>
			<fScale/>
			<fInterfaceScale/>
			<NIF>Art/empty.nif</NIF>
			<KFM/>
			<Button>Art/Interface/Buttons/Buildings/XXXX.dds</Button>
		</BuildingArtInfo>

I think I even had the NIF line as <NIF/> but was told that can cause problems.
 
The smallest I have done is
Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_XXXX</Type>
			<LSystem/>
			<bAnimated/>
			<fScale/>
			<fInterfaceScale/>
			<NIF>Art/empty.nif</NIF>
			<KFM/>
			<Button>Art/Interface/Buttons/Buildings/XXXX.dds</Button>
		</BuildingArtInfo>

I think I even had the NIF line as <NIF/> but was told that can cause problems.

This works perfectly!


Link to video.
 
Top Bottom