Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Creation/AI/Mods/Scenarios > Occ Mod
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:34
  Old Post 19-03-2004 19:01 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Occ Mod Browse Apolyton AD-FREE

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 is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:34
  Old Post 19-03-2004 19:37
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton buy from Amazon

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 is offline Maquiladora
Emperor

Jun 2001
time: 05:34
  Old Post 19-03-2004 19:57 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Browse Apolyton AD-FREE

Now its killing my 2nd warrior produced, but none after that...

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 19-03-2004 20:06 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton

Might have to do with the fact that you don't always get a 2nd settler.

Either way, since it should only work in the starting turn, an extra check "g.year == 0" in the if statement should solve the problem.

code:
//------------------------------------- // Destroy second settler on startup //--------------------------------------- HandleEvent(BeginTurn) 'destroy_settler' pre { unit_t tmpUnit; if (IsHumanPlayer(player[0]) && player[0].units == 2 && g.year == 0) { GetUnitByIndex(player[0], 1, tmpUnit); KillUnit(tmpUnit); DisableTrigger('destroy_settler'); } }

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:34
  Old Post 20-03-2004 10:01 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Browse Apolyton AD-FREE

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).

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:34
  Old Post 26-03-2004 16:12 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Get a bigger avatar today!

Hm, sorry guys. I dunno how I missed the second unit thing in testing. Shoulda set the check to look for settlers rather than units. It was a long time ago

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:34
  Old Post 26-03-2004 16:31
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Browse Apolyton AD-FREE



Wombat sighting!

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:34.
Apolyton Time is 00:34.
    top of page
Rate This Thread:
Forum Jump:
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
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0422 seconds (88.24% PHP - 11.76% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net