V's Tweaks

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"
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:
So I've been rebalancing ships to be more historically accurate and immersive. Am now touching up their sizes as well, have a look :)

Ships1.png


Ships2.png
 
The re-sizing of ships does have some interesting effects. I've done that in my (never released) naval mod for EU3, too. Although I have to admit that I don't appreciate your flotilla approach for smaller vessels. Out of curiosity: how quickly can these changes be done?

On a different topic, I'm still hoping that someone can fix the shrunken foremast of the brigantine.:crazyeye:
 
Changes are quite straightforward, fscale in CIV4ArtDefines_Unit.xml and mesh number CIV4UnitInfos.xml

On a different topic, I'm still hoping that someone can fix the shrunken foremast of the brigantine.:crazyeye:

An issue is that many of the models aren't accurate in some ways, and others like the galleon, are kind of a caricature.
The fluyt for instance should have higher masts than a galleon, while the galleon's model has masts so high it looks ridiculous. The frigate needs way more cannon portholes, the carrack's hull should be higher at the bridges than the galleon, while its sails are baby-sized, and the "merchantman" seems to be a made up ship type with no historical reference. Not to mention how ridiculous the fluyt's baby masts look lol. Many of the other models look really great though, so it's really a mix.

I've been rebalancing ship's stats as well. For instance the fluyt should be unarmed and thus weak, but quite fast and carrying a good load, in fact it should carry more than the galleon (I gave both 4 slots). The galleon is by no means the king of cargo, and it's absurd that only it should be able to carry treasure, so treasure now only needs 4 slots, which all proper cargo ships have.

Although I have to admit that I don't appreciate your flotilla approach for smaller vessels.

I gave some smaller ships multiple models because they literally supposed to represent a division/flotilla of that number of ships, rather than an individual vessel. For instance I'd give the caravel a single cargo slot if it was a single ship, and then I'd need to mod the starting ships (which is easy but still), and it'd then not be a very useful ship either. The privateer, though an abstraction, would be too strong for a single model-look, and the sloop would be too weak. IMO it's also immersive and looks cool, as smaller cheaper vessels were used in much larger numbers than one ends up doing in game.

The 6-ship smuggler looks kinda bad but is there for its 6-slot anti-micro convenience. I only use them to shuttle to port royal and nothing else, so there might as well be a 6-slot version.
 
### V's Tweaks v1.0.0

! For new units you need the included DLL, which is the dynamic DLL variant provided by Nightingale.
! A backup is included for every modded file and for the hardcoded DLL. Just use these to get back to vanilla.

# Pick the files you want:

CIV4BuildingInfos.xml
- Tripled storage capacity

CIV4ProfessionInfos.xml
- Scout & Pioneer no longer allows moving into peak
# Note that "seasoned scout" and "hardy pioneer" can do so regardless of profession.
# Same for "converted native" if using the tweaked CIV4UnitInfos.xml

GlobalDefinesAlt.xml
- delayed pirate spawn (ships are more expensive)
<DefineName>MIN_ROUND_PIRATES</DefineName>
<DefineName>TIMER_PIRATES</DefineName>

CIV4TerrainInfos.xml
- Ships now have base vision range of 2 instead of 1 # https://forums.civfanatics.com/threads/increasing-range-of-vision-on-ocean.664715/

CIV4ArtDefines_Unit.xml
- More realistic ship sizes

CIV4UnitInfos.xml
(New game recommended)
(Anything that adds new units cannot be removed mid-game)
tweaks:
- rebalanced costs in Europe & co (Fixed / no increments, but more expensive)
- rebalanced ships to be more historically accurate and immersive
(strength, movement, withdrawal chance, evasion to port, cargo, costs, bombardment)
- "new" ships:
-- double smuggling ship variant (for less micro)
-- non-replacement first rate ("Man-o-War")
- specific:
-- treasure only requires 4 cargo slots to load (instead of 6)(still takes up only 3 slots)
-- Seasoned scout: +1 moves
-- Mortar: enabled defensive bonus (mortars can fire from behind cover)
-- Converted native: can enter peak

CIV4UnitClassInfos.xml
(required for new ships in CIV4UnitInfos.xml)
 

Attachments

  • V's Tweaks v1.0.0.zip
    2.8 MB · Views: 44
Last edited:
Please make absolutely clear in the description of this thread and your first post that this is only a mod-mod of WTP and these are no changes of the original WTP mod! :thumbsup:
 
well yeah, tweak is a synonym for tiny diy submod, pretty standard, I fail to see why there'd be any confusion, it even has "V's" in the name lol
 
MSpaint is just the best :D
I wanted an easy way of presenting my wip edits.

CivIV Realism Invictus has a tree view for unit progression, I don't recall for sure but I think it has for promotions as well, so it should definitely be possible.
 
Now that I've placed what I wanted into a submod, this thread will be for more traditional DiY tweaks, listed in the first post.

I've addressed some performance issues I had been complaining and making noise about, like "making" the trade route UI load in a second instead of a minute.
 
Top Bottom