Thread Tools
Old December 22, 2002, 09:08   #91
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 10:16
Local Date: November 1, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
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; December 22, 2002 at 09:23.
Peter Triggs is offline  
Old December 22, 2002, 18:47   #92
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 12:16
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Is this your own version of the Withdraw script Peter, it is slightly differnt from the version you find in Dale's latest Dipomod version of Apolyton Pack.

For those of you haven't voted for CTP1/2 yet in the top games series poll you sould do it now.

You can also vote for single games in this poll.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old December 22, 2002, 20:53   #93
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 10:16
Local Date: November 1, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
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.
Peter Triggs is offline  
Old December 23, 2002, 18:12   #94
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 12:16
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
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
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:16.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team