Resource icon

[ModMod] Kek-Mod 0.3.1

Hi DarkLunaPhantom,

I love to play LAN-sessions with an old friend and we both still really enjoy playing Civ IV thanks to your nice ModMod. Your work is amazing!
For improvement, I have one thing, especially when playing "big and small" or other maps similar to earth. One of my favorite features is using castles as ship canals between 2 water fields. But when you have a city on a lake that is connected to the sea by a castle, theres no possibilty to build ships there. The picture shows an exemplary situation, Santiago looks like a really nice coastal city, but you can't build ships. I found out that a city gets this feature only on lakes or other water areas that have around 20 water fields or more. An exception are work boats, which can also be built on small lakes if there's a resource available. I mean it's completely logical that you can't build warships at any tiny lake, but I think it should be possible as soon as theres a connection to the ocean.
Maybe it could be a solution that Civ IV "counts" fields with castles like "water fields" or something? Sorry, i have no idea about programming and stuff, but i think maybe there could be a solution. It would be so great if you could fix that!
Thanks. :)
 

Attachments

  • Santiago.PNG
    Santiago.PNG
    4.6 MB · Views: 100
Hi, thank you for the feedback. This is something that I wanted to fix for some time now.

The problem here is that game uses the size of the water area the city is directly connected to and does not take canals into account. I wanted to change things so that water areas connected by canals (forts or cities) are treated as a single water area.
I also wanted to change several other similar problems, e.g. if you have a city connected to a water area larger than 20 tiles, but the city is completely blocked by sea ice, you can still build ships there although ships can't even leave the city. (You might not build ships there, but the AI might.) There are also some other similar problems that are caused by (im)passability of certain tiles. This also affects AI planning, e.g. if you have two large water areas (both with more than 20 tiles) connected by a canal, the AI is probably not aware that building ships in one of those water areas helps the war effort in the other water area.

When I tried to make changes that would fix all of these inconsistencies by changing how the game determines which water (and land) areas are actually connected I encountered some problems. These areas are used in the code in many places, so all those places would have to be checked because this change could cause bugs. Also, this would introduce the possibility of changing the size of areas dynamically after the game has started (by global warming melting ice or players building forts) which is currently possible only by using WorldBuilder. This dynamic recalculation of areas might be a problem for the AI because it uses these areas for planning and I am not sure how the AI would be affected if these areas were reset. It might actually be good idea to add another layer(s) of areas that game calculates for different purposes and not to mess with the existing system too much, but maybe I am worrying too much about breaking things.

This is definitely something that I want to revisit and implement changes that would solve all these issues I mentioned, but doing this will take some time to implement carefully and not break anything (and not miss other similar problems that could be solved at the same time). It would be a lot easier to solve just your specific problem and I might just do that if I give up on implementing this larger solution for all similar problems. Unfortunately, I won't be able to do any modding for at least a month or longer, so I don't know when will I be able to do anything about this.
 
@TheOnlyDJCat
I finally found some time to look into your reports and fix the bugs you reported. The code is on github and I plan to soon release a new version including these fixes. Thank you for the reports.

Hi!

Took me some time to reproduce this from older saves :)
Here are two saves, one with correct vassalize offer, and 8 turns later with buggy offers.

This was caused by an int overflow bug in the code evaluating the value of ending a war that could happen if the power values were very high.

Another funny bug is shown in the screenshot. I have war with master, but peace with his vassal.
This happened when Genghis Khan became vassal of Louis in the same turn as the "great mediator"-event brought peace to my war with Genghis.

I added an additional check when the event applies the effect to prevent these situations.
 
Great mod! If I had to pick one thing that I miss in BTS, then it would be ability to plant forest for around 120 gold if you have biology tech. Thank you for you work on this mod!
 
Last edited:
I found a bug. On info screen (F9) are missing graphs for several civilizations. Save is attached.

It's not a bug. You need to have enough espionage points against a civ for "can see demographics" to have its data displayed on those graphs. It's the same espionage point threshold as the one for displaying power ratios in the scoreboard.
 
Hi. Thanks for explanation. I'm stil lame in this game, but I'm getting better. I found a small mistake in civilopedia: go to game concepts -> air units -> gunship movement:
Gunships move like other land units, except that they pay 1 Movement Point to enter all land spaces, including peaks (which are impassable to other land units).
They can't move to peaks.
 
@TheOnlyDJCat
I finally found some time to look into your reports and fix the bugs you reported. The code is on github and I plan to soon release a new version including these fixes. Thank you for the reports.



This was caused by an int overflow bug in the code evaluating the value of ending a war that could happen if the power values were very high.



I added an additional check when the event applies the effect to prevent these situations.

Awesome!
Thank you, and I wait for the release :)
 
I have uploaded a new version, v0.26. Changelog is available in the first post, on github and in the mod folder. Code and commit logs are on GitHub.

Starting from v0.25, mod can be updated to the current version in-game via Advanced -> Options -> Update Mod (as long as the update server is online).
 
With version 0.25 I had occasional crashes during loading of a saved game. With this new version (0.26) those crashes are gone. Great job DarkLunaPhantom!
 
With version 0.25 I had occasional crashes during loading of a saved game. With this new version (0.26) those crashes are gone.

That might be unrelated to the update since I don't think that I fixed any crashes in the last update (last crash that I remember I fixed was in 0.25a).
If you have a save whose loading causes a consistent crash, upload it here so that I can try to debug the problem.
 
That might be unrelated to the update since I don't think that I fixed any crashes in the last update (last crash that I remember I fixed was in 0.25a).
If you have a save whose loading causes a consistent crash, upload it here so that I can try to debug the problem.
The problem is that those crashes were not consistent. Loading any save could occasionally crash the game. If I tried to load a save 20 times, it crashed maybe once. That's why i didn't report it, because I know how difficult it is to fix such random crashes. I even thought that those crashes could be caused by instability of my computer. However those crashes are now gone.
 
Just to add to the crashes, I have around one crash per daily session. Sometimes when redirecting an airship, sometimes when moving one unit. Maybe this is just because of the map size (GEM), but it happens more frequenly since the last versions. I'm sorry that it is not reproducible, because loading the autosave will not crash even when doing the same clicks :(

Edit: Crash means Civ just closes to the desktop without any dialog. In windows event viewer is only the crash logged without any further details
 
Just to add to the crashes, I have around one crash per daily session. Sometimes when redirecting an airship, sometimes when moving one unit. Maybe this is just because of the map size (GEM), but it happens more frequenly since the last versions. I'm sorry that it is not reproducible, because loading the autosave will not crash even when doing the same clicks :(

Edit: Crash means Civ just closes to the desktop without any dialog. In windows event viewer is only the crash logged without any further details

You can get crash dump file by setting "GenerateCrashDumps = 1" in Civ's config file, but I don't remember if I ever tried to use it so I don't know will that be helpful at all. You can try uploading it and then I can take a look. If it is not reproducible, it's complicated to figure out the reason for the crashes.

There might be a problem that's specific to your PC so if you can, you can try to play with the same settings on a different computer and see whether the crashes still happen.
There are also a couple of other things you can try: make sure you have a Direct IP capable (pre-Steam) version of the game (called original release if using Steam), update your graphics driver and set all in-game graphics related options to highest.
 
You can get crash dump file by setting "GenerateCrashDumps = 1" in Civ's config file, but I don't remember if I ever tried to use it so I don't know will that be helpful at all. You can try uploading it and then I can take a look.

I try that setting and see if a file is generated!

Make sure you have a Direct IP capable (pre-Steam) version of the game (called original release if using Steam), update your graphics driver and set all in-game graphics related options to highest.

I already have the pre-Steam version and everything should be up to date, but the idea to set everything on highest, might be worth a try, to see if it is more reproducible then.
 
Top Bottom