Adding a new building

With regard to the 'pinking' of buildings; this happened to me, and I've been spending hours trying to get round it. Whether my particular solution is relevant to anyone elses' problem, I don't know, but here goes:

I was basicly cut/pasting the graphic files for the FfH Infirmary into Next War, to use the building as a Kelp Processor (it's the only graphic file I could easily access that I could convince myself MIGHT look a bit like a factory?). So I changed all the XML easy enough; Chamaedrys' walkthrough at the start of this topic has all the details (if you have BtS, I don't think you even have to edit the Civ4CityLSystem to get your building to show up in-game; my Kelp Processor does and I havn't touched it).

The problem was that, while I had the 3D model in fine, it was pink. It just refused to associate the texture with the model!

Long story short, the solution was: you can't rename the .dds or .nif files. I changed them from Infirmary.dds and Infirmary.nif to Kelp_Processor.nif & .dds, and, for some reason, the game didn't like that. Change them back to their original names, and it works like a charm. You can call the folder they're in whatever you want; just don't fiddle with the graphics' names themselves.

I beleive this is to do with the art files being referenced within other art files. Mad thought. In other words, the Infirmary.nif file looks for a texture from the file Infirmary.dds . If you change the name of the nif file to Kelp_Processor.nif, it will still look for a texture from Infirmary.dds , if that makes sense? I think it is also the case that they must be in the same folder for them to work, in most cases (again due to the internal referencing thing).

And it is interesting that you mention about the Civ4CityLSystem in Beyond the Sword not being relevant, as it was this that caused all my problems with CTDs back in Vanilla. But then i dont mod Beyond the Sword, only vanilla so i have no experience with the changed file organisation at all.
 
@peteandbill:

The reason for it crashing at this point is a problem with the art files, usually in my experience the CityLSystem one. HOWEVER, I ONLY EDIT VANILLA CIV 4 FILES, AND UNFORTUNATELY THE ORGANISATION HAS CHANGED SINCE BEYOND THE SWORD ARRIVED- THIS ADVICE MAY NOT BE OF TOO MUCH HELP.

I had a lot of problems with my buildings that i created referencing 'leafs' that were of an incorrect size for the graphics, which causes the crash.

I would recommend PMing the person who created the art for the building and asking them which size 'leaf' they used, and it would be even better if they could give an example for you of what XML code you need to put into the file for it to work. Im sure if you ask nicely they will (unless they are really mean/busy lol).

Hope that helps, like i say, im by no means an expert.

thanks 4 the advice ... but i just copied the nif file from the original building (a library and an obelisk ... i made two and both crash) ... i did change the button though ... would that affect it?
 
In that case, make sure that you have referenced the filepath to your button correctly, and also make sure you have deleted the comma before the filepath, and everything afterwards (eg. the atlas reference including all commas and numbers).

If it is still not working it could be a problem with your button art file itself, or it may be that something else is causing the problems. Other than that im not much help im afraid!

Hope that helps, and if not then please post again (especially if you find the cause of the problem!).

PS. If it doesnt help then can you write the entry you have for the new buildings into a post and il see if i can spot any problem. cheers
 
In that case, make sure that you have referenced the filepath to your button correctly, and also make sure you have deleted the comma before the filepath, and everything afterwards (eg. the atlas reference including all commas and numbers).

If it is still not working it could be a problem with your button art file itself, or it may be that something else is causing the problems. Other than that im not much help im afraid!

Hope that helps, and if not then please post again (especially if you find the cause of the problem!).

PS. If it doesnt help then can you write the entry you have for the new buildings into a post and il see if i can spot any problem. cheers

YES!!!! that was the problem (i had not taken the commas out from before the button) THANK YOU MRKINGKONG

this is weird though because for all of my flag buttons and leader buttons i left the commas and never ad any problem with the game
 
Can anyone help me? I am calling on the experts here!!!


I am stuck big time on creating a unique building for the BtS mod I am working on.
The building is the "Mineral Mine" to replace "Forge"...
Basically, it is very similar to the "Mali Mint", but looks like the "Japanese Shale Plant".

I basically cut and paste over the Mali Mint files from BtS, but added the art for the Japanese Shale Plant.

However, everytime I load the Mod, I get the same error. It tells me the Tag: BUILDING_MINERAL_MINE info is not correct. See below screen shot.
Link for DLing mod in progress


attachment.php
 
Like for any other things: Look at the original ;).
For an UB, you have to add a new building in Civ4BuildingInfos.xml with an existing buildingclassinfo. And then you have to give this building to a civilization in the Civ4CivilizationsInfos.xml.
 
I just added a new building (not a UB) to one a mod Ive been working. I got no error mesages when I loaded the game and everything appeared fine the Civilopedia. But when I tried to build it the game crashed (though I found I could add it in the World Builder without any problems). Any suggestions?

I have been able to add UBs without this problem.
 
I just added a new building (not a UB) to one a mod Ive been working. I got no error mesages when I loaded the game and everything appeared fine the Civilopedia. But when I tried to build it the game crashed (though I found I could add it in the World Builder without any problems). Any suggestions?

I have been able to add UBs without this problem.

Sounds like some kind of art problem... and perhaps not with the UB...
If you run the mod without the UB it runs with no problems? Or will it crash?
 
For whatever you are adding, it all has to add up... this lesson was long in sinking in for me (from The J and Teg Nevanis... spelling?)... but I finally figured it out and am creating new civs in less than an hour including art...

Basically, for your Building...
Make sure whatever you have it tagged as in your CIVINFO xml, that name stays constant...
Then go to BUILDINGINFO, and make sure you reference the correct art file...
Then go to DEFINESART_BUILDING, and make sure you have a 64x64 button... basically, I take the closest thing to it I can find, and then simply switch the art pathways (usually a subfolder within my new civ main folder for each building, unit, and leaderhead).

Before starting to play, I generally look in the Pedia... because if it isn't right there, it won't be right when you play... its a little easier to check out too...

If you want, post the xml fils that I mentioned... I will try looking to see if I see anything...
 
Sounds like some kind of art problem... and perhaps not with the UB...
If you run the mod without the UB it runs with no problems? Or will it crash?

I created a mod with just the new building but when I ran it it did not show up in the game at all. I dont think the UBs have anything to do with it though as I have added several of them without any problems. To answer The J's question, yes it does have a custom button. Its the same size as the rest of them. It is a little less graphic (mainly with the bracket) but I created several other buttons (UBs & UUs) in the same manner and again had no problems with them. The graphics to the building itself I downloaded but they seemed fine when I added it in the WB.

Heres the only thing I can think of. What is are the Scema XML files? Ive mostly ignored them since they didnt seem to affect anything I was working on before.
 
The schemas are the files that tell the game how to read the info files properly. You don't need to modify them at all except for its file name.

If you post your info files (civ, building, artdefinesbuilding) I am sure we can help you.
 
Heres the files for the building Ive been trying to add (water treatment plant). The listings are at the botom of the XML files except for the buildinginfos file which was too large to copy onto here.
 
Tried adding a different button. This got it to work. So I can only assume that the DDS file was somehow corrupt even though it worked in the civilopedia.

Anyways, thanks for all you help!:goodjob:
 
Back
Top Bottom