Vaeringjar
Chieftain
- Joined
- Dec 19, 2020
- Messages
- 92
Here I list a bunch of DiY tweaks for various things.
Notes:
- Applying a tweak will require relaunching the game. XML changes require it and python changes may crash the game if it's running.
- These tweaks are savegame compatible unless specified.
- Make backups of edited files.
# Performance and load time tweaks:
P1 - "Automate Trade Route"
The trade route UI takes longer to load the more import/export orders you have.
I use a trade setup that requires every city to import and export everything, so by mid-game this UI can take a full minute to load.
This tweak makes it always load near-instantly, however, it does not list all routes at the same time and thus requires you to always use filters.
@ \Assets\Python\Screens\CvTradeRoutesAdvisor.py
Search for "def routesTable(self, bRebuild):" and replace this code:
with this:
P2A - "Sail to the New World"
If you got lots of cities this GUI may take lots of time to load (>10 seconds in my games). This tweak makes it near-instantaneous at the cost of removing the feature to send a ship directly to a city. I personally mostly use the east/west sectors so the trade-off is worth it.
@ \Assets\Python\Screens\CvAfricaScreen.py
@ \Assets\Python\Screens\CvEuropeScreen.py
@ \Assets\Python\Screens\CvPortRoyalScreen.py
Search for "def getPlotLists (self, unit)", then at the end of this "def" find and comment out the code under "#City list" after the 1st line:
P2B(Alternate) - "Sail to the New World"
If you got lots of cities this GUI may take lots of time to load. One feature I never use is that when hovering over a city in the list, its stockpiles are displayed at the bottom yields UI. Disabling this will speed it up, by my rough estimate it is >10% faster, but it will vary on how many cities you got.
@ \Assets\Python\Screens\CvAfricaScreen.py
@ \Assets\Python\Screens\CvEuropeScreen.py
@ \Assets\Python\Screens\CvPortRoyalScreen.py
Search for "for iYield in self.YieldList" and comment out that whole code block, like so:
P3 - Ocean Weather
If all that weather is eating up all your potato's FPS, you can reduce or disable it.
@ \Assets\XML\Terrain\CIV4FeatureInfos.xml
Search for "FEATURE_VENT_DEF", "FEATURE_VENT_FAV" and "FEATURE_STORM"
You can reduce the amount of weather terrain features by reducing the "iAppearance" number, while setting "bGeneratedEveryRound" to 0 should completely disable it.
#
- Forced labourers can't flee
If you get tired of micromanaging fleeing pops and their disruption to production, you can simply disable it.
@ \Assets\XML\CIV4UnitInfos.xml
For each of: UNIT_CRIMINAL UNIT_INDENTURED_SERVANT UNIT_NATIVE_SLAVE UNIT_AFRICAN_SLAVE
Switch bLbDCanEscape and bLbDCanRevolt to 0
# Misc:
Other simple DIY tweaks you can do:
@ \Assets\XML\GameInfo\CIV4WorldInfo.xml
- You can edit things like the number of native and colonial AIs for a given map size.
- And map size for most map scripts (not FaireWeather).
@ \PublicMaps\FaireWeatherTweakEx.py
- You can edit map sizes. Use notepad++ and search for a map size.
@ \Assets\XML\GameInfo\CIV4GameSpeedInfo.xml
- You can customise game speed stuff. For example make epic stacks be 200 units instead of the weird 150, or change the time increment per turn, etc
@ \Assets\XML\GameInfo\CIV4GameOptionInfos.xml
- You can set personal defaults here, instead of having to tick boxes every single time.
@ .../docs/CivCol/... CivilizationIV.ini
- To directly launch a mod you can either make a working mod shortcut (I don't remember how) or find "Specify a Mod folder" and make it "Mod = WeThePeople-2.8.2.2" or whatever the mod folder is named
- You can also do stuff like clamping fps, toggling fullscreen, setting a custom windowed resolution, etc
- Set the AutoSaveInterval and MaxAutoSaves. I have the interval set to 1 (every turn) just in case the game crashes.
------------------------------------------------
v1.0.0: https://forums.civfanatics.com/threads/vs-tweaks.666018/#post-15993605
- Note:
Tweaks are small, usually DIY, adjustments to a game or mod.
In context of a game, tweaks apply to that game, and when in context of a mod tweaks apply to that mod.
So when under the context of a specific game or mod, a post with a title such as "V's Tweaks" has a meaning that can be interpreted as, and no differently than,
tweaks that apply to the beforementioned game or mod, and made by an entity identified as V. An astute eye might observe that the mod under which the context of this essay can be found has a number of authors none of which can be identified as V, thus yielding the conclusion that "V's Tweaks" is not the work of the authors of that mod, and is therefore fan-made. It thus follows that "V's Tweaks"'s adjustments vary to the state of the content it replaces, therefore differing from vanilla content, which is defined as being the default as-installed state of content of either a game or mod, which one will find consistent with the title of the post and the context under which it has been placed. Any human or non-human entity who enjoys the content of the mod under which this prose has been carefully and eloquently expressed, and who may also enjoy the contents of "V's Tweaks", is therefore invited and welcomed by the so-called V entity to download, install and play the content known as "V's Tweaks", either in part or in full.
Notes:
- Applying a tweak will require relaunching the game. XML changes require it and python changes may crash the game if it's running.
- These tweaks are savegame compatible unless specified.
- Make backups of edited files.
# Performance and load time tweaks:
P1 - "Automate Trade Route"
Spoiler :
The trade route UI takes longer to load the more import/export orders you have.
I use a trade setup that requires every city to import and export everything, so by mid-game this UI can take a full minute to load.
This tweak makes it always load near-instantly, however, it does not list all routes at the same time and thus requires you to always use filters.
@ \Assets\Python\Screens\CvTradeRoutesAdvisor.py
Search for "def routesTable(self, bRebuild):" and replace this code:
Code:
if self.isSelectionEmpty():
self.CURRENT_TABLE = self.EXISTING_ROUTES
self.CurrentList = self.ExistingRoutes
if self.CurrentList > [] and not bRebuild:
for iI in xrange(len(self.ExistingRoutes)):
screen.setTableText(self.TableNames[self.CURRENT_TABLE], 1, iI, self.getAssignment(self.getRouteByTableRow(iI).getID()), "", WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_CENTER_JUSTIFY)
screen.show(self.TableNames[self.CURRENT_TABLE])
screen.modifyLabel(self.szTitle, u"<font=3b>" + self.TableLabel[self.CURRENT_TABLE] + u"</font>", CvUtil.FONT_LEFT_JUSTIFY)
self.updateButtons()
return
with this:
Code:
if self.isSelectionEmpty():
self.CurrentList = []
#self.CURRENT_TABLE = self.EXISTING_ROUTES
#self.CurrentList = self.ExistingRoutes
#if self.CurrentList > [] and not bRebuild:
# for iI in xrange(len(self.ExistingRoutes)):
# screen.setTableText(self.TableNames[self.CURRENT_TABLE], 1, iI, self.getAssignment(self.getRouteByTableRow(iI).getID()), "", WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_CENTER_JUSTIFY)
# screen.show(self.TableNames[self.CURRENT_TABLE])
# screen.modifyLabel(self.szTitle, u"<font=3b>" + self.TableLabel[self.CURRENT_TABLE] + u"</font>", CvUtil.FONT_LEFT_JUSTIFY)
# self.updateButtons()
# return
P2A - "Sail to the New World"
Spoiler :
If you got lots of cities this GUI may take lots of time to load (>10 seconds in my games). This tweak makes it near-instantaneous at the cost of removing the feature to send a ship directly to a city. I personally mostly use the east/west sectors so the trade-off is worth it.
@ \Assets\Python\Screens\CvAfricaScreen.py
@ \Assets\Python\Screens\CvEuropeScreen.py
@ \Assets\Python\Screens\CvPortRoyalScreen.py
Search for "def getPlotLists (self, unit)", then at the end of this "def" find and comment out the code under "#City list" after the 1st line:
Code:
#City list
self.CityPlotList = []
# (city, iter) = player.firstCity(false)
#
# while (city):
# if city.isCoastal(gc.getMIN_WATER_SIZE_FOR_OCEAN()):
# if unit.getGroup().generatePath(plotEast, city.plot(), 0, false, None, true):
# self.CityPlotList.append([city, None])
# elif unit.getGroup().generatePath(plotWest, city.plot(), 0, false, None, true):
# self.CityPlotList.append([city, None])
# (city, iter) = player.nextCity(iter, false)
P2B(Alternate) - "Sail to the New World"
Spoiler :
If you got lots of cities this GUI may take lots of time to load. One feature I never use is that when hovering over a city in the list, its stockpiles are displayed at the bottom yields UI. Disabling this will speed it up, by my rough estimate it is >10% faster, but it will vary on how many cities you got.
@ \Assets\Python\Screens\CvAfricaScreen.py
@ \Assets\Python\Screens\CvEuropeScreen.py
@ \Assets\Python\Screens\CvPortRoyalScreen.py
Search for "for iYield in self.YieldList" and comment out that whole code block, like so:
Code:
# #get yield stored in city warehouse
# for iYield in self.YieldList :
# screen.hide("EuropePrices" + str(iYield))
# szNumStorage = u"-"
#
# if (pCity.getYieldStored(iYield) > 0):
# szNumStorage = u"%d" % (pCity.getYieldStored(iYield))
# ## R&R, Robert Surcouf, Multiple rows of Yields if necessary START
#
# #screen.setLabel("DialogStorage" + str(iYield), "Background", u"<font=3><color=255,255,255>" + szNumStorage + u"</color></font>", CvUtil.FONT_CENTER_JUSTIFY, iX + self.BOX_W / 2, self.BOX_Y + self.BOX_H / 12, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
# screen.setLabel("DialogStorage" + str(iYield), "Background", u"<font=2><color=255,255,255>" + szNumStorage + u"</color></font>", CvUtil.FONT_CENTER_JUSTIFY, iX + self.BOX_W / 2, iY + self.BOX_H / 12, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
# iX += self.BOX_W
#
# #iY += (iX / (self.XResolution -5) ) * self.BOX_H
# iY += (iX / (self.BOX_X + self.NUM_YIELDS_IN_A_ROW * self.BOX_W -1) ) * self.BOX_H
# #iX = max( iX % (self.XResolution -5) , (self.XResolution - self.BOX_W * self.NUM_YIELDS_IN_A_ROW) / 2)
# iX = max( iX % (self.BOX_X + self.NUM_YIELDS_IN_A_ROW * self.BOX_W -1) , (self.XResolution - (self.XResolution / self.NUM_YIELDS_IN_A_ROW) * self.NUM_YIELDS_IN_A_ROW) / 2)
# ## R&R, Robert Surcouf, Multiple rows of Yields if necessary END
# screen.setLabelAt("DialogWarehouse", "DialogBackground", u"<font=4>" + localText.getText("TXT_KEY_EU_WAREHOUSE_INFO", (pCity.getName(), pCity.getMaxYieldCapacity())) + u"</font>", CvUtil.FONT_LEFT_JUSTIFY, self.BOX_X, self.BOX_Y - self.STANDARD_MARGIN, 0, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
P3 - Ocean Weather
Spoiler :
If all that weather is eating up all your potato's FPS, you can reduce or disable it.
@ \Assets\XML\Terrain\CIV4FeatureInfos.xml
Search for "FEATURE_VENT_DEF", "FEATURE_VENT_FAV" and "FEATURE_STORM"
You can reduce the amount of weather terrain features by reducing the "iAppearance" number, while setting "bGeneratedEveryRound" to 0 should completely disable it.
#
- Forced labourers can't flee
Spoiler :
If you get tired of micromanaging fleeing pops and their disruption to production, you can simply disable it.
@ \Assets\XML\CIV4UnitInfos.xml
For each of: UNIT_CRIMINAL UNIT_INDENTURED_SERVANT UNIT_NATIVE_SLAVE UNIT_AFRICAN_SLAVE
Switch bLbDCanEscape and bLbDCanRevolt to 0
# Misc:
Other simple DIY tweaks you can do:
@ \Assets\XML\GameInfo\CIV4WorldInfo.xml
- You can edit things like the number of native and colonial AIs for a given map size.
- And map size for most map scripts (not FaireWeather).
@ \PublicMaps\FaireWeatherTweakEx.py
- You can edit map sizes. Use notepad++ and search for a map size.
@ \Assets\XML\GameInfo\CIV4GameSpeedInfo.xml
- You can customise game speed stuff. For example make epic stacks be 200 units instead of the weird 150, or change the time increment per turn, etc
@ \Assets\XML\GameInfo\CIV4GameOptionInfos.xml
- You can set personal defaults here, instead of having to tick boxes every single time.
@ .../docs/CivCol/... CivilizationIV.ini
- To directly launch a mod you can either make a working mod shortcut (I don't remember how) or find "Specify a Mod folder" and make it "Mod = WeThePeople-2.8.2.2" or whatever the mod folder is named
- You can also do stuff like clamping fps, toggling fullscreen, setting a custom windowed resolution, etc
- Set the AutoSaveInterval and MaxAutoSaves. I have the interval set to 1 (every turn) just in case the game crashes.
------------------------------------------------
Spoiler old stuff: :
v1.0.0: https://forums.civfanatics.com/threads/vs-tweaks.666018/#post-15993605
- Note:
Tweaks are small, usually DIY, adjustments to a game or mod.
In context of a game, tweaks apply to that game, and when in context of a mod tweaks apply to that mod.
So when under the context of a specific game or mod, a post with a title such as "V's Tweaks" has a meaning that can be interpreted as, and no differently than,
tweaks that apply to the beforementioned game or mod, and made by an entity identified as V. An astute eye might observe that the mod under which the context of this essay can be found has a number of authors none of which can be identified as V, thus yielding the conclusion that "V's Tweaks" is not the work of the authors of that mod, and is therefore fan-made. It thus follows that "V's Tweaks"'s adjustments vary to the state of the content it replaces, therefore differing from vanilla content, which is defined as being the default as-installed state of content of either a game or mod, which one will find consistent with the title of the post and the context under which it has been placed. Any human or non-human entity who enjoys the content of the mod under which this prose has been carefully and eloquently expressed, and who may also enjoy the contents of "V's Tweaks", is therefore invited and welcomed by the so-called V entity to download, install and play the content known as "V's Tweaks", either in part or in full.
Last edited: