View Full Version : [BtS] Seven05's World Piece
Seven05 Dec 11, 2007, 09:41 PM World Piece v0.62
Revision History, Screenshots and Optional Components (http://forums.civfanatics.com/showpost.php?p=6243578&postcount=2) *** New component added January 30th, 2008
Known Bugs & Pending Updates (http://forums.civfanatics.com/showpost.php?p=6243581&postcount=3)
Download Latest Version (http://forums.civfanatics.com/./downloads.php?do=file&id=7811)
The big changes:
Realistic Climates with new custom textures
The biggest change with the most impact is the game world & climate. A huge thanks to Cephalo for his 'Perfect World' map script which was used as a base and made all of this possible. The map script will generate a realistic world using a heightfield generator and plate tectonics, temperatures and rainfall will be calculated based on the world's heightfield. This means there won't be such obvious banding of terrains and deserts, jungles and grasslands will all be in the right places. Peaks will form mountain ranges and these can lead into the ocean to form realistic island chains. The terrain itself is climate based, there are different versions of grasslands, plains and deserts based on the climate. The custom terrains all have the same yield values and allow the same improvements however they are used to place resources and civilizations in appropriate climates. Yes, that means no more half-naked Zulu's starting in the frozen wastelands, but the Russians may find themselves up there.
With 0.6 I've added unique biomes to the world, these are limited areas with custom tectures and/or climate settings. For now there are two alternate biomes available one that simulates the Great Plains region of North America and another that is based on Australia's reddish brown dirt and savanna.
New Gamespeeds based on turns per era
Note: As of v0.3 this is fully controlled by the game speed you select.
World Piece uses optional, dynamic research cost adjustments to help keep the game running at an even pace through each era. This is a loosely enforced rule so it is still possible to discover advanced technologies before their time however it will require substantial effort. The way dynamic costs work is that the game speed determines the turns per era (they've all been renamed to make it easy), for instance the default is 100 turns per era. If you start the game in the ancient era all ancient techs will have their normal cost for the first 100 turns (using the default speed) and all later technologies from the Classical era and beyond will have their cost increased. Once 100 turns have passed all Classical era tech will be at their normal cost, Ancient technologies will be cheaper and Medieval and later technologies will be more expensive.
Additionally, to compensate for the longer games the prices for technologies will be dynamically increased by 12% per era. So a classical era tech will be 12% more expensive and a medieval era tech will be 24% more expensive, and so on. Since this change is done in the DLL the base prices will be intact for playing games using the default game speeds.
With this change it is still possible to use free technologies to discover a technology from a more advanced era. You can also continue to use great people to discover advanced technologies however they will frequently only provide a boost towards the technology rather than discovering it outright.
The biggest impact on gameplay is that you will typically have a longer period of time (more turns) to use the units and buildings from a particular era before they become obsolete. It will also be more difficult for any Civ to get too far ahead or fall too far behind. In order for this change to function you must select one of the 'turns per era' game speeds, selecting any other speed (e.g. Marathon) will use the standard tech costs without any of these effects.
AI tweaks
The AI has undergone several changes involving countless tweaks to unit, building and technology changes. They have been made smarter and more aggressive towards each other, not just the human player(s). And, perhaps most importantly, the majority of their bonuses to production and research have been removed including a few well hidden bonuses.
The AI diplomacy has been adjusted with the major change in determing if they'll ask you to join a war or stop trading with another civ. In the case of joining their war they'll only ask you if their elations with you are better than your relations with their enemy. Their requirements to ask you to stop trading are based on your relationship with them, this value can be different per leader and mirrors their required attitude before they'll accept a request from you to stop trading with another civ.
The AI's workers (and your automated workers) should no longer attempt to improve tiles outside of the workable area (fat cross) of your cities. There are a couple of exceptions to this- they will improve tiles with resources on them if they need the resource and they will continue to build routes in tiles that can't be worked.
Global Warming
Global warming has undergone significant changes. The effect of nuclear weapons is no longer the sole contributor to global warming and the method of changing terrain has been completely re-written. Global warming now works off of two primary factors- nuclear winter (resulting from meltdowns and nuclear weapons) and global warming (resulting from excessive polution/unhealthiness).
Nuclear winter is represented by severe droughts accross the land based on the results of publically available scientific models. Since the global cooling factor is short-lived (3-6 years) the most substantial effect is as much as a 75% decrease in precipitation. In the game, this is reflected by 'drying' terrain and transforming grassland to plains or plains to desert. The nuclear winter also has a duration built into it so it will no longer last indefinately however any changes to the terrain are permanent.
Global warming is represented by shifting the climate of individual tiles. So temperate tiles can shift to warm tiles and cool tiles can shift to temperate tiles. For example a cool grassland may turn into temperate grassland. The climate shift has some strict requirements based on the surrounding tiles so you will not suddenly have tropical land appearing in the middle of the norther tundras. Global warming is based on pollution value of every land tile in the game with unimproved tiles reducing pollution (in most cases) and improvements adding pollution (again, in most cases). Additionally, each city will add pollution equal to its size and the unhealthiness from buildings with additional pollution if the city has access to coal or oil. Although you will notice more tiles being affected by global warming, DON'T PANIC! The effect is minimal by itself as a temperate grassland has the same yield values as either warm or cool climate grasslands so the shift is more visual than anything. It will have an impact on health resources, destroying any that are not valid for the new terrain type and it can potentially enable more tiles to turn to desert as a result of the nuclear winter effect.
Finally, as pollution levels increase the frequency of storm events will increase. These are newely created events that do not have the same behavior as similar existing random events. These new effects will be in red text in the log window and the original random events have not been touched so you may still get those weather events in awkward places.
Enviroment Based Traits (Work in Progress)
In addition to the pre-defined traits each leader has there is a chance one of three environment based traits will be assigned to each civ in the beginning of a new game. The three traits are represented by a hidden, non-tradable technology that is given to civilizations starting in regions that are less than ideal- Jungles, Deserts and Tundra. The jungle civs receive access to the Jungle Warfare promotion which is identical to the vanilla 'woodsman' promotions except that it only works in jungles, additionally jungles in their city radius will provide a small health bonus instead of an unhealthy penalty. Desert civs gain access to the Desert Combat promotion, it is a single promotion that grants +25% to the units strength when attacking into desert tiles. Tundra civs receive a small bonus of +1 :food: and +1 :commerce: on any tile with a hunting camp. The bonuses are only given on turn 1 and there is no way to accumlate additional ones during the course of the game.
New Traits (Work in Progress)
All of the leader traits have been redesigned with a focus on making them more balanced and more unique. A couple of the over-powering abilities have been removed and replaced with abilities more inline with the rest of the traits. Traits should also have a more even feel throughout the game with a balance of early and late game benefits.
This is a work in progress and although it has undergone quite a bit of testing it's likely to change. However, without taking the complete changes to the mod into account several of them look weaker than they are in practice so I'd ask that you try out different traits in multiple games to see how they balance against each other. On the bright side, I personally find it more enjoyable to try out different civs now without worrying about giving up the power of Financial Leaders bonus commerce or 'wonder-mania' with an Industrious Leader.
The Spiritual trait is the first to have a 'new' ability not normally supported by Civ4, the new ability is dependant on one of the game options selected, see the minor rule changes below for specific details.
Aggressive:
-25% XP requirement
+100% Great General Emmergence
Double production speed of Barracks
Charismatic:
+1 :) per city
+1 :) from monument, colosseum, broadcast tower
Creative:
+10% :culture: per city
Double production speed of theater
Expansive:
+2 :health: per city
Double production speed of settler
Financial:
+10% :gold: per city
Double production speed of Bank
Imperialist:
Double production speed of National Wonders
Double production speed of monument, courthouse, jail
Industrious:
Double production speed of worker
Double production speed of forge, factory, industrial park
Organized:
No Anarchy
-25% Civic Upkeep
Philosophical:
+50% Great Person Rate
Double production speed of university
Protective:
+100% Great General emmergence within cultural borders
+1 :) from walls, castle
Double production speed of walls, castle, bunker, bomb shelter
Spiritual:
Can found multiple religions (only if limited religion founding enabled)
50% Research cost for religion techs (only if limited founding NOT enabled)
Double production speed of temple, monastary, cathedral
'Bonus' Technologies (Work in Progress)
Throughout the eras there are now several 'bonus' technologies. These are used to represent key historical events or other accomplishments frequently represented by wonders. I chose to use techs for those that are simply not appropriate when represented as buildings or whose development is better suited to research rather than production. None of these technologies are required to research any of the standard technologies, skipping them will not affect your ability to procede in the game.
The bonus techs have several restrictions controlling their discovery. They have the obvious prequisite technologies and additionally they can only be researched while you are in the appropriate era. The era limitation prevents you from stepping back to pick up a bonus technology that you skipped adding a consequence for beelining for advanced technologies as that can advance you to the next era in many cases. And finally, only one civilization may discover the bonus technology, once they have made the discoverey no other civ may research that technology (nor can they be traded). In effect, the function very much like the normal world wonders except that they exist as a technology rather than a building.
The bonus techs are:
Sun Tzu's Art of War
Receive a free Great General and the ability to build Training Camps. Training Camps give +2 XP to Melee, Archery and Siege units and work like Cathedrals requiring multiple barracks per training camp.
Exploration
Receive a unique 'Longboat' unit which can enter ocean tiles and rival territory.
Rule Changes:
Note: Most of these minor rule changes are optional components of the game, they are all enabled by default. If you start a new custom game or MP game you can pick and chose which of these to enable. You do not have to edit any files if you wish to exclude any of the new rules from your game.
Limited Religion Founding (Optional): The technologies required to found a religion can be made unavailable for civilizations that already have a holy city. If enabled, any non-spiritual leader will be unable to research new religion technologies once they have a holy city while spiritual leaders are not affected. If disabled, spiritual leaders can research the technologies required to found religions at 50% cost.
This is accomplished by the addition of new techs used to found religions, the new techs ONLY found religions and offer no other benefit nor are they prerequisits for later techs. Once a religion is founded by a specific tech it's cost drops to 1, this allows any expended research to overflow to the next project since the tech is otherwise useless and the loss of research time was too severe of a penalty.
Additional Air Bombing Missions: New missions for bombing have been added using a modified version of Dales Air Bombing Missions and the mission icons created by GarretSidzaka. The new missions are: Carpet Bombing (destroy random building), Surgical Strike (destroy more specific target such as factories and barracks) and Port Strike (attack ships in the city). If the mission fails there is a chance of killing some of the target city's population which will increase war weariness for both the attacker and defender. The surgical strike mission will have it's chance of success increased with the discovery of computers and again with the discovery of lasers.
Lethal air strikes against ships (Optional): Air & missile units can inflict up to 100% damage against naval units with this option enabled. It has no effect on how much damage is inflicted per attack it just removes the limit. It also has no effect on land units which can still only be damaged up to a preset percent (default 50%).
Tile stack limit (Optional): There is a limit of 8 units per tile outside of cities and 12 units inside cities. The limit applies only to land & naval military units (workers, settlers, spies, missionaries, executives, air units and missiles are all exempt) and it counts all units in the tile regardless of ownership. Ships do not count towards this limit while in a city and units loaded as cargo do not count towards the limit until unloaded. And finally, a city that is 'full' can still produce units but the newely created unit will be dumped outside the city.
Discovering New Resources: Mines, which have always had a small chance (1 in 10000) of discovering new resource, still can however they can only discover a resource that is allowed on that terrain. So, for example a mine on a tundra hill will never discover gems. Additionally, farms now have a small chance of discovering wheat, corn or rice but only if you already have access to that resource and the terrain is appropriate for it, food resource received from trade deals will count as access.
Naval Movement/Air Unit Range (Optional): Movement for naval units and the range of air units is increased based on the map saize for any map larger than standard, no changes are made for smaller maps. On large maps, naval units will have +50% movement, on huge maps they will have +100% movement. Air units will have similar increases to their range. Due to the way civ generates the Civlopedia data the default movement speed will be shown in menus and the civlopedia but the modified movement will display properly for units in the game.
Naval Invasions (Optional): Naval units can no longer unload their cargo into hostile territory unless they have not yet moved on the current turn. Units with the amphibious promotion are exampt from this and may unlaod immediately. This has no effect on tiles that are un-owned or owned by you or a player you have open borders with. The purpose is to add some risk to naval invasions since the transports will have to sit in hostile waters for the remainder of the turn before unloading giving the defender some time to respond by shifting defenders to the area or attacking the transport ships. It also adds a great deal of importance to 'securing the beaches' as a staging area for future transports and gives units like the Viking Beserker and Marines some added 'shock value' during naval invasions.
National Units: National units, those which are limited in how many you can build such as Missionary units now have their limit scaled based on the world size. Standard sized maps use the default limits (e.g. 3 Missionary units), smaller maps allow fewer units and larger maps allow more.
Removing Jungles: Removing jungles provides a small hammer bonus, half of what you would get from clearing a forest. This is done to help compensate for the potentially massive jungles created with this map script and for civs that 'prefer' starts in or near jungles.
Highly Destructive Nukes (Optional): The blast radius and destructive power of nucler explosions has been increased inflicting more damage to units and cities (buildings and population). Improvements & features (forests/jungles) in the blast radius will almost always be destroyed. Cities can potentially be destroyed by nuclear weapons provided they do not contain any units or buildings that are flagged as 'nuke immune' such as ICBMs, great people and bomb shelters. Any tile that is affected by fallout has a chance of turning to wasteland, if this happens the tile is completely worthless for the rest of the game and any resource there is permanently destroyed. Fallout has a small chance of moving to an adjacent tile each turn, when this happens the original fallout is removed. Each tile affected by fallout even after the initial blast has a small chance of turning to wasteland and destroying any improvements, features or resources.
Modified Corporation Benefits
Corporation benefits have all been adjusted with the primary change being they they only provide yield bonuses, never commerce bonuses. What this means is that Sid's Sushi, for one example, provides food and commerce instead of food and culture. The actual bonus each corporation provides is now more balanced with the other corporations so again picking on Sid's Sushi it now provides a lot of commerce but only some food whereas Cereal Mills provides a lot of food but only some commerce. The chance from specific commerce types to general commerce helps make it easier to balance each corporation to the point of making them all useful at least to some degree. This makes the strategy of spamming your opponents with them quite a bit more risky as those corporation may prove to be very helpful. Alluminum Inc and Standard Ethanol are also quite useful as commerce generators even if you already have access to allumunim and/or oil. The AI, if you're curious, is quite pleased with this change since it no longer cripples them when they spread your corporations all over the world for you.
Installation:
DELETE ANY PRIOR VERSION OF WORLD PIECE
* v0.62 is not compatible with prior version saved games
1. Download v0.62 (http://forums.civfanatics.com/./downloads.php?do=file&id=7811)
2. Extract into your Civilization 4\Beyond the Sword\Mods folder
3. Run the mod through the in-game advanced menu option 'Load Mod'
Note: The file attached to this post is the DLL source code only, you do not need it to play the mod only to view/edit the changes in the DLL.
Playing World Piece:
The World_Piece map script will generate a random world with multiple continents and try to establish an old world and a new world much like the terra map script. The maps look best when playing on large or huge worlds although standard size maps are generally acceptable. There are now several new configuration options available when starting a new game:
Allow New World- If allowed, the second largest continent will be considered the 'new world' and no civs will start on it. Additionally, the 'old world' is limited to approximately 50% of the available land. If not allowed, the map script will still define a new world area but it will only consist of very small landmasses, the 'old world' will be a minimum of 75% of the available land.
Pangaea Continents- There are thwo options available, you may choose to suppress or allow pangaea style continents. If suppressed, the chance of multiple regions seperated by oceas is very high, if not suppressed no efforts are taken to prevent them from occuring. This is somewhat dependant on your choice of New World settings, if you don't allow a new world and don't suppress pangaea they will be very likely to occur.
Default Biome- This option allows you to define the default biome (climate) for the map. The default biome is every area that was not selected for one of the regional 'unique' biomes, typically this is the majority of the map. The choices are tropical which increases both the temperature and rainfall, arid which increased the temperature and decreases rainfall and cool which decreases the temperature and slightly decreases rainfall. Natural uses the world shape alone to determin climate without any modification.
Continent Style- There are several continent styles available with landmass size, shape and distribution based on existing mapscripts. The most notable is the 'Earth Like Continents' which is based on the Earth2.py mapscript by GRM7584 and creates continents that are very similar to the real world.
The map script is very slow to generate worlds due to its complexity, go have a sandwich and don't panic unless the background music stops playing :)
The following game options are enabled by default: City flipping after conquest, pick religion, no tech brokering and permanent alliances. The folowing victory types are disabled by default: Domination, cultural. Default options can be changed in the CIV4GameOptionsInfo.xml file or by starting a custom game rather than selecting 'Play Now.'
World Piece is fully MP compatible, to the same degree that BtS is anyway.
Credits:
Turlute - BTS Version of attitude icons
Blue Marble team - Ocean, Coast and snow textures and forrest, jungle and cloud reskins.
Cephalo - The incredible PerfectWorld map script that made much of this possible.
SevenSpirits - Modifications to the base PerfectWorld map script land placement, resource placement & starting plot code.
dreich2 & Lumpthing - The civilization starting plot normalizer script.
GRM7584 - Earth2.py mapscript, used to generate earth like continents
Bhruic - The unofficial patch for BtS 3.13 which is used as a base for my DLL.
Dale - Air Bomb Missions
EDU Team - EDU (Ethnically Diverse Units) components
Rabit,White - Modified galley model used as 'Longboat' unit
Lord Tirian - German translations for World Piece text
And of course Firaxis, the CivFanatics team and everybody else :)
Seven05 Dec 11, 2007, 09:42 PM Revision History:
0.62 January 29th, 2008
*** Not a patch, delete prior version before installing ***
- Fixed a bug that crashed the game when limited religion founding was disabled
- Added game option to control restricted amphibious landings
- Added global define to increase stack limit in forts (default is zero)
- Added initial implimentation of bonus technologies
- Exposed all global warming/pollution variables to xml
Previous Versions:
0.6 January 17th, 2008
- Added ice cap 'melting' to the existing global warming system
- Increased AI value for religions
- Improved AI's dealing with privateers
- Fixed a bug that crashed the game when time victories were disabled
- Redesigned World_Piece map script with multiple options in a single script
- Added alternate 'unique' biomes for more variety on the world map
- Added environment based 'traits' for civs.
0.5 January 6th, 2008
- Added Dale's Air Bomb Mission with modifications
- Add full effects for weather events related to Global Warming (new sounds too)
- Added ability to limit religion founding
- Added new ability for Spiritual Trait related to limited religion founding
- Fixed a bug with per era tech cost adjustments when researched by teams
- Removed requirement for Veritas Delictat 3.1 mod
- Added EDU components to base mod
- Two versions of the mapscript available for games with or without new worlds
- Added AI support for the new air bomb missions
- Added AI understanding of limited religions
0.4 December 27th, 2007
- Fixed errors with new game speeds causing crashes on turn 3.
- Optimized fallout drifting code.
- Added craters to nuclear explosions (work in progress).
- Added ability for airstrikes to hit ships in cities.
0.3 December 23rd, 2007
- Expanded global warming to include pollution input based on population, improvements and features.
- Added ability to control pollution values for features and improvements via XML.
- Fixed errors with the spreading of nucler fallout, no longer creates extra fallout.
- Modified ICBM unit, blast radius (iNukeRange) is now 2, tactical nukes have a radius of 1.
- Modified fallout features, damages units in the same tile 20% per turn.
- Added check for improvements to survive nuclear blasts based on their AirBombDefense rating and distance from point of impact.
- Forts offer similar protection against nukes as bomb shelters do, provided the fort survives the initial blast (see above).
0.21 December 18th, 2007
- Modified nuclear meltdown effect, no longer explodes but still kills population and creates fallout
- Added code modification to dynamically increase tech costs in 'turns per era' mode
- Added support for standard map scripts (e.g. Pangea, Big and Small, etc)
- Fixed ships being able to enter deep ocean that couldn't enter normal ocean
- Expanded global warming code, exposed new functions to python to allow for future random events
0.2 December 14th, 2007
- Added in-game option to enable/disable most rule changes.
- Added Naval movement and air unit range scaling based on map size (optional).
- Modified Global Warming Method.
- Added destructive nuclear weapons (optional)
- Moved mapscripts to 'PrivateMaps' as suggested by DeanJ
- Greatly improved climate generation in World_Piece map script.
- Greatly improved climate based civilization starting location rules in World_Piece_Normalize.py
0.1 December 11th, 2007
- Initial Public Release
Source Code:
Download: Here (http://forums.civfanatics.com/attachment.php?attachmentid=171648&d=1205789611) or here (http://www.ioncross.com/users/victor/WorldPieceSource0_62.zip). (1.1MB)
The zip archive contains all BtS 3.13 source files (.cpp & .h), not just the ones I have edited. All of my changes are encapsulated in comments such as /*** World Piece Begin ***/ and /*** World Piece End ***/, single line changes simply have a // World Piece comment added to them. The majority of my significant changes have extensive comments explaing what I was doing (or trying to do as the case may be). The source is based off bhruic's unofficial patch so if you find changes compared to clean BtS files that are not commented they're from the unofficial patch. I did remove several sections of in-progress AI work to avoid confusion and keep people from accidentally trying to use broken code so it's safe to hop in there and change things to your heart's content :)
Optional Components:
These are user create modifications to World Piece, so think of them as unofficial mods to the unofficial mod. Feel free to comment on them in this thread however keep in mind that I didn't create them so my ability to support them or answer specific questions will be very limited.
Add-on: Unit Formations (http://forums.civfanatics.com/attachment.php?attachmentid=168493&d=1201730645)
Author: genine (http://forums.civfanatics.com/member.php?u=63163)
Modified unit formations. To install copy the two included xml files into your World Piece\Assets\XML\Units folder overwriting the originals. It is recommended that you backup the default World Piece files before installing this modification, to do that you can simple rename or copy the existing Civ4FormationInfos.xml and Civ4UnitInfos.xml files before installing this.
Screenshots:
(See attachments)
The first screenshot shows an area with both cool and temperate climate and shows the amount of cohesion that is common with deserts rather than random scatterings here and there. The cooler climate is in the lower half of the screenshot and is easiest to identify by the evergreen trees. This map was interesting in that it only created one large desert region, typically there will be two or three desert regions. You can also see the Khmer starting plot to the left, they're set to prefer temperate grasslands for their starting location.
The second screenshot shows an area just north of the first screenshot where you can see both temperate and warm climate tiles. As you can see the differences in appearance aren't extreme between the climates. You can also see the Babylonian starting plot to the right, they are configured to prefer warm climates prefering plains & deserts but since there were no flood plains in this desert region (and therefore no decent desert starting plots) this was the next best thing with its proximity to the desert. Well, there was but it was too close to another civ that was probably placed first.
The third screenshot shows the dynamic technology cost in action. While I was in the WB taking the other screenshots I gave myself Bronze Working, since this is turn 1 in a '100 turns per era' game the cost for Iron Working has been substantially increased since it is a classical era technology. It would still be quite possible to research it pushing for an early swordsman advantage since it only takes 43 turns from a single, undeveloped size 1 city on turn 1 of 100 for this era.
The fourth and fifth show the before and after effects of the highly destructive nucluear weapons option. If you look closely in the fifth screenshot you can see where some of the tiles beneath the fallout have turned into wasteland.
Seven05 Dec 11, 2007, 09:42 PM Known bugs with v0.62:
Bonus Technologies (Sun Tzu's Art of War & Exploration) do not stop research for all civs once one discovers them. It does properly prevent other civs from starting research on them.
Pending Updates:
Research Bonus based on resource availability (Pending) - Civilizations receive a small bonus when research technologies required to use resources that they have present in their territory. Currently it is a static 10% discount and is applied as long as they have a single resource. This only applies to the techs that allow you to build the improvements needed to connect to the resource, for example Oil is revealed with Scientific Method and can be connected with Combustion so their would be no bonus to Scientific Method but Combustion would be 10% cheaper.
Enhanced future era units, tech & buildings (Work in Progress) - The primary change here will be the addition of the Next War units and buildings, including arcologies. With the enhanced global warming, nuclear winter and nuclear weapon effects the potential for extended epic games providing a different experience in the late game is pretty good. In addition, a lot of the futuristic components can be adjusted to work well with the changes in World Piece. For instance the arcology buildings can be used to prevent global warming/nuclear winter and fallout effects from affecting any tiles with the city's workable area, clones (worker variant) can be allowed to build new improvments on previously unusable terrain like the wasteland and units like the Cyborg can be immune to the harsh effects of nuclear fallout.
Adaptive, Objective based AI (Work in Progress) - The AI is being given some new attributes to facilitate general short-term and long-term objectives. Early in the game the AI will evaluate its current position and, based on the leader's traits, decide on a long-term goal from the list of available victory conditions. The AI will re-evaluate their long-term goal regularly and adjust as needed. They will also come up with short-term goals throughout the game based on their long-term objective to influence the descision they make to bring them towards their long-term goal in a more orderly manner than the current, almost completely random system. For instance a long-term goal may be to achieve a cultural victory and along the way they may decide that they need to capture a specific nearby city that has several wonders or is a holy city. In addition to their goals the AI will track the behavior of other civs (including human players) and their own success and failure more closely and use this data to influence descisions. For instance, if the AI decides to attack a neighbor loses the AI will remember how, and if possible why and try a different tactic next time. Much of this is partially in place in BTS already but based almost entirely on random chances or vague data with no effort to remember what did and didn't work in the past.
Real World Map, World Piece Style (Planned) - World maps can be fun, so why not have one that has all of the new terrain types.
Seven05 Dec 11, 2007, 09:44 PM How to control the global warming variables in XML
There are several new global warming variables in the xml files. First, there are the global defines added in 0.61:
POLLUTION_POPULATION_START_ERA
Any valid era type can be used. The era specified determines when a player's city will produce pollution from the population, in earlier eras there will be no pollution from the population only from the buildings. Pollution IS NOT the same thing as health & unhealthiness although building unhealthiness is used to determine pollution the pollution itself will not cause unhealthiness or have any impact on the city's health.
POLLUTION_BUILDING_MODIFIER
This is a percentage modifier used to adjust the amount of pollution created by a city's unhealthy buildings. The default value is 100, lower values will reduce the effect and higher values will increase it. Unhealthy buildings are things like forges, factories, etc at 100 the game will translate the building's unhealthiness directly to pollution.
POLLUTION_POPULATION_MODIFIER
This is also a percentage modifier like the previous value. This affects the pollution generate by population, at 100 each population point in a city will generate 1 pollution once the civ has entered the defined era. So a size 10 city will produce 10 pollution per turn in the industrial era and beyond. This modifier has no effect on building pollution so this can be used to fine tune pollution to make either buildings or population more or less significant as desired.
POLLUTION_ENVIROMENTALISM_MODIFIER
This modifiers is the final adjustment to the population pollution is the city belongs to a civ using the enviromentalism civic. The default is 50 which means the pollution generated by population points will be cut in half. This has no effect on building pollution since that is already addressed by recycling centers which remove all unhealthiness from buildings. This modifier is applied after the population modifier, so if they're both set to 50 a size 20 city will produce 5 pollution per turn from population for civs running enviromentalism.
Improvement and Feature Pollution
In Civ4ImprovementInfos.xml each improvement has it's own iPollution value and in Civ4FeatureInfos.xml each feature has its own iPollution value. In both cases the result is identical, a positive number creates pollution per turn while a negative number absorbs pollution per turn. Remember, every un-improved tile in the game will already absorb one point of pollution per turn so these values only need to affect those improvements which should actively generate pollution. This can also be used to have features and improvements absorb pollution, by default the forest, jungle and ice features will all absorb pollution. In the case of features this is above and beyond the 'free' point for un-improved tiles. Features can also be defined to generate pollution and improvements can be defined to absorb pollution. This makes it possible to impliment 'water treatment facilities' as improvements for one example.
Defining terrain temperature and global warming terrain types
Ok, this is the big on, and probably the most complicated to explain. In the vanila Civ4/BtS game you have a single global define for the global warming terrain (default is Terrain_Desert), any tile that is randomly select turns into that one terrain type. In World Piece each tile has a temperature defined in Civ4TerrainInfos.xml which is used to determine IF a tile can be affected by global warming and a second warming terrain type that is used to determine WHAT to change that specific tile into.
Here is a sample from the default cool climate grassland terrain type:
<TerrainInfo>
<Type>TERRAIN_COOL_GRASS</Type>
<Description>TXT_KEY_TERRAIN_GRASS</Description>
<Civilopedia>TXT_KEY_TERRAIN_GRASS_PEDIA</Civilopedia>
<ArtDefineTag>ART_DEF_TERRAIN_COOL_GRASS</ArtDefineTag>
<Yields>
<iYield>2</iYield>
<iYield>0</iYield>
<iYield>0</iYield>
</Yields>
<RiverYieldChange>
<iYield>0</iYield>
<iYield>0</iYield>
<iYield>1</iYield>
</RiverYieldChange>
<HillsYieldChange/>
<bWater>0</bWater>
<bImpassable>0</bImpassable>
<bFound>1</bFound>
<bFoundCoast>0</bFoundCoast>
<bFoundFreshWater>0</bFoundFreshWater>
<iMovement>1</iMovement>
<iSeeFrom>1</iSeeFrom>
<iSeeThrough>1</iSeeThrough>
<iBuildModifier>0</iBuildModifier>
<iDefense>0</iDefense>
<GlobalWarmingClimate>TEMPERATURE_COOL</GlobalWarmingClimate>
<GlobalWarmingTerrain>TERRAIN_GRASS</GlobalWarmingTerrain>
The two new values are shown at the end of the code block. Valid temperatures are- TEMPERATURE_COOL, TEMPERATURE_TEMPERATE and TEMPERATURE_WARM. I would have preferred to use CLIMATE_ but that's in the game already. This value defined the temperature for tiles using this terrain type, when the global warming events occur each tile is evaluated comparing it's temperature to the surrounding tiles to see if it can warm up. If it can it will transform into the terrain listed in the GlobalWarmingTerrain field, in this example TERRAIN_GRASS which is our temperate grassland. Terrain that can not transform to a warmer version should have this value set to NO_TERRAIN or -1 as thos value are checked first and tiles tha can not transform skip all future evaluation.
This last bit does make it possible to use my global warming code without my climate based terrain textures, it just won't look as good in the process :)
BobTheTerrible Dec 11, 2007, 11:19 PM This looks pretty good. I like the realistic climates and AI bit, I've been dying for someone to mod the AI so that it only asks for war declarations/trade embargoes in realistic situations.
As for the whole era thing with technologies, the Revolutions mod has a pretty cool idea. The tech pace is normal, but if a civ starts to fall behind on tech (not just a few techs, but substantially behind), it will get some free beakers for a technology for each civilization it knows that has the tech. The 100 turns per era thing is interesting, but I feel setting an objective, defined limit on how long an era lasts is a little "gamey."
I can't play civ till I get home from college this Friday, but maybe I'll give this mod a go then. Can't wait to see screenshots of worlds generated with the script, will have to check that out in the map forum.
Seven05 Dec 11, 2007, 11:30 PM Screenshots are up :)
Yeah, the turns per era is very gamey, fortunately it's a pretty flexible rule so it doesn't really prevent you from grabbing advanced techs it just makes it more costly. The main thing for me was wanting to be able to play an epic game where I got to enjoy each era for the same amount of game time rather than the normal blitz through medieval time and then just enough time to build my army of riflemen before having to upgrade them all to Infantry. It plays very well through since it's so transparent of a change. In fact, the way tech costs work if you're researching an advanced tech when the turn counter hits the next era you'll probably get the tech right away since the cost drop is instant and Civ 4 calculates the cost constantly.
BobTheTerrible Dec 11, 2007, 11:53 PM Yeah, the turns per era is very gamey, fortunately it's a pretty flexible rule so it doesn't really prevent you from grabbing advanced techs it just makes it more costly. The main thing for me was wanting to be able to play an epic game where I got to enjoy each era for the same amount of game time rather than the normal blitz through medieval time and then just enough time to build my army of riflemen before having to upgrade them all to Infantry.
Ah, I thought the purpose of the era thing was to prevent other civs from falling behind, which is why I mentioned the Revolutions style of doing it.
I think it was you who mentioned in the Perfect World map thread tinting the map tiles based on the heightmap altitude to give the graphical appearance of height -- any plans to include this?
Seven05 Dec 12, 2007, 12:02 AM Ah, I thought the purpose of the era thing was to prevent other civs from falling behind, which is why I mentioned the Revolutions style of doing it.
That's another purpose, but not so important. What happens is when Civ4 evaluates the cost it looks at the turn number and then the setting in the gamespeed info for the number of turns per era and compares the current turn to the number of turns per era and then the era of the technology. Then, if the technology is advanced it's cost is increased, if its in the current era nothing changes and if its from the previous era its cost is decreased. Since the cost change is universal and has the same effect on every player it's not so much of a handicap adjuster as it is a pace mechanic.
I think it was you who mentioned in the Perfect World map thread tinting the map tiles based on the heightmap altitude to give the graphical appearance of height -- any plans to include this?
Yes, that's still in the works, in fact the graphics for some of the high altitude terrain is in the mod they just aren't 'hooked-up' to anything yet. I also want to add in different water terrains to show water depth since that could also be used for things like a defense bonus for subs in very deep water and combined with temperature data would allow things like the aqua colored shallows around the Carribean islands (among other places). Of course then those shallows could be used to block subs or large ships. Argh... here I go again, see... when will it end? :)
SevenSpirits Dec 12, 2007, 12:51 AM Cool! I'm looking forward to trying this out.
Seven05 Dec 12, 2007, 01:15 AM Aw man, I'm glad you posted... I have some of your tweaks to the map script in there too. Eesh... too many credits to keep track of for an old man.
hrochland Dec 12, 2007, 02:58 AM "Your download has failed. There were no available download servers." :( :( :(
Some error on FileFront :(
jkp1187 Dec 12, 2007, 05:48 AM Looks interesting. Just curious, is the included map script usable in an unmodded game, too?
Chuggi Dec 12, 2007, 07:12 AM Wow this looks great! :D I like the part where certain civs start on different tiles (eg. arabia has a good chance of starting in the desert? :) ). Is it possible to get certain civs to start near each other (like european civs together and asian civs together)? If you could work out how to implement that than this mod would be legendary.
Atm the only part I don't like is the tile limit, which doesn't sound too realistic and would be incredibly annoying in a game ;)
Seven05 Dec 12, 2007, 08:27 AM Looks interesting. Just curious, is the included map script usable in an unmodded game, too?
No, but you can grab the original PerfectWorld.py in the map scripts forum, SevenSpirits' modified PerfectWorld script is in the same thread and has some extra tweaks that I really liked with resource normilization and starting plot values. I do plan on exposing more optional settings to the players so you can pick & choose which rules to use in your game, once I do that you can essentially play with the new maps ant terrains alone.
Seven05 Dec 12, 2007, 09:00 AM Wow this looks great! :D I like the part where certain civs start on different tiles (eg. arabia has a good chance of starting in the desert? :) ). Is it possible to get certain civs to start near each other (like european civs together and asian civs together)? If you could work out how to implement that than this mod would be legendary.
Atm the only part I don't like is the tile limit, which doesn't sound too realistic and would be incredibly annoying in a game ;)
Thanks :)
Yes, Civs can be configured to start in cultural groupings... sort of. The normalizer script kicks in after starting plots have been identified and then rearranges the civs on those starting plots based on the values each civ has assigned for terrains, features or resources. So you can take a cultural group, for instance meso-american, and give them a high value for the corn resource (and negative values for resources assigned to different cultures). As long as you chose a resource that isn't all over the place like fish is they should start in clusters. It's not perfect but it will work most of the time. That code is all in dreich's script that he originally made for FFH and his original script has all sorts of instructions for it's use. Lumpthing then made a version of the script with standard civs in it rather than FFH civs, the code is the same so any tricks from either script will work in the other.
The tile limit will be a configurable option later, the main reason it's there now is to help the AI. When they can't create a stack of 20+ units they do a much better job of assembling the stack with appropriate units. It also eliminates the dreaded 'stack of doom' and encourages the AI to assign multiple targets to its multiple stacks making wars generally more interesting. I was orignally enforcing the limit for the AI only, but that didn't seem fair and it made it too easy for a human player to build a SoD that was more potent than ever. In practice, a stack of eight units is still tough and two stacks of eight is just as scary as one stack of sixteen. City defense is a little more interesting too, you have a per tile advantage in the city itself so you need to keep the enemy from surrounding you to maintain that advantage.
Seven05 Dec 12, 2007, 09:03 AM "Your download has failed. There were no available download servers." :( :( :(
Some error on FileFront :(
I'll see if I can get it mirrored somewhere else today :)
Seven05 Dec 12, 2007, 11:13 AM Updated the orignal post with an alternate download mirror for anybody having trouble with File Front, might not be the fastest download but it'll work in a pinch.
I also added a list of pending changes to the 3rd post so you'll have an idea of what to expect in future updates or to make sure I read your post :)
Shqype Dec 12, 2007, 11:53 AM I should have expected something like this from you. So there WAS a reason you were compiling all these SDK snippets ;)
The Climate Changes (and the appropriate placing of civilizations) sounds like the best addition so far. Good job on this man, it looks good, and I'll be sure to give it a try.
Seven05 Dec 12, 2007, 12:14 PM Heh :)
This is actually a collection of changes that I've been using in weekend LAN games for ages, I just finally decided to put it into a package that would be easy to upload for public consumption.
I'll release the dll source later, I was expecting to run through som rapid updates after the initial release so if or when that slows down I'll post the source code as a seperate download for anybody interested.
jkp1187 Dec 12, 2007, 05:00 PM Naval Movement: Movement on water tiles has been adjusted, all of the ships have double their normal movement points however coastal tiles require 2 movement points to enter. Essentially, this makes ocean travel a bit quicker which is important on larger maps generated in this mod with the size of the oceans.
Good idea! I always wondered why the developers never thought about trying to balance naval movement points for the larger maps. This is a huge reason why I don't play any map larger than Standard-size....and your solution seems like it might be a winner.
Just curious -- if your mod mainly focuses on the larger maps, have you considered re-adjusting the air/missile unit ranges? Four squares just isn't much on a large map, let alone huge.
Seven05 Dec 12, 2007, 06:13 PM Good idea! I always wondered why the developers never thought about trying to balance naval movement points for the larger maps. This is a huge reason why I don't play any map larger than Standard-size....and your solution seems like it might be a winner.
Just curious -- if your mod mainly focuses on the larger maps, have you considered re-adjusting the air/missile unit ranges? Four squares just isn't much on a large map, let alone huge.
I kind of stole that Idea from Rhye's mod, although he treats oceans like roads for movement and I just took the easy XML-only shortcut.
What I need to do for the ships, air units and missiles is set them up to scale based on the map size like I did with national unit limits. It shouldn't be too hard but I haven't even looked at that code, maybe I'll do that tonight. The main reason I did something for the Navy right away is that with 'earth-like' oceans occupying 74-78% of the map inter-continental wars were taking forever to prepare for.
deanej Dec 12, 2007, 06:14 PM A few ideas:
-Make your "PublicMaps" folder "PrivateMaps" and change Allow Public Maps = 1 to Allow Public Maps = 0.
-Having the traits explained in the post would be helpful, as well as the special options (such as choose religion and permanent alliances on by default)
Seven05 Dec 12, 2007, 06:19 PM A few ideas:
-Make your "PublicMaps" folder "PrivateMaps" and change Allow Public Maps = 1 to Allow Public Maps = 0.
-Having the traits explained in the post would be helpful, as well as the special options (such as choose religion and permanent alliances on by default)
I should do that, I've been avoiding it because I really want to move the majority of the current map script code out of python and into the DLL to make it faster and readily compatible with all of the default scripts. But thats a pretty big project so the private maps is a good idea until I get around to that.
I'll add those other items to the initial post, since this was a 'private' mod for so long I've forgotten about a lot of the minor changes I made along the way. :)
Chuggi Dec 12, 2007, 07:10 PM Thanks :)
Yes, Civs can be configured to start in cultural groupings... sort of. The normalizer script kicks in after starting plots have been identified and then rearranges the civs on those starting plots based on the values each civ has assigned for terrains, features or resources. So you can take a cultural group, for instance meso-american, and give them a high value for the corn resource (and negative values for resources assigned to different cultures). As long as you chose a resource that isn't all over the place like fish is they should start in clusters. It's not perfect but it will work most of the time. That code is all in dreich's script that he originally made for FFH and his original script has all sorts of instructions for it's use. Lumpthing then made a version of the script with standard civs in it rather than FFH civs, the code is the same so any tricks from either script will work in the other.
The tile limit will be a configurable option later, the main reason it's there now is to help the AI. When they can't create a stack of 20+ units they do a much better job of assembling the stack with appropriate units. It also eliminates the dreaded 'stack of doom' and encourages the AI to assign multiple targets to its multiple stacks making wars generally more interesting. I was orignally enforcing the limit for the AI only, but that didn't seem fair and it made it too easy for a human player to build a SoD that was more potent than ever. In practice, a stack of eight units is still tough and two stacks of eight is just as scary as one stack of sixteen. City defense is a little more interesting too, you have a per tile advantage in the city itself so you need to keep the enemy from surrounding you to maintain that advantage.
Great! I'll be including this in my mod for sure ;) Is it easy to modify the script if you were to add new civs, or change existing ones resource preferences? I'm not too good at python/SDK.
Still not too sure about the tile limit but what you said makes sense (sort of).
Seven05 Dec 12, 2007, 07:21 PM Great! I'll be including this in my mod for sure ;) Is it easy to modify the script if you were to add new civs, or change existing ones resource preferences? I'm not too good at python/SDK.
Still not too sure about the tile limit but what you said makes sense (sort of).
Grab Lumpthing's script from the mapscripts forum and you can edit as needed, it'll work with any map if you follow the instruction in the script file itself, it's pretty easy to use. You can also look at Dreich's original as there are some examples in his script that Lumpthing didn't use.
For the tile limit, the next update will allow you to disable it if you don't want it in there, I guess thats the important part. :)
Chuggi Dec 12, 2007, 07:49 PM Oh ok thanks :D I'll try it out before being too hasty though. I'm just glad the mapscripts aren't too difficult to edit because I'm terrible at coding :lol:
Shqype Dec 12, 2007, 08:34 PM I just started a game and loaded a Large map using the World Piece map script:
http://img170.imageshack.us/img170/3926/icymeccafd3.th.jpg (http://img170.imageshack.us/my.php?image=icymeccafd3.jpg)
Isn't it strange that the Arabs spawn on a coast surrounded by forests and Ice? Maybe you didn't set their starting location or something, or the code isn't complete yet. But I'd like to see these guys stick to the deserts and fertile grasslands close by the deserts, not any place where there will be ice!
Just thought I'd share.
Chuggi Dec 12, 2007, 08:44 PM Maybe it could be added that they have to start near oil and incense - but then that would put them at a bit of an advantage (though they would be sure to start near plenty of desert).
Also I was wondering with the mapscript, is it possible to choose different formations like pangea, continents, archipelago? and also to reduce the amount of ocean?
Seven05 Dec 12, 2007, 09:02 PM Unfortunately it's not quite a perfect method. Before the civs are re-assigned their appropriate start plots all of the start plots are generated based on value with one such starting plot per player. So if you have 10 players it generates 10 possible starting plots using what it determines to be the best city locations on the map (within the old world area(s)). Once that is done it then shuffles the players around based on their preferences but it does this in order which can sometimes result in a civ 'late' in the list not getting an ideal plot. This is done to make sure the starting locations are primarily good city locations first, and then probably appropriate for the civ.
So, in laymans terms, it's possible that of the starting plots created none of them were suitable or you were last on the list and got the shaft. In most cases, unless you have a bunch of civs with similar preferences, everything works out fairly well.
The order in which it processes civs can be tweaked, so if there are repeated problems with specific civs I can try that. I'll also double check the script to make sure I didn't break anything and try the Arabians myself a few times. :)
Seven05 Dec 12, 2007, 09:12 PM Maybe it could be added that they have to start near oil and incense - but then that would put them at a bit of an advantage (though they would be sure to start near plenty of desert).
Also I was wondering with the mapscript, is it possible to choose different formations like pangea, continents, archipelago? and also to reduce the amount of ocean?
It is possible to set preferences on resources but for balance reasons I decided not to. The closest to that I've come is ensuring civs with UUs or UBs that require coastal cities get a costal start (99% of the time anyway).
And there's no options for the map script yet, well there probably never will be for this particular script because of the way it works. What I need to do is figure out a way to get the new terrains working on a standard map, but that will be tough since the standard map generator generates plot types where this one generates a heightfield which it then uses to generate the climate through temperature and rain distribution, winds the whole nine yards.
What I'll have to do is create a few variations of the script since I can manipulate the way the heightmap and tectonic plates are generated it's pretty easy to force pangea type maps, snakey continents and to a limited degree archipelago (or however the heck you spell that word). I *might* be able to get some of that working with menus in the game but I never bothered because what I really want to do is use the heightfield generator in the SDK in place of the existing fractal plot generator.
Shqype Dec 12, 2007, 11:07 PM Unfortunately it's not quite a perfect method. Before the civs are re-assigned their appropriate start plots all of the start plots are generated based on value with one such starting plot per player. So if you have 10 players it generates 10 possible starting plots using what it determines to be the best city locations on the map (within the old world area(s)). Once that is done it then shuffles the players around based on their preferences but it does this in order which can sometimes result in a civ 'late' in the list not getting an ideal plot. This is done to make sure the starting locations are primarily good city locations first, and then probably appropriate for the civ.
So, in laymans terms, it's possible that of the starting plots created none of them were suitable or you were last on the list and got the shaft. In most cases, unless you have a bunch of civs with similar preferences, everything works out fairly well.
The order in which it processes civs can be tweaked, so if there are repeated problems with specific civs I can try that. I'll also double check the script to make sure I didn't break anything and try the Arabians myself a few times. :)
Ah, I see. Have you thought about having the game check for an additional amount of start locations (maybe twice the amount of civs) and then assign the new start locations to each civ? And maybe make it such that certain civs will NEVER get put in certain terrain (like Arabs in Ice).
I did a random civ and ended up as the Persians, but when I went into the WB to check out the rest of the world, I didn't see any Russians near Ice, only Arabs, lol.
It was cool to see the Japanese start on the coast of a peninsula, though :)
PS - Why don't you create an .ini file that allows the user to set which terrain/feature types each civ has a preference for? TheLopez has done similar things with assigning starting techs based on resources and features/terrain by the start location. Something in that style for this would be superb :)
Seven05 Dec 12, 2007, 11:49 PM Ah, I see. Have you thought about having the game check for an additional amount of start locations (maybe twice the amount of civs) and then assign the new start locations to each civ? And maybe make it such that certain civs will NEVER get put in certain terrain (like Arabs in Ice).
I did a random civ and ended up as the Persians, but when I went into the WB to check out the rest of the world, I didn't see any Russians near Ice, only Arabs, lol.
It was cool to see the Japanese start on the coast of a peninsula, though :)
PS - Why don't you create an .ini file that allows the user to set which terrain/feature types each civ has a preference for? TheLopez has done similar things with assigning starting techs based on resources and features/terrain by the start location. Something in that style for this would be superb :)
I looked into it, my minimalist approach isn't the best so I've done a few tests with more terrains in the list and it works better. It's pretty easy to tweak for your own taste, look in the World_Piece_Normalize.py file in the public maps folder and you'll see the settings. What I've started doing now is adding every possible terrain type to each civ with weights for each and more use of features for weights. I've also re-ordered the priority putting 'tropical' types first, followed by 'arid' types and then everybody else. I've still refrained from including resources in the weights because while cultural groupings are kind of neat I didn't want to be that restrictive.
If you want to mess with it, here's the list of possible terrain types:
TERRAIN_GRASS, TERRAIN_HOT_GRASS, TERRAIN_COOL_GRASS
TERRAIN_PLAINS, TERRAIN_HOT_PLAINS, TERRAIN_COOL_PLAINS
TERRAIN_DESERT, TERRAIN_HOT_DESERT
TERRAIN_TUNDRA, TERRAIN_SNOW
I don't know if I can force Civ to generate more starting plots than there are players, there's probably a way to do it I just haven't looked at much of that code myself. However, if you play with a couple of extra civs on the map the results will always be better.
Chuggi Dec 13, 2007, 08:05 AM It is possible to set preferences on resources but for balance reasons I decided not to. The closest to that I've come is ensuring civs with UUs or UBs that require coastal cities get a costal start (99% of the time anyway).
I play more for fun so I'm not going to be too worried if China gets loads of rice :D I'm going to have to change this myself because cultural starting positions are a must for me (though I still don't quite understand if this will work properly.. isn't it possible to have rice all over the world therefore all the asian civs would be seperated..?) or does your mapscript prevent this?
And there's no options for the map script yet, well there probably never will be for this particular script because of the way it works. What I need to do is figure out a way to get the new terrains working on a standard map, but that will be tough since the standard map generator generates plot types where this one generates a heightfield which it then uses to generate the climate through temperature and rain distribution, winds the whole nine yards.
What I'll have to do is create a few variations of the script since I can manipulate the way the heightmap and tectonic plates are generated it's pretty easy to force pangea type maps, snakey continents and to a limited degree archipelago (or however the heck you spell that word). I *might* be able to get some of that working with menus in the game but I never bothered because what I really want to do is use the heightfield generator in the SDK in place of the existing fractal plot generator.
Pangeas are my favourite :D Well its probably hard to do but it would be really cool :) I also don't care much for archipelago and water but other peoples might :lol:
vodlaian Dec 13, 2007, 08:55 AM Gonna try this mod out. Hey, do you plan on addressing global warming at all? It would be nice to see a mod that actually has a system that isn't static.
Seven05 Dec 13, 2007, 10:30 AM Yes, global warming is planned for the future since I have the ability to change the terrain in stages to better represent climate shifts instead of simply expanding the deserts :)
Chug...
The resources try to split themselves up over a limited number of areas if they can do so while generating enough of the resource in the first place. The original Civ code was to pick the area(s) first and then put the resource in specific areas if they fit. What you'll want to do for cultural groupings is use more than one resource so the chances of having access to both in multiple areas is less likely. Since the resources are climate dependant you can use them instead of terrain types to make the groupings more likely. You can also use resources for some groups and terrains for others. What would probably work well is to handle the culture groups forst for eveything except the european civs and then defined them by terrain types. It won't be perfect but it'll be close.
I'll include a pangea version in the next update. Pangeas with this script can result in multiple landmasses connected by coast but not land, a single large landmass with some islands and very small continents around it, or a massive continent that circles the entire globe without any breaks. If you just want less water in your games you can open up the World_Piece.py script in the public maps forlder and change the land percent value up near the top.
Seven05 Dec 13, 2007, 02:48 PM ...
I did a random civ and ended up as the Persians, but when I went into the WB to check out the rest of the world, I didn't see any Russians near Ice, only Arabs, lol.
...
I've fixed the script for the next update, works quite a bit better now. Also, I tried generating more starting plots than needed but the problem I was running into is that Civ4 assumes that a player will start at every plot and uses the distance between them to determine the value of each. This was making some areas VERY good because their value was decreased for the nearby starting plots which ended up being empty. So the end result was artificially de-valued plots getting extra bonuses added around them to normalize them when they didn't need normalizing.
However, as long as you end up with a decent variety of civs that don't all have the same preferences it works well with the latest changes :)
Seven05 Dec 13, 2007, 11:43 PM Global warming code is done, I think. What does everyone think about this method for global warming:
1. A random plot is selected as always, it must be a land plot and it may not be a city plot. This is unchanged from the original code.
2. Once the plot is selected I evaluate the current terrain type and then bump it to a different type based on what it currently is. So grass turns to plains and plains turn to desert (excpet in the cold climate as there is no cold desert). The climate variation doesn't change, so if it was cool grasslands it becomes cool plains.
3. If the tile has an improvement, it is destroyed as before but only if the terrain is changed.
4. If the tile has a health resource on it (corn, wheat, cows, pigs, etc) and it changes to a terrain type that isn't allowed for that resource the resource is removed.
5. If the tile has a feature (forest or jungle) on it, the feature is destroyed but only if the terrain type changes (so floodplains are effectively immune as are forests in cold climate plains tiles).
After a quick test where I launched 20 Nukes the change is much more subtle than it was before but still significant enough to be noticed. Even with 20 nukes out the chance of the same tile being hit enough to go all the way from grassland to desert is very slim, even with 200 or 2000 nukes out it still wouldn't happen too often. The impact of global warming is most significant in the warm and temperate climates where the majority of the health resources require grasslands.
It's still not 'global warming' though. I'd like to expand it further without getting extreme. One thing I was thinking about was giving it a chance of triggering one of the hurricane/tornado/blizzard events instead of always changing the terrain, or perhaps increasing the likelyhood of those events world wide or having a chance of triggering more than one. This would give it more of a feeling of 'violent changes to the eco system' rather than simply turning the world into a desert.
And then there is the issue of reducing the chance of it occuring. Should there be a way to lessen the effect? And if so, what would be a good way to go about that? Perhaps maintain a running total of forest & jungle tiles and having a small chance per tile of decreasing the nuclear explosion count, say 1% chance per 100 forest/jungle tiles. Of course this means we could do the inverse too and increse the chance of global warming without needing nuclear explosions, for instance we could say that each coal plant has a 1 in 1000 chance of incresing the nuclear explosion count.
The nuclear explosion count is how the game currently handles global warming if you're curious, and I would just as soon continue to use it since it's just a variable to hold a number despite it's scary name :) What happens is the game looks at how many nuclear explosion have occured and for each one of those it applies global warming to one tile. So if you've had 10 reactors meltdown in your game, global warming can potentially affect 10 tiles per turn (with a 25% chance per tile currently). So by increasing or decreasing that number we directly affect the intensity of global warming.
Chuggi Dec 14, 2007, 12:40 AM Sounds great! :D I'll follow your advice when I'm ready to implement your mod! Hopefully by then your global warming will be perfected as well :D Thanks.
hrochland Dec 14, 2007, 02:19 AM :( The requested URL /victor/World_Piece_0_1.zip was not found on this server. :(
Mirror too. I have no luck. Your mod is secret for me :(
Seven05 Dec 14, 2007, 07:59 AM I'll look into the mirror later today, I'm getting the same error here now.
Seven05 Dec 14, 2007, 12:52 PM hrochland, the Ioncross.com mirror works now, try again and see if you can grab the file :)
I started work today to get the climate based terrain working on all map scripts and met with dismal failure... I can modify CvMapGenerator.py to use them, but then the only scripts that work using the default functions are Big_And_Small and Medium_And_Small, all of the rest crap out trying to import a function that I can't even find in any of the python files to begin with. Unfortunately, even if they did work the results aren't terribly impressive with the way Civ4 handles terrain placement in the first place. Since everything is based on latitude only for the defaul map scripts it's very difficult to get enough of each terrain on them. They end up looking pretty ugly and very short on resources. So, this bit's going to wait until I can re-write the core functionality for generating plot types. Of course, when I do that you won't really need multiple map script because with that change in place I can just add a pull-down menu for the World_Piece map script to control the landmass distribution and climate and it won't take 5 minutes to create a map.
I'll post 0.2 later when I've finished making all of the game rule changes optional including the changes to traits, naval movement, tile stack limits and game speed (turns per era).
Seven05 Dec 14, 2007, 01:55 PM Just curious -- if your mod mainly focuses on the larger maps, have you considered re-adjusting the air/missile unit ranges? Four squares just isn't much on a large map, let alone huge.
Check out the pending updates (http://forums.civfanatics.com/showpost.php?p=6243581&postcount=3) post on the first page, the extended air range code is completed and naval movement is now based on map sizes. In both cases the change only affects maps bigger than standard size, nothing is reduced on smaller maps. On large maps you'll see an increse of 50% so galleys will move 3 instead of 2 and airships will have a range of 6 instead of 4. On huge maps everything is doubled so the same galley will move 4 instead of 2 and airships will have a range of 8 instead of 4.
I've also added in-game options to control almost all of the rule changes, such as these movement scale adjustments. In theory, you could run my DLL alone without any of the XML changes or mapscripts to just enhance the vanila game with some additional options. I'll have to test that theory and possibly release a 'lite' version. Now that I've nailed down how to get the game options working flawlessly (it's incredibly easy) I'm going to look into merging SDK code from other popular mods such as Revolutions so if anybody has any request feel free to ask away.
jkp1187 Dec 14, 2007, 02:19 PM Check out the pending updates (http://forums.civfanatics.com/showpost.php?p=6243581&postcount=3) post on the first page, the extended air range code is completed and naval movement is now based on map sizes. In both cases the change only affects maps bigger than standard size, nothing is reduced on smaller maps. On large maps you'll see an increse of 50% so galleys will move 3 instead of 2 and airships will have a range of 6 instead of 4. On huge maps everything is doubled so the same galley will move 4 instead of 2 and airships will have a range of 8 instead of 4.
Whoo-hoo!
By the way, what is the size ratio of the different map sizes? Is Huge 2x the size of Standard, for instance?
I've also added in-game options to control almost all of the rule changes, such as these movement scale adjustments. In theory, you could run my DLL alone without any of the XML changes or mapscripts to just enhance the vanila game with some additional options. I'll have to test that theory and possibly release a 'lite' version. Now that I've nailed down how to get the game options working flawlessly (it's incredibly easy) I'm going to look into merging SDK code from other popular mods such as Revolutions so if anybody has any request feel free to ask away.
I was going to merge my EVENTS component with your mod, possibly my NextWar mod, if I got around to it. Neither of them have any SDK code, so there shouldn't be any issues.
Seven05 Dec 14, 2007, 02:28 PM Whoo-hoo!
By the way, what is the size ratio of the different map sizes? Is Huge 2x the size of Standard, for instance?
Some mapscripts use different sizes but the default sizes put a huge map at about 150% of the standard map size. You get a little less than a 25% increase per map size in general. Terra maps, and the World Piece map script, generate larger maps though so a huge map generated with my map script is almost twice as large as a standard map.
I was orignally going to scale movement by the grid size exactly, but with small differences it had some odd results like no increase in movement for a galley but a caravel gained 1 movement point. Using +50% and +100% makes an obvious difference without really breaking the game.
I was going to merge my EVENTS component with your mod, possibly my NextWar mod, if I got around to it. Neither of them have any SDK code, so there shouldn't be any issues.
I should check out your custom events and look into adding them, you can never have too many as it reduces the repetativeness of them :)
Seven05 Dec 14, 2007, 06:35 PM v0.2 is posted. Lots of changes in this, mostly focused on giving the player in-game control over which options to use. Should make for a good LAN game tomorrow which will give me a chance to test the MP support again to make sure I didn't break it (yet). :)
Freakwave Dec 15, 2007, 03:57 AM hi,
I had someones vassal demanding a tech from me, with the new dip system i thought id share
In my 0.1 game Roosevelt won a cultural victory in 1804. 2 of 3 cities had just 2 cathedrals and their religious buildings but no wonders, it caught me by surprise really. If this is the new ai then hats of, but could it be the new 100 turns per era after which culture from buildings increases? just a wild guess.
I still think the 50k limit should be increased.
Sgt.Sativa Dec 15, 2007, 08:11 AM Been floating around these forums for about 3 - 4 years, and you've finally given me a good reason to register lol :)
Great work :) amazing mod, just enough twist in the mod to keep me hooked till 5am, without bogging it down with a billion changes
Very solid and well thought out mod, instantly became one of my favorites, especially when combined with Veritas Delectat.
arstal Dec 15, 2007, 08:13 AM One suggestion- on the global warming, have the icy tiles turn standard due to the warming, yeah it makes them better- but global warming has its positive externalities as well.
One question- would shoving a non-SDK mod in with your mod affect anything? I want to combine your mod with Wolfshanze's for its naval units and unit changes.
Seven05 Dec 15, 2007, 09:55 AM hi,
I had someones vassal demanding a tech from me, with the new dip system i thought id share
I still have to work on some aspects of demands, so far the only diplo code I've edited is their descision to ask you to join a war or stop trading so they're less unreasonable. I can certainly work on demands, anyone have any ideas on ways to improve their choices for damanding things?
In my 0.1 game Roosevelt won a cultural victory in 1804. 2 of 3 cities had just 2 cathedrals and their religious buildings but no wonders, it caught me by surprise really. If this is the new ai then hats of, but could it be the new 100 turns per era after which culture from buildings increases? just a wild guess.
I still think the 50k limit should be increased.
I guess this is what I get for always playing with the cultural victory off :)
I'll increase the requirements for cultural victories to scale better with the extra turns. And yes, this is an effect of the AI changes. Since they no longer 'suffer' from the random chance to build units/wonders they only build them if they need them. This allows them to focus on what they think is important, so if they decide to improve culture they'll focus on that rother than spitting out extra units or buildings wonders that don't benefit their strategy. You should see a similar effect with space races, military production before and during wars and general empire building. Most of the time it works well enough.
Thanks for the heads-up, I'll get that fix in for the next version.
Seven05 Dec 15, 2007, 10:00 AM Been floating around these forums for about 3 - 4 years, and you've finally given me a good reason to register lol :)
Great work :) amazing mod, just enough twist in the mod to keep me hooked till 5am, without bogging it down with a billion changes
Very solid and well thought out mod, instantly became one of my favorites, especially when combined with Veritas Delectat.
Ah, flattery will get you everywhere! :D
I've been resisting adding a lot of 'fluff' to the game, I'm glad somebody appreciates it. I'll probably be playing... err... testing, yes testing it toady for most of the day in a MP LAN game with a good friend. Not until 5am or anything, maybe 2 or 3 am though. Glad you're enjoying it, feel free to offer suggestions or make requests if you find something that seems a bit out of whack like the cultural victories.
Oh, and I forgot the obligitory Welcome to CFC!
Seven05 Dec 15, 2007, 10:14 AM One suggestion- on the global warming, have the icy tiles turn standard due to the warming, yeah it makes them better- but global warming has its positive externalities as well.
I have some plans for extending global warming a little more. I was working on code to remove ice tiles from the ocean slowly with a chance each time of 'raising' the sea level and absorbing some coastal land into the ocean. I wasn't planning on touching tundra/snow land tiles but I should be able to get some code in so they receed quasi-naturally rather than having random ltiles changed, come to think of it I should probably do that everywhere.
One question- would shoving a non-SDK mod in with your mod affect anything? I want to combine your mod with Wolfshanze's for its naval units and unit changes.
Depending on which files the other mod modified it may just drop in with no work other than moving the files around. Several of the AI changes I made are dependant on changes to the UNITAI values in the units so you don't want to simply replace the units file (although you could, it wouldn't really break anything). There is a free program out ther call 'WinMerge' that you can grab to help you merge files together like this.
There are only a few files that my modified DLL requires to function properly:
GlobalDefinesAlt.xml
GlobalTypes.xml
CIV4GameOptionInfos.xml
CIV4ArtDefines_Terrain.xml
CIV4TerrainInfos.xml (anything in the xml/terrain folder really)
The new terrain (and all of the files in the xml/terrain folder) can actually be removed if you're not using the new map script and DLL changes like global warming will fall back to only using the default terrains. So it's pretty flexible, all things considered. If you have any questions or need help with merging them feel free to ask and I'll give you a hand with it.
BobTheTerrible Dec 15, 2007, 01:40 PM Now that I've nailed down how to get the game options working flawlessly (it's incredibly easy) I'm going to look into merging SDK code from other popular mods such as Revolutions so if anybody has any request feel free to ask away.
I'd definitely be happy of you could merge Revolutions in the code. I love that mod so much it's hard for me to play the game without it.
Freakwave Dec 15, 2007, 07:06 PM Ideas on diplomacy system.. at least not vassals demanding anything ;)
What i think is that they should be inline with their masters on foreign policy. Puppets shouldnt have a mind of their own. Usually i hate the vassal system, if not for the colony stuff, but then i rarely release a colony since i usually build the forbidden palace there, if there is enough reason to, state property will do the trick usually.
I'd love to see the revolution mod included. If it wont be so extreme as it is now.
Its a bit to linear now, grow a city, more unhappyness, there you have a revolt.
The ideal situaltion would be the other way around, begin with lots of small city states to kingdom to nation to empire. Im influenced by paradox interative games btw. I guess the ideal mod is your own mod... :)
Chuggi Dec 15, 2007, 10:48 PM I have some plans for extending global warming a little more. I was working on code to remove ice tiles from the ocean slowly with a chance each time of 'raising' the sea level and absorbing some coastal land into the ocean. I wasn't planning on touching tundra/snow land tiles but I should be able to get some code in so they receed quasi-naturally rather than having random ltiles changed, come to think of it I should probably do that everywhere.
OMG this would be so awesome! I've wanted this for ages but I thought it was impossible to do.
Seven05 Dec 16, 2007, 08:08 AM What i think is that they should be inline with their masters on foreign policy. Puppets shouldnt have a mind of their own. Usually i hate the vassal system, if not for the colony stuff, but then i rarely release a colony since i usually build the forbidden palace there, if there is enough reason to, state property will do the trick usually.
That's very doable. It's a little tougher to enforce for vassal's to human players. Maybe I could start by not allowing vassals to enter diplomacy with anybody except their master or 'fellow vassals' under the same master. I should also look into the vassal code itself a bit and try to encourage the AI to break free, or try to build itself up to where it can break free.
I'd love to see the revolution mod included. If it wont be so extreme as it is now.
Its a bit to linear now, grow a city, more unhappyness, there you have a revolt.
The ideal situaltion would be the other way around, begin with lots of small city states to kingdom to nation to empire. Im influenced by paradox interative games btw. I guess the ideal mod is your own mod... :)
I still have to look into Revolutions a bit more to see what the best way would be to get it in as an optional component. I guess it depends on how much is in Python, how much of that I can move to the SDK and what other assets it has.
Seven05 Dec 16, 2007, 08:16 AM OMG this would be so awesome! I've wanted this for ages but I thought it was impossible to do.
Oh, it's definately possible, it just requires a bit of work. The climate terrains will be a huge help because it means I can make the whole world seem warmer or cooler without really changing a whole lot. For instance I can shift temperate grasslands to warm grassland to simulate warming or to cool grassland to simulate cooling without the drastic effect of changing grassland into desert. This also means we can warm up the world without turning it into a desert making it 'global warming' instead of 'global drying' :)
To really do this right is going to involve changing a lot of core behavior like global warming being changed to be affected by something other than just nuclear explosions and meltdowns.
Lachlan Dec 16, 2007, 12:07 PM Hi ! i will give a try :)
Civ4+Warlords+BTS = 10/10 :goodjob: + mods = 15/10 :nuke:
EDIT : i played a few with 300turns per era on standard map = WOW ! Nice changes...
Game is more fun but a few graphical bugs...
Like red thing who circle around a city and a red thing in forest, i reloaded, same type of things...
jkp1187 Dec 16, 2007, 05:32 PM Oh, it's definately possible, it just requires a bit of work. The climate terrains will be a huge help because it means I can make the whole world seem warmer or cooler without really changing a whole lot. For instance I can shift temperate grasslands to warm grassland to simulate warming or to cool grassland to simulate cooling without the drastic effect of changing grassland into desert. This also means we can warm up the world without turning it into a desert making it 'global warming' instead of 'global drying' :)
To really do this right is going to involve changing a lot of core behavior like global warming being changed to be affected by something other than just nuclear explosions and meltdowns.
Just some wild thoughts...
Perhaps add up unhealthiness added by Factories, power plants, airports, Industrial Plants from all civs...and once a certain threshhold is reached, an instance of global warming takes place?
It would be neat to leave the present mechanism in place (where nukes = climate change), except in that case, have it change terrain into tundra & ice, simulating nuclear winter.....
deanej Dec 16, 2007, 07:58 PM That seems like it would be...
-The global warming terrain changed to tundra or ice with a text change from "global warming" to "nuclear winter" and:
-The new global warming system with the "global warming" label
That would probably be better, as otherwise there would be two global warming systems running at the same time.
BobTheTerrible Dec 16, 2007, 08:32 PM A few suggestions:
I would be nice if you could rework diplomacy a bit more so that civs won't ask you do declare war on a civ that's distant (either far away from you on your continent or on another continent) until sometime in the industrial age or so. I hate having a civ ask me to declare war on someone when it's obvious that I can't do anything about it. Also, when you refuse to declare war, it would be nice if you got a +1 "You refused to declare war on us" modifier with the other civ. Ditto for trade embargoes.
Also, it would be cool if you could have the score bar on the side break up into civ clusters by continent. So rather than one big mass of civs, the civs of each continent would cluster together with small breaks between continents.
Seven05 Dec 16, 2007, 11:22 PM Thanks for the feedback guys :)
With global warming what I'll probably end up with is two methods running simultaneously. I need to keep nuclear effects separate because if you chose the 'Highly Destructive Nuclear Weapons' they don't really need any extra effects like the current 'Global Warming' as they become quite potent and end up destroying the world on their own. However, if you're not using that option the vanila nukes really need that added boost to add some deterent against using them too excessively.
Using unhealthiness for measuring polution is definately the way to go. It can be pretty detailed to, for instance we could specify a few certain buildings or just use every building with any unhealthiness and then when a civ discovers mass production their population unhealthiness (excess only I would think) could be added in. Anyway, using unhealthy rating of buildings and comparing the world total against a threshold should work very well. We can even have multiple stages, where the first stage only spawns a few extra weather related events (floods, blizzards, hurricanes, etc), the second stage could start warming up the terrain by slowly shifting temperate tiles to warm and cold tiles to temperate. The third and final stage could be borderline catastrophic with even more random weather event, continued warming of the terrain and the addition of melthing icecaps and raising sea levels. As long as their is a way to keep it under control and eventually reverse or at least slow the effect it should be a fun addition. I'll probably need some help with a few new events too, quests to build recyling centers would be a good addition for the late game.
For now I'm limiting my diplomacy changes to the AI descision process, I'll definately look into diplomacy with vassals. Later I'll try out some additonal effects although I'm worried that giving a bonus for not joining a war would upset the balance a little, might be easy enough to offset with a higher penalty with the civ whos request you refuse since they'll only ask you now if they like you more than their enemy does. Their reasoning behind getting you into a war with somebody you can't even reach isn't that bad either, i use that tactic frequently with the AI. If I can get a civ to declare war on my enemy that will usually make them an enemy of my enemy as well and... well you know the old saying. It's also a fair way to gauge your commitment towards the relationship, if they ask you to help with an enemy and you refuse, even if you couldn't really do anything, how good of a friend are you? At a minimum, the declaration of war will sever trade agreements and close their borders.
As for the interface changes, I don't know if I'll add anything like that. I haven't messed with the interface at all so I don't know how easy it is to manipulate and I prefer the list to be ordered by score, it's a good quick reference for who to keep an eye on and who you can beat on. If nothign else I should be able to expose that data to python, if it isn't already, so you or another enterprising modder could put that change in yourself.
Chuggi Dec 17, 2007, 12:12 AM So basically buildings like coal plants, industrial parks (and possibly city size if possible?) will contribute to global warming, while recycling centres will reduce it - and then nuclear explosions (from missiles and the plants) will contribute to a nuclear winter?
hrochland Dec 17, 2007, 07:39 AM Now I have successful download. Thanks you. I'm enjoying on evening game with your mod. Looks promisingly...
HROCHland
Freakwave Dec 17, 2007, 12:38 PM That's very doable. It's a little tougher to enforce for vassal's to human players. Maybe I could start by not allowing vassals to enter diplomacy with anybody except their master or 'fellow vassals' under the same master. I should also look into the vassal code itself a bit and try to encourage the AI to break free, or try to build itself up to where it can break free.
Yes and with the revolutions mod, look if one vassal breaks free others might follow peacefully or not.
I still have to look into Revolutions a bit more to see what the best way would be to get it in as an optional component. I guess it depends on how much is in Python, how much of that I can move to the SDK and what other assets it has.
This is abracadabra to me :lol:
are those boats fixed yet? or is it for 0.21?
Cant seem to find a mapscript editor/tutorial. Can you point me in the right direction? thanks in advance. Looking into perfectworld.py explains alot due to example text in the script.
jkp1187 Dec 17, 2007, 01:34 PM Thanks for the feedback guys :)
Using unhealthiness for measuring polution is definately the way to go. It can be pretty detailed to, for instance we could specify a few certain buildings or just use every building with any unhealthiness and then when a civ discovers mass production their population unhealthiness (excess only I would think) could be added in. Anyway, using unhealthy rating of buildings and comparing the world total against a threshold should work very well. We can even have multiple stages, where the first stage only spawns a few extra weather related events (floods, blizzards, hurricanes, etc), the second stage could start warming up the terrain by slowly shifting temperate tiles to warm and cold tiles to temperate. The third and final stage could be borderline catastrophic with even more random weather event, continued warming of the terrain and the addition of melthing icecaps and raising sea levels. As long as their is a way to keep it under control and eventually reverse or at least slow the effect it should be a fun addition. I'll probably need some help with a few new events too, quests to build recyling centers would be a good addition for the late game.
I'll be glad to help with random events/quests. If you check my events mod, I also have added a quest called "Alternative Energy", which tasks the players with building hydro and/or nuclear plants for their cities.
It's great that there are a lot of possibilities with the global warming mechanism. Just a question: are there any buildings whose 'unhealthiness' isn't, theoretically, caused by generation of greenhouse gasses? The only ones I can think of are the laboratory and maybe the drydock....
For now I'm limiting my diplomacy changes to the AI descision process, I'll definately look into diplomacy with vassals. Later I'll try out some additonal effects although I'm worried that giving a bonus for not joining a war would upset the balance a little, might be easy enough to offset with a higher penalty with the civ whos request you refuse since they'll only ask you now if they like you more than their enemy does. Their reasoning behind getting you into a war with somebody you can't even reach isn't that bad either, i use that tactic frequently with the AI. If I can get a civ to declare war on my enemy that will usually make them an enemy of my enemy as well and... well you know the old saying. It's also a fair way to gauge your commitment towards the relationship, if they ask you to help with an enemy and you refuse, even if you couldn't really do anything, how good of a friend are you? At a minimum, the declaration of war will sever trade agreements and close their borders.
I'm wary of any changes to the actual in-game rules unless there's a real compelling reason to do it (as opposed to tinkering with how mechanisms like global warming or basic things like terrain and units.) Anything to improve the AI, though, I definitely favor.
Seven05 Dec 17, 2007, 02:03 PM So basically buildings like coal plants, industrial parks (and possibly city size if possible?) will contribute to global warming, while recycling centres will reduce it - and then nuclear explosions (from missiles and the plants) will contribute to a nuclear winter?
I'm not sure yet exactly how it will work, but something like that, yes. The nuclear winter is still undecided right now, I've spent some time researching it and it looks like the cooling effect is very short term (using catastrophic volcano erruptions as a reference) but there can be a longer period of greatly reduced precipitation. So really, having the effect of nuclear weapons turning tiles into desert isn't too far off, my current implimentation of reducing grass->plains->desert is even closer to the results of scientific testing with various models. The actual cooling effect, while initially quite severe, doesn't last long enough to warrant changing tiles to tundra or ice in the game. One thing I now know is that I need to decrease the count of nuclear explosions over time since even the 'worse case' scenarios estimate a nuclear winter effect of 3-6 years (merely a few turns in a game of Civ).
So what we'll probably end up with for a 'nuclear winter' effect is a short period of time where severe droughts plague the world. Global warming, on the other hand, will be a slow and long lasting process that will be difficult to control and all but impossible to stop. An exchange of nucler weapons will also affect global warming due to the unhealthiness in cities hit by nukes, the destruction of 'beneficial' terrain and the loss of health resources as a result of the destruction.
Seven05 Dec 17, 2007, 02:08 PM are those boats fixed yet? or is it for 0.21?
Cant seem to find a mapscript editor/tutorial. Can you point me in the right direction? thanks in advance. Looking into perfectworld.py explains alot due to example text in the script.
The fix for the boats hasn't been uploaded yet, expect it before the middle of this week, v0.21 is mostly minor changes with no substantial additions so I'll hopefully be able to release it as a patch with only the modified files.
I don't think there are any mapscript tutorials out there. I had only messed around a little myself until Cephalo released his PerfectWorld.py script and I saw the potential for climate based terrain. But, his script is very different than any of the default ones since he has completely re-written many of the core funtions. I might be able to help with some specific questions, but otherwise I'm not really the guy to ask about map scripts :)
Seven05 Dec 17, 2007, 02:43 PM I'll be glad to help with random events/quests. If you check my events mod, I also have added a quest called "Alternative Energy", which tasks the players with building hydro and/or nuclear plants for their cities.
I'll definately check out your mod and look into merging it once I get a bit more involved with the global warming aspect. I probably won't get too far into it until v0.3 or so and then I'm sure I'll have plenty of questions for you. If you'd be interested in creating some more weather events I'm sure I could put them to use, but I haven't even really looked into events yet so I don't know if it would even be possible to control them like I'd want to.
It's great that there are a lot of possibilities with the global warming mechanism. Just a question: are there any buildings whose 'unhealthiness' isn't, theoretically, caused by generation of greenhouse gasses? The only ones I can think of are the laboratory and maybe the drydock....
I'm sure the enviromental impact could be argued for almost every building except for the blantanly obvious coal plant and factory. If you consider the impact of landfills on the environment, and the methane they release, you can probably justify every unhealthy building as having an effect. I'll have to mess with some numbers to see how many are needed to achieve the desired results and then take it from there rather than sticking to any sort of arbitrary rules.
jkp1187 Dec 17, 2007, 04:49 PM I'll definately check out your mod and look into merging it once I get a bit more involved with the global warming aspect. I probably won't get too far into it until v0.3 or so and then I'm sure I'll have plenty of questions for you. If you'd be interested in creating some more weather events I'm sure I could put them to use, but I haven't even really looked into events yet so I don't know if it would even be possible to control them like I'd want to.
Every event has certain trigger criteria that must be met before the trigger is pulled, so to speak. There are certain randomizing factors at work, of course, but it is possible to set events to automatically trigger as soon as the criteria are met. I believe that any sort of trigger criteria that can be scripted into Python can be used. (Full disclosure: I'm not an expert in Python....I've just been asking a lot of questions and reverse-engineering the scripts that were written by the BtS developers and Solver.)
I'm sure the enviromental impact could be argued for almost every building except for the blantanly obvious coal plant and factory. If you consider the impact of landfills on the environment, and the methane they release, you can probably justify every unhealthy building as having an effect. I'll have to mess with some numbers to see how many are needed to achieve the desired results and then take it from there rather than sticking to any sort of arbitrary rules.
That's fair. Any thought to some sort of pollution proxy to represent automobile usage? Number of oil wells/offshore platforms? Maybe number of oil resources currently available and in use/being traded by all civs?
Seven05 Dec 17, 2007, 07:58 PM Ok, so here's what I have for global warming/nuclear winter so far. I appologize ahead of time if this gets to technical :)
First off, I've added two new functions that are expesed to python, they are both in CyGame:
int getGlobalPolution()
This simply returns the integer value for the current polution level. It will never return a negative value.
void changeGlobalPolution(int iChange)
This allows you to manually adjust the polution level with positive or negative values.
Global polution is a running total, so rather than setting it directly it can be changed with small changes. For instance each unhealthy city could increase the value by 1. It also has built-in decay, like the 'NukesExploded' variable, everytime it changes the value becomes the current turn or the current polution level, whichever is greater, + the change specified. When you use the getGlobalPolution() function the value returned is zero or the current polution variable minus the current turn number, whichever is greater. So, the net effect is that polution decays by 1 point per turn and unless it increases by at least 2 per turn it will never really increase.
Next, the code that actually applies the effect works much like the original code. It loops through random plots to decide where to apply the warming effect, the number of plots it tries to change is equal to the value returned by getGlobalPolution() and the chance for changing a plot uses the global warming probability in your global defines xml file. Also, when looking for a plot the code will look at the 8 adjacent plots to determine if it can warm the selected plot, with more warmer plots adjacent to it increasing the chance. So a cool grassland plot in the middle of tundra will never warm up but one close to temperate lands might.
Now, the important part of the code is where the global polution variable is adjusted. This is handled by each city independantly on every turn. For the first run I'll have it simply increase the global polution by 1 point if the city is unhealthy. So, if you have 10 unhealthy cities on the map you can potentially change 10 tiles to a warmer terrain, if all of them stop being unhealthy during the next turn global warming will slowly come to an end over the course of the next 9 turns.
The best part is that is actually looks like it's working, I'll test it some more and then upload the update. :)
Freakwave Dec 18, 2007, 09:46 AM Thanks for your reply
I changed desert and plains by -0.1 and +0.1 resp. (if you know what i mean) in the map script it seems to make a huge difference in desert formation. I wanted to tone down the global desert area, but now there is a tad too little desert... hmm ill post this in the appropriate thead also.
Stecki Dec 18, 2007, 09:52 AM hi seven05,
gratulations for your well done mod. i use to deactivate some of the rule changes , but your mod produces really great maps.
i noticed two strange things:
galleys can travel deep ocean terrain. in my first game i found a deep ocean field next to a coast field and so i crossed with my silly little galley the worlds "deepest" seas for about 3200 years without finding another way out.
cottages, villages etc were invisible until i reach renaisance. i wonder if other players had this problem too. i didn`t read anything about that before.
Seven05 Dec 18, 2007, 10:41 AM hi seven05,
gratulations for your well done mod. i use to deactivate some of the rule changes , but your mod produces really great maps.
i noticed two strange things:
galleys can travel deep ocean terrain. in my first game i found a deep ocean field next to a coast field and so i crossed with my silly little galley the worlds "deepest" seas for about 3200 years without finding another way out.
cottages, villages etc were invisible until i reach renaisance. i wonder if other players had this problem too. i didn`t read anything about that before.
The boat issue is fixed, I just have to upload the update, a little oversight on my part since during my initial testing none of the maps generated had any points where you could get from coastal tiles to deep ocean without having to pass through normal ocean.
The cottages are most likely the result of me using Veritas Delictat which included ethnically diverse building changes. I'll see if I can modify some art defines so that it works properly without that mod merged with mine, sorry about that :)
I really like the maps too but I can't take full credit for them, I did a lot of tweaking to get results that I was consitently happy with but Cephalo's base script itself is pretty incredible.
Seven05 Dec 18, 2007, 10:44 AM Thanks for your reply
I changed desert and plains by -0.1 and +0.1 resp. (if you know what i mean) in the map script it seems to make a huge difference in desert formation. I wanted to tone down the global desert area, but now there is a tad too little desert... hmm ill post this in the appropriate thead also.
Try smaller changes like +/- 0.025 or 0.05 and try changing the desert threshold only, not the plains threshold. You can also scroll down a bit below the desert threshold and find the settings for rain noise and smoothing, if you increase both slightly (very slightly) the deserts will be broken up with plains rather than being massive oceans of sand.
Seven05 Dec 18, 2007, 10:53 AM I'll be glad to help with random events/quests. If you check my events mod, I also have added a quest called "Alternative Energy", which tasks the players with building hydro and/or nuclear plants for their cities.
Ok, I'll call on your experience now :)
Is it possible to increase the chance of specific events in the XML and then add another check to the 'canDoWhateverEvent' python code to reduce the cahnce based on the global polution or nukes exploded variables? What I was thinking is that I coudl change the chance of the weather events up to some obscene probability so they'd happen almost every turn and then when it checks to see if it can do that even in the python code just tell it yes or no based on the current environmental state. So, for instance, a 90% chance of hurricane events being triggered per turn but a 50% chance of it not being allowed if the global polution is below a certain threshold. Or would that not even change the frequency of events? I haven't looked into the random event code at all so I'm pretty clueless :D
jkp1187 Dec 18, 2007, 11:30 AM Okay, here's what I know about the subject.
There are two XML lines that affect the chance of the event trigger being pulled. They're in the XML file CIV4EventTriggerInfos.xml, as below (where X = a positive number).
<iPercentGamesActive>X</iPercentGamesActive>
<iWeight>X</iWeight>
iPercentGamesActive controls whether or not the event is even IN the specific game. If it's set to "0", the event will never be active in any game. Ever.
If iPercentGamesActive is set to "100", then the game will be active in 100% of the games. If it's between 1 and 99, then there's a chance that the event will not be eligible to be triggered.
Note that "active" does not necessarily mean that it will trigger. It just means that of all the events out there, this event will be eligible to be triggered in that specific game if the pre-requisites for the event have been met and the program randomly chooses that event. I do not know when or how the game "rolls the die" against this value.
For example -- the "Tsunami" event came shipped with BtS 3.02, but iPercentGamesActive has always been set to "0" so the event will never trigger unless you edit the file so that the event's iPercentGamesActive is a positive number. (I'm guessing it was deactivated because it's a little strong -- there's a chance of a small city getting totally destroyed.)
iWeight controls the likelihood of the event being triggered on any given turn. This is a numeric value. If the value of "-1" is given, the event WILL occur as soon as all of its prerequisites are met. The highest in the game right now is 5000 for the "Man Named Jed" event.
There are also two other XML tags -- bProbabilityUnitMultiply and bProbabilityBuildingMultiply -- that affect the probability of the event being triggered, assuming it makes the 'first cut'. If these are flagged as "0", nothing happens; if "1", the trigger probability increases as the player builds more units or buildings, respectively.
As far as I can tell, the probability of the event being triggered question is treated separate from the prerequisites. As long as the prerequisites are met, the event is eligible to occur.
Now, obviously, with bProbabilityUnitMultiply and bProbabilityBuildingMultiply, it seems like it's possible in theory for us to script something where the more pollution that exists the higher the chance of an event being triggered (obviously, they did something analogous for units and buildings,) but I do not know to where/what these two XML tags callback. I also do not know the actual numbers on this -- (each additional building increases probability by x%?)
It's also helpful to refer back to Solver's tutorial on events. He doesn't provide much in terms of how to do complex events, but he explains the basics very well, and he also includes a line-by-line description of the XML tags:
http://forums.civfanatics.com/showthread.php?t=230567
It will certainly be possible to put some sort of prerequisite # of pollution in the world -- for instance, prereqs could be: must have combustion, industrialism, must have x instances of pollution in the world, then the event can trigger (or, if you want to be evil, use "-1" as the value for weight so that it must trigger.)
There is another point to consider with random events -- they are usually triggered per individual civs. You could certainly specify that the effects be global via python (in CvRandomEventInterface.py)....but if you have iPercentGameActive at 100, and iWeight at -1, then every civ might end up getting the same event as soon as they meet all the prereqs.
Sorry if this doesn't exactly answer your question exactly....
Seven05 Dec 18, 2007, 12:30 PM Not exactly but it puts me on the right track :)
So I should be able to do something like this:
Set the weight of an event to -1 so it will trigger as soon as the prereqs are met and give it no prereqs but assign a PythonCanDo. In python, check the current polution level and use that as the r |