RFCE + K-Mod

Morholt

Prince
Joined
Jul 27, 2006
Messages
440
Location
Swedish Empire
So after having the suggestion put forward in the RFCE++ thread I've spent some time on attempting to merge RFCE and K-Mod. K-Mod is a mod that attempts to improve the game's AI and speed, and also includes a global warming system that we're not interested in.

This merge is based on K-mod 1.15 and RFCE svn version 905. It is guaranteed to work with revision 905 and may or may not work with the latest RC.

It is not perfect, the AI behaves differently from the vanilla AI and that seems to make some things not work quite as intended. Also the game will probably need to be rebalanced. France seems to collapse a lot.

The benefits:
-It does seem to be faster. I can load Dutch starts in 30 minutes.
-There should be large improvements in the naval AI but I haven't played with it enough to confirm this.

The drawbacks:
-The AI seems to have a tendency for "blobbing" more than with the standard DLL.
-The AI also seems to collapse more often.

How to install:
Unzip it into your RFCEurope directory (Usually in Beyond the Sword/Mods)





Technical stuff:
I started from the K-mod DLL and then did a search for "Rhye" and "3Miro" in the RFCE source, and adapted everything that did not seem obsolete into the K-mod source. I also found some uncommented code so there's probably some I missed as well. I didn't port all of the AI hacks, for example the AI seems capable of fighting independents just fine without them with the updated AI.

I believe all the K-mod specific code is commented with "K-mod" in the source, and all RFCE specific is commented with "RFCE" regardless of author, for easy identification.
 

Attachments

So after having the suggestion put forward in the RFCE++ thread I've spent some time on attempting to merge RFCE and K-Mod. K-Mod is a mod that attempts to improve the game's AI and speed, and also includes a global warming system that we're not interested in.

This merge is based on K-mod 1.15 and RFCE svn version 905. It is guaranteed to work with revision 905 and may or may not work with the latest RC.

It is not perfect, the AI behaves differently from the vanilla AI and that seems to make some things not work quite as intended. Also the game will probably need to be rebalanced. France seems to collapse a lot.

The benefits:
-It does seem to be faster. I can load Dutch starts in 30 minutes.
-There should be large improvements in the naval AI but I haven't played with it enough to confirm this.

The drawbacks:
-The AI seems to have a tendency for "blobbing" more than with the standard DLL.
-The AI also seems to collapse more often.

How to install:
Unzip it into your RFCEurope directory (Usually in Beyond the Sword/Mods)





Technical stuff:
I started from the K-mod DLL and then did a search for "Rhye" and "3Miro" in the RFCE source, and adapted everything that did not seem obsolete into the K-mod source. I also found some uncommented code so there's probably some I missed as well. I didn't port all of the AI hacks, for example the AI seems capable of fighting independents just fine without them with the updated AI.

I believe all the K-mod specific code is commented with "K-mod" in the source, and all RFCE specific is commented with "RFCE" regardless of author, for easy identification.

Great work!:)

Can RFCE ++ be copied over this for RFCE++ with K-Mod?
 
No, I'll have to do a manual merge of that as well. I might have to tweak the AI a bit first though, it probably needs more awareness of stability for example.
 
Sounds great! :goodjob:
Will definitely look into it when I finally have a little more time to mod...
 
Some comments on the ZIP archive:
  • The 'xml' directory is in lower case, while RFCEurope user upper case.
  • A redundant backup of BBAI_Game_Options_GlobalDefines.xml is included.
  • The source files in CvGameCoreDLL.rar appear to use \n for line endings as opposed to \r\n in SVN. Doing a 'diff' compared to CvGameCoreDLL in SVN results in every single line being marked as modified.

Sadly, I am unable to test this further as BTS segfaults in the "Loading XML" stage, a read to address 0x00000001 is supposedly attempted...
 
The files posted here are not compatible with RFCEurope. They are for RFCE++ modmodmod.
I haven't looked into it yet, but AFAIK Morholt merged it with RFCE, not with RFCE++
 
Some comments on the ZIP archive:
  • The 'xml' directory is in lower case, while RFCEurope user upper case.
  • A redundant backup of BBAI_Game_Options_GlobalDefines.xml is included.
  • The source files in CvGameCoreDLL.rar appear to use \n for line endings as opposed to \r\n in SVN. Doing a 'diff' compared to CvGameCoreDLL in SVN results in every single line being marked as modified.

Sadly, I am unable to test this further as BTS segfaults in the "Loading XML" stage, a read to address 0x00000001 is supposedly attempted...
I'll fix the first two points, but I'm not sure it warrants a reupload. The line endings should not matter for most applications and with diff you can use the --strip-trailing-cr option.

It does seem to work for me. Are you using SVN revision 905?

The files posted here are not compatible with RFCEurope. They are for RFCE++ modmodmod.

If it was unclear: these files are for RFCEurope, not RFCE++
 
I'll fix the first two points, but I'm not sure it warrants a reupload. The line endings should not matter for most applications and with diff you can use the --strip-trailing-cr option.
No, a reupload would probably be overrated in this case, it'll only blow up on a case-sensitive filesystem anyways.

Thanks for the diff tip! Now, to browsing!

Morholt said:
It does seem to work for me. Are you using SVN revision 905?
Mea culpa, it appears I cannot reproduce the error any longer. My apologies.
 
Here's an example of the problem with the new DLL: runaway AI's. France and Spain are both Stable and Germany is Solid. It seems that the more competent AI, especially with regards to naval invasions, makes it behave less like history and more like a human player would. Some additional form of AI restraint, or increasing the significance of the warmaps, might be needed.
 

Attachments

  • kmod.jpg
    kmod.jpg
    55.7 KB · Views: 293
Here's an example of the problem with the new DLL: runaway AI's. France and Spain are both Stable and Germany is Solid. It seems that the more competent AI, especially with regards to naval invasions, makes it behave less like history and more like a human player would. Some additional form of AI restraint, or increasing the significance of the warmaps, might be needed.

WOW!!! That is extremely competent. Yes this should be toned back a good bit.
 
This is not unlike what you would see in the latest version of the RC. At least from the general screenshot one cannot see any real "competence". The question is whether the AI would react better and pose more challenge for the Human and whether the code is faster (which I think it is).
 
No, a reupload would probably be overrated in this case, it'll only blow up on a case-sensitive filesystem anyways.

That is curious, IIRK both Morholt and I use Linux. At least on my end, the mod cannot be any more Linux friendly.
 
That is curious, IIRK both Morholt and I use Linux. At least on my end, the mod cannot be any more Linux friendly.
Hmm, my guess is that when Wine found two folders named XML ("XML" and "xml") it didn't bother to search for files after the first match. But in general I agree, RFCE[++] is very Linux/Wine-friendly.
 
I generally use winrar when dealing with Windows files, it avoids these problems as it will overwrite without case discrimination.
 
Morholt, do you plan to update this to RFCE 1.0?
There were a couple small dll changes since you uploaded this, but not that much
 
IIRK the two changes are the new DCN and the new ability for the Amsterdam Beurs. They are small changes, although they are distributed among many files.

Note that the DCN and Amsterdam Beurs will crash the game without a corresponding change to the XML schemes. I can make the small changes to the .dll file, but Morholt should just make a new upload changing everything in the svn and making it up-to-date with RFCE++. Basically there should be one huge merge between the latest RFCE 1.0 and RFCE++ with K-Mod and one huge upload. There is no point in making svn updates before this happens.

The RFCE 1.0 download contains everything that it needs to be edited if needed (i.e. it contains all the .cpp files). If we make changes there, we should make them directly to the .zip and reupload it with something like 1.0.1, 1.0.2 and so on. The SVN should become the place only for the current development branch. I think this would be easier for everyone.

Also, I suggest the main folder in the SVN be renamed to RFCEuropeII or something else that is appropriate. I don't want to use RFCE++, since this is no more just an addon to RFCE, but RFCE itself. We can actually remove the entire old folder and add RFCE++ as RFCEuropeII, it would be a huge upload, but it may be the easiest way.

@Morholt: are you part of the developers on the SVN. If not, make a sourceforge account and merijn_v1 and I can make you a developer.
 
I think we should rather have a separate SVN for RFCE II
There is still improvements left to do on RFCE 1.0 too, so why complicate our lives with ending it's SVN access?

When work finally starts on RFCE II, I will create a new SVN and add all 3 of you as developers
First we need a map though, without it I'm not sure if any other work can be done...
 
Also, I would rather merge the K-mod with RFCE 1.0 too
Or at least make it optional (the way it already was in this thread)
It has such important AI and speed tweaks, it would be great if RFCE 1.0 players would have access to it too
 
Separate SVN is also a good idea.

I am not sure if the K-Mod .dll would work with 1.0, we may have to change couple of things at least. However, we should keep it as an optional patch, in my experience with mods, there are always bugs and I don't want to force people to use a buggy RFCE.
 
Back
Top Bottom