Ruff's Cobbled SG Modpack

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,134
Location
an Aussie in Boston
Finally! Version 2.0 of Ruff's Cobbled SG Mod is now available. There are two versions, one for vanilla Civ4 (v1.61) and one for Warlords Civ4 (v2.08). The aim of these mod packs is to enhance SG play and reporting without having any impact on game rules. So, just to be clear ... one of the primary aims of this mod is ...
UNALTERED GAMEPLAY

Spoiler :
bahhh - not the primary aim ... that would be about having fun playing with python and bending the game to my will!


Current Version
- v2.0.1 (Vanilla Civ4 v1.61 compatible) - downloaded 525 times (Jul 23) and rated "A-" :cooool:
- v2.0.4w (Warlords Civ4 v2.08 compatible) - downloaded 970 times (Jul 23) and rated "A" :cooool:

Please note that I am not planning on getting BtS so there will not be a version of this mod pack for BtS from me.


This mod contains ...


Let me know if I have got any of the references or links incorrect or (even worse) missing.

Installation
The best place to install this mod is under your 'my docs' civ4 folder. It is designed to sit on top as an optional component of your civ4 game. You should rename your current customassets folder prior to unzipping this mod and then check if there is any compatibility issues between the created folder and your old customassets folder. To uninstall this mod, delete (or rename) the customassets folder - the game will create a null (empty) version of the customassets folder if it cannot find one.

For Civ4 Vanilla ... put the RuffMod v2.zip file here ...
C:\Documents and Settings\user-name\My Documents\My Games\Sid Meier's Civilization 4\​
... right click it, select "winzip", select "Extract to here". This will create two files ('RuffMod v2.ini' and 'ModSpcDomAdvColumns.txt' in the above folder and create a customassets directory.

For Civ4 Warlords ... put the RuffMod v2w.zip file here ...
C:\Documents and Settings\user-name\My Documents\My Games\Warlords\​
... right click it, select "winzip", select "Extract to here". This will create two files ('RuffMod v2w.ini' and 'ModSpcDomAdvColumns.txt' in the above folder and create a customassets directory.

There are no combatibility issues between this mod and ...
- blue marble
- ???

Mod Options
The unzip process creates a RuffMod_2.ini (vanilla) or RuffMod_2w.ini (warlords) file which controls almost all of the components in the mod pack. You can either edit this file using notepad (or similar) or use the in-game option screens. The options screen is activiated by Alt-J. There are various tabs which control various elements of this mod pack. There is also a 'credits' tab.

Thanks
  • A very special thanks to the poor saps at Deviant Minds who Rex strong armed into testing and providing very useful feedback and suggestions on this mod pack. A number of the significant improvements to the logger came about as throw away lines from the testers.
  • Thanks to the HOF Crew for their excellent mod, in particular, the in-game option screens which I borrowed fairly heavily from.
    My dream is to have some of my code make its way back to the HOF mod
    news - :banana: life is good ... some of my code did make its way into HOF-1.61.011 and HOF-2.08.004 !!
  • Thanks to the good people at CFC who provided answers to silly python questions - things that had caused me hours of pain, they were able to solve in 5 to 10 minutes (the buggers :D)

Known Issues:
There are a small number of issues with the current version (no promise of any fixes)
  • this isn't really an issue but ... items in customassets are not loaded if you check 'locked assets' - that is what locked assets mean ... no custom assets ... ie the assets are locked! ... so, my mod packs will not be loaded if you check 'locked assets'
  • The 'city growth' event fires after whipping or drafting and reports "city growth"
  • The 'turns to complete units / buildings' doesn't take account of overflow
  • Turning some options off / on require alt-tabing to refresh the screen (raw commerce for one)
  • The logger reports the city founded using the default name
  • Logger reports 'x/y' turns even if no time victory is possible
  • testing attitudes on yourself (ie how does Civ1 feel about Civ1) - you can get errors, need code to skip this
  • import the latest update to sevopedia
  • random civ-related names doesn't work for warlords
Spoiler Notes on the Logger :

I have extensively modified the logger based on personal experience and feedback from the forums. All logger information is controlled via a ini file (a la HOF logger) in a number of ways ...
  • The logger does NOT start on game start. You have to start the logger yourself using ALT-L. It will then display a dialog box regarding logging.
  • However, if you select the 'silent' option, the logger will start automatically with default file names and no in game messages
  • You also have the option of showing "IBT:" after the completion of your turn and before the computers turn
  • You can also dump battle statistics (total units victorious and defeated split between attacking and defending) to the log with ALT-B. This will also reset the counters.
  • The logger can now log war status (without any DLL changes in the vanilla version)
  • The logger can now log changes in State Religion
  • The logger can now log changes in attitudes
  • The logger can now log changes in civics
  • The combat message now contains the combat victory probability and location of the battle
  • The tech commenced message now contains the number of turns to learn the tech
  • The build (units and buildings) messages now contain the number of turns to complete the item

Spoiler sample log :


Logging by Ruff's Cobbled Mod Pack v2.0.1 (Warlords v2.08) - New Log Entries
----------------------------------------------------------------------------
Turn 0/128 (1760 AD) [21-Dec-2006 22:26:23]

IBT:

Turn 1/128 (1765 AD) [21-Dec-2006 22:28:05]
Delhi founded
Delhi begins: Mechanized Infantry (27 turns)
Delhi's borders expand

IBT:

Turn 2/128 (1770 AD) [21-Dec-2006 22:30:34]
Bombay founded
Contact made: Malinese Empire
Ruff_Hi(India) declares war on Mansa Musa(Mali)
Research begun: Future Tech (43 Turns)
Bombayb begins: Mechanized Infantry (16 turns)
A Well was built near Bombayb

IBT:
Attitude Change: Mansa Musa(Mali) towards Ruff_Hi(India), from 'Cautious' to 'Annoyed'

Turn 3/128 (1775 AD) [21-Dec-2006 22:32:07]
A Mine was built near Delhi

IBT:

Turn 4/128 (1780 AD) [21-Dec-2006 22:32:47]
Bombay founded
Bombay begins: Mechanized Infantry (8 turns)

IBT:

Turn 5/128 (1785 AD) [21-Dec-2006 22:33:20]
A Camp was built near Bombayb

IBT:
Judaism founded in Bombayb
Judaism has spread: Bombayb
Christianity founded in a distant land
Islam founded in Bombay
Islam has spread: Bombay
Hinduism founded in a distant land
Buddhism founded in Delhi
Buddhism has spread: Delhi
Civics Change: Mansa Musa(Mali) from 'Despotism' to 'Universal Suffrage'
Civics Change: Mansa Musa(Mali) from 'Barbarism' to 'Bureaucracy'
Civics Change: Mansa Musa(Mali) from 'Tribalism' to 'Emancipation'
Civics Change: Mansa Musa(Mali) from 'Decentralization' to 'Environmentalism'
Civics Change: Mansa Musa(Mali) from 'Paganism' to 'Organized Religion'

Turn 6/128 (1790 AD) [21-Dec-2006 22:33:30]
A Farm was built near Bombay
Delhi's borders expand
Delhi finishes: Mechanized Infantry
Bombayb's borders expand

IBT:
State Religion Change: Ruff_Hi(India) from 'no State Religion' to 'Judaism'
State Religion Change: Mansa Musa(Mali) from 'no State Religion' to 'Hinduism'
Attitude Change: Mansa Musa(Mali) towards Ruff_Hi(India), from 'Annoyed' to 'Furious'

Turn 7/128 (1795 AD) [21-Dec-2006 22:34:59]
Delhi begins: Tank (5 turns)
Delhi begins: Gunship (4 turns)
Bombayb grows: 6

IBT:
Confucianism founded in a distant land

Turn 8/128 (1800 AD) [21-Dec-2006 22:35:27]
A Windmill was built near Bombayb
A Farm was built near Bombay
A Lumbermill was built near Bombayb
Bombay grows: 6

IBT:

Turn 9/128 (1805 AD) [21-Dec-2006 22:35:40]
A Lumbermill was built near Bombayb
Delhi grows: 10
Bombayb grows: 7

IBT:

Turn 10/128 (1810 AD) [21-Dec-2006 22:35:53]
A Lumbermill was built near Bombayb
Delhi finishes: Gunship
Archimedes (Engineer) (Great Engineer) born in Delhi
Bombayb finishes: Mechanized Infantry

IBT:

Turn 11/128 (1815 AD) [21-Dec-2006 22:36:14]
A Mine was built near Bombayb
A Farm was built near Bombay
Delhi begins: Gunship (4 turns)
Bombayb begins: Gunship (4 turns)
Bombay finishes: Mechanized Infantry

IBT:
While defending in Malinese territory at Djenne, Explorer loses to: Malinese Mechanized Infantry (32.00/32) (Prob Victory: 0.0%)

Turn 12/128 (1820 AD) [21-Dec-2006 22:36:57]
A Farm was destroyed near Timbuktu
While attacking in Malinese territory at Timbuktu, Gunship defeats (21.36/24): Malinese Explorer (Prob Victory: 100.0%)
A Lumbermill was built near Bombayb
A Lumbermill was built near Bombayb
Bombay begins: Gunship (6 turns)
Bombayb grows: 8

IBT:
While defending in Malinese territory at Timbuktu, Gunship loses to: Malinese Mechanized Infantry (11.52/32) (Prob Victory: 5.5%)

Turn 13/128 (1825 AD) [21-Dec-2006 22:37:24]
A Lumbermill was built near Bombay
Bombay grows: 7

IBT:

Turn 14/128 (1830 AD) [21-Dec-2006 22:37:29]
Delhi finishes: Gunship
Bombayb finishes: Gunship

IBT:

Turn 15/128 (1835 AD) [21-Dec-2006 22:37:34]
While attacking in Malinese territory at Kumbi Saleh, Modern Armor defeats (32.00/40): Malinese Mechanized Infantry (Prob Victory: 56.8%)
A City Ruins was destroyed near Madras
Confucianism has spread: Kumbi Saleh
Captured Kumbi Saleh (Mansa Musa)
Razed Kumbi Saleh
Kumbi Saleh lost
A City Ruins was built
While attacking in Malinese territory at Djenne, Modern Armor loses to: Malinese Mechanized Infantry (32.00/32) (Prob Victory: 30.7%)
While attacking in Malinese territory at Djenne, Modern Armor defeats (4.80/40): Malinese Mechanized Infantry (Prob Victory: 30.7%)
While attacking in Malinese territory at Djenne, Modern Armor loses to: Malinese SAM Infantry (6.12/18) (Prob Victory: 82.2%)
Delhi begins: Gunship (4 turns)
Bombayb begins: Gunship (5 turns)
Bombay's borders expand
Norbert Rillieux (Engineer) (Great Engineer) born in Bombay

IBT:
While defending in Indian territory near Bombayb, Fast Worker loses to: Malinese Gunship (24.00/24) (Prob Victory: 17.8%)
While defending in Indian territory at Bombayb, Fast Worker loses to: Malinese Gunship (24.00/24) (Prob Victory: 82.2%)
A Well was destroyed near Bombayb
A Pasture was destroyed near Delhi
State Religion Change: Ruff_Hi(India) from 'Judaism' to 'Islam'

Turn 16/128 (1840 AD) [21-Dec-2006 22:40:49]
While attacking in Indian territory at Delhi, Modern Armor defeats (40.00/40): Malinese Gunship (Prob Victory: 100.0%)
While attacking in Malinese territory at Djenne, Gunship defeats (12.48/24): Malinese SAM Infantry (Prob Victory: 35.7%)
Modern Armor promoted: City Raider I
While attacking in Malinese territory at Djenne, Modern Armor defeats (22.40/40): Malinese Christian Missionary (Prob Victory: 35.7%)
A City Ruins was destroyed near Madras
Christianity has spread: Djenne
Captured Djenne (Mansa Musa)
Razed Djenne
Djenne lost
A City Ruins was built
Modern Armor promoted: City Raider I

IBT:
A Mine was destroyed near Bombayb
A Camp was destroyed near Bombayb
A Lumbermill was destroyed near Bombayb
Civics Change: Mansa Musa(Mali) from 'Organized Religion' to 'Pacifism'

Spoiler Naming Convention :

There are 6 options with unit naming (and a sub-option in some cases) all controlled from the Ruff_Mod.ini file. These options are:
  • Normal Civ IV names
  • Totally random names (TheLopez)
  • Random civ-related names (TheLopez)
  • ‘1st Warrior’ type names (Porges)
  • ‘1st Warrior of Moscow’ type names (Porges)
  • Borg Naming (Ruff_Hi)
You can also use roman numerals (Sen2000) when you are using Porges’ naming options.

Here is an example of the Borg naming convention …

Unfortunately, the name size doesn’t have room for “tertiary adjunct to …”.

Spoiler Version History :

v2.0 to v2.0.1 (Vanilla) or v2.0.4 (warlords)
  • fixed Scoreboard name/civ option doesn't 'take' when game loaded. Work-around; Alt-J then exit
  • fixed Dead civs still included in 'attitude', 'civics', 'state religion' and 'war status'
  • fixed city ruins included in creation / destroyed improvements
  • removed spoiler information where you can learn about a civ because the logger reports pillage by their units or in their land

v1.2.0b to v2.0
  • A complete rewrite / recombine of all elements
  • Dropped some elements (specialist stacker, plot enhancements)
  • Added some elements (scoreboard, UN resolutions)
  • Enhanced some elements (logger)
  • Added in-game options screen (heavy borrowing of code from HOF Crew)
v1.2.0 to v1.2.0a to v1.2.0b (0a had the wrong file)
  • Added battle odds to the logger
v1.1.0 to v1.2.0
  • changed Reminder key from ALT-F (used for something else – fort maybe) to ALT-M (set ‘minder)
  • Logger:
    • changed logger so that it shows the unit name in combat results
    • changed the colour for promotions
    • included option to have 4000BC as Turn 0 or Turn 1
    • Fixed Turn counter
  • Added option to turn clock mod on / off
  • added TheLopez's Specialist Stacker (HOF version)
  • added 12Monkey’s Plot List Enhancement
  • added TheLopez’s Great Person Mod
  • added Sevo's Civilopedia
  • added Tech Screen
v1.0.2 to v1.1.0
  • echo Alt-L logging on of off
  • added battle statistics (ALT-B)
  • added option of logging "IBT:"
  • changed Reminder key from ALT-R (rebase air units) to ALT-F (flag future reminders)
  • added 12Monkey's Modified Special Domestic Advisor
v1.0.1 to v1.0.2
  • fixed some logging issues
  • combat results report if unit was defending or attacking
    victories are reported in dark red, losses are reported in red
  • logging is started with Alt-L once the game has loaded with a message about if you are logging or not
  • option to turn off random unit names
  • started process of moving to RuffMod.ini file instead of HOF.ini file
v1.0.0 to v1.0.1
  • fixed tabbing for domesticadvisor
  • fixed tabbing for attitude icons
  • fixed error in logging of religionspread to another civ


v1.1.0 replaced after 57 downloads.
v1.2.0a replaced after 25 downloads.
v1.2.0b replaced after 150 downloads.
 


 
:goodjob: ruff. I am going to give it a go. Not sure if I want all of what you've put together, but I definitely want to see if you've managed to fix up the issues with the Autologger.

I'll post back with some feedback after I've had a chance to play with it.
 
Tried to play my own SG with it tonight and it broke the interface - all because of one silly tab. It just goes to show that you cannot make a simple change and assume it will work. Version 1.0.1 is now available with this issue fixed and some other small fixes too.
 
For those of us a bit new to this game, can you tell us where to unzip to? Do I put the 'customassets' directory and two ini files anywhere in particular?

Code:
Install:
Put the zip file in your civ 4 'my docs' directory and unzip, retaining
directory structure.  It will create a 'customassets' directory, two ini
files and a read me file.

EDIT: Ok.. I think I understand a bit... into the 'Sid Meier's Civilization 4' directory and overwrite existing files?
 
I've created a better readme document. See attached.
 

Attachments

  • Ruff_Cobbled_SG_Mods_ReadMe.pdf
    19.3 KB · Views: 723
Great stuff ruff_hi. I installed and played away without any errors but autolog didn't work yet.

I think it's to do with the fact that you've put all the config info into the file HOF-1.61.001? Guessing here. I looked in that file and changed the settings of the default directory and your name to mine and a few others but it didn't load up the settings I set.

This file is in the 'Sid Meier's Civilization 4' directory. Do I have to 'load' this file or something to get it to work properly?
 
I hate it when I leave my RL name in things. Here is what the autolog part of my ini file looks like (in blue, black text are comments that should NOT be in the ini file) ...

###################################
[AUTOLOG]

# Enables use of the autolog part of the mod. 0 = Disabled, 1 = Enabled.
Enabled = 1


I haven't tested if this works. It might, it might not.

# Autolog directory where log file resides - Default or use fully qualified path (i.e. C:\Folder\subfolder etc.)
AutoLogPath = Default


The default path is '\autolog' under your user CIV 4 directory (the one where games are saved, etc). It is normally 'C:\Documents and Settings\userid\My Documents\My Games\Sid Meier's Civilization 4\autolog'

# name of log file -- if there is no file of this name in the directory above, one will be created
LogFileName = Autolog.txt


The logfilename is ignored if 'DefaultLogFileName' is true.

# default name of log file (1 for yes, 0 for no) - default is 'PlayerName.txt'
DefaultLogFileName = 1


The only addition from the HOF ini file is that I have added the 'DefaultLogFileName' part. If this is true (=1), then the log file will be the name of the player. For example, if you are playing in CTIV-5's war training camp, then the log file would be CTIV-5.txt. The dialog box will ask if you want to log the game or not - you are not given the option of changing the file name. If this is set to false (=0), then you will be given the chance of changing the file name as per the v1.52 logger.

You have to be very careful with dialog boxes in CIV4. Hitting enter just appears to close the dialog box and it might not register the 'button' event. So, click on OK instead of hitting enter. This is true with the custom log item too. I am thinking of changing the logging option from automatic to a user controlled key (say Alt-L). That way, it will not get tied up with the loading of the game.
 
ruff, just to update you on how it went for me.

I did the changes you mentioned above and it now creates the autolog file but there is no content in the file other than -
----------------------------New entries----------------------------
Turn 81 (850 BC)

Nothing else shows up after this.

I also didn't want the random name thingy so I just removed the two random name python files from the custom assets directory. Should I modify any of the other files to reflect that they are gone?

I have attached the file PythonErr2.log to show that it does report that it is loading the relevant files (zipped as it won't let me attach log files).
 
Here is a beta version that fixes some of the logging issues you and I have noticed. Deleting the renameunit.py files was probably not the best way to go - better in that situation to open the RandomNameEventManager.py file with notepad and put a '#' mark in front of the 'unit.setname(' lines - caution, that line is in there twice. However, you don't have to do that with this version as I have included an 'enabled' option for the rename part in the RuffMod.ini file (right down the bottom).

Changes for this version ...
  • fixed some logging issues
  • combat results report if unit was defending or attacking
  • victories are reported in dark red, losses are reported in red
  • logging is started with Alt-L once the game has loaded with a message about if you are logging or not
  • option to turn off random unit names
  • started process of moving to RuffMod.ini file instead of HOF.ini file

(see first post for latest version).
 
Thanks for the advice on the 2 files for randomname. I didn't delete them, I removed them from the folder to another. I will put them back and turn them off.

You seem to mention a new file? Which link to follow? I like the sound of Alt-L to turn the logging on and it actually saying that it's going to log now.
 
new file attached above - have fun. The only thing that I am not happy about (at the moment) re the logger is that if you hit 'cancel' on the log file dialog box, it doesn't come back. If you hit ok, it does. I want it the other way around (doesn't come back if you have started logging, does come back if you haven't).
 
Thanks ruff.. Giving it a go now.

Just a quick question. Does the program just load whatever ini files are in the game directory? So if you have both the HOF and Ruff ini files it will load both? Does it matter that they both have the same stuff in them?
 
The name of the log files is explicitly mentioned in the python code - it doesn't just load all ini files. I am in the process of moving the items from the HOF.ini file to the RuffMod.ini file. At the moment (v1.0.2), the autologger and the unit rename stuff is in the RuffMod.ini file with the rest in the HOF.ini file.
 
FWIW, I think the clock mod was eotinb's as well.
 
New v1.1.0 available. See first post.
 
:thumbsup:

Nice work. I really appreciate that you took the time to do this.

Two questions:

How do I disable the "clock" as I notice it reports the game turn +1?

And how can I correct the game turn numbers in the autolog as it also reports game turn +1 after the opening turn?
 
Bede said:
:thumbsup: Nice work. I really appreciate that you took the time to do this.

Two questions: How do I disable the "clock" as I notice it reports the game turn +1? And how can I correct the game turn numbers in the autolog as it also reports game turn +1 after the opening turn?
Thanks for the feedback. I was reporting on a game today and noticed that my logger turn counter was off. I wasn't aware that the clock didn't have an 'enable' feature.

Solutions to both of these involve changing the python code. For the clock, edit CvMainInterface.py and search for 'clock mod'. For the logger, it depends on if the very first turn is counted as '0' or '1'. I think that I have some code that counts it as '0' and some code that counts it as '1'. Obviously inconsistent. What do you think - is the first turn '0' or is it '1'? Anyway, the code is found in autologEventManager.py - search for '.getGame().getGameTurn()' ... caution, it appears twice. Once for when the logger is opened and once at the end of the round.

I'll update my modpack for this in the next version.
 
The opening turn (4000BC) is turn 0 if you want the turn counter to be consistent with the in game turns.

Thanks for the prompt reply, editing now.

Edit made, but now for some reason the year number is off in the logger. The clock display is corrected. :confused:
 
Top Bottom