View Full Version : Mod (Scenario) - Crash to Desktop...help!
Mattygerst Sep 07, 2009, 01:38 PM Okay, as you know, I've been working a long while on creating a mod.
Things I'd guess you'd need to know:
Basis of the mod: RevDCM
We took the RevDCM mod, and created new leaders, civilizations, flags, buttons, and leaderhead art. To create the new leaders we simply copied/pasted the old leaders with the traits we wanted and simply renamed all the leaders (as well as corresponding XML references needed). Then we created new .dds art and placed that in all the correct places as per tutorials on CivFanatics. We then created new civilizations (48 of them) by adding them to the civilizationinfos and then put the correct corresponding leader that we created with them. All the art work for flags/civs/leaders/buttons, etc., should be correct.
Now, we are basing our map off GEM. GEM is used with RevDCM in the GEM 1940 scenario. We are using the same map - only renaming a few cities, and moving around the city owners in the on the map as well as playerculture.
In the WorldBuilderSave for the map - the correct civilizations and leaders from the XML were added to correlate correctly with the map. Everything appears to be in order.
Now - I load up the game. Choose Advance -> Load a Mod -> MyMod. The game loads correctly with no errors. No XML errors, etc. The game has publicmaps=0 set, so you are forced into playing the WBS save for the GEM map. The game opens, and you get to the leaders to select from. This all works 100% correctly with correct leaderheads and art and flags all present.
Now - I go to start up the game. Before the map starts initializing I get a crash to desktop. I get a QUICK message saying (something? - happens to quick to really see it) about "Gilgamesh." When Gilgamesh has been deleted from the LeaderheadInfos and from the CivilizationInfos in the XML (remember, no XML errors).
What are we missing that would be causing this crash to desktop before the map even starts initializing?...
Any help is much appreciated and I can be contacted on AIM if you ask me to so we can work on it together if possible. Everything appears nearly in order - all the "work" is done, and the map is created. The mod loads correctly thru start-up. Getting the important crash before the map loads is the issue...and as you know, an important one, haha.
mechaerik Sep 07, 2009, 01:40 PM Did you remove Gilgamesh from the DiplomacyInfos xml file?
Mattygerst Sep 07, 2009, 01:45 PM Ah! Certainly did not. Will get on it right away, and get it done. Will be back once that is done.
Mattygerst Sep 07, 2009, 03:21 PM Did you remove Gilgamesh from the DiplomacyInfos xml file?
Also...I have no idea what this entails. I know where the DiplomacyInfos xml is and all. But, I have done no work in it whatsoever.
I have created 48 new leaders/civs. And I have removed all the civs that are in the game - standard. What do I need to do to get the diplomacyinfos xml working correctly?
mechaerik Sep 07, 2009, 03:56 PM Go through the file and close the tags where Gilgamesh is found.
Mattygerst Sep 07, 2009, 07:29 PM Do I have to add tags for each of the new leaders I built, as well? I would assume so?...
mechaerik Sep 07, 2009, 07:36 PM You don't have to, but if you don't, the leaders won't have custom diplomacy text (which means they won't say anything when you meet them).
Mattygerst Sep 07, 2009, 08:33 PM What if it is a scenario in which each leader starts out already at contact? Maybe I'm not fully understanding what you're saying?...
Also...from what I wrote in the first post...is there anything else that I'm missing out on that will create a CTD?...
mechaerik Sep 07, 2009, 08:40 PM Well, if all civs have contact, then you won't really see much difference.
AS far as I can tell, there doesn't appear to be anything else.
Mattygerst Sep 07, 2009, 09:23 PM Okay, to make sure I don't break the XML...what exactly do I do with the XML in the Diplomacy Infos?
Considering I'm using none of the civs that come with the game (in name), and have created (by copy/pasting/editing) 48 new civs?
To prevent this crash - what exactly am I doing with this XML? Simply removing it?...I can't imagine that is correct, but I also don't know what exactly I'm supposed to do, either...
mechaerik Sep 07, 2009, 09:26 PM Just remove the leader's mentions in the Diplomacy infos. Whenever you see a tag, close it. I'm sure there's some faster way to do it though. Probably take a modified file from another mod.
phungus420 Sep 07, 2009, 09:27 PM I really don't think an extranious entry in DiplomacyInfos will cause a critical issue. I mean, it's not good, and you should fix it anyway, but I doubt that's the cause of your crash.
mechaerik Sep 07, 2009, 09:34 PM Happened to me before when I tried removing the Next War civs.
EDIT: Now that I think about it though, I think it happened after the map was generated.
Mattygerst Sep 07, 2009, 11:22 PM I really don't think an extranious entry in DiplomacyInfos will cause a critical issue. I mean, it's not good, and you should fix it anyway, but I doubt that's the cause of your crash.
Any other thoughts about this? The crash happens right after I select to Begin Game. You see it try to start "Initializing" for a split second, and then a CTD. Any thoughts if not simply the DiplomacyInfos?...
Whenever you see a tag, close it.
Sorry for a fairly rudamentary understanding of XML lingo...but exactly what do you mean (as in, do) to close a tag? Don't know if it doesn't matter - but remember...the entire mod loads with zero XML errors...
phungus420 Sep 07, 2009, 11:53 PM Any other thoughts about this? The crash happens right after I select to Begin Game. You see it try to start "Initializing" for a split second, and then a CTD. Any thoughts if not simply the DiplomacyInfos?...
First off don't ignore the diplomacyInfos issue. You need to remove the references to Gligamesh anyway, I just don't think this is causing this particular CTD.
My initial thought is that you haven't set up the map to handle 50 players. You need to add teamID and player entries so that there are 50 in total, the teamID count should stop at 49, since it starts at 0. Whether or not you think you've done this, double check, it's entirely possible you've miscounted, or your teamID# list has two entries for #21 or some such thing, minor typos like this always occur when coding.
If it's not the map, then you should start by fixing the diplomacyInfos issue. Once that's done, assuming you still get a CTD, download the debug dll available for RevDCM, and see if it comes up with anything. A debug dll will often catch things or point you toward causes that are otherwise invisible:
RevDCM 2.51 debug gamecore (http://www.filefront.com/14170937/RevDCM-debug.zip/)
Mattygerst Sep 08, 2009, 02:20 AM If it's not the map
Definitely not the map. The map, itself, is a simple copy/paste from a map that works already in a different scenario with simply changes to cities/culture/units.
Once that's done, assuming you still get a CTD, download the debug dll available for RevDCM, and see if it comes up with anything
Will get on that once the diplomacy infos is fixed...any chance you could answer this question - just so I'm sure:
Whenever you see a tag, close it.
What - exactly - am I doing to close a tag?
Sorry for a fairly rudamentary understanding of XML lingo...but exactly what do you mean (as in, do) to close a tag? Don't know if it doesn't matter - but remember...the entire mod loads with zero XML errors...
phungus420 Sep 08, 2009, 02:52 AM Definitely not the map. The map, itself, is a simple copy/paste from a map that works already in a different scenario with simply changes to cities/culture/units.
Does the map work for a mod that uses a 50civ dll?
Mattygerst Sep 08, 2009, 11:05 AM Does the map work for a mod that uses a 50civ dll?
Yes...thats where the map comes from. GEM 1940 is a 50 civ scenario & it is copied and used in the same fashion. Nothing at all was changed on the map except stuff that 'needed' to be. As in...the leaders were changed, and the civilizations were changed to match the new leaders/civs in the mod. And then cityowners & playerculture owners were changed. So, it is definitely not the map.
It is something...something breaking it and causing the CTD...but not the map. So...if I'm getting zero XML errors (besides having to do DiplomacyInfo which shouldn't cause the CTD) and if the map is correct and holds 50 civs...what could the problem be?...
phungus420 Sep 08, 2009, 11:20 AM It is something...something breaking it and causing the CTD...but not the map. So...if I'm getting zero XML errors (besides having to do DiplomacyInfo which shouldn't cause the CTD) and if the map is correct and holds 50 civs...what could the problem be?...
Is this not clear enough? Do I need to rephrase what I wrote here?
First off don't ignore the diplomacyInfos issue. You need to remove the references to Gligamesh anyway, I just don't think this is causing this particular CTD.
If it's not the map, then you should start by fixing the diplomacyInfos issue. Once that's done, assuming you still get a CTD, download the debug dll available for RevDCM, and see if it comes up with anything. A debug dll will often catch things or point you toward causes that are otherwise invisible:
RevDCM 2.51 debug gamecore (http://www.filefront.com/14170937/RevDCM-debug.zip/)
Mattygerst Sep 08, 2009, 11:42 AM Yeah, I know, I'm in the process of doing that - I was just trying to be clear that it is def. not the map, itself. Because it holds 50 civs, etc.
What I don't understand is what I need to do with the DiplomacyInfos.
It is an entire page - 9784 lines of code, with 2.7 million characters. There is every leader from regular BTS mentioned various times...do I simply delete every time they're mentioned? I've known what to do with every other part of the XML - it is pretty much self-explanatory. But this I'm having trouble understanding exactly what I can do...
phungus420 Sep 08, 2009, 11:59 AM Search for the offending Leader references and delete the entire block of code referencing them. You say Gilgamesh is the offending leader, so you search for LEADER_GILGAMESH and delete all the blocks relating to him. For instance, the first block of code you'll find in your Gilga search will be this:
<Response>
<Civilizations/>
<Leaders>
<Leader>
<LeaderType>LEADER_GILGAMESH</LeaderType>
<bLeaderType>1</bLeaderType>
</Leader>
</Leaders>
<Attitudes/>
<DiplomacyPowers/>
<DiplomacyText>
<Text>AI_DIPLO_FIRST_CONTACT_LEADER_GILGAMESH_1</Text>
</DiplomacyText>
</Response>
Delete all blocks of code like this, the stuff between the <Response>, </Response> tags. If you find something like this:
<Leaders>
<Leader>
<LeaderType>LEADER_GILGAMESH</LeaderType>
<bLeaderType>1</bLeaderType>
</Leader>
<Leader>
<LeaderType>LEADER_HAMURABI</LeaderType>
<bLeaderType>1</bLeaderType>
</Leader>
</Leaders>
Then don't delete the entire block, just delete the Gilgamesh portion, specificially <Leader>
<LeaderType>LEADER_GILGAMESH</LeaderType>
<bLeaderType>1</bLeaderType>
</Leader> Should be the only piece you remove in such cases.
Mattygerst Sep 08, 2009, 12:39 PM Okay, I fully understand.
Last question (I think)...since I've removed every leader from the original game & replaced them with all new leaders - would it make sense to simply remove every reference to every leader in this thread?
The_J Sep 08, 2009, 06:50 PM Definitely not the map. The map, itself, is a simple copy/paste from a map that works already in a different scenario with simply changes to cities/culture/units.
That could maybe be a problem.
If there's someting on the map, which you removed in your XML, the map will crash when you try to load it.
Okay, I fully understand.
Last question (I think)...since I've removed every leader from the original game & replaced them with all new leaders - would it make sense to simply remove every reference to every leader in this thread?
...in this thread :confused:?
Mattygerst Sep 08, 2009, 08:00 PM That could maybe be a problem.
If there's someting on the map, which you removed in your XML, the map will crash when you try to load it.
There is nothing on the map that would also be in the XML. I double checked everything.
...in this thread ?
Haha...typo...I meant...if I have removed all the original leaders and replaced them...shouldn't I just delete just about everything in the diplomacy infos (considering this a current day scenario and all leaders will start out at contact with each other)?
The_J Sep 09, 2009, 06:36 PM There is nothing on the map that would also be in the XML. I double checked everything.
No more ideas, sorry :dunno:.
Haha...typo...I meant...if I have removed all the original leaders and replaced them...shouldn't I just delete just about everything in the diplomacy infos (considering this a current day scenario and all leaders will start out at contact with each other)?
Yes, to that :).
|
|