Presenting my very first Civ 4 (mod)mod! Rhye's and Fall RAND Plus After having played a few games in regular RFC, I moved to RAND after the concept of Rhye's game mechanics with random maps enthralled me. Regular RFC is actively developed by Leoreth in RFC Dawn of Civilization, but unfortunately there seems to be not much interest in RAND. I aim to at least make it slightly more appealing. While I have done some minor work on Civ before, this has been the first time I have actively created code in SDK and Python, both merging previous ideas and implementing my own ones. Here is the full list of my changes: Spoiler : INCLUDED Spoiler : - Merged Unofficial Patch 1.6 by jdog5000 and associated (http://forums.civfanatics.com/showthread.php?t=324024), many changes to SDK, Python and XML - Merged Global Warming mod 1.11 by Minor Annoyance (http://forums.civfanatics.com/showthread.php?t=302649), its changes are commented with GWMod. Some tweaks: -- With the Rising Seas option, oil resources are replaced when a desert tile sinks -- Jungles have the same global warming defense value of 2 than forests, instead of 3 -- Includes gamespeed scaling and change by Fuyu so that GW defense does not affect the chance of nuclear winter -- Only civics with positive health changes qualify as 'treehugger' -- GW and Nuclear Winter don't hit peaks, and fallout doesn't block GW - Merged some changes from Mongoose SDK 3.3 (http://forums.civfanatics.com/showthread.php?t=325318), either directly or included in the UP 1.6. These changes are generally commented with Mongoose, 12monkeys or Roger Bacon FloodPlainsFix AITargetCityValueFix TransportUpgradeFix CargoLoadFix CargoInterceptFix PromotionRefundFix ExperienceNeededMod CollateralDamageMod FlankingDamageMod CityTileCommerceMod FeatureGrowthMod EventTileDowngradeMod PillageOwnRoadsMod TeleportingIntoLakeFix CameraZoomFix - Merged Varietas Delectat 9.2 by avain (http://forums.civfanatics.com/downloads.php?do=file&id=17916) and Taizong leaderhead (http://forums.civfanatics.com/downloads.php?do=file&id=12282) together with Actual Quotes by Willowmound (http://forums.civfanatics.com/showthread.php?t=234288) - Merged some of the Movie Mod from BAT by LemonMerchant (http://forums.civfanatics.com/forumdisplay.php?f=268), though I wish megaupload was still up to include some extra movies from Arian (http://forums.civfanatics.com/member.php?u=143025) SDK Spoiler : - CvGame::update and CvGame::doTurn: Implemented the change by embryodead to prevent autosaves during autoplay (need to revisit it so that it also works with random spawn dates) - CvPlayer::getBuildingClassPrereqBuilding: Arabia can build state religion cathedrals for 1 temple each instead of 4 - CvPlayer::canDoEvent: prevented minor civs from being targeted by an event? - CvPlot::canTrain: Obsolete bonuses are no longer needed to train units - CvUnit::resolveCombat: Units with a CombatLimit value, like siege units, get full combat experience when surviving after attacking, instead of being limited to gain EXPERIENCE_FROM_WITHDRAWL - CvUnit::canMoveInto: Units can move into Jungles with any Woodsman promotion, or with any route if they can actually use it (own it, friendly or no territory, or Commando, etc) as well as being the Khemer UP - CvUnit.cpp::canParadrop: The player needs access to Oil to perform paradrops 1.1 - Tweaks to the GW mod - CvUnit::testSpyIntercepted: spies cannot be caught by minors as was intended, and spies caught are now killed by the player and added to unit killcount statistics as in vanilla Civ - CvGameCoreUtils::isPromotionValid: defensive only units cannot get promotions which increase their attack in a certain feature or terrain - CvPlayer::canFound: Russia can found cities on Tundra and Snow. Vikings too but only if coastal or next to fresh water. Khmer can found cities on Jungle - CvPlot::calculateNatureYield: Russia can yield 1 food out of Tundra tiles naturally, making it possible to build improvements on it. - CvCity::doReligion: religions can now propagate to cities that already have a religion, controlled by a parameter in GoblalDefinesAlt.xml, RELIGION_SPREAD_EVERYWHERE - CvPlayer::acquireCity: Vikings get x2 gold when capturing a city 1.2 - CvPlot::movementCost: units that ignore the Desert movement penalty now have to check for hills and features as in other terrains PYTHON Spoiler : - Consts.py: Reenabled Hatshepsut for Egypt as the early AI leader, she gets replaced by Ramesses around 1600BC and is selectable to play with. Changed Ming Tai Zu (now Taizong) to appear circa 500AC - CityNameManager.py: Fixed many accented characters that had to be written in HTML code - Stability.py: Holy Roman Rathaus also increases stability - UniquePowers.py: Added Religious Inmigration by Panopticon (http://forums.civfanatics.com/showthread.php?t=338241), changed so that it doesn't favor any religion and is restricted by Theocracy - CvPediaMain.py, CvPediaBuilding.py: the new UU and UB (see civilizations below) will now appear in the Civilopedia, as well as some previously hidden leaders - CvRFCEventHandler.py: When a city collapses or is traded in a Congress it no longer loses the national wonders turned to world wonders in RFC, nor the Triumphal Arch, and does lose the Olympic Park and the main and summer palaces - Consts.py, UniquePowers.py: new Slave unit for the Aztecs - RFCUtils.py: adapted for the Mali Skirmisher being now a longbowman replacement - RiseAnFall.py: changed the Conquerors spawning system for the better, taking into account new UUs, can now spawn Cavalry and Cuirassiers with the right techs - Removed/changed all references to the Marsh resource 1.1 - Barbs::spawnUnitsArea and Barbs.py::spawnUnitsLatitude: added a check for not Ocean terrain, might help with barb ships being spawned at the ice caps - UniquePowers::useMongolUP: The Mongol UP now works if the city they approach has a population up to 20% bigger than the one they razed - UniquePowers::selectRandomCityTargetCiv: Fixed the American inmigration UP so that the target city is indeed picked randomly and needs at least a surplus of food to receive immigrants - Pots::setup: Added new custom game option for having all the civs spawn no matter the size of the map (Fierabras) 1.2 - RFCUtils::bestUnitCounter, bestUnitMounted, bestUnitSeaTransport: all tweaked and fixed for the new UUs - RiseAndFall::OnFirstContact: more tweaks to conqueror spawning, also creates missionaries of the state religion (JediClemente) - Stability::OnCityRazed: Mongolia has no stability hit from razing cities - Stability::OnCityAcquired: Persia's UP is now cumulative with the Occupation civic XML Spoiler : ART - CIV4ArtDefines_Terrain.xml, Assets\Art\Terrain\Textures: Changed the marshes' graphics and art schema to Marsh terrain graphics from Colonization by johny smith (http://forums.civfanatics.com/showthread.php?t=293601) - Removed all references to the marsh resource, changed the graphics of the marsh feature with those of the resource (swamp weed) BUILDINGS - Fixed all national wonders turned to world wonders in RFC so that they give no culture when captured (Colosseum, Channel Tunnel, Mt. Rushmore) - Turned Triumphal Arch into a regular building and it is always captured - Moved all embassies to their own special building category, they become obsolete with Electricity - Interpol is again a regular building, requires Communism - Amphitheatre gives +1 for Football Events, UB versions don't (they are all already better off) - Market and Forum give +1 for Cotton - American Mall gives no for Football Events - Pyramids never go obsolete (karadoc) - Statue of Zeus requires just a monument in the city, since they often go obsolete too soon to have bothered building 4+ of them - Temple of Artemis gives prophet instead of merchant - Colosseum only gives experience to melee, archery and mounted units, and becomes obsolete with Military Science - Cristo Redentor builds twice as fast with stone 1.2 - U.N. and Apostolic Palace can be built even with Diplo victory off CIVILIZATIONS Basically I've added a UU and UB to some civs if their culture generally encompasses that of a civ which doesn't appear in RFC - Babylonia: Gets back the Garden UB, added Vulture UU (+Sumeria), you can now select Gilgamesh to play - China: Added Hwacha UU, Seowon UB (+Korea), changed Ming Tai Zu with Taizong - Germany: Added Landsknetch UU, Rathaus UB (+Holy Rome) - Rome: Added Cataphract UU, Hippodrome UB (+Byzantium) - Greece: Added Cataphract UU (Lone Wolf) - Montezuma's favorite civic is now Slavery instead of Police State GAME INFO - Slavery: -1 in all cities (PieceOfMind) - Max national wonders for OCC uncapped 1.1 - Bureaucracy: -25% maintenance costs for number of cities 1.2 - Fixed the Movie Mod module which was preventing the Manhatan Project from being built - Serfdom: +2 and +1 from Fort TERRAIN - Marsh resource removed - Marsh terrain gives a 25% defense penalty instead of bonus and can yield 1 , and 1 if next to a river. Resources and goody huts may be found on them - All marshes have the Swamp feature that gives an additional 25% defense penalty, and -1 to Marshes. This is the feature preventing some/most units from entering Marshes 1.1 - Swamps are now drained with Steam Power (Baldyr) - Hamlets, Villages and Towns provide 5, 10 and 15% defense bonus, and the later acts as a city like Forts (Baldyr) 1.2 - Plantations can be built on Swamps before SP, like on Jungles - Offshore platforms act as cities and provide +10% defense, you can station fighters on them (but keep them guarded) - Fallout causes 10% damage/turn to units on it TEXT - Otto I is Charlemagne again (ok, so he was more Frank than German, but there are anachronisms everywhere already) - Renamed Phalanx to Hoplite and Oromo warrior to Askari (Leoreth) - Renamed East Indiaman to Oostindievaarder - Renamed missionaries to their faith specific names as per the Realistic Religions mod by abbamouse (http://forums.civfanatics.com/showthread.php?t=141585) -- Jewish Rabbi -- Islamic Da'eiah -- Hindu Swami -- Buddhist Acariya -- Confucian Junzi -- Taoist Sage 1.1 - Changed the description of some Unique Powers to be more specific 1.2 - Added missing text for languages other than English to avoid killing the interface (but do yourself a favor and play in English) UNITS - Added Commando promotion to Great Spy (PieceOfMind) - Workboats incur no military support and get no military production modifiers (PieceOfMind) - Gunship, Mobile Artillery, Missile Cruiser, Stealth Destroyer and all Missiles require Aluminum - Battleship also requires Artillery (PieceOfMind) - Missile Cruiser also requires Rocketry - Attack Submarine requires either Oil or Uranium, has +50% attack against Battleship - Mech Infantry requires Oil - Jet Fighter has +50% against helicopters (Civ V?) - Infantry no longer can upgrade to SAM Infantry (Fuyu) - Grenadier can upgrade to SAM Infantry (Fuyu) and has +50% attack against Musketman too - Increased iPower of: Catapult and Hwacha (5->6), Cannon (12->14), Artillery (18->19), Mobile Artillery (26->28), Missile Cruiser (14->42) as per Fuyu and PieceOfMind's recommendations - City Garrison promotions give protection against revolts (10, 15 and 20%) - Mali Skirmisher is now a Longbowman replacement, with 7, requires Archery and Monarchy - Gunship can move over impassable terrain and starts with Amphibious - Paratroopers can move through Jungle and Swamp - Panzer starts with Mobility instead of Commando and requires Oil instead of Combustion (Leoreth) - Added back collateral strength to the Keshik so that they can flank siege units (Leoreth) - Mercenaries get +50% from pillage - Lowered evasion chance of guided missile to 90% - ICBM can be rebased and loaded on vessels, is not nuke immune, and requires Satellites - Legionnaries can build roads and forts, at 75% work speed (Civ V) - Camel Archer has +25% against other mounted units (Leoreth), inherent withdrawal chance reverted to 15% but starts with Flanking I - Conquistador's inherent bonus against melee units lowered to 25% but starts with Shock - Impi and Musketeer now have 1 but start with Morale - Added a new Slave unit for the Aztecs' UP: works at 50% the rate of normal workers and has just 1 move, but can also hurry production (50 hammers base) or join a city as a free citizen specialist. Slaves can only be created from combat if not running Emancipation - Added the Asault Mech from Next War! Its an armored, national unit, 3 allowed. strength 60, hammers 450, -10% city attack, 15% withdrawal, 20% interception with range 2, 2 moves, 1 first strike, collateral up to 60% to 6 units with 50% eff., no def. bonuses, starts with Blitz and Morale, can't move through swamp. Requires: Fusion, Robotics, Aluminum and Uranium 1.1 - Attack Submarine doesn't require Combustion - Destroyer now also requires Radio - Added a few modular units from the Modern Era Expansion from VD to fill gaps. If you don't want them, just delete the relevant folders under Modules\Units or edit them as you please: -- (Pre-)Dreadnought: Requires Steel, Assembly Line, Iron, and Coal or Oil. Combat 24, Moves 7, cost 180, bombard 16, Collateral up to 40% to 3 units with 35% eff. Upgrade line is now: Ship of the Line and Ironclad -> Dreadnought -> Battleship -- Armored Cruiser: Requires Railroad, Iron, and Coal or Oil. Combat 16, Moves 9, cost 130, bombard 12, 15% intercept. Upgrade line is now: Frigate and Privateer -> Armored Cruiser -> Destroyer -- Support Aircraft: The A-10 Thunderbolt! Requires Advanced Flight, Oil, and Aluminum. Combat 16, cost 140, +100% against armored units and targets them first, can see submarines and be carried on carriers (I doubt they are able to detect submarines in RL, but I can't add a unit for every specialized task). Airship now upgrades to this instead of to Fighter. -- Humvee (Recon Vehicle): Requires Plastics, Oil. Same properties than Explorer which now upgrades to it. Combat 12, Moves 3, cost 90, can attack and pillage but not capture cities, starts with Woodsman I, Guerrilla I, Sentry and Commando. Perfect for worker pillaging and army support. - Guerrilla III and Woodsman III are now available to Recon units, but due to the change in isPromotionValid, only the Humvee can get them - Gunship can now move over all terrain but not enter Ocean - Lowered the Camel Archer's to 9 - East Indiaman has the flag to explore rival territory back on, in case a (American most likely) player flips one from the Dutch - Ballista Elephant has 1 first strike (karadoc) - Cuirassier doesn't require Gunpowder since Military Tradition already does 1.2 - Removed Accuracy and Interception promotions from naval units - Changed a few promotions with Combat X requirement to alternatively have a Drill X requirement, like Blitz and Amphibious - Counter promotions now have the tech requirement for the unit category they target: Cover requires Archery, Formation requires Horseback Riding, Ambush requires Industrialism... - Persian Immortal's attack bonus against archer lowered to 75% and starts with Cover - Musketeer starts with Shock - Babylonia, Greece, Korea, Persia and Russia now use the Sukhoi-25 graphics for the Support Aircraft - Changed the Panzer's attack bonus against Rifleman and Infantry to a flat +25% against gunpowder units, and reduced its strength to 26 (inferior weaponry, superior tactics) - New artstyles of the Humvee for a few civs: -- Aztec, France, Greece, Mali, Portugal use the Panhard VBL -- Babylonia, Carthage, Ethiopia, Persia, Russia use a BDRM -- Germany, Netherlands, Vikings use the Dingo VBL -- England, Rome, Spain use the Lince LMV All my changes in the files should be commented with "Tweaked" Download links: The sourceforge page Download Rhye's and Fall RAND Plus 1.2 Download the Varietas Delectat resource files These are required for the mod to run, but you might have already installed them somewhere else. An SVN link in case you want to use SVN software to see my latest changes: svn://svn.code.sf.net/p/rfcrandplus/code/trunk/Rhye's and Fall RAND Plus Current issues Spoiler : - Barbarian ship spawning seem to be nonexistent, or happen at the icecaps (goddammit) - A leader might contact you with a request right after a Congress which ended in a DOW from him against you, causing weirdness (there are ways to get a leader contact with a DOW going on through many ways, this is just one more) - MovieMod is not really working, only world wonders/projects can play movies (I doubt anyone plays with movies on though...) - I can't select nor deselect anything manually in the diplomacy screen when dealing with Egypt or Turkey! Future Plans: Spoiler : With some terrible amounts of optimism, here is what I hope to achieve one day: - Remove minor civs from the diplomacy screen and from any AI considerations regarding relations to other players - Add Epic and Marathon gamespeeds as in RFCMarathon by embryodead (http://forums.civfanatics.com/showthread.php?t=354241) - Merge with K-Mod (http://forums.civfanatics.com/showthread.php?t=407049) - Make more civs playable, possibly with inspiration from (http://forums.civfanatics.com/showthread.php?t=400112) -- Separate Holy Rome/Austria-Hungary from Germany, add Korea and Byzantium - these should be legit enough -- Add the Zulu, Celts and the much hated Native America (Iroquois Confederacy/Canada), these might not be very historical. Possibly custom events/game options allowing the player to decide whether they appear at all? -- Separate Sumeria from Babylon. Turn them into Israel? - Add an Inquisitor unit (see RevolutionDCM), make the AI use it - Make Forts act as colonies in Civ 3? - Further tweak the GW mod, make a tile sink only if an ice tile has been melted regardless of terrain, make gw scan and hit only tiles in which something can happen (no plain water tiles) - Add WoC frame to ease adding modules? - Add AI code for land units to carry missiles and other land units: -- Mobile Artillery and Assault Mech carrying missiles -- Gunship carrying Paratroopers and Marines - Add custom game options for no Stability, Plague, Congresses... because in choice lies fun? - Make more options of the mapscript customizable. The mod depends heavily on the mapscript for things like Earth Likeness parameter being a hack over Sea Level, but maybe some interface options like those from the Full of Resources mapscripts could be implemented - See above, option to manually determine the number or even the specific civs that will spawn on the map - Make resources dynamically appear in new areas like in standard RFC. Currently the starting area of a civ might get new resources, but thats it, the Americans will often not have horses around. Resources.py is being imported but not used, should be rewritten to this feature Next version Changelog For stuff that is so far implemented and pending release, please discuss for better feedback! Spoiler : Version 1.3 - CvPlayer::canFound: Aztec and Maya can also found cities on Jungle plots - CvInfos CvUnitInfo::getArtInfo: changed the method by which the game selects the units' ArtDefineTag, to comply with Varietas Delectat and to have less anachronistic unit models in the industrial age - CvUnit::canMoveInto: all Khmer units can also move into Swamps - CvPlot::calculateYield: implemented change by embryodead and Leoreth so that cities built on top of resources get the yield of that resource's relevant improvement - CvPediaBuilding::getBuildingSortedList: removed embassies and corporations from the Civilopedia screen - RiseAndFall::setup: Egypt will now actually start with the civics Bureaucracy if their birth turn is >= 50, and Representation instead of Hereditary Rule if >= 130 - CvRFCEventHandler::OnCityBuilt and onCityAcquired: new second Maya UP, free Observatory in every city, since their UP was (is) a tad weak - Replaced Serfdom changes to forts with +1 gold from farm and plantation and -1 to town (karadoc) since the AI was building almost nothing but forts - Added a U.N. vote for Commonwealth global civic, because hey, Commonwealth sounds good (don't hate me too hard for it) - Removed defense penalty from the Swamp feature, it was a bit useless anyways since combat seldom takes place in marshes - Ensured world wonders give 2 GPP and national wonders 1 - Moai Statues give +1 hammer to water plots in all cities, becomes obsolete with Steam Power - Colosseum doesn't require Barracks, only gives +4 exp to melee units, only gives +50% production speed to land units, builds 50% faster with either marble or stone - Leaning Tower requires Phylosophy instead of Literature (Leoreth) - Monument and UB go obsolete with Divine Right instead of Calendar (Leoreth) - Statue of Zeus is back to needing 4+ monuments - Reverted Temple of Artemis to give merchant GPP again - Coal Plant requires Electricity, like all other plants indirectly do - American Mall requires Biology and Electricity, instead of Refrigeration (which requires both) and gives 1 merchant slot (Leoreth) - Bunker, Bomb Shelter, Aqueducts and Levees build twice as fast with Stone - Babylonian Garden also requires Agriculture - Removed Cataphract UU from Greece - Reverted change to Mali Skirmisher, it is an Archer again - Keshik now has 2 movement, doesn't ignore terrain movement cost, but starts with Morale and Mobility. Upgrades to Cuirassier instead of Cavalry (leftover from regular Civ), ignores Desert movement cost - Removed the flag to explore rival territory from the East indiaman, kind of a cheat - Changed Support Aircraft +100% against armored units with just Ambush promotion - Leadership promotion gives +50% protection against revolts - Ironclad's movement increased to 4 (Leoreth) - Mobile SAM also requires Aluminum - Gunship is again limited to moving on land - ICBM is again nuke immune and cannot be loaded on submarines, but can be rebased to other cities or forts - Both submarines are now immune to collateral damage - Cavalry and Cossack can flank attack Artillery, at 50% strength - Grenadier has collateral damage like the Cho-ko-nu - Missile cruiser has 40% interception chance with range 2 - Incan Quechua requires Bronze Working instead of Mining - Dreadnought and Armored Cruiser require Astronomy - Added south american warrior artstyle to the Incans - Borrowed the Bombard unit from RFC DoC (Leoreth). Not optional as I need it integrated in Python: -- Combat 8, Cost 90, +25% city attack, collateral up to 60% to 6 units, Requires: Gunpowder, Iron or Copper. Upgrade line is now: Catapult and Trebuchet -> Bombard -> Cannon -- Restored Cannon to 12 strength, requires Steel. Knight and ass. UU have 50% flanking strike against Bombard. Curassier, Cavalry and ass. UU have full flanking strike against it -- Also integrated in Python events so conquerors will get bombards instead of cannons if they arrive with Gunpowder (unless they arrive with Steel) - Added another (very) optional unit from the Modern Era Expansion from VD, the Special Forces: basically Paratrooper + Navy SEAL, which now upgrade to it. Requires Fascism, Composites, Advanced Flight. Combat 24, Cost 180, +50% against all siege units, 1-2 first strikes, paradrop range 5 with 25% evasion. Starts with Amphibious, Commando, March. Badass Credits and Tanks - Rhye - Of course! Thank you for the best Civ mods, and for RAND especially, which makes the perfect blend between historical simulation and Civ's randomness - Leoreth - for his work on RFC Dawn of Civilization (http://forums.civfanatics.com/forumdisplay.php?f=452) from which I'll hopefully be able to grab more concepts to improve this mod in the future, and for advice and help - Panopticon - for the RFC modules which actually showed me a bit about Python - LunarMongoose - for his many SDK tweaks to make the game better - Minor Annoyance - for the Global Warming mod - PieceOfMind and karadoc - for their work on the PIG mod (http://forums.civfanatics.com/showthread.php?t=328283) and K-mod (http://forums.civfanatics.com/showthread.php?t=407049), which is excellent research on how to improve the base game without deviating from its roots - Embryodead - for RFCMarathon and Sword of Islam (http://forums.civfanatics.com/showthread.php?t=373155), excellent modmods which provide new and interesting features - Avain and all contributors to Varietas Delectat (http://forums.civfanatics.com/downloads.php?do=file&id=17916), I really can't stand Civilization without it! - jdog5000 and contributors to the Unofficial Patch (http://forums.civfanatics.com/showthread.php?t=324024), for your time to make the game even better - EmperorFool, LemonMerchant, Fuyu and everyone involved in the BTS Unaltered Gameplay project (http://forums.civfanatics.com/forumdisplay.php?f=268) for placing my ideals high as to what this mod should ever have - Baldyr and LoneWolf for some interesting ideas - All the people who discussed my additions in the thread where this started (http://forums.civfanatics.com/showthread.php?t=455853) - And all the people who discuss things here of course!