PDA

View Full Version : CTD after first screen, where should I look for the error?



Ellderon
02-06-2007, 16:15
Following the tutorial for making your own faction from nothing, I started making one.
I decided to go for the mod folder approach, as it's generally a smarter thing to do. Now I've been modding games for 6 years or so (from space-empire sims, shooters, strategies and RPG's) so I really have no problem with learning how to mod MTW2 (alltough it's one of the more trickier games to mod)

I made the faction (and banners, custom textures, units, UI stuff and practicly everything else that's not in the tutorial, but I placed it in a differrnt folder for I wanted to test just the bare faction with nothing extra - no banners, units, etc.) and started the mod.

I get the hourglass loading, then the first screen with the charging knights and then a black screen as hte hourglass spins on and on but nothing happens and the HD is quiet. When I press something the game chrashes and I get a unspecified error in the log.

the error has to be in one of the files but I didn't find anything. So I ask - which files are laoded immediately on game startup? - for it has to be one of those

Ellderon
02-08-2007, 00:13
Help PLS?

FrantzITA
02-08-2007, 20:11
i got this type of error when with the attachements in the modeldb file ... but how you can hope to find what error its ? can be a typing error anywhere... something that is missing ... when you mod you have to make a little step and control immediately if everything is working , if you go too far is impossible to find the error ...

Foz
02-08-2007, 20:49
As far as I know, everything you can mod in the game is loaded when you start up. Most of the text files (.txt or .xml) say explicitly that they load once and then are not referred to, and I think in general we can assume that game files are compiled by the game into whatever format it likes them in, then referred to at will from there. So... yeah. It could be in any given file you unpacked :sad:

MC Hamster
02-10-2007, 15:01
What you can do is to enable logging, and then check the logfile after it crashes - it should point you in the right direction.

What you need to do is add a few lines to the .cfg file of the mod you're using (or medieval2.preference.cfg if you're running the 'basic' game)

if you add:


[log]
to = logs/system.log.txt
level = * error


Into the file in question, you should see a 'logs' folder show up, and a system log will dump into that folder when you run the game.

Take a look at the log when it crashes and it should give you the error, generally with the offending file and line number where the code goes bad.

Ellderon
02-15-2007, 00:32
It gives me a "unspecified error", here:

00:20:04.921 [system.rpt] [always] CPU: SSE2
00:20:04.921 [system.rpt] [always] ==== system log start, build date: Dec 5 2006 version development ===
00:20:05.046 [system.io] [always] mounted pack packs/data_0.pack
00:20:05.125 [system.io] [always] mounted pack packs/data_1.pack
00:20:05.203 [system.io] [always] mounted pack packs/data_2.pack
00:20:05.281 [system.io] [always] mounted pack packs/data_3.pack
00:20:05.375 [system.io] [always] mounted pack packs/data_4.pack
00:20:05.375 [system.io] [always] mounted pack packs/localized.pack
00:20:27.812 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.



And I re-did everything from scratch too..Since I can't figure out what's wrong, I'm gonna upload a rar with my mod folder (just the basic files, no textures, banners, maps and stuff like that for they would make the file to big, but I did make everything). If anyone cares to take a look:

http://www.hades-combine.com/web/hosted/fow/MTW2mymod.rar

Re Berengario I
02-15-2007, 00:54
First of all you should put these lines

[log]
level = * trace

in your cfg file so you can see a bit better when the CTD problem is encountered in the log.

Ellderon
02-17-2007, 00:38
Wow..the log is huge now..

I looked it over and there's a whoooole bunch of files (general files or files for other factions) that it can't find in mymod directory so it opens them from the packs. Like this:

--------------
00:31:56.781 [system.io] [info] exists: missing mymod/data/animations/engine/siege_serpentine_moving2idle.evt
00:31:56.781 [system.io] [trace] pack open,packs/data_0.pack,data/animations/engine/siege_serpentine_moving2idle.evt,267
00:31:56.781 [system.io] [info] open: found data/animations/engine/siege_serpentine_moving2idle.evt (from: packs/data_0.pack)
----------------


And that's allmost the whole thing, alltough I did find THIS at the end:


00:32:03.515 [system.io] [info] exists: missing mymod/data/ui/generic/#generic_construction.tga
00:32:03.515 [system.io] [info] exists: missing data/ui/generic/#generic_construction.tga.dds
00:32:03.515 [system.io] [info] exists: found data/ui/generic/#generic_construction.tga (from: packs/data_2.pack)
00:32:03.515 [system.io] [info] exists: missing mymod/data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga
00:32:03.515 [system.io] [info] exists: missing data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga.dds
00:32:03.515 [system.io] [info] exists: missing data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga
00:32:03.515 [system.io] [info] exists: missing mymod/data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga.dds
00:32:03.515 [system.io] [info] exists: missing mymod/data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga
00:32:03.703 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.

Re Berengario I
02-17-2007, 02:17
Those last lines are the same as other games that load flawlessly so you have to search for an [error] statement somewhere in the log or you can try to see if the problem instead is in the next file which should be loaded that in that case is descr_walls.txt as the following:


01:48:44.328 [system.io] [info] exists: missing data/ui/generic/#generic_construction.tga.dds
01:48:44.328 [system.io] [info] exists: found data/ui/generic/#generic_construction.tga (from: packs/data_2.pack)
01:48:44.328 [system.io] [info] exists: missing data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga.dds
01:48:44.328 [system.io] [info] exists: missing data/ui/mesoamerican/buildings/#mesoamerican_temple_pagan.tga
01:48:44.343 [system.io] [trace] file open,,data/descr_walls.txt,8032

Ellderon
02-18-2007, 00:51
Well, the only error in the log is the unspecified error..
And I havn't touched the descr_wall.txt

Can anyone try to run my mod? Oh wait, I havn't supplied my custom textures..or can it load without them?

Ellderon
02-18-2007, 01:12
Nope, it aint hte descr_walls.txt. I removed hte extracted file from my data folder, so it should use hte packed one, but it still chrashes with the same errror.

I don't get it, with the extracted file and no mod the game works fine..???

Foz
02-19-2007, 06:02
Nope, it aint hte descr_walls.txt. I removed hte extracted file from my data folder, so it should use hte packed one, but it still chrashes with the same errror.

I don't get it, with the extracted file and no mod the game works fine..???
Of course it does, the extracted files are the exact same thing the game refers to in the packs if the files are not extracted. My recommendation from here is that you start removing (to a safe place, to be put back later) files that you've altered from the data folder. Try to load the game after each one. If it loads correctly (i.e. to the menu, without crashing or exiting for error) then the last thing you removed should be what was causing the problem. Alternately (and perhaps easier) you can copy everything to a different place and put back the modified files one at a time, this time watching for the game NOT to load correctly. Either one may produce good results, and I'm not sure there's anything to recommend one over the other.

Once you know what file it is, you can start with the base unpacked version of it. Make sure the game loads like that. Then add your changes back in, in little pieces at a time (I mean small chunks of text, instead of whole files). Again, when the game stops loading for the first time, it's likely you found your problem piece of text, which you can then comb for errors. If you can't find any, post that set of changes here and I'm sure other people will have a look... it's just that without any place to start, no one can really give any advice except what I just did: narrow down where the problem is, and let us know.

Happy hunting, and good luck.

Edit: Wait, stop the press, new idea.

Did you say you were adding a new faction, with new textures and whatnot, using a Mod Folder? I seem to recall people saying that it is not possible to do it like that: that you have to use io.file_first in the base data folder to make this work correctly. Something about the game not reading particular files when you're using a mod folder, and that they're ones that are needed for custom textures/models/etc. Can anyone else confirm this???

Ellderon
02-19-2007, 12:31
That's why I put all the textures, ui icons and stuff in the data folder (not mod folder) and added io.file_first to the .cfg file

I?ll try what you suggested first. Wish me luck!