• 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

I don't see anything wrong there, but is your <bUseLSystem> tag set to 1 in the CIV4ImprovementInfos.xml file? I think that's required to use the PlotLSystem.
Yes :( It's a copy of town improvement.
 
Hi,

Can someone give me a few pointers on how to include a cityset within a mod. For background, I'm basing my mod off of the original FFH but I want to bring in a cityset from MoM (once I can manage one, more will follow).
The only tutorial I can find on this is https://forums.civfanatics.com/threads/how-to-add-new-city-art.189687/.

My first trial run was to try and bring across the ancient Khazad cityset from MoM.
I created a new ARTSTYLE in GlobalTypes.xml.
I copied across the entries from MoM into my CIV4CityLSystem.xml, relating to ARTSTYLE_KHAZAD, and renamed them to the new ARTSTYLE_DEEPMINING. (Note: The entries relating to ARTSTYLE_KHAZAD in FFH and MoM were identical.)
There were 18 references to an_khazad.nif among the lines in CIV4CityLSystem.xml that I'm adding.

I think I need to rename the an_khazad.nif and the an_khazad.dds files that I'm importing from MoM and putting in Art/structures/cities, as otherwise they clash with the existing names. I was going with an_deepmining. So I would need to update those 18 entries in the xml but I need to get the nif aligned with this?
If changing the names of the nif file, how do I update the all of the NiNode references from "an_khazad.nif" within the "an_deepmining.nif" and how do I update the texture so that it points to "an_deepmining.dds"?
If I click on one of the "an_khazad.dds" texture file references and select "an_deepmining.dds" as the new texture, it uses the full file address, rather than just "an_deepmining.dds". How do I change it so it will refer to the dds file in the same folder as the nif?

thanks
 
You don't need to rename the nif and dds files. If you have the art files from both city styles in the seperate folders (even if the models are exactly the same), the game will use them as seperate models. Changing the dds file in one folder will change doesn't change the texture of the other city set because those are in a different folder. Even if the files have exactly the same names.

But if you for whatever reason want to rename all nif and texture files, you can use Nifskope to change the NiNode references to the renamed dds file.
 
Thanks @merijn_v1,
I’ll try to stay away from Nifskope for the time being then.

How do I reference the different folders using the suggested approach?
All of the cityset art seems to be in the Art/Structures/Cities folder.
If I put a new folder, Deepmining, in here with the MoM an_khazad.nif and an_khazad.dds files, how is this to be referenced in CIV4CityLSystem.xml?
Typically, where the Artref nif is referenced, it looks like
<ArtRef Name =“generic:an_khazad.nif::1x1_01”>
Am I correct in thinking the “generic” is pointing to the Art/Structures/Cities folder? If it is, what’s the edit to point to a different folder?
 
Anyone knows a good model that could work as a Suburb improvement (upgrade from Town).

I tried to copy-paste things from Town but the results are these:
Spoiler :

As seen in the above pictures stays as a humble ancient cottage(?) :(
Okay, I found the answer:

I added IMPROVEMENT_SUBURB after every IMPROVEMENT_TOWN with Find+Replace function but I did not notice that there are some !IMPROVEMENT_TOWN parts too. Adding the ! to the remaining parts solved the problem.

Thanks for every answer :)
 
I'm looking to make a modmod (of C2C), and I need to know if I have file placement correct (I don't have the exact words right, because I'm recalling from memory on mobile):
...-> Civ 4 -> Beyond The Sword -> mods -> C2C -> data -> mods-> My Mod

And if, for example, I want to edit xml files, I should copy and paste them into My Mod, and edit them there? It would be like:

...-> C2C -> data -> mods -> My Mod -> xml -> (xml files)
 
I'm looking to make a modmod (of C2C), and I need to know if I have file placement correct (I don't have the exact words right, because I'm recalling from memory on mobile):
...-> Civ 4 -> Beyond The Sword -> mods -> C2C -> data -> mods-> My Mod

And if, for example, I want to edit xml files, I should copy and paste them into My Mod, and edit them there? It would be like:

...-> C2C -> data -> mods -> My Mod -> xml -> (xml files)
That is almost correct for mods of Caveman2Cosmos.
...-> C2C -> assets-> modules -> My_Mods -> (your mod name here) -> (xml files)
Because of the BULL mod used by C2C it is best practice not to have any white space in your mod name, hence the underscore in the My_Mods name. It causes (caused?) problems when displaying small icons of buildings in some places.
 
I just built the Moai Statues. Didn't it have a wonder movie?!?!
In my memories it had... but... maybe I just mix it with Stonehenge :rolleyes:

EDIT:

Never mind. I made my own :D
Moai Statues (26sec)
 
Last edited:
Hi,

So I found my problem with importing over citysets from MoM,
(Note: The entries relating to ARTSTYLE_KHAZAD in FFH and MoM were identical.)

The ARTSTYLE entries between FFH and MoM are not identical, so I was obviously copying the Artref information from the wrong mod. In case my previous post might have steered anyone wrong...

To import a cityset from another mod it does appear to be as simple as;
  • Add your new ArtStyleType into the ArtStyleTypes in GlobalTypes.xml, e.g. <ArtStyleType>ARTSTYLE_DEEPMINING</ArtStyleType>
  • Copy the cityset files (nif, dds) into a folder in Art/structures/cities.
  • Copy over the relevant Artref from the CIV4CityLSystem.xml in the mod your importing from.
  • Amend the Artref to use the name of your folder between "generic:" and the name of the nif file for the Artref you've copied over, e.g. where deepmining is the name of the folder, it looks like <ArtRef Name="generic:deepmining/an_khazad.nif::1x2x2_01">
  • Change the ARTSTYLE in the Artref you've copied over to refer to your new ARTSTYLE, e.g. <Attribute Class="Artstyle">ARTSTYLE_DEEPMINING</Attribute>
 
Hi everyone! Is there a way to change how much culture is required to take a plot from another civ? I'm trying to make a work around similar to fixed borders with minimal territory change on crowed parts of a map barring war or massive differences in cultural pressure. I would appreciate any help I can get!
 
Hi everyone! Is there a way to change how much culture is required to take a plot from another civ? I'm trying to make a work around similar to fixed borders with minimal territory change on crowed parts of a map barring war or massive differences in cultural pressure. I would appreciate any help I can get!
I know that in Civ4CultureLevelInfo.xml you can change the iThreshold to the number you want. So that with XX culture the city gains a culture level. Maybe you can come up with an idea to use this to get the result you want. (cf : http://modiki.civfanatics.com/index.php?title=Civ4CultureLevelInfo )

If you want to do something more precise I think you will have to look for Python or SDK solutions.
Hope this can help you a little :)
 
Hi,

I’ve a further query on citysets.
In BtS, when a city is captured, it acquires the art style of the conquering civ. In FFH, when a city is captured it retains the art style of the original civ.

Where is this defined and what do I edit in order to change it? I’m basing my mod off FFH, but I want the art style of the new civ, rather than the original civ to be used.
 
I am not familiar with FFH but most likely it is implemented in the DLL, as the original Civ4 DLL has a direct relationship between the owner civ's city art style and the art style of the city itself.
 
Hi,

I’ve a further query on citysets.
In BtS, when a city is captured, it acquires the art style of the conquering civ. In FFH, when a city is captured it retains the art style of the original civ.

Where is this defined and what do I edit in order to change it? I’m basing my mod off FFH, but I want the art style of the new civ, rather than the original civ to be used.
It may be part of Assimilation modcomp. I'm just guessing but I would start searching for that key word.
 
@LPlate2: I've once given cities the art style of their cultural owner through CvCity::getArtStyleType in CvCity.cpp. (I didn't keep that change in the end because, apparently, there is no way to give Cottages, Hamlets etc. the same treatment.)
 
Hi,

Thanks, CvCity::getArtStyleType in CvCity.cpp is the spot I needed, neatly commented by Xienwolf to make sure I didn't miss it. The commented out line is as it appears in the BtS CvCity.cpp.

FFH
Code:
ArtStyleTypes CvCity::getArtStyleType() const
{

//FfH: Modified by Xienwolf (Maintains City ArtStyle of base Civilization)
//   return GET_PLAYER(getOwnerINLINE()).getArtStyleType();
    return ((ArtStyleTypes)(GC.getCivilizationInfo((CivilizationTypes)getTrueCivilizationType()).getArtStyleType()));
//FfH: End Modify

}
 
(I didn't keep that change in the end because, apparently, there is no way to give Cottages, Hamlets etc. the same treatment.)
I may misunderstand what you are saying but I think you are wrong. Just check AND2.
In the pic bellow you can see Roman cottages and the other artstyles also have their own:
Spoiler :
upload_2020-5-24_13-59-43.png
 
I'd like to show e.g. a European-style Cottage – instead of Greco-Roman – when the tile culture is 80% Celtic. I don't think that's possible. As far I can tell, the EXE picks the art style for that Cottage by calling getArtStyleType on the player who owns the tile politically.
 
I have a WBsave from a very old version of Magister Modmod for FfH2, and I'm not sure which version. I'm trying to open it in the version I have installed (not the latest one), and every time it simply crashes to desktop in the initial loading phase. My approach now is to try to copy-paste the details into another WBfile using Notepad++, but the exact same thing happens. It even occurs when I simply bring over the plot info - is that possible to do in general, even?

@MagisterCultuum, have any input here?
 
Back
Top Bottom