Theres some problems with it. I know IW isnt around and id fix the problems myself if i knew how to fix them both.
1. You can find cities in ruins, and keep them. (easily fixed)
2. I keep getting my second military unit disbanded for no reason, im not over unit support at all. I have one city (my capital) and it disbands my second warrior the turn after i build it... or am i missing something? Im guessing it has something to do with the disband starting 2nd settler code?
1. You can find cities in ruins, and keep them. (easily fixed)
2. I keep getting my second military unit disbanded for no reason, im not over unit support at all. I have one city (my capital) and it disbands my second warrior the turn after i build it... or am i missing something? Im guessing it has something to do with the disband starting 2nd settler code?
Code:
////////////////////////////////////////////////////
// OCC code //
// By the Immortal Wombat a.k.a. Ben Weaver. //
////////////////////////////////////////////////////
//--------------------------------
// No settling units for player 1
//----------------------------------
int_f mod_CanCityBuildUnit(city_t theCity, int_t theUnit) {
int_t tmpUnit;
tmpUnit = theUnit;
if(tmpUnit == UnitDB(UNIT_SETTLER) || tmpUnit == UnitDB(UNIT_URBAN_PLANNER) || tmpUnit == UnitDB(UNIT_SEA_ENGINEER)){
if(IsHumanPlayer(theCity.owner)){
return 0;
} else {
return 1;
}
}
else {
return 1;
}
}
//----------------
// Make it impossible to win by alliances
// and do start scenario stuff
//------------------
HandleEvent(BeginTurn) 'StartScen' pre {
if(IsPlayerAlive(1)) {
ChangeGlobalRegard(1, -1000, ID_HATE, 200);
}
message(1, 'startscenariomessage');
DisableTrigger('StartScen');
}
messagebox 'startscenariomessage' {
Show();
Title(ID_BEGIN_TITLE);
Text(ID_BEGIN);
}
//--------------
// Can't Capture Cities
//----------------
HandleEvent(CaptureCity) 'destroy' post {
if(player[0] == 1){
Event: KillCity(city[0], 0, 0);
}
}
//---------------------------
// Can't incite revolutions
//-----------------------------
HandleEvent(InciteRevolutionUnit) 'Spies' pre {
if(unit[0].owner == 1){
return STOP;
}
}
//----------------------------
// Cant Take Gift Cities
//------------------------------
HandleEvent(GiveCity) 'Nononocheating' pre {
if(player[0] == 1){
return STOP;
}
}
//-------------------------------------
// Destroy second settler on startup
//---------------------------------------
HandleEvent(BeginTurn) 'destroy_settler' pre {
unit_t tmpUnit;
if(IsHumanPlayer(player[0]) && player[0].units == 2){
GetUnitByIndex(player[0], 1, tmpUnit);
KillUnit(tmpUnit);
}
}
Comment