Feature Load Failure

Tholish

Emperor
Joined
Jul 5, 2002
Messages
1,344
Location
Japan
A while back, I added a couple of features to my mod (wind and sun), using just the Flood Plain art, and they work fine. Now I have added 6 space terrains that I want to synergize with 11 new features, but if I add any features at all, even carbon copies of existing ones with just nothing different but the name, my mod fails to load. If I take out the new feature it works again. What could possibly be wrong? Theres just FeatureInfos and FeatureArtDefines. If I'm using existing art how could there possibly be a problem?

It loads "uncached xml" then the popup about failing to load, but not a ctd, just nothing you can do but click the popup which closes the loading. I tried a mod made of the same FeatureInfos inside the correct folder structure, and nothing else, and it worked. I cut out FeatureArtDefines, since I use the standard ones, and I still crash. Is this a common problem?
 
from the sound of it there is a typo in the feature art defines. Check that again and see if there's any mispellings or out of place characters.

I'd recommend notepad++, it'll help you find some of those errors.
 
I removed feature art defines completely from my mod, since I don't use any custom art for features (yet). The only material related to features is the FeatureInfos. I thought it might be the something to do with the Andromeda missile, so I removed it, since the AI doesn't use it anyway, but that didn't work. I removed custom maps and map scripts. Still no good. Deleted the ini and let a new one get generated. Nothing allows loading of the mod except deleting all features added after those two extra ones. The only thing I can think of is the new terrains, but I did the same thing to an older version before I added them, and it crashed it.

I include the featureinfos. By itself in a mod consisting of just "Mods/Modname/Assets/XML/Terrain/Civ4FeatureInfos.xml" and nothing else but the russian doll of folders, it works. In my mod, it doesn't. Take out the Sun2 feature and my mod works again. Note its windows notifying me civ4 has stopped working, not a Civ4 xml error popup.

PS. I use Word Pad to edit xml, and am happy with it. I used to have all kinds of xml editors, but found that the only thing they are any good for is finding your line number. The free VC++2005 also finds line numbers, you can open xml files with it and it even does the squiggly lines for mistakes, but it doesn't always save changes.
 

Attachments

For what it's worth. I temporarily replaced the Civ4FeatureInfos file in my mod with your file and it worked fine. I could create your new features in the WB and they acted like flood plains. I did get some XML errors when the game started, but it looked like they where all caused by features that my mod required, that where not in your file.
 
I can add features to other mods, so its not something wrong with my computer or my civ installation.

I can rename featues, so its not something to do with anything to do with particular feature names.

I can reduce the number of features below 6, by eliminating wind, sun and also oasis.

I can then add ice2, ice3 and ice4. But as soon as I add a ninth feature, used in my mod, regardless of name, placement, art or anything, a Windows popup simply tells me that civ has stopped working (with the normal civ load scren for mods in the background, having just completed loading cached xml and presumably moved on to digesting all that it has loaded.

It seems like there's a tag or something somewhere that sets maximum features to 8, but there's no such tag in my mod, and besides that wouldn't cause a load failure would it. I have cut out all the fat and scoured all the candidates. There is no dll modification. The only python consists of the eden project, a couple of unrelated screen modifications, and some changes to events. There's no feature limit tag in Global Defines. All that's left is art--none of it feature related--and topical xml files.
 
Try clearing the cache by holding down the shift key while the game is started. The message at startup should change to indicate that the cache was cleared.

I have the cache permently turned off on my game, but I disabled it so long ago I forget how I did it.
 
Thanks for the try General Tso, but that didn't work. It cleared the cache, so that part of loading (whatever it is) doesn't happen any more, and its cool to know about that, but any more than 8 features still stops loading. I thought maybe specifically 9 was somehow a problem and made 16, but that not only stopped loading, it got a gray screen behind the windows popup. So whatever it is, it results from a quantity rather than a quality, ">8 is too much and 16 is way to much" rather than "'9' is not on the list". Something is getting overloaded.
 
Whatever the problem is it definetly isn't anything to do with the number of Features.

I noticed that you set the TerrainBooleans for High Wind to both land and water TerrainTypes. Does the game really allow this?
 
Yes, it works great. In my future mod, wind allows TideMills on coast and WindMills on land. Its one of the few kinds of water improvements the AI will actually make. The crash has got to do with the number of features because everything else the same, changing that is what causes it, regardless of the nature of the added feature. I can eliminate wind and sun and make three copies of any other feature, with a changed name, and it won't load. But two is OK.
 
I am telling you - whatever the problem is it isn't due to the number of Features. I know this to be a fact since I am using 11 Features in my own personal mod. :p
 
Right, and I can make more features in other mods. There is something in my mod that I can't isolate that is causing it to be limited to 8 features. I'm thinking this is something that someone has encountered before, and they can save me a lot of time. Everything in my mod is pretty interelated, so cutting anything out to diagnose it will be much harder than isolating a crash with WB by cutting out cities and units. To find this will be almost as time consuming as rewriting the mod. I would have to take out references to things in other things. However, I might just go back to the last old version I can add features to and add the modern versions of files into it until it crashes and then I will know which one it is. Guess I'll start on it though.
 
Version 93 (like 17 versions back) accepts additional features. When I replace the art folder with the current one, it no longer loads with the extra features (though it loads without them)....OK, I copied the entire art folder from the latest version into 93 and narrowed it down to this: by eliminating a folder called Art/Structures/Buildings/Religions I could get a good load even with an extra feature. However, even entirely eliminating the entire art folder from a current version of the mod with 9 features does not allow it to load.

Edit: thought that since this crash is similar to the one you get for having a mesed up UnitArtStyle I could just use the default one and not have any custom UnitArtStyle, but that did not work.
 
I still haven't found a solution for this. I made a mod with just my xml folder, no art or python. It loads fine (though Im sure it would crash if I tried to start a game). Then I added a feature and it didn't load. So, I cut down this mod one folder at a time and found that if I reduce the number of routes I can increase the number of features. By replacing the same route file with another one (the one from my 6 routes graphic collection) at least two additional features are selected. But if I gut the standard one and have all route as do nothings, except one that should be OK, it fails to load again. Hot on the track now.
 
Last time you'll see this one. I solved it. I had a route with 4 prereq or bonuses but left global defines with max prereq or bonuses set to 2. Why this affected Features, or even loaded at all, I don't know. Probably something to do with memory allocation. (When did that old GlobalDefines get back in?)
 
Back
Top Bottom