Known Issues

From Civilization V Wiki

Jump to: navigation, search

Use this page to add any issues you are fairly sure are present in the game, specifically those relevant to modding. You can add a new issue using the add section link (the '+' next to edit in the bar at the top of the page) and update details of existing issues using the edit link for each section.

Please use the talk page ('discussion' link at the top of the page) to discuss details of issues, including to propose an issue you are unsure of.

Contents

Unable to delete assets

Symptom: After deleting assets from the base game the game crashes when loading. May also cause crashes during gameplay.

Assets that don't cause crashes if deleted: Civilizations, Leaders, Promotions, Units, Unitclasses Assets that cause crashes if deleted: Builds, Resources, Technologies, Terrain (probably more but these are all I've tested)

Cause: In Civ5, the ID integer value correlates to the ID row on the main table that the info class is based on. So, if a resource (for example) was deleted, that method would return NULL for a specific value.

Much of our code was updated to support this, however legacy code has many locations where it does not check for null. The biggest culprit are loops like this

for(int iI = 0; iI < GC.getNumResources(); iI++)
{
       ...
       GC.getResourceinfo((ResourceTypes)iI)->DoStuff();
       ...
}

Sections like the above cause a crash when it tries to run the function against an empty definition.

Fix: There is no easy fix for this. The code will have to be reviewed and every place where it does a function like the above will have to have a check included to make sure the asset isn't null before the function is run. Firaxis is currently working on this fix.

Workaround: Look for opportunities to disable assets rather than deleting them. Civilizations can be set to not be playable, units and buildings can be set to require the future tech, etc.


Game doesn't support more than 1 leader per civilization

Symptom: Only the first leader assigned to a civilization is displayed in the game setup screen.

Cause: When the game builds the list of available civs/leaders it iterates through the civilizations and displays them without checking for multiple leaders:

for civ in GameInfo.Civilizations( "Playable = 1" ) do
 	-- Use the Civilization_Leaders table to cross reference from this civ to the Leaders table
 	leader = GameInfo.Leaders[GameInfo.Civilization_Leaders( "CivilizationType = '" .. civ.Type .. "'" )().LeaderheadType];
 	leaderDescription = leader.Description;

Additionally the SetCivilization function doesn't allow for a Leader value to be passed in.

   PreGame.SetCivilization( 0, civID );

Fix: Both functions will need to be updated in order to support multiple leaders, and updated in all places where civilizations are selected.

Workaround: Duplicate civilizations could be added to the game (Germany2...) setup identically to the first except for the changed leader. This may appear a little wonky in the civilopedia (where the Civ would be displayed twice) but should allow players to select multiple leaders.


Can't add more than about 60 promotions

Symptom: Any promotions past the first 60 (approx) is added to every unit in the game.

Cause: There is a limit of 200 rows for promotions.

Fix: The row size will need to be extended in a future patch. Is this possible to be made unlimited?

Workaround: None. Currently there is a hard limit on the amount of usable promotions. This limit includes if promotions come from multiples mods (so even if your mod doesn't hit the limit, if the player is running your mod and another together they may hit the limit).


Unable to add Audio through mods

Symptom: Audio is not moddable in the current implementation.

Cause: Audio is not run through the game database, but direct calls to specific files which aren't moddable.

Fix: Firaxis will need to remake the audio system to make it moddable.

Workaround: Make your own sounds effects while you play?


Unit Art changes aren't modular

Symptom: A player cannot run multiple mods that modify unit art at the same time.

Cause: Modifying unit art requires exclusive access to the Civ5ArtDefines_UnitMembers.xml and Civ5ArtDefines_Units.xml files. A mod adding unit art has to replace the entire files, another mod that adds unit art would need to do the same (and therefor it would lose the changes from the first mod).

Fix: UnitMemberArtInfos and UnitArtInfos need to be moved into the game database.

Workaround: Currently we can only run one mod with updated unit art at a time.

Only one resource mod can run at the same time

Symptom: A player cannot run multiple mods that modify resources at the same time.

Cause: Modifying resources requires exclusive override of AssignStartingPlots balancing functions. A mod adding resource has to replace the entire functions, another mod that adds resource would need to do the same (and therefor it would lose the changes from the first mod).

Fix: Add a way for mod to append or remove resource definitions from data structures inside AssignStartingPlots without exclusively overriding functions

Workaround: Wait for community to make a mod to do that.

(FIXED) Not all categories are showing up in Mods browser

Symptom: Categories such as Map Scripts are not showing up inside the mod browser.

Fix: This issue has been fixed and will be available in the next patch.

(FIXED) Enabling/Disabling mods will affect ALL VERSIONS of that Mod

Symptom: If multiple mods of the same version were installed on the user's machine, enabling one will enable all, or vice versa with disabling.

Fix: This issue has been fixed and will be available in the next patch. Installed mods will now be separated by version and specific versions can be enabled/disabled.


MaxPlayerInstance issue

Symptom: Successfully set a national wonder so that you can build 4 of them. If all 4 are in construction, you can not start construction on a 5th. However, once 3 have been built, the 4th copy deletes one of the other 3 upon completion.

Net result is that every time you build the 4th of 4 national wonders, it deletes one of the other 3.


Max population listed in demographics

Symptom: Currently in my mod you can reach populations so high that the demographics can no longer keep up. The max population it will show is 2,147,483,647 people. Not sure if the other demographics cap out or not. Of course, my civ sure is trying to have a GNP of 2 billion million gold. :)

Mod Building and Enabling problem

Symptom: When I first started modding you could leave Civ 5 open at the main menu, make a change in your mod, build it, and then go into browse mods to find the change has been made and you can simply enable it for immediate testing. If the Mod was already enabled, building it would disable it.

In rare cases, building the mod while in the game would cause your mod to disappear from the mod list. Building it again usually brought the mod back however.

At some point this problem changed from being intermittent and immediately fixable, to practically permanent and requiring you to actually restart the game.

Deleting or downloading mods seems to be the only way to get my mod to show back up on the list without restarting the game.

Request a refresh page button added to the Installed Mods Page.

UI:GetNumCurrentDeals(iPlayer) doesn't seem to work as expected

Symptom: I was looking for a way to iterate over all active trade deals and found this line in DiploCurrentDeals.lua.

local iNumCurrentDeals = UI:GetNumCurrentDeals( iPlayer );

However, it returns the same value no matter what integer is given for iPlayer. It appears that its either returning the value for the active player or player 0 (which are typically the same thing in a single player game) which works just fine for looking at the main player's current trade deals but not when scanning through all civs' trade deals.

At first, I thought that UI:GetNumCurrentDeals() was meant to only be for the active player, since it's underneath the UI package but then I realized that UI.LoadCurrentDeal( iPlayer, iIndex ) seems to accept its arguments as implied.

No Building / Landmark Modding Support

Symptom: civ5artdefines_wonders.xml and civ5artdefines_landmarks.xml are not being picked up in mods (landmark even when ticked in mod properties). This is the only thing holding us back from making new wonders, resources, improvements, natural wonders etc now.

Row changes Post Game-Start have no effect

Symptom: Presumably because once the objects are created in the DLL, they store their own values, but this means changing unit / building / tech costs, disabling / enabling of units / buildings / techs, and all other manner of common mod goals are impossible during gameplay (beyond UI hacks that the AI will ignore).

(FIXED) December Patch Removed ScriptData

There used to be a handy field on several game objects, called ScriptData. This was made multiple-mod friendly by some modcomps, including the popular SaveUtils.lua (CivFanatics thread), and was then used as a fundamental and necessary element of various mods and modcomps. This seems to have been removed in the December patch. Alternative techniques do not appear to have been found.

THIS HAS BEEN FIXED

Personal tools