1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

K-Mod: Far Beyond the Sword

Discussion in 'Civ 4 - K-Mod: Far Beyond the Sword' started by karadoc, Jan 8, 2011.

  1. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    Any of the PublicMaps folders should be fine. I've got it in mods/K-Mod/PublicMaps; but if you want to be able to use it with different mods (or without any mod) then the best place is probably \Users\(username)\Documents\My Games\Beyond the Sword\PublicMaps

    The maps made by this script are very varied. Sometimes there is a huge continent; but sometimes there are just a bunch of smaller ones. It usually doesn't look particularly 'earth-like', but I think the maps it makes are good for gameplay. There's usually enough room to expand, and there are usually some uninhabited islands as well. (I think "Fractal" maps are pretty good, except that there's almost never any significant uninhabited islands...)


    The AI mostly figures out what's good by itself. There are some hard-coded things, such as the typical population of a city, and the typical value of food compared to productivity or commerce - but for choosing techs, units, buildings, civics, corporations, and so on, the AI calculates what's good and what's not based on what it would actually get. -- So unless there are some core changes in a mod, then this AI should work pretty well.

    As Radio Noer said, it's certainly possible to merge K-Mod with other mods; but the difficulty of doing so will vary depending on what you are trying to merge it with. Most of the K-Mod changes are in the dll; so if you have a mod which is based on mostly xml and python changes, the merge shouldn't be too hard;; but if you have a mod that also has a stack of dll changes... it might turn out to be very difficult to merge them.

    I don't know if I've fixed the OOS problem either! :( I haven't seen any OOS problems for while in my games... so hopefully it's all fixed now. But it's really hard to say. OOS problems are usually extremely difficult to reproduce - so it's pretty hard to work out if stuff ix fixed or not. For all of the OOS problems I've fixed in the past, I've basically just guessed at what might be a problem; changed stuff; and then decided several versions later whether or not things seem to be working better.

    But anyway... if it was always the same person going out of sync; it's possible they had some different game files or soemthing.. maybe. -- although it's more likely that it was just some kind of race-condition. Let me know if you see any more OOS problems in the latest version(s). I probably won't be able to help, but at least I'll know to keep trying to think of what the problem might be.

    (By the way, do you think it would be fair to say that K-mod has fewer OOS cases than the unmodded game? I haven't played multiplayer without K-Mod for ages, so I don't really remember how common OOS is - but I do remember that it happened from time to time.)
     
  2. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    Ran into large bug, Mongols declared war on the Native Americans, took several cities, then his army stopped progressing...so the Native Americans (with only their cap left) stayed at war with the Mongols for 200+ turns...I wondered what was going on.

    So when I invaded the mongols, and they have a huge army in "snaketown" for the first two turns (so far) of my invasion. That army seems trapped/bugged somehow- its not coming back to defend or moving at all. Btw the Native American cap could not have survived it if that army had continued its invasion (it had 200+ turns to do so, or even to make peace).

    On a good note, Im seeing alot less suicidal catapults this game so far (still some but less than what I usually notice)
     
  3. En_Dotter

    En_Dotter Prince

    Joined:
    Jul 15, 2010
    Messages:
    337
    Location:
    Serbia
    He shouldnt have any different files. He only has BTS + K-Mod, and i guided him how to install. He doesnt know almost anything about game customization, lets say he know how to play and thats it. So im 99.95684956% sure the files are the same as those with me and my other mate. Still, there is always a tiny possibility but i rly rly doubt it.

    Well, i think it happens less often. Before K-mod a lot of players went OOS with no particular order. With mod i have seen only random events making this happen and rarely something else and less often. By the way this might be strange, but OOS (if i remember well) happened only (if not almost always) when a bad random event happened to him. I dont say he knows how to make OOS (after all its a friendly game so no cheating is at hand), but when he reconnects he gets a new random event (almost always if not rly always) that is beneficial. The game doesnt want him to get bad stuff! :D
     
  4. CaptainMidnight

    CaptainMidnight Warlord

    Joined:
    Apr 16, 2006
    Messages:
    141
    Be aware there are OOS problems caused by random events if one or more of the players are using Windows 7 and others Windows XP. The solution is to put Windows 7 into XP compatibility mode. Here's the thread:

    http://forums.civfanatics.com/showthread.php?t=349483

    Or just turn random events off.
     
  5. En_Dotter

    En_Dotter Prince

    Joined:
    Jul 15, 2010
    Messages:
    337
    Location:
    Serbia
    Oh! Tnx for the info. Will try that and report with now OOS if they even happen. He does have XP as far as i remember and me and other mate have win 7 ultimate 64 bit.
     
  6. TheOnlyDJCat

    TheOnlyDJCat Warlord

    Joined:
    Dec 31, 2006
    Messages:
    113
    Location:
    Germany
    We tried to continue our multiplayer game yesterday after upgrading to the 1.12 version. Around 400BC (when the first wars started and/or construction was available to most AIs) we got OOS every 5 turns. (large world, bis&small script, marathon)
    We downgraded both to 1.11 and restarted from the same save, where we started the 1.12 session (because 1.12 saves are not comaptible with 1.11 saves :( ).
    Afterwards we had no OOS - and we played up to rifling.
    So either upgrading to 1.12 during a game or 1.12 itself has OOS problems.
     
  7. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    It sounds like v1.12 is broken. That sucks. :(

    I can't really look into it for the next few days because I'm not at home. Sorry about that.
     
  8. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    You still the best Karadoc :D

    Merry Christmas!
     
  9. En_Dotter

    En_Dotter Prince

    Joined:
    Jul 15, 2010
    Messages:
    337
    Location:
    Serbia
    I got some strange AI behaviour to report. At least it seems strange to me cus either AI was "bronken" then or way ahead of me (which i doubt). I had a stack of 7macemen and 3 swords + 1 cata. His city had like ~5% defense and my units were on ~90% since i got bombarded. He had 3 longbows and one more defender (i dont remember which one but was weaker than lbow). Well, i w8 another turn to heal my troops and to go in. Next turn he moves out 2 of his longbows and bomards me with 3 catas from outside of the city reducing my stack to ~60%. No way i can attack without large loss so i dont. I w8 2 more turns. He has the same 2 units defending and those 2 longbows are away. So i can just go in and take it, but since i didnt wanna risk wiht only one cata and 75% troops vs city on the hill i w8 one more turn. Longbow is made that turn so he had 3 defenders. I cant possibly take that city without severe loss and i make peace with him.

    My question is: Why did he move those longbows then? He moved them to a random direction if u ask me cus there was nothing, well a distant city of his that wasnt threatened. Did AI take in account bombardment and its producion? Its odd for me thats all. If i didnt hesitate for one turn i would have taken the city and most probably made peace with him cus i was on the upper hand...
     
  10. En_Dotter

    En_Dotter Prince

    Joined:
    Jul 15, 2010
    Messages:
    337
    Location:
    Serbia
    New strange behavoiur. Im Duch and fighting a war vs Native Americans. Big and small map scrip, huge size. I have only access to horses and no other military resource. Natives take the only copper i can see i want to have it. War starts and i manage to take one of the cities. I press on to be in the middle of 2 of his cities. One city is size 1 other is maybe 5 or 6. I go for the larger one but send a recon to see whats up with the small one. When my horse archer reaches the small town i can see 2 dog soldiers guarding it. Now comes the funny part. I hit end turn and AI moves his entire garrison out of the small town. My forces werent enough to take the large city that was maybe 4 or 5 tiles away from the small one (road connected) to say AI wanted to give up the small one to protect the larger one. I just go in the city and it was destroyed by default.
    Any thoughts?
     
  11. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    .. yeah. Both of those things sound odd. Particularly the second one.

    It's hard to know exactly what they had in mind without playing those turn again in debug mode, but my guess is that for the first case, where they moved the longbows out, they were probably trying to take them to another city (for who knows what reason...)

    In the second case, where they gave up their city: they aren't meant to do that - ever. My only guess is they were using the "crush" strategy, and they decided that both of the defenders in the city should actually go into city-attack mode. That seems very unlikely; but I think it is possible. In any case, it was a poor decision. I will tighten up the rules for crush to try to prevent that from happening. (but that might not even be the cause of the weirdness.)


    As for the OOS stuff, I played a little bit of multiplayer today, and we didn't get any OOS errors. So maybe it's already fixed (somehow), or maybe the problem just hasn't been triggered in this game yet. I've double-checked some of the changes I made between v1.11 and v1.12 to see what might have caused the OOS; but I don't think I've found the source of the problem. I did find some minor mistakes, but not the kind of thing that could cause OOS. So it's a bit of a mystery. -- Maybe if I get through my current multiplayer game without any OOS problems, I'll just upload the new version, in the hope that the OOS problem was something that I already fixed without knowing it...
     
  12. En_Dotter

    En_Dotter Prince

    Joined:
    Jul 15, 2010
    Messages:
    337
    Location:
    Serbia
    I really dont know what crush strat really is but im guessing. Anyway, he didnt have much forces near me. Maybe 7-10 units in total including garrisons i could see. I think i have some autosaves but i doubt u would be able to replicate my turns (i dont know what i was doing and what autosave is gonna work the best), and its hard to say if AI would do the same. If you think it is somehow possible to replicate ill send u some.
     
  13. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    I could leave my save where the Mongols left their main army in snaketown for 150 turns at least, even as I took cities from them...but you probably have it fixed already
     
  14. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    I played some more multiplayer, and we didn't get any OOS errors or see any other obvious problems. So I've uploaded a the new version in the hope that all the problems have miraculously been fixed by some of the stuff that I changed.

    Although I did fix some problems in the code, I didn't actually find anything that I think would cause OOS errors or anything that would cause the AI to erroneously move defenders out of a city. -- So those problems may or may not be fixed. Let me know how it goes.

    v1.13 is now uploaded.

    [edit]
    By the way, "crush" is the name of a war strategy that the AI sometimes uses. When doing the crush strategy, the AI will use more of its units to attack rather than defend. For example, the AI might bring a bunch of its defensive longbows in to attack your cities alongside its macemen etc.
     
  15. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    1.13

    I just started a game and the Romans have a worker "stuck" inside their capital for 8 turns straight (I have vision from a hill), and Im not even at war with them...
     
  16. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    They probably just don't have the worker techs yet.
     
  17. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    Did you look into that bug before in 1.12 where the Mongol's army was stuck inside a city?

    But you are right about the Roman Worker.
     
  18. karadoc

    karadoc AI programmer

    Joined:
    Oct 3, 2005
    Messages:
    1,568
    Location:
    Australia
    I did check a few possible causes for that problem, but I don't think I found anything suspicious.

    The thing is, there are some legitimate reasons why the AI might keep their army in a city for an extended time. For example, maybe they were trying to save up some gold to upgrade the army before moving out; or maybe they were badly losing the war and thus decided to use the "turtle" strategy. My guess is that the case you saw was on the fringe of a legitimate decision rather than a bug. ie. I think the AI probably had a reason for staying in the city, but the reason was probably stretched a too far. A tactical mistake rather than a bug. -- But it's really hard to know for sure without having a save to reproduce the problem.
     
  19. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    Sent you a request for your email so I can send you my save file for 1.12 mongols army bug or tactical mistake. I dont think I can attach a file here...

    charlesbeutt[at]gmail[dot]com
     
  20. Charles555nc

    Charles555nc Prince

    Joined:
    May 3, 2010
    Messages:
    522
    Random Questions:

    Forest preserves increase forest growth in non city controlled tiles?

    Forest spread seems more in early ages than later ages...true/false?
     

Share This Page