Does anyone know if it's possible to mod victory conditions where win conditions are based on the capture of certain capital cities, or if cities can be assigned victory points? Or does anyone know of any user-made scenarios that already has this? Thanks.
Announcement
Collapse
No announcement yet.
Victory through capital city capture possible?
Collapse
X
-
Odd, I very nearly replied to your Civ3 thread. Cities are assigned victory points in the Alexander the Great scenario as included in the game. The capture of "Mount Doom" in Hexagonian's Lord of the Rings scenario gives a substantial advantage to the human player, but victory is possible to assign by capital city capture.
If you only have one capital city to capture, the code is easy:
Code:HandleEvent(CaptureCity) 'victory_conditions' pre{ if(CityHasBuilding(city[0], "IMPROVE_CAPITAL") && !IsHumanPlayer(city[0].owner)){ GameOver(1,1); // player one wins; } }
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
-
Thanks, Immortal Wombat!
I'm a complete newbie for CTP2 scenario design, but I would very much like to see some scenarios where there is "sudden death" victory conditions where each country gets a capital to defend. If there is none around, I suppose I'll try to see if I can create one. Do you know if there are any other user-created scenarios that have this? Also, if you happen to find out how to assign cumulating victory points for cities, that would be fantastic. Thanks again!
Comment
-
Originally posted by Darrell999
Do you know if there are any other user-created scenarios that have this?
Also, if you happen to find out how to assign cumulating victory points for cities, that would be fantastic. Thanks again!Code:int_t VICTORY_POINTS[]; HandleEvent(CaptureCity) 'count_victory_points' post{ VICTORY_POINTS[city[0].owner] = VICTORY_POINTS[city[0].owner] + city[0].population; if(VICTORY_POINTS[city[0].owner] > 150){ GameOver(city[0].owner,1); } }
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Comment
-
Hmmm - there are a few historical scenarios which could be made to use that capital capture condition.
I have the war between Germany and the Soviet Union firmly in mind here - if Germans capture Moscow, German victory, if Russians capture Berlin, Russian victory, and so on and so forth.
But since I am no programmer and certainly no graphics whizz, I can't realise this idea myself
Comment
-
If there is more than one AI. Isnt what Darrell999 is looking is a code that give all the cities of the player who lost the capital to its conquerer?
If it is here is the code
Code:HandleEvent(CaptureCity) 'PedrunnsVictoryConditions' pre{ int_t c; int_t tmpPlayer; int_t CityCount; city_t tmpCity; if(CityHasBuilding(city[0], "IMPROVE_CAPITAL") // && !IsHumanPlayer(city[0].owner) ){ tmpPlayer = city[0].owner; CityCount = PlayerCityCount(tmpPlayer); for (c = 0; CityCount; c = c + 1) { GetCityByIndex(tmpPlayer, c, tmpCity); if(CityIsValid(tmpCity)) { Event: GiveCity(tmpCity, player[0]); } } } }
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Comment
Comment