Sid Meier's Civilization: Beyond Earth

Sid Meier's Civilization: Beyond Earth

New Horizons: A total conversion [vanilla]
Machiavelli  [developer] 30 Aug, 2015 @ 8:44am
Info for improving mod performance
Some users have reported experiencing an extra 1-3 seconds at the start of each of their turns (it looks like the AI is taking longer). Another is that the tech web is less "responsive" to selecting a new technology. This is caused by some UI code that adds the building quest info to the tooltip for the buildings (which can be seen in the tech web and other locations). You can improve performance by disabling the UI code that shows the building quests. To do so:

1) Use notepad (or any other text editor) to open:
...Sid Meier's Civilization Beyond Earth\MODS\Mods\New Horizons (v xxx)\UI\InfoTooltipInclude.lua

2) Search for "-- NH edit:" to find a section of the file that looks like:

-- NH edit: start insert
-- Add text for quests
local perkA = "PLAYERPERK_NH_" .. pBuildingInfo.Type .. "_A";
local perkB = "PLAYERPERK_NH_" .. pBuildingInfo.Type .. "_B";

if(GameInfo.PlayerPerks[perkA] ~= nil and GameInfo.PlayerPerks[perkB] ~= nil) then
local strQuestText = "";
local perkA_HelpText = Locale.ConvertTextKey(GameInfo.PlayerPerks[perkA].Help);
local perkB_HelpText = Locale.ConvertTextKey(GameInfo.PlayerPerks[perkB].Help);
local bHasPerkA = pActivePlayer:HasPerk(GameInfo.PlayerPerks[perkA].ID);
local bHasPerkB = pActivePlayer:HasPerk(GameInfo.PlayerPerks[perkB].ID);

if(bHasPerkA == false and bHasPerkB == false) then
-- Player hasn't done the quest yet
strQuestText = "---- Quest ----[NEWLINE]" .. perkA_HelpText .. "[NEWLINE]---- OR ----[NEWLINE]" .. perkB_HelpText;
elseif(bHasPerkA) then
-- Player picked perk A
strQuestText = "---- Quest ----[NEWLINE][COLOR_GREEN]" .. perkA_HelpText .. "[ENDCOLOR][NEWLINE]---- OR ----[NEWLINE][COLOR_WARNING_TEXT]" .. perkB_HelpText .. "[ENDCOLOR]";
elseif(bHasPerkB) then
-- Player picked perk B
strQuestText = "---- Quest ----[NEWLINE][COLOR_WARNING_TEXT]" .. perkA_HelpText .. "[ENDCOLOR][NEWLINE]---- OR ----[NEWLINE][COLOR_GREEN]" .. perkB_HelpText .. "[ENDCOLOR]";
end

table.insert(lines, strQuestText);
end
-- NH edit: end insert


3) Comment out this section of code. To do that add (without quotes) "--[[" at the top and "--]]" at the bottom. It should look like:

--[[
...the stuff above...
--]]
Last edited by Machiavelli; 30 Aug, 2015 @ 11:34am