Mod Mystery Freeze

Redden

Chieftain
Joined
Nov 3, 2009
Messages
14
Well I haven't modified any main program or python coding (except Civic Screen font size to allow space for more Civics), so have only changed XML thus far; removing or adding units and buildings, civs, and so forth. Because of some of the changes in removing Bonus types and what not I <!-- --> Tagged all of the events so as not to cause issues, as well as projects.

Things go smoothly at first but I notice one issue right away; the Flag Graphic. Despite the fact I did the .dds texture exactly the same way as a tester mod (in which it worked fine) the image I want on my flag only shows up as a black field rather than the graphical image (though the alpha channel seems to be working fine as the transparency was where it should have been).

The second problem is that as soon as I build a city, the game freezes. Not crash, but just freezes. I can move the mouse pointer around but nothing is clickable and I have to manually shut it down by closing it on the task bar or in active programs menu. It used to work just fine, but for some reason now it's giving me these issues. I'll note that in World Builder I could drop 20 cities no problem, but as soon as I exited that mode back to the normal game, it froze again.

I ran Civ Check but the only values it came up with were the bonuses, units, and buildings I'd removed that were contained within <!-- --> tags so they should have no impact on the game whatsoever.

So I'm curious if there is an obvious thing that is wrong I should go to fix and change, possibly resulting in both problems from the same source cause. As a note I'm using Windows XP, SP3 and the Mod is BTS.

Well I seem to be asking more noob questions than gaining progress than I'd like to, but at least I can figure and XML my finalized building changes and gather graphics for icons while I try to hammer out this major gameplay issue. Any help is appreciated and if you need more info to offer advice/solution let me know and I'll provide it.
 
Things go smoothly at first but I notice one issue right away; the Flag Graphic. Despite the fact I did the .dds texture exactly the same way as a tester mod (in which it worked fine) the image I want on my flag only shows up as a black field rather than the graphical image (though the alpha channel seems to be working fine as the transparency was where it should have been).

Please attach the flag.

The second problem is that as soon as I build a city, the game freezes. Not crash, but just freezes.

Is logging, the python errors etc. activated?
If not (or if you have no idea what i'm talking about), then take a look at your .ini file in Documents\My Games\BtS and enable whatever you think might be useful (just use common sense; er...don#t activate the HAP debugger thing).
 
About the freeze... It could be a weird exception, just like The_J said, but it also sounds like a infinite loop of some kind. Since you haven't touched the code either seems unlikely, though. :confused:
 
Mmm, it wouldn't let me attach them as textures to this post.

I do not think the logging/python errors are activated. Something like that seems as if it would be most useful in this case. I don't mind things going wrong, it's the not knowing what the problem is so therefore not knowing how to go about fixing it that is frustrating.


Oh yes and as an addition to the original post, and I can't believe I forgot this when writing it, I removed the Religions and replaced them with 2 (well more like I removed all but 2 and edited the remaining). They link properly with the units and buildings, however.... Christianity, which I renamed "The Church" had an interesting problem. In the religion buildings instead of showing the Christianity Symbol for the related building it shows the Judaism symbol. I went through numerous times and all of the religion tags within the XML are properly set. This graphical hitch combined with the other issues does lead me to believe I have a singular source problem.
 
You pretty much have to revert to a blank mod and start adding the things you've edited one at a time. Once you get the problem you pretty much know what change caused it.
 
Mmm, it wouldn't let me attach them as textures to this post.

.zip it.

I do not think the logging/python errors are activated. Something like that seems as if it would be most useful in this case. I don't mind things going wrong, it's the not knowing what the problem is so therefore not knowing how to go about fixing it that is frustrating.

That's why i suggest activating the logging, it might help ;).
Also usage of a debug dll could help (will just show more errors; make sure to start in windowed mode).

Oh yes and as an addition to the original post, and I can't believe I forgot this when writing it, I removed the Religions and replaced them with 2 (well more like I removed all but 2 and edited the remaining). They link properly with the units and buildings, however.... Christianity, which I renamed "The Church" had an interesting problem. In the religion buildings instead of showing the Christianity Symbol for the related building it shows the Judaism symbol. I went through numerous times and all of the religion tags within the XML are properly set. This graphical hitch combined with the other issues does lead me to believe I have a singular source problem.

Assets\res\fonts\Gamefont.tga and _75.tga.
Attention, complicated files, and it's easy to screw them. Go pixel by pixel.
 
Yes if debugging doesn't work I may just have to do that; step by step alterations to locate the issue.

View attachment CivIVFlagSamples.zip
There's the two flags. Cassco is the one that worked in my other mod, ThePretenderFlag is the one that fails in this one.

I must be missing something because I don't see where in the .ini is anywhere to flag logging.

[CONFIG]

; Modular XML Loading
ModularLoading = 0

; Skip Main menu
SkipMainMenu = 0

; Custom Art from user folder is not loaded
NoCustomArt = 0

; Custom XML and Python from user folder are not loaded
NoCustomAssets = 0

; No Custom Scenario option in main menu
NoCustomScenario = 0

; No team play allowed
NoTeams = 0

; Read Game options from XML, not .ini
ForceGameOptions = 0

; Always start in the standard era
ForceStandardEra = 0

; Scenario file (Single player)
ForceScenario = 0

; This mod is only for single player games
SinglePlayerOnly = 0

; Allow public maps to be used with this mod
AllowPublicMaps = 1

; Mod Image file
ImageFile = 0

; Name of Mod
Name = Succession

; Description of Mod
Description = Generic Mod

And as far as the TGA goes I never touched them; only linking to individual new files (the Religion building error was there before I added a custom graphic, and both ways it still points to the Judaism instead of Christianity image). But I'll take a look.

Thanks again for the input.
 
You have the wrong .ini file. There is a link in the BTS folder to the \My Documents\My Games\Beyond the Sword\CivilizationIV.ini file. You can open it either way.
 
There's the two flags. Cassco is the one that worked in my other mod, ThePretenderFlag is the one that fails in this one.

Don't see a problem with the files themselves.
-> take a look at your artDefines. Did you set bWhiteFlag to true for your new flag?
 
The religion issue is because you cannot tag the gamefonts for religions. It will just start at number 1, then 2, then 3 etc.
As the J mentionen, these files are hell to work with (alpha channels, borders) and a 0.001% coloring at a borderpixel will screw it up for good.
If you only have 2 religions and using the standard gamefont, let me know the order (well, church was number one, but what is number 2) and I'll do them for you. Free of charge ;)
 
Excellent! The Gamefonts change fixed that issue at least, and now I'll know how to deal with potential problems when I'm done altering my resources, thank you. I'm glad I was familiar with DXTbmp already from some skinning changes and such so made the alteration a lot less problematic. Since I do most of my graphical work for a lot of my non programming projects in paintbrush, I'm used to doing pixel by pixel work anyhow.

The python logging worked. Checking the log from my freeze and a normal game the python seems to stop before it gets to selecting the 'what to build' interface upon initial settlement.

Yes, I tried the background on both white and non white. Non white the 'image' comes out as a black circle, with white set to 1 it's a yellow circle. I put the functioning flag from my other mod in and it worked just fine so it must be an issue with that set of faction flags I created themselves and not coding. They were more or less still temporary so I'm going to not worry about that for the time being and focus on getting the city to work so I can test costs and strength balance.
 
E
Yes, I tried the background on both white and non white. Non white the 'image' comes out as a black circle, with white set to 1 it's a yellow circle. I put the functioning flag from my other mod in and it worked just fine so it must be an issue with that set of faction flags I created themselves and not coding.

The only advice then: Save it again.
One of my flags always had a yellow background...after i tried it the 5th time it was alright, and i have still no idea why :dunno:.
 
Success! I'd like to thank you all for your input as it helped me in a couple areas. However I have solved the primary lockup issue. I had a thought about something; as that nothing in the XML seemed it should cause crashes and the freeze made no sense I wondered if the problem was my machine. It's older, but it runs FFH2 just fine but as it is reaching obsolete status I decided to try something. Removing all Buildings except the Palace and all Units except Settler and Worker it went just fine. The City placed, went to the 'build' selection and everything proceeded as normal. Possibly then I had too many items available to build right away and it log jammed the system. At the very least it is an end to the maddening frustration of the problem making no sense as far as coding goes.

Thanks again for the assist and help (especially on the .tga front).
 
Back
Top Bottom