March 10, 2002, 17:58
|
#1
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Med Mod 2 Multiplayer Crash
Hey wanted to first thank you guys for making such a great mod for CTP2. It works great for me single player and makes the game substantially more fun.
However, when I try to play a multiplayer game with 2 humans and 6 AIs, the game will crash to the desktop (on the host/Player 1 machine) under the following circumstance(s):
* Player 2 (the non-host) conquers a city which is the last city of an AI civ and ends their turn. On the way to player 1's turn, the game appears to crash when it gets to where the conquered AI civ would have its turn.
* When I try the multiplayer game as singleplayer right before Player 2 conquers the civ (with the CPU taking over for Player 1 in this case), there is no crash.
* In multiplayer, if Player 1 conquers the civ instead, the game will crash after Player 1's turn ends.
* Crash occurs on Win98, WinME and WinXP as the host.
* Doesn't matter if either Player 1 or Player 2 chooses to 'bloodbath' or 'extend empire' or if the city gets destroyed because it's a size 1.
* One of the MP save games from my debugging is attached where either Player 1 or Player 2 can take the city after a turn.
* This is v2.1 of the mod, with the most recent (as far as I can tell) version of Wouter's SLC file that addressed the city disband crashing.
--
I tried turning off some of the triggers in Wouter's scripts, specifically commenting out the militia and partisan code. The partisan code shouldn't have mattered since we didn't reach Nationlism.
Any help would be appreciated, I'm hankering to play this mod multiplayer and its been so great single player!
|
|
|
|
March 18, 2002, 12:46
|
#2
|
Deity
Local Time: 23:32
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
Let's try to keep this in the proper thread...
Have you tried disabling *all* SLIC code for MedMod and/or Cradle? Then we can be absolutely certain the error is in the SLIC code and not in the text-file settings. To do this, just go into the relevant gamedata.txt file ([MM2|CRA]_gamefile.txt) and replace '[MM2|CRA]_script.slc' with 'script.slc'. Does the crash still occur after this? (It would be best to start a new game to test this)
|
|
|
|
March 21, 2002, 03:30
|
#3
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
See results of testing in thread below.
Last edited by Spanscape; March 21, 2002 at 13:04.
|
|
|
|
March 21, 2002, 13:03
|
#4
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Okay problem is isolated to the CRAG_script.slc file.
I played two quick multiplayer games where I gave myself 5 settlers and 100000 gold.
Game#1: I kept CRAG_gamefile.txt (which is the 1.3 Beta gamefile) pointing to CRAG_script.slc. Cranked out 5 chariots with Player 1 (the host), zoomed over to a neighbor and wiped them out. When I ended the turn, crash to desktop. I know I was using the Cradle SLIC, since both of us had militia.
Game #2: Changed CRAG_gamefile.txt to point to just scripts.slc and restarted the game. Cranked out 5 chariots again with Player 1 (the host) and zoomed to a neighbor. Conquered them -- no crash upon ending turn. Conquered another neighbor, no crash. No militia this game for me, so I know the Cradle scripts were disabled.
At least it's isolated. I suppose I can now start removing specific scripts, one at a time, to identify which was is causing it to bomb.
Any suggestions on the order of attack?
Last edited by Spanscape; March 21, 2002 at 13:10.
|
|
|
|
March 21, 2002, 13:21
|
#5
|
Emperor
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
I have only the following advice (which is probably fairly obvious):
First comment out all other file references at the bottom of the file. If that removes the bug proceed to removing the first half, etc. Halving the number of suspects each time you should need only 4 tests. Then if you're lucky and it appears to be just one files fault, look in that for triggers which happen on the relevant events (City conquest, civ conquest, start of turn, etc.) and fiddle.
However, it's probably due to a combination of triggers so it won't be so easy.
Also, of course, many of the triggers are interdependant and it will cause crashes if they're removed without their fellow triggers.
Good luck
|
|
|
|
March 21, 2002, 13:22
|
#6
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Ok, I re-enabled CRAG_script.SLC, but commented a few specific ones out:
//#include "CRA_capturecity.slc"
//#include "CRA_homeguard.slc"
//#include "CRA_springfield.slc"
//#include "CRA_frenzy.slc"
With those guys gone, it crashes. So it doesn't look like it's the millitia code, building destruction, AI capitol rebuilding or frenzy code.
Next game, I commented the following out:
//#include "CRA_diplomod.slc"
//#include "CRA_pow.slc"
//#include "CRA_disasters.slc"
//#include "CRAI_KillCityOption.slc"
//#include "CRAI_FortsForAIs.slc"
//#include "CRAI_ComImpSForAIs2.slc"
And... CONQUERED TWO CIVS - NO CRASH.
Third game, I had only these two commented out:
//#include "CRA_diplomod.slc"
//#include "CRA_pow.slc"
And again... conquered two civs - no crash. Final test game coming up where I determine who the culprit is.
Game #4, with only one script commented out:
//#include "CRA_pow.slc"
And - CRASH! Looks like CRA_diplomod.slc is the culprit in my multiplayer crashes! So now I wonder which trigger inside is the real culprit... although I don't have a problem playing without this mod to avoid the crashing in the future.
Last edited by Spanscape; March 21, 2002 at 14:04.
|
|
|
|
March 21, 2002, 14:08
|
#7
|
Prince
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
Isn't diplomod in the Apolyton Pack as well though? Why would it cause a crash in one but not the other?
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
|
|
|
|
March 21, 2002, 14:19
|
#8
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Just did a diff between APOL_diplomod.slc and CRA_diplomod.slc...
And, guess what? Apolyton pack uses Diplomod v3.6 and Cradle has Diplomod v3.5... there's about 30 lines of difference, where a few of the differences are use of g.player instead of player[0] and vice versa.
Going to try my test with the APOL_diplomod.slc (so v3.6) and see how it jives.
|
|
|
|
March 21, 2002, 14:22
|
#9
|
Emperor
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
If that doesn't work try it with just diplomod (all the others commented out) and see if you still get crashes. It might be due to a combination of things.
|
|
|
|
March 21, 2002, 14:37
|
#10
|
King
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
While you're doing all this, have DebugSlic set to 'Yes'; you'll get better error messages.
|
|
|
|
March 21, 2002, 14:40
|
#11
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
See what happens when I decide to stay home and telecommute? I end up getting side-tracked into solving CTP2 problems. =)
At any rate, tried out Diplomod 3.6 under Cradle (replaced the CRA_diplomod.slc file with my APOL_diplomod.slc file, as well as updated CRA_diplomod_str.txt).
And... still crashes! However, Diplomod 3.6 works fine with Apolyton mod, as well as a mod I cranked out with all of the Cradle units but based on the Apolyton SLCs.
So, there's some funky combination of Cradle and Diplomod (3.5 or 3.6) which causes this crash...
--
With DebugSLIC=Yes, I just see the usual assortment of 'invalid # of arguments in isHumanPlayer' messages. Then as I conquer the AI civ, I get another of those in a CaptureCity trigger, then the crash to desktop.
Last edited by Spanscape; March 21, 2002 at 14:46.
|
|
|
|
March 21, 2002, 14:46
|
#12
|
Emperor
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Quote:
|
Originally posted by Peter Triggs
While you're doing all this, have DebugSlic set to 'Yes'; you'll get better error messages.
|
What exactly does DebugSlic do?
|
|
|
|
March 21, 2002, 14:56
|
#13
|
Emperor
Local Time: 16:32
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
|
My one concern is that Diplomod is one of the SLICS that will affect AI action in the game - it is actually a code that rewrote one of the base SLIC codes that came with the game - most of the other codes were add-ons.
There should be a copy of Diplo 3.6 as part of the files. Look for the files
CRAP_diplomod.slc
CRAP_diplomacy.txt
CRAP_Strings.txt
CRAP_diplomod_str.txt
in your setup
You can (after making a backup of the 3.5 originals) rename the above files using the CRA_ prefix and thus activate Diplo 3.6.
Run your test...
This is assuming that Dale has used Diplo 3.6 in the Apolyton Pack. But at the same time, I think MedMod uses 3.6.
You may also try to use the default diplomacy files in the game and see if that causes a crash.
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
|
|
|
|
March 21, 2002, 14:59
|
#14
|
Emperor
Local Time: 16:32
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
|
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
|
|
|
|
March 21, 2002, 15:02
|
#15
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Yes, did all that to try out Diplomod 3.6 under Cradle. And you are correct, MedMod does use 3.6, and I see the crashing there as well when an AI civ is conquered.
At any rate, 3.6 under Cradle also crashes, but Diplomod 3.6 doesn't crash under Apolyton. Which leaves us to it being a combo of two mods. At any rate, I ran the latest test using this SLIC combo:
#include "CRA_airunit.slc"
//#include "CRA_capturecity.slc"
//#include "CRA_homeguard.slc"
//#include "CRA_springfield.slc"
#include "CRA_wonderbuildings.slc"
#include "CRA_wonderunits.slc"
//#include "CRA_frenzy.slc"
#include "CRA_diplomod.slc"
//#include "CRA_pow.slc"
#include "CRAG_updater.slc"
#include "CRA_disasters.slc"
#include "CRA_Goods.slc"
#include "CRA_soundfix.slc"
//#include "CRAI_KillCityOption.slc"
//#include "CRAI_FortsForAIs.slc"
//#include "CRAI_ComImpSForAIs2.slc"
//#include "CRAI_pw_cheat.slc"
#include "CRAI_infras.slc"
Result: still crashes. Going to try it with Diplo 3.6 *only* and see what happens.
|
|
|
|
March 21, 2002, 15:17
|
#16
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Okay, I'm stumped... I ran *only* Diplomod 3.6 in this last test and it crashed. I was expecting whatever SLC was conflicting to not be enabled, so Diplomod would behave.
FYI, CRAG_script.slc had everything but Diplomod out:
//#include "CRA_airunit.slc"
//#include "CRA_capturecity.slc"
//#include "CRA_homeguard.slc"
//#include "CRA_springfield.slc"
//#include "CRA_wonderbuildings.slc"
//#include "CRA_wonderunits.slc"
//#include "CRA_frenzy.slc"
#include "CRA_diplomod.slc"
//#include "CRA_pow.slc"
//#include "CRAG_updater.slc"
//#include "CRA_disasters.slc"
//#include "CRA_Goods.slc"
//#include "CRA_soundfix.slc"
//#include "CRAI_KillCityOption.slc"
//#include "CRAI_FortsForAIs.slc"
//#include "CRAI_ComImpSForAIs2.slc"
//#include "CRAI_pw_cheat.slc"
//#include "CRAI_infras.slc"
--
Any thoughts on what else I can disable to see if I can get Diplomod to behave?
|
|
|
|
March 21, 2002, 15:41
|
#17
|
Emperor
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Which version of Cradle are you using? I don't have any files starting CRAG_ in my install...
Next thing to try is commenting out the various BeginTurn triggers in the diplomod file. This might cause other problems (like crash on loading of SLIC), but try anyway.
|
|
|
|
March 21, 2002, 15:42
|
#18
|
King
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
Quote:
|
What exactly does DebugSlic do?
|
It gives you more and better error messages. With DebugSlic =No, the game can run even though it contains some errors.
Spanscape, what are you getting when these crashes are happening?
I downloaded one of your savegames a couple of days ago, but I couldn't put it into multiplayer and get it working.
|
|
|
|
March 21, 2002, 15:43
|
#19
|
Emperor
Local Time: 16:32
Local Date: October 31, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
|
Try using the default diplomacy files. The files would be
diplomacy.txt
diplomacyproposal.txt
There should be a default diplomacy.slc file - offhand I do not know what the name of that file is - but it should be in the default/gamedata folder.
And there will be a file in the english/gamedata folder that is part of the default diplomacy setup - offhand I do not know what the name of that file is either. You will have to make a change in the
(CRA_)Strings.txt
to tie that file into the test setup
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
|
|
|
|
March 21, 2002, 16:29
|
#20
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Quote:
|
Originally posted by hexagonian
Try using the default diplomacy files. The files would be
diplomacy.txt
diplomacyproposal.txt
to tie that file into the test setup
|
Yup, just tried this - no crashing works fine.
Peter: Basically whenever I conquer a civ (destroy their last city) in a multiplayer game under Cradle or MM2 (not not Apolyton), something in the Diplomod (3.5 and 3.6) is causing me to immediately crash to the desktop on the host machine as soon as the conquering civ ends its turn (whether it be the host or the joined player). I get no messages, no popups if DebugSlic=Yes, just back to Windows.
I suppose my next step is to start commenting out triggers in CRA_diplomod.slc and see if I can isolate the problem...
|
|
|
|
March 21, 2002, 16:52
|
#21
|
Super Moderator
Local Time: 23:32
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
|
Quote:
|
Originally posted by hexagonian
There should be a default diplomacy.slc file - offhand I do not know what the name of that file is - but it should be in the default/gamedata folder.
|
You know the name it is diplomacy.slc. By the way this file only contains triggers that removed diplomacy from the original game. The AI was stopped from accepting proposals, counter proposals and threats and was stopped from making threats by default. I guess this file shouldn't never be in the game, its probably purpose was showing modmakers how to change the AI behaviour in diplomacy.
-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
|
|
|
|
March 21, 2002, 17:04
|
#22
|
Emperor
Local Time: 07:32
Local Date: November 1, 2010
Join Date: Dec 2000
Posts: 3,944
|
Just as a clarification:
There absolutely no difference between Cradle Diplo 3.6, Med Mod Diplo 3.6 and Apolyton Diplo 3.6, EXCEPT in concern to diplomats establishing embassies:
- The actual unit used to establish embassies is different in the MODS.
- The advance which enables the above diplomat units is different in the MODS.
They're the only two differences between all the Diplo 3.6 versions.
BTW, if you change to the Diplo 3.6 script, you MUST use the diplomacy.txt that comes with Diplo 3.6. One major change between Diplo 3.6 and Diplo 3.6 was I added the "normal" and "make friends" diplomatic personalities. If you don't, then Diplo 3.6 SLIC with diplomacy.txt 3.5 WILL crash when it checks AI diplomatic personalities.
Hope this helps.
BTW, does the crash occur IMMEDIATELY when you hit end turn, or does it crash where normally the destroyed civ would take it's turn? IE: Hit end turn - CRASH! or Hit end turn - player 2 goes, player 3 goes, player 4 (destroyed) CRASH!
|
|
|
|
March 21, 2002, 17:22
|
#23
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Edit: deleted duplicate post
|
|
|
|
March 21, 2002, 17:25
|
#24
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Quote:
|
Originally posted by Dale
BTW, does the crash occur IMMEDIATELY when you hit end turn, or does it crash where normally the destroyed civ would take it's turn? IE: Hit end turn - CRASH! or Hit end turn - player 2 goes, player 3 goes, player 4 (destroyed) CRASH!
|
My most recent tests have been running 'Cradle 1.3 Beta' which points to Diplomod 3.5.
Just ran a test where I commented out the following 4 triggers:
HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre
HandleEvent(BeginTurn) 'DIP_MainRoutine' post
HandleEvent(BeginTurn) 'DIP_EstabEmb' pre
HandleEvent(BeginTurn) 'WDT_MainRoutine' pre
Still crashes with these 4 out of CRA_diplomod.slc. Double-checked and removing CRA_diplomod.slc from CRAG_script.slc means no crashing.
At first I thought the game crashed when it reached the dead AI civ in the turn cycle. But then I realized that the other human player was at index 2 (after myself as the host and index 1 conquered the civ) never got their turn, with the AI civs being index 3-8. So its at the beginning of a human turn when the host crashes.
BTW, whats the difference between g.player and player[0] in a trigger?
|
|
|
|
March 21, 2002, 17:36
|
#25
|
Prince
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
Quote:
|
Originally posted by Peter Triggs
It gives you more and better error messages.
|
Yeah, usually "array index 0 out of bounds" which is annoying, because there's not always an obvious array, and its almost certainly not out of bounds
I don't understand that one...
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
|
|
|
|
March 21, 2002, 17:43
|
#26
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Ok, in addition to these 4 (which removing by themselves do not cause the crash):
HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre
HandleEvent(BeginTurn) 'DIP_MainRoutine' post
HandleEvent(BeginTurn) 'DIP_EstabEmb' pre
HandleEvent(BeginTurn) 'WDT_MainRoutine' pre
I took these 5 additional triggers and 2 functions out:
HandleEvent(InitDiplomaticState) 'DIP_InitDiploState' pre
HandleEvent(NextDiplomaticState) 'DIP_NextDiploState' pre
void_f DIP_EstablishEmbassyFunc(int_t recipient)
HandleEvent(ContactMade) 'DIP_FlagContactMade' pre
HandleEvent(EstablishEmbassy) 'DIP_FlagEmbassyMade' pre
HandleEvent(BeginTurn) 'WDT_BeginGame' pre
int_f WDT_GetDistanceNearestCity(location_t theLoc, int_t thePlayer)
And... *bling* no more crashing...
|
|
|
|
March 21, 2002, 17:49
|
#27
|
Emperor
Local Time: 22:32
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Try it with none of the embassy code and all of the other code and vice versa.
|
|
|
|
March 21, 2002, 17:55
|
#28
|
King
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
What's really surprising is that you're not getting ANY error messages.
|
|
|
|
March 21, 2002, 18:03
|
#29
|
Settler
Local Time: 21:32
Local Date: October 31, 2010
Join Date: Mar 2002
Posts: 29
|
Quote:
|
Originally posted by J Bytheway
Try it with none of the embassy code and all of the other code and vice versa.
|
Ok left all the WDT code in and removed all the embassy stuff:
HandleEvent(BeginTurn) 'DIP_EmbassyCheck' pre
HandleEvent(BeginTurn) 'DIP_MainRoutine' post
HandleEvent(BeginTurn) 'DIP_EstabEmb' pre
HandleEvent(InitDiplomaticState) 'DIP_InitDiploState' pre
HandleEvent(NextDiplomaticState) 'DIP_NextDiploState' pre
void_f DIP_EstablishEmbassyFunc(int_t recipient)
HandleEvent(ContactMade) 'DIP_FlagContactMade' pre
HandleEvent(EstablishEmbassy) 'DIP_FlagEmbassyMade' pre
With those 8 guys gone, no crashing.
|
|
|
|
March 21, 2002, 18:06
|
#30
|
Emperor
Local Time: 07:32
Local Date: November 1, 2010
Join Date: Dec 2000
Posts: 3,944
|
Well, you can elliminate:
HandleEvent(BeginTurn) 'WDT_BeginGame' pre
After the first turn, this is disabled anyways.
Also, I don't think it's going to be:
HandleEvent(InitDiplomaticState) 'DIP_InitDiploState' pre
HandleEvent(NextDiplomaticState) 'DIP_NextDiploState' pre
These two functions will only ever trigger if you're an AI.
Which leaves the embassy functions. I had a hellova time getting that running. Wouldn't surprise if there was still a bug in it. *sigh*
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 17:32.
|
|