Re: Why does my Mod crash? (new type of CTD?)
Hi All,
Been reading the forums for a while and learned a lot about Mods. Much thanks to all you contributors.
While testing V6 of my own "Yingling Mod" (Pagan Viking Danish, see background below) for VI-2.01, I got a new type of CTD while testing it. All of the mods work fine in a game past 20-40 turns until I attack any Byzantine provence (battle win or byzantine retreat makes no difference). I get the CTD on the next turn with no error message. This CTD does occur after the auto-save. Earlier turns that took out Rebels, Polish and Hungarians had no problems. I tried a bunch of stuff and nothing helped identify the problem.
Yes I have scanned the Forums for any similiar problem and found nothing. Being stumped, does any genius out there have any ideas on what is going wrong????? I am willing to zip and email the files to any interested party.
TIA and Bye
Mod Premise: No battle at Stamford Bridge, King Harold still loses to William. Danish get excommunicated after refusing Papal order to turn over Mercia/York to William and go back to being pagan and make their own empire.
Mod Description: Starting from EARLY.TXT, Danish become pagan barbarian raider with units and some buildings from VI via cut&paste. Uses custom prod-files, names files, and mods to the "LOC\ENG" files. The modified tech-tree works. Only "new" unit is a danish-specific "Skald" agent (emissary type) with preaching/zeal effects and this mod passed game testing in the early turns. This Skald agent was the only new type of mod change from my Yingling V5 Mod that did not have this CTD problem. But I cannot figure how this could cause a "enemy faction-specific" CTD.
Re: Why does my Mod crash? (new type of CTD?)
Could it be that when you capture that province you come into contact with another nation, of another religion e.g. Turks, and the Muslim pieces/shields, which you can now see, have an error in them? This happened to me in my WoT mod.
To test this, send an emissary to the area and check it out.
Re: Why does my Mod crash? (new type of CTD?)
Thanks for the thought, but I had not modded faction shields/colours. I did try your test anyway but it did not trigger the CTD
Re: Why does my Mod crash? (new type of CTD?)
Just for closure purposes, I was not able to discover the cause of the "CTD after attacking a specific faction after many turns into the game". However, it might be of interest that the problem disappeared after rebuilding the mod campaign text from scratch but leaving the other mod files alone. This does imply that "Mod success" can only be declared after completing a full game, or maybe several games, including maybe played as each active faction in the game. Just an evil thought.
Thanks and Cheery Bye
Re: Why does my Mod crash?
I have big prob with XL mod.
I installed it while following all instructions step-by-step,but game failed with CTD error, if i go to campaing or attept load saved games.
When i look on error log i see this:
Errors for session started: Thu Apr 14 19:02:13 2005
C:\MedAddOn\Crusaders_TW\main3d_1.cpp(7115) : DirectX call : DDERR_SURFACELOST
Errors for session started: Thu Apr 14 19:11:09 2005
C:\Med_Patch\Crusaders_TW\frontend_globals.cpp(107 4) : Error : "No such file or directory"(2)
C:\Med_Patch\Crusaders_TW\bmradar.cpp(287) : File Error : fopen(".\RadarMap\flatinland17.map", "wb") - "No such file or directory"(2)
I never installed anything to this path.
When i try to find these files in directory, where i installed the game,i find nothing.
Please help me! Btw: Sorry for my English but im from far far away from u...
Re: Why does my Mod crash?
Here are a few things I have learned while debugging my mod:
1)You may only declare 31 factions in a campaign, including the rebels, not 32. The program will CTD prior to the Main Menu if you attempt to declare more than this.
2)At least some of the new V&V's added for VI in the changes text do not work. Basically, if a V&V is not defined in events text nor used in the default file, then it will probably not work.
3)There is some kind of glitch with the Horde's Set Leader Attributes in the campaign files. Trying to change anything results in the romannumeral error in his name.
I also ran into a mysterious error with the Ligurian Sea. I changed it to Lagurian and it seems to have fixed the problem. I still have no idea what was going on.
4)The scenario system is FUBAR'd when it comes to graphics, imho. Basically, to use it you have to find all the Viking folders, make similar ones for your mod, and fill them with everything new for your mod plus everything from the basic game that you use in your mod, such as factions.
Included in this is the 25meg campmap\portraits folder, even if you don't add any new portraits for your mod.
5)There seems to be something strange about the way faction descriptions are defined. Those for the Viking factions only appear in Changes.txt, which should not normally work without being defined previously in Startpos.txt, and which in fact does not work for other entries. I mean, there appears to be some type of special hardcoded link just for the Viking factions.
Descriptions which are defined in Startpos.txt don't show up in the game unless they have a duplicate entry in Changes.txt.
6)This is something I noticed a long time ago, but have not seen described here.
Error messages for the units text are almost always wrong. The game seems to load the file by columns, and the error is usually in the previous unit in the previous tab to the one specified in the message, at least in the case of missing tabs.
Re: Why does my Mod crash?
This a fix for the CTD during the "thinking...." phase.
I ran into this problem after I created a new 600 AD map for the Fall of Rome mod. The game would CTD, usually after 10 turns, or so.
I isolated it to the Avars conquering Macedonia, and discovered I missed a neighbors entry for Dalmatia to Epirus. The Epirus to Dalmatia entry was fine.
One I added the Epirus entry to Dalmatia's neighbors, the game was fine. I auto ran it for 300 years with out a CTD.
Re: Why does my Mod crash?
Quote:
Originally Posted by SicilianVespers
This a fix for the CTD during the "thinking...." phase.
I ran into this problem after I created a new 600 AD map for the Fall of Rome mod. The game would CTD, usually after 10 turns, or so.
I isolated it to the Avars conquering Macedonia, and discovered I missed a neighbors entry for Dalmatia to Epirus. The Epirus to Dalmatia entry was fine.
One I added the Epirus entry to Dalmatia's neighbors, the game was fine. I auto ran it for 300 years with out a CTD.
That may be my problem, then. After posting here, I discovered that I had a number of such errors. Most pertained to recent changes I made to the map, but a few could have been present before then....
I just tried, and the game still won't work, but later I'll remove the units and see if it still crashes immediately.
Re: Why does my Mod crash?
Quote:
Originally Posted by WesW
I have found that there are hard-coded links to agents in the units text which bar you from removing any of them from the game, or altering their unit type.
here is the content of a pm from WesW
============================================
Well, one of the last bugs I found was simply a missing bracket around one of the priority settings in the buildings text, something like {PORT(100}, where the 100 wasn't enclosed. This caused an immediate crash the first time you hit End turn.
============================================
The two bugs which were such a bitch both dealt with agents, however. The game kept CTD'ing during the AI thinking phase when it got to the first faction that had any type of Castle, on the first turn after the castle appeared.
It was so confusing because there was nothing wrong with the buildings text, and the bug was unrelated to any of the buildings which had a castle as a preq, such as the Town Militia line or the Royal Palace.
There was also no connection to any units enabled by the castle, and any syntax errors in the units text should have been detected at game startup.
It turned out that I had done two things which were each causing the exact same crash.
First, I had moved three agent units to the bottom of my units text, which placed them beyond the 255 limit. The game also crashed if they were deleted from the file.
The second thing I had done was change the unit type of the Grand Inquisitor to Cardinal, since I was using it as a pagan priest. Changing the unit type of any of the agents also causes the CTD. There are no messages generated by any of these crashes; the program simply shuts down.
From what I can surmise, the game performs multiple checks of the units text at different points in the game.
The check at program startup checks for allowable values from a hardcoded list, which I am sure you are familiar with.
There is a second check, when you begin or load a saved game, for royal units. If it fails to find any for a given faction, it defaults to the first unit in the units text, which can cause a crash if that unit is not one which can appear on the battlefield, such as an agent or a ship. I suspect that this was why the programmers placed Highlanders at the top of the file, so that the game wouldn't default to the Catapult. Artillery will work fine, but having a regular unit probably worked better when they were first playtesting the game.
These two checks I knew about, but it turns out that there is a third check, apparently the first turn after the appearance of any building designated as a Troop Producer in the buildings text, though it may be something hardcoded specifically to castles. This was very confusing since there is an Agent Producer designation which one would think would trigger anything dealing with agents. I seem to remember that the Troop designation affects the granting of valour bonuses to battlefield units, but I don't know what the others are used for.
Anyway, it is this check which triggers the hardcoded search for the agent names and types, and unless all are present and properly linked, and located somewhere within the first 255 units in the text, then the game crashes.
WesW
Re: Why does my Mod crash?
Regarding the above post, I should mention that the agent crashes do not occur until after the appearance of the first castle in an AI-controlled province. Castles controlled by you don't trigger the check, apparently.
Re: Why does my Mod crash?
I've been working a mod (with files independent of the original M:TW) that ultimately allows the user to play as one of many "rebel" factions...based around the Early Era. Currently I think I have 22 playable factions or so...7 of which are not playable in the original M:TW. The mod also adds many small tweaks, new units etc.
The problem I'm having is a CTD when loading the 3D battle map IF and only IF certain troops are in the army for specific factions; it loads approx halfway on the bar before CTD. The troops are produced without problem. No CTD if I "autocalc" a battle (ie skip the 3D mode).
Specific example: One of my added factions is the Moldavians...
If I have Varangian Guard or Saracen Infantry (probably others as well) in the army, I get the CTD if I attempt to "fight out" a battle. Same with my new units...the new units work normally for the original factions, but NOT if owned by the new factions. I can use SOME troops at least with the Moldavians, such as Armoured Spearmen, Irish Dartmen, Avar Nobles.
I keep thinking it's some sort of shield error, but I can't find it if it is. I've gone over the unitprod (MOD-specific unitprod, btw) so many times and found no error. It seems like I've gone over every obscure corner of the directory and back again and found nothing that would cause this particular problem. I could provide an extensive list of which troops work and which don't if that helps pinpoint the issue. Any ideas? :help:
Re: Why does my Mod crash?
Sounds like the face shield textures problem. There are eight unit types which cause a CTD when used by modded factions.
Try the following:
In the textures/men folder you'll find the folders for the various unit graphics. Copy the following folders and rename the copies as shown below:
Peasant --> Custom0
ChainHlm --> Custom1
HlPlArSH --> Custom2
LArmWCav --> Custom3
MKnight --> Custom4
MSHelm --> Custom5
PlateS --> Custom6
PlateCav --> Custom7
Now go into each of the new folders and rename the files to match the new folder. For example, in Custom0 you'll find Peasant.bif, Peasant.lbm and Peasant_H.bif. Rename them to Custom0.bif, Custom0.lbm and Custom0_H.bif and then do the same to the other new folders. Only change the .bif and .lbm files to match the new folder name.
Almost done. Now go into the unit production file that you're using for your units, using an editor like Gnome's. The default file was Crusaders_unit_prod11.txt but you only need to change whichever unit file you're using for that mod. Scroll across to field 48, the texture body types. Now scroll down and locate each unit which uses one of the abve 8 textures and change the entry t match the new folder. Remember to use all caps here. So each time you see "PEASANT, YES, YES" change it to "CUSTOM0, YES, YES" all the way down, and change "CHAINHLM, YES, YES" to "CUSTOM1, YES, YES" and so on for each of the units which use one of the above texture types. Make sure you don't miss any. That's it. The reason that you want to copy the abve folders and rename the copies is so you can still play the original unmodded eras which use files pointing to the old folders.
Good luck.
(And thanks to Lysander for identifying the problem and the solution way back when and Starkhorn for including the fix in his adding_new_faction_guide.pdf and BKB for clueing me in to the need to add PlateCav to the list)
Re: Why does my Mod crash?
now i had this same problem and i tried this solution, and im pretty sure i logged in everything right.
changed to the custom names in the directory
changed to the custom names in Gnome
but when i tried it again i got a message from Gnome saying: that Custom0 wasnt recognized in column 27 row 1 (even though the correct collum where they were edited is 48 and 27 is something like ammo)
What could have gone wrong with that.
i finnally found a temporary solution. To change all the images in Gnome to images that i knew that worked, Like LotHelm and stuff like that. Now the battles work but theyre graphics are messed up. (i get dieing graphics while the unit is marching to battle lol. And if i face another angle, they're marching, but i get the picture sideways of each unit marching.)
~:) anybody have a clue
Re: Why does my Mod crash?
Good question. Make sure that you're using all caps in the Gnome editor for the new unit folders. It may not seem like a big deal; but it is. Even though you can name the folders Custom0 and the files Custom0.bif; you must use caps in the proper column in the unit_prod file. So in Gnome, make absolutely sure that the lines read "CUSTOM0, YES, YES" and "CUSTOM1, YES, YES" etc, and not "Custom0" or something else. Leaving out a capital letter, or using the letter O instead of the number 0, or a missing comma in any of the statements you changed will cause it to crash when loading the file and give you the column row error statement. The column and row in the erroe message numbers aren't always equivalent to the columns and rows in an editot like Gnomes; but the file name should be correct, so locate the problem that way.
Re: Why does my Mod crash?
Howdy folks,
Getting a CTD when I am trying to HOST games in MP on Gamespy... all with a mod. I can join games just fine. Any ideas?
LA
Re: Why does my Mod crash?
I have found a few more errors and such as I have continued to mod the game...
First, for buildings, bif names are also used as the links to the descriptions and names texts for the building, and these names are case-sensitive. So, if your building info doesn't show up onscreen, check this out.
Also, there apparently can only be one building type with the TRADING_POST effect.
I also think I found the cause of the crash which occured whenever an Agent type was removed from the game. I noticed that the Heroes text referenced all the unit types from the units text when deciding which types were admissible for Heroes. The list of unit types appears to be hardcoded, and causes a crash if any are not present in the units text. It doesn't matter whether or not there is a Hero of a given type- every type in that hard list must be present in the units text. Apparently, the game is designed to initially activate the Heroes text right after the first AI-controlled castle appears, so this is what triggers the crash.
Finally, ruler numbers appear to not work properly for new factions. Instead, the game uses one of the entries in the startpos' prince list for the faction. The entries it uses differ depending upon the faction's place in the list.
This bug also occurs for the Horde. To illustrate the bug, since it's hard to describe, here is a paste from the Medmod beta, where I have made notes for my own use (sanity).
SetStartLeader:: FN_HORDE 0 8 2 0 4 1 0 0 0 3 //1st entry used as ruler no.
SetStartLeader:: FN_HUNGARIAN 10 8 3 4 4 1 2 1 5 1
SetStartLeader:: FN_PAPIST 9 8 4 5 11 22 4 5 4 10
SetStartLeader:: FN_SICILIAN 4 8 4 3 6 2 4 1 2 1
SetStartLeader:: FN_BULGARIAN 2 8 1 4 0 3 0 3 2 1 //1st entry used as ruler no.
SetStartLeader:: FN_CUMAN 0 8 1 4 0 3 0 3 2 1 //1st entry used as ruler no.
SetStartLeader:: FN_GENOESE 4 8 4 3 1 1 12 2 2 1 //3rd entry used as ruler no.
SetStartLeader:: FN_LITHUANIAN 2 8 1 4 1 3 0 3 2 1 //3rd entry used as ruler no.
SetStartLeader:: FN_OUTREMER 2 8 1 4 4 3 4 3 2 1 //3rd entry used as ruler no.
SetStartLeader:: FN_PORTUGUESE 5 8 3 4 1 1 2 1 5 1 //3th entry used as ruler no.
SetStartLeader:: FN_SCOTTISH 7 8 3 4 2 3 1 1 2 2 //6th entry used as ruler no.
//SetStartLeader:: FN_SERBIAN 0 8 1 3 2 2 1 4 1 1 //6th entry used as ruler no.
SetStartLeader:: FN_SWEDISH 7 8 3 4 2 1 2 3 5 1 //6th entry used as ruler no.
SetStartLeader:: FN_TEUTONIC 3 8 2 3 2 3 3 1 2 1 //6th entry used as ruler no.
For the Swedes, their king would be "Hagar" the 3rd, while the Teuton Master would be the first with his name.