 |
|  |
 |
|
Maquiladora
|
|
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?
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);
}
}
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:34
|
|
quote:
Im guessing it has something to do with the disband starting 2nd settler code?
|
You're right; you only want to do this once:
code:
//-------------------------------------
// 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);
DisableTrigger('destroy_settler');
}
}
|
|
|  |
 |
|
Maquiladora
|
|
Now its killing my 2nd warrior produced, but none after that...
|
|
|  |
 |
|
Maquiladora
|
|
Yep, thats done it thanks.
Heres the updated mod zip.
1. Fixed disband problem as above.
2. No settlers from huts.
3. No cities from huts.
4. Minimum Gaia Controller Cores reduced to 1, so science end game is possible.
I suppose for 2 and 3 you could write code to only exclude them for the human, but frankly cities from huts do the AI more harm than good and settlers from huts isnt a great loss to the AI seeing as it doesnt tip huts much.
I havent played it to the end yet (no surprises) so there may be other bugs yet.
Attachment: occmod_2004_03_20.zip
This has been downloaded 1 time(s).
|
|
|  |
All times are GMT. The time now is 05:34. Apolyton Time is 00:34. |
top of page
|
|
|
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
|
|
|
|
|
|