I love playing with K-Mod or AdvCiv, but unfortunately I've run into too many bugs in AdvCiv that are making the gameplay a bit of a headache. I'd like to know if it's possible to take the K-Mod mod as a base and add AdvCiv's UI changes on top of it. There's no way I can go back to playing without the health & happiness over/under preview when hovering the cursor over a city that AdvCiv has.
I have a software development background and have done some light tinkering with mods in the past, but I've never done anything with Civ4 mods other than installing them. If this modmod doesn't exist, would someone mind giving me some guidance on how I might create such a modmod?
Bonus question: I would love to play with the many extra civs & leaders that CIV Gold has, but not if I have to give up playing on something K-Mod-based. How hard would it be to add those civs & leaders to any given mod?
This K-Mod version with bugfixes from AdvCiv would probably be the best starting point. The AdvCiv manual lists most of the UI changes under ID "004" in its appendix.
Spoilerscreenshot from manual :
(This is just about a quarter of the full list.)
Adding all or most of those to K-Mod is probably a disproportionate effort, but perhaps you could cherry-pick the important ones. E.g. the health and happiness info in the city bar tooltip is part of change 186: "Enhanced city bar hover text, mostly from BULL". All the relevant code should be tagged with advc.186. In this case, it's probably just C++ (mostly CvGameTextMgr.cpp) and XML (game text) code, but, generally, it would be best to run a text search on the mod's Python scripts as well.
Spoilerresult of CvGameCoreDLL text search :
After copying AdvCiv code into K-Mod, the C++ parts will probably need some adjustments because AdvCiv has added a lot of shorthands and utility functions that won't be present in K-Mod. For example, right at the start of CvGameTextMgr::setCityBarHelp, I spot a call to CvDLLUtilityIFaceBase::UI, which I've added as a more readable alias of CvDLLUtilityIFaceBase::getInterfaceIFace. A bit later, I obtain the ID of the "active" (human) player through a free function getActivePlayer; would have to be GC.getGame().getActivePlayer() in K-Mod. Then I check the status of a BUG option through BUGOption::isEnabled, which ... is something else in K-Mod. Those sorts of things.
And of course the (CvGameCore) DLL would need to be recompiled, which involves setting up a development environment, probably Visual Studio. There's a chapter "For developers" in the manual. One could also search the Git log for those change IDs from the manual; however, in the early years of AdvCiv, the commits were too large for this to be of much help. Also, when I just tried searching for advc.186, I found that I had put a wrong ID tag (advc.086) in the commit message in this case, so it took me a while to find this Git commit.
Rather a lot of effort, even for adopting just a small subset of the UI changes. (Though perhaps it's really just a few small things that you can't do without.) It might be a more straightforward task to just fully merge BULL (or my own recent fork of BULL: Taurus) into K-Mod. Another CFC user recently asked me about that in a private conversation, so I'll just copy-paste part of my reply:
SpoilerBULL/K-Mod merge :
f1rpo said:
BULL modifies about 100 different source code files. To most of them, only a few chunks of code have been added and they're not going to clash with K-Mod, but there are a few files with more extensive changes, especially CvGameTextMgr.cpp, and, in some places, BULL and K-Mod changes will need to be reconciled. For example, most but not all of the "actual effects" help text from BULL is already in K-Mod, and K-Mod shows it through a key press rather than an option. I guess one could in such cases just leave things at the K-Mod version. On the options screen, there could be problems with K-Mod options (e.g. Simple Unit Selection) taking up space where BULL options are supposed to go, so the graphical layout may need work. Would likely take me more than a week's spare time.
When I've thought about a version of AdvCiv with fewer game rule changes, my thinking was always to work backwards from AdvCiv by disabling and reverting lots of additions. Demolishing things tends to be easy, and this approach would preserve all the refactoring and performance tweaks in AdvCiv. That being said, if bugs in AdvCiv are the main concern, then keeping all those far- and wide-reaching, error-prone changes in place is probably contrary to the mission. (I also think that there is hardly any audience for a mod with extensive AI changes and hardly any game rule changes; ultimately, I think, the players who want the original rules also don't want the AI to behave all that differently.)
Speaking of bugs in AdvCiv, this is a rather unexpected deal breaker to me. AdvCiv has been largely in maintenance mode for 3 years or so, and I've fixed just about every bug brought to my attention that wasn't impossibly elusive in that period. No doubt not every issue has been reported. And maybe gameplay feels like a bit of a headache not entirely on account of bugs. Though, even in that case, rolling back a few AdvCiv rule changes might be easier than working from K-Mod.
Additional civs: I've never looked at that mod's files, but I don't think adding them to K-Mod or AdvCiv should be particularly challenging. Both have added a few elements to Civ4LeaderHeadInfos.xml. In AdvCiv, all those additions should be optional with sensible default values (set through the dummy leader LEADER_DEFAULTS); in K-Mod, I think the victory strategy weights (originally from the BBAI mod) are the only change to the leader XML schema. The AdvCiv Plus mod adds about two dozen leaders to AdvCiv. That probably goes in the wrong direction though – if you want to get closer to K-Mod.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.