Next War merger?

The easiest way to find out is to simply compare bts, k-mod and next war xmls.

Also, there may be some additional effects for next war stuff in dll/python, I don't know about that.
 
I don't know for sure, but I'd expect that there would need to be at least a little bit of xml editing.

In the early days of K-Mod, changes were made in some parts of the xml which make it incompatible with the base game. Some of this was from inherited from the mods that I used as starting points, and some of it was done by me to try to implement particular features... More recently I've been careful to not break compatibility when adding new features (eg. new xml fields are optional, such as the commerce percent bonuses and specialist bonuses from tech.)

Here are the xml differences that come to mind
  • Leaders require some xml fields for their preferred victory strategies.
  • Features require a 'global warming defence' field.
  • Promotions require 3 "or" prereqs instead of just 2.
  • Civics have an 'extra happiness' field, which wasn't there before; iUnhealthyPopulationModifier instead of bNoUnhealthyPopulation; and iGoldPerMilitaryUnit is now a percentage rather than a whole number.
  • Buildings also have iUnhealthyPopulationModifier instead of bNoUnhealthyPopulation
  • (There may be others that I haven't though of right now.)
If I was doing it all again now, I'd implement most of those things in a different way - but it isn't worth trying to change them now!

Anyway, if Next War changes any of those xml files - which it probably does, then you might have to add missing fields to the Next War xml files. The good news is that you won't have to edit the Next War tech xml, because I was kind experienced enough to make the new tech fields optional. The bad news is that if Next War changes has any dll changes it will probably be difficult to merge them with K-Mod (unless someone else has done it already).
 
Hi karadoc, or any other coder:

Next War contain a few python modifications and will be difficult to merge for me. I stuck at this code in Next War CvGameUtils.py what pevents a prevent a player to build an a lower arcology if a higher arcology level is already build

Code:
def cannotConstruct(self,argsList):
        pCity = argsList[0]
        eBuilding = argsList[1]
        bContinue = argsList[2]
        bTestVisible = argsList[3]
        bIgnoreCost = argsList[4]
        
        # player can't build an arcology if they have shielding or advanced shielding
        if eBuilding == gc.getInfoTypeForString("BUILDING_ARCOLOGY"):
            if pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_ARCOLOGY_SHIELDING")) or pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_DEFLECTOR_SHIELDING")):
                return True
        
        # player can't build shielding if they have advanced
        if eBuilding == gc.getInfoTypeForString("BUILDING_ARCOLOGY_SHIELDING"):
            if pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_DEFLECTOR_SHIELDING")):
                return True

        return False

How can i integrate this into K-Mod/BUG Mod ????
 
Looks like K-Mod doesn't make changes to CvGameUtils.py, so I'd try to just copy the whole file.
(Edit: There is also BugGameUtils.py though; hmm ...)
You'll need to enable the cannotConstruct callback (USE_CANNOT_CONSTRUCT_CALLBACK) in PythonCallbackDefines.xml. As for the CvEventManager functions you've listed: BUG has its own EventManager (Python\BUG\BUGEventManager) which, as far as I understand, replaces CvEventManager. BUG and Next War have been merged before, but I can't find a working implementation; the download here is dead.
 
mmh.... i set in PythonCallbackDefines.xml
<Define>
<DefineName>USE_CANNOT_CONSTRUCT_CALLBACK</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>

but the code in CvGameUtils.py will still not work :confused:
There must be another option to point this in BugGameUtils.py or something... I can't belive it that this little code will not merge-able :sad:
 
I get i CANNOT_CONSTRUCT_CALLBACK ................. WORKING !!!

K-Mod/BUG Mod do not load the CvGameUtils by default :eek::mad::mad::mad::mad: you need to config BUG about it !!!

add code to Assets\Config\init.xml
Code:
   <gameutils module="CvGameUtils" class="CvGameUtils"/>

and yes the callback needs to be enable in Assets\XML\PythonCallbackDefines.xml

Code:
   <Define>
       <DefineName>USE_CANNOT_CONSTRUCT_CALLBACK</DefineName>
       <iDefineIntVal>1</iDefineIntVal>
   </Define>

Now it is working like charm :goodjob:
 
Hello. Did someone manage to merge K-mode and Next war mode?
Would be very nice if someone could help me with this. I tried but the game crashes after some turns.
 
Back
Top Bottom