 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:23
|
|
I always play in debug mode so I've never worried about getting out of it. If you're playing the same game, did you do the 'ReloadSlic' ritual. Open up the chat screen (', apostrophe key) and then type: /reloadslic Then press 'return', and then 'return' again when the chat screen goes clear, to close it. I think that will get you out of debug mode, otherwise you'll probably have to start a new game.
I had an earlier version of the file with slightly fewer lines. I think I found the problem so here's how I corrected it, if Dale wants to use this:
code:
HandleEvent(BeginTurn) 'WDT_MainRoutine' pre {
int_t tmpVal;
city_t tmpCity;
tmpVal = 0;
for(WDT_civ = 0; WDT_civ < WDT_NumOfPlayers; WDT_civ = WDT_civ + 1) {
if (IsPlayerAlive(WDT_civ)){
if( !(IsHumanPlayer(player[0])) && WDT_civ != player[0] && HasAgreement(player[0], WDT_civ, 3)) {
WDT_numoftroops = player[0].units;
for(WDT_count = 0; WDT_count < WDT_numoftroops; WDT_count = WDT_count + 1) {
GetUnitByIndex(player[0], WDT_count, WDT_tmpunit);
if(CellOwner(WDT_tmpunit.location) == WDT_civ && GetAgreementDuration(player[0], WDT_civ, 3) >= 5) {
WDT_tmploc = WDT_tmpunit.location;
AddCenter(WDT_tmploc);
WDT_waterunit = 0;
if(TerrainType(WDT_tmploc) >= 10 && TerrainType(WDT_tmploc) <= 17) {
WDT_waterunit = 1;
}
WDT_veteran = 0;
if(IsVeteran(WDT_tmpunit)) {
WDT_veteran = 1;
}
if(!(IsCivilian(WDT_tmpunit)) && WDT_waterunit != 1) {
tmpVal = WDT_GetDistanceNearestCity(WDT_tmploc, player[0]);
GetCityByIndex(player[0], tmpVal, tmpCity);
WDT_tmploc = tmpCity.location;
AddEffect(WDT_tmpunit.location, "SPECEFFECT_DIPLOMATIC", "SOUND_ID_EXPEL");
WDT_tmptype = WDT_tmpunit.type;
Event: DisbandUnit(WDT_tmpunit);
CreateUnit(player[0], WDT_tmptype, WDT_tmploc, 2, WDT_tmpunit2);
if(WDT_veteran == 1) {
ToggleVeteran(WDT_tmpunit2, 1);
}
}
}
}
}
}
}
}
The thing is that whenever you cycle through the Player array, it's a good idea to check whether the player you want to look at is in the game.
Last edited by Peter Triggs on 22-12-2002 at 18:23
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:23
|
|
It's Dale's April 22/02 version from the one of the Cradle updates. I just changed a couple of things to try to get rid of that 'out of bounds' error that Azeem reported.
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:23
|
|
Yeah I wondered why it looked so different in comparsion to my version of DiploMod, so obviously it is a difference between DiploMod 3.5 and 3.6:
code:
HandleEvent(BeginTurn) 'WDT_MainRoutine' pre {
int_t tmpVal;
city_t tmpCity;
location_t tmploc2;
location_t tmploc3;
tmpVal = 0;
player[0] = g.player;
for(WDT_civ = 0; WDT_civ < WDT_NumOfPlayers; WDT_civ = WDT_civ + 1) {
player[1] = WDT_civ;
if(!(IsHumanPlayer(player[0])) && player[1] != player[0] && HasAgreement(player[0], player[1], 3)) {
WDT_numoftroops = player[0].units;
for(WDT_count = 0; WDT_count < WDT_numoftroops; WDT_count = WDT_count + 1) {
GetUnitByIndex(player[0], WDT_count, WDT_tmpunit);
tmploc2 = WDT_tmpunit.location;
if(CellOwner(tmploc2) == WDT_civ && GetAgreementDuration(player[0], WDT_civ, 3) >= 5) {
AddCenter(tmploc2);
WDT_waterunit = 0;
if(TerrainType(tmploc2) >= 10 && TerrainType(tmploc2) <= 17) {
WDT_waterunit = 1;
}
WDT_veteran = 0;
if(IsVeteran(WDT_tmpunit)) {
WDT_veteran = 1;
}
if(!(IsCivilian(WDT_tmpunit)) && WDT_waterunit != 1) {
tmpVal = WDT_GetDistanceNearestCity(tmploc2, player[0]);
GetCityByIndex(player[0], tmpVal, tmpCity);
tmploc3 = tmpCity.location;
AddEffect(WDT_tmpunit.location, "SPECEFFECT_DIPLOMATIC", "SOUND_ID_EXPEL");
WDT_tmptype = WDT_tmpunit.type;
Event:DisbandUnit(WDT_tmpunit);
CreateUnit(player[0], WDT_tmptype, tmploc3, 2, WDT_tmpunit2);
if(WDT_veteran == 1) {
ToggleVeteran(WDT_tmpunit2, 1);
}
}
}
}
}
}
}
Unfortunatly there is another bug in the embasy rebuild code of DiploMod 3.6, actual I don't want to fix it, but use your new DiploMod, but in order to do it I need some status report so that I can decide how finished it is.
-Martin
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:23. Apolyton Time is 00:23. |
top of page
|
| archivepost |
|
Forum 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
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|