K-Mod: Far Beyond the Sword

Hey everyone, I've been getting into DLL-modding and am working on my idea of how Civ4 should have been released in the first place (which AFAIK is basically the same as what karadoc set out to do when starting K-Mod). I'm using K-Mod v1.44 as a base. It's nowhere near complete, but with karadoc having been silent for so long, I thought I'd make a stripped down version as close as possible to K-Mod v1.44 that could also be enjoyed by K-Mod lovers who don't share my taste for more radical changes. I'll add it to this post as an attachment. It's basically K-Mod v1.44 + Platyping's Platypedia + Afforess' Advanced Automations + most of Pep's New Sentry Actions + some other changes you probably won't even notice. It hasn't been tested extensively because, as I said, it's merely a stripped down version of what I'm actually working on, but bug reports (and other forms of feedback) are welcome nonetheless.

Could you do this as a github fork? (Besides me, there is also someone else doing this currently.)
 
Could you do this as a github fork? (Besides me, there is also someone else doing this currently.)

Oh, I didn't know that was going on. Anyway, I don't know. I'm having some reservations about taking things that other people made and uploaded here, changing them and uploading them somewhere else.
 
Could you do this as a github fork? (Besides me, there is also someone else doing this currently.)

Wow, this is awesome, all changes seem to be inline with Karadoc's initiative.
So it's like a spiritual succession to K-mod!
Keep up the good work guys!
 
Karadoc uploaded some code to the K-Mod github. (This was the last commit previously, so there are 40 new commits now.)


I think that everything from that v1.45 pre-release and some new things are there now except experimental balance changes listed here:
Spoiler :
commit c9e2c9fb06fa0ee5e212d47dad8e89c9b4b00aa5
Author: karadoc <karadoc@gmail.com>
Date: Wed Apr 1 09:38:30 2015 +1100

Adjusted cultural revolt probability and properties.

Increased the base change of revolt from 10% to 15%. Decreased the
duration of revolts from 3+2*(previous revolts) to 2+(previous revolts).
Increased the number of 'warning revolts' from 1 to 2. ie. Cities will
now flip on the 3rd revolt rather than the 2nd.

The net effect of these changes is that the average number of turns to
flip a city will be unchanged, and the number of turns spent in revolt
will be similar to before - but the chance of each revolt is a bit
higher and so it's a bit more predictable and less dependant on luck.

commit 7ba5932b0fb537413230c550d619abc5fef8ba2c
Author: karadoc <karadoc@gmail.com>
Date: Sat Mar 21 13:04:09 2015 +1100

Scientific Method now gives +1 science to specialists.

Also, the base cost of Scientific Method has been increased from 2400 to
2800.

commit c9400db98bcb2820bee01846bb672c1b2d829f2d
Author: karadoc <karadoc@gmail.com>
Date: Sat Mar 14 15:09:41 2015 +1100

Increased cargo capacity of most boats.

The cargo capcity has been increased by 1 for all sea units that can
carry military land units. (Galley, galleon, transport, etc.)

This is a somewhat experimental change. The aim is to make overseas wars
slightly more cost-effective; particularly in the early game.

commit bf442a13243291820338bf15725f471e2b00e6fd
Author: karadoc <karadoc@gmail.com>
Date: Sun Mar 8 12:43:47 2015 +1100

Tweaked the effects and availability of lumber mills.

Lumber mills are now available with Guilds rather than Replaceable
Parts; but instead of providing 1 hammer, they now produce 1 commerce
and gain 1 hammer from replaceable parts.

Lumber mills no longer gain any commerce bonus from being next to a
river. (So, with Replaceable Parts, lumber mills next to rivers are the
same as before, but lumber mills away from river now yield 1 commerce
more than they use to.)

Added CIV4BuildInfos.xml. (Used to set lumber mill build prerequisite.)

commit 65f3d44e0b1f45cb0b745aa930744eff0d7dfb80
Author: karadoc <karadoc@gmail.com>
Date: Sun Mar 8 12:40:55 2015 +1100

Adjusted the commerce of watermills.

Watermills now give 1 commerce (and 1 hammer) by default, but only gain
1 commerce from Electricity.

(Previously they gave 0 commerce by default, and gained 2 commerce from
Electricity.)

commit d8cda493c180fecbd68801107b4db642068f702d
Merge: 8d687ca e88754e
Author: karadoc <karadoc@gmail.com>
Date: Sat Jan 24 13:32:21 2015 +1100

Merge branch 'jobSwap_wip'

Conflicts:
CvGameCoreDLL/CvCityAI.cpp

This branch should have been merged some time ago. I resolved conflicts
by simply choosing the master version rather than the WIP version.


He said that these are not uploaded to github because they haven't been tested, and the same reason is the cause why there hasn't been an official release of v1.45 (yet).
 
@DarkLunaPhantom

Hello, the latest (or one of the latest) commits pushed indentation errors into CvEventManager.py
My changes:

Code:
diff --git a/Assets/Python/CvEventManager.py b/Assets/Python/CvEventManager.py
index 704f719..aa499fa 100644
--- a/Assets/Python/CvEventManager.py
+++ b/Assets/Python/CvEventManager.py
@@ -372,7 +372,7 @@ class CvEventManager:
 		iGameTurn = argsList[0]
 ## AI AutoPlay ##
 		if CyGame().getAIAutoPlay() == 0:
-		CvTopCivs.CvTopCivs().turnChecker(iGameTurn)
+			CvTopCivs.CvTopCivs().turnChecker(iGameTurn)
 ## AI AutoPlay ##
 		# PB Mod begin
 		self.bGameTurnProcessing = True
@@ -544,13 +544,13 @@ class CvEventManager:
 	## Platy Builder ##
 			if not CyGame().GetWorldBuilderMode():
 	## Platy Builder ##
-			popupInfo = CyPopupInfo()
-			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
-			popupInfo.setData1(iBuildingType)
-			popupInfo.setData2(pCity.getID())
-			popupInfo.setData3(0)
-			popupInfo.setText(u"showWonderMovie")
-			popupInfo.addPopup(pCity.getOwner())
+				popupInfo = CyPopupInfo()
+				popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
+				popupInfo.setData1(iBuildingType)
+				popupInfo.setData2(pCity.getID())
+				popupInfo.setData3(0)
+				popupInfo.setText(u"showWonderMovie")
+				popupInfo.addPopup(pCity.getOwner())
 
 		CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)
 
@@ -567,13 +567,13 @@ class CvEventManager:
 	## Platy Builder ##
 			if not CyGame().GetWorldBuilderMode():
 	## Platy Builder ##
-			popupInfo = CyPopupInfo()
-			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
-			popupInfo.setData1(iProjectType)
-			popupInfo.setData2(pCity.getID())
-			popupInfo.setData3(2)
-			popupInfo.setText(u"showWonderMovie")
-			popupInfo.addPopup(pCity.getOwner())
+				popupInfo = CyPopupInfo()
+				popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
+				popupInfo.setData1(iProjectType)
+				popupInfo.setData2(pCity.getID())
+				popupInfo.setData3(2)
+				popupInfo.setText(u"showWonderMovie")
+				popupInfo.addPopup(pCity.getOwner())
 				
 	def onSelectionGroupPushMission(self, argsList):
 		'selection group mission'
@@ -904,7 +904,7 @@ class CvEventManager:
 		if (city.getOwner() == gc.getGame().getActivePlayer()):
 ## AI AutoPlay ##
 			if CyGame().getAIAutoPlay() == 0 and not CyGame().GetWorldBuilderMode():
-			self.__eventEditCityNameBegin(city, False)	
+				self.__eventEditCityNameBegin(city, False)	
 ## AI AutoPlay ##
 		CvUtil.pyPrint('City Built Event: %s' %(city.getName()))
 
@DarkLunaPhantom

Hello, the latest (or one of the latest) commits pushed indentation errors into CvEventManager.py
My changes:

Thanks, it seems that I merged one of alberts2's changes into my fork incorrectly. I'll probably redo all that anyway since more karadoc's code is now available.
 
An other issue are an empty main menu if I use German as language. I've looked into xml/Text, searched for incomplete items, and add a few language strings. Now, all entries have tags for all five languages, again. I've not checked which entry was the issue culpit, but assume it was the double <German> Tag in one of theese files. :)

I do not want fork on Github, but you can simply appliy the patch with
'git apply [attachment file]'.
 

Attachments

Oh that is very interesting, a similar problem has been plaguing my mod for years.
 
An other issue are an empty main menu if I use German as language. I've looked into xml/Text, searched for incomplete items, and add a few language strings. Now, all entries have tags for all five languages, again. I've not checked which entry was the issue culpit, but assume it was the double <German> Tag in one of theese files. :)

I do not want fork on Github, but you can simply appliy the patch with
'git apply [attachment file]'.

Nice catch. I think that you accidentally deleted English text for TXT_KEY_PROMOTION_DISORGANIZED in Assets\xml\Text\Civ4GameText_K-Mod.xml.
 
Yeah, this is indeed an interesting find.
The double german entry in <Tag>TXT_KEY_EVENT_CIV_GAME_1</Tag> is in vanilla BtS, in the CIV4GameText_Events_BTS.xml file.
So this could cause troubles everywhere.

I wonder if it is was fixed somewhere before, in one of the unofficial patches or in a fairly well-known mod.
But probably not, as it would have surely made it's way to most bigger mods a couple years ago.
 
I still wonder why this does not affect base BtS, I played it in German for a while without issues.
 
I still wonder why this does not affect base BtS, I played it in German for a while without issues.

Yeah, I'm clueless as well. Surely tens (hundreds?) of thousands people played vanilla BtS in german, it would have come up for sure if it causes any issues without mods used.
Cannot really add a proper rationale behind this.

If the issue always comes up when xml files are loaded from multiple places, then that would mean even the smallest mods cannot be run in german.
That's also very doubtful.
 
I still wonder why this does not affect base BtS, I played it in German for a while without issues.

Hm, seems like AbsintheRed is right and there are only an indirect releation between my xml changes and the empty menu.
I reverted to the previous version (and cleared the cache, etc) but can't reproduce the error anymore.
 
Duplicate xml tags and files cause other weird bugs. E.g., having modded xml file with the same name as the BTS file with city names (but none of the same tags) changes city names ingame to concatenation of names from all languages, so "Rome" becomes something like "RomeRomRoma...".
 
Karadoc uploaded some code to the K-Mod github. [...] I think that everything from that v1.45 pre-release and some new things are there now except experimental balance changes listed here:
Spoiler :
commit c9e2c9fb06fa0ee5e212d47dad8e89c9b4b00aa5
Author: karadoc <karadoc@gmail.com>
Date: Wed Apr 1 09:38:30 2015 +1100

Adjusted cultural revolt probability and properties.

Increased the base change of revolt from 10% to 15%. Decreased the
duration of revolts from 3+2*(previous revolts) to 2+(previous revolts).
Increased the number of 'warning revolts' from 1 to 2. ie. Cities will
now flip on the 3rd revolt rather than the 2nd.

The net effect of these changes is that the average number of turns to
flip a city will be unchanged, and the number of turns spent in revolt
will be similar to before - but the chance of each revolt is a bit
higher and so it's a bit more predictable and less dependant on luck.
[...]
Thanks for making us aware, also of the fork by alberts2. I've now bookmarked all three commit histories: yours, alberts2's and karadoc's. Already adopted your recent addition about defensive pacts - haven't tested it yet, but sounds good.

I think I got all the balance changes from K-Mod 1.45 by copying XML files from the beta. Only a tiny bit seems to be missing:
Decreased the duration of revolts from 3+2*(previous revolts) to 2+(previous revolts).
The change from "3+" to "2+" is in GlobalDefinesAlt, but the missing factor 2 would be a DLL change in CvPlot::doCulture. Well, hardly a crucial difference.
 
I think I got all the balance changes from K-Mod 1.45 by copying XML files from the beta. Only a tiny bit seems to be missing:The change from "3+" to "2+" is in GlobalDefinesAlt, but the missing factor 2 would be a DLL change in CvPlot::doCulture. Well, hardly a crucial difference.

I think that this
Spoiler :
commit d8cda493c180fecbd68801107b4db642068f702d
Merge: 8d687ca e88754e
Author: karadoc <karadoc@gmail.com>
Date: Sat Jan 24 13:32:21 2015 +1100

Merge branch 'jobSwap_wip'

Conflicts:
CvGameCoreDLL/CvCityAI.cpp

This branch should have been merged some time ago. I resolved conflicts
by simply choosing the master version rather than the WIP version.

is also missing.
 
Sounds like the branch was technically "merged", but really just discarded -
"choosing the master version". (I don't know; I haven't worked much with version control.)
 
Sounds like the branch was technically "merged", but really just discarded -
"choosing the master version". (I don't know; I haven't worked much with version control.)

Not really, that way only things from that branch that were discarded are those lines of code which were changed in the master version in the meantime. (Conflict means that the same thing was changed both in that branch and in the master version (with respect to last common point) so they couldn't be merged automatically.)
 
I decided to check does this still happen:

Hey guys, I've just wasted several hours trying to fix a bug in K-Mod that's not in base BtS. Perhaps one of you might like to take a crack at it. Here's how to produce the symptom: Worldbuilder yourself a barbarian city, add a barbarian archer and a barbarian fighter, then attack the city with a gunship. Unless the archer wins, your gunship conquers the city, which it should never be able to do. (Tipp: Search for "isNoCapture()".)

I tested with barb archer and a galley in a city attacked by gunship and it seems that bug is not present when playing with all of karadoc's commits. I am playing my fork, but I think that none of my or alberts2's code does anything to that so I guess this fixed it.
 
Not really, that way only things from that branch that were discarded are those lines of code which were changed in the master version in the meantime. (Conflict means that the same thing was changed both in that branch and in the master version (with respect to last common point) so they couldn't be merged automatically.)
Oh, I see; that makes sense. :hammer2:
 
Back
Top Bottom