K-Mod: Far Beyond the Sword

I just had a repeatable crash in 1.20b. I've attached a save, along with my personal XML-customised K-Mod, which I named "L-Mod" for its folder name (the edits are all in the XML, mostly tweaks for building stats as part of a rebalancing experiment). My personal tweak is what I was playing at the time the crash happened (and, thus, the mod the file is saved under). But since I made no DLL changes I suspect the issue is common to K-Mod in general, or perhaps even a BTS original bug.

When you load the save, scroll up to Vijayanagara (north central cost of my land area) and click on the Work Boat that's sitting idle on the Fish awaiting orders. Tell it to Automatically Construct Improvements (or whatever exactly the command's name is xD) and the game should crash to desktop.

I apologize in advance for the crappy gameplay exhibited in my file - I was trying a new strategy and got very lazy about not getting adequately involved in tech trading early on! :crazyeye:
 

Attachments

  • L-Mod.7z
    2.5 MB · Views: 44
  • KCrash AD-1901.CivBeyondSwordSave
    911.4 KB · Views: 39
Fresh Install, with empty CustomAssests (had .ini set to not load them anyway but thought it best to makes sure)

Still get error for soldiers and spec. Most people don't play with Show Python Exceptions so probably why its not been noticed (I do as i mod at times)



Actual locked the game up as tried to take SS, and then couldn't move the pathing so got constant exceptions, and couldn't remove the naming feature cause of exceptions appearing :)

Spec is same but has ActualEffects error rather than HealthBars
 
Ah. I see what you mean now, Habitus. By the looks of things, there are some BUG options which get referred to in the dll but are not listed in the config files. I was aware the such unused options existed, but I didn't realise it was a problem. (This particular problem doesn't affect the gameplay, but ultimately all warnings and error messages are things to be fixed.) So far, I've had python exceptions turned off. That's about the change. Anyway, thanks for pointing it out. I'll fix it for the next version.

@Lenowill, it does indeed crash. Thanks for the save. It isn't immediately obvious what the problem is. It looks like the game is still trying to access the workboat after the workboat gets consumed. Apparently it's a problem with the new way automated units are controlled in K-Mod. I'm not yet sure exactly what the problem is, but I expect to work it out soon.

I'm expecting to upload the next version either later today, or tomorrow. It will have those bug fixes and a bunch of new AI goodness.
 
Thanks for looking at it karadoc. :)

As always, great mod. Trying a new leader and strategy and being lax in my play actually managed to make me lose (or have what was going to be long, hard-to-come-back-from game, at any rate) on Prince difficulty. That hasn't happened in quite a while.

I really look forward to K-Mod one day becoming a modding base that other experienced modders use to merge really good AI with really fun gameplay alterations. I know I already said that once, but darn, this is a really good AI rework and it keeps getting better. The recent "they'll give you a better deal sometimes if they're the one attempting to get you to trade" thing is a wonderful change that has made tech trading much less strictly formulaic than it was before. I haven't tried the new governor production/whipping AI yet but might do so in a game in the near future - it sounds very good to have as an option, particular when my empire is just getting way too big (since I can actually PLAY on Huge now without AI turn times becoming so obscenely long!)

There are still some aspects of the flow of the human player's turn that I'd like to see improved. Unit cycling being able to be more "logical" rather than so jumpy is one example. I like automatic unit cycling in general (especially with the super fast cycling change you implemented, Kara), but I hate it when I'm trying to do a war or something and I double click my units to select the group ... aaaaand the game auto-cycles to a worker somewhere. It's mentally jarring and often leads to me automating workers when I shouldn't, purely out of frustration and a desire to keep my focus on the "military stuff" while that "part" of my turn is going on. Pretty much, I wish I could tell the auto-cycling thing to view my turn as having "phases," so that it would only cycle to military units first and wait until I'm totally done with them before moving on to workers and settlers and executives and the like.

I also wish the Military unit UI was a bit better for situations in which units are stacked (the default method of displaying a huge row of tiny, TINY icons gets disorienting with large stacks of units). I think I would like a UI mod that somehow condensed the icons for units in the same tile into "piles" of like units (a pile of macemen, a pile of longbows) that were seperated from one another by some visual space. And once a unit was out of moves or ordered to Skip its turn, displace it slightly from the rest of the pile and fade its icon slightly. I dunno, something like that would help make war a lot less mentally overloading for me.

I'd also -really- like there to be an instant hotkey press to Wake all military units that are in the same tile as the unit I've got selected - WITHOUT having to group up the entire set of units to do so. That would save me so much time and headache when I want to wake up a bunch of units that had been asleep but DON'T want to force them all into one big stack (and then end up erasing the previous, smaller unit stacking that I had done deliberately earlier, once I click to break the big group I just made).

Also, if the brief hitch of graphical lag that happens when I first select a unit could be avoided (gets really noticeable lategame with a lot of units) that would be amazing as well. I'm not sure what even causes that - is it just the game trying to load the unit's graphic and sounds? If so, surely there must be some way I can neutralize that anyway?

...Wow, didn't intend for this to turn into a suggestion-box post, but I guess I ended up thinking out loud. Food for thought for Karadoc and any other interested modders who have been following K-Mod, I suppose. :O
 
Ah. I see what you mean now, Habitus. By the looks of things, there are some BUG options which get referred to in the dll but are not listed in the config files. I was aware the such unused options existed, but I didn't realise it was a problem.

It's not hidden, it's just a typo. In the Advanced Combat Odds config file change ShowDedenderHealthBars to ShowDefenderHealthBars. You'll also need to fix the same typo in the text file.
 
Time for a new awesome game with 1.21. Gosh, i cannot stop playing this game after so many years!
 
Minor issue, in this save the ai moves 4 catapults into range of my city with large numbers of redcoats and knights...
 

Attachments

  • forkaradoc.CivBeyondSwordSave
    620.1 KB · Views: 50
I was able to download and play the game but when the first opportunity came to change civics, I was able to highlight the civic but no button came up to put the civic into effect. Is there a glitch?
 
I've never heard of that happening with this mod, joe. Can you describe what happened in a little bit more detail? (Was this happening on the Civics screen itself or in the little popup window that comes up when you gain access to new Civics?)

If it _wasn't_ the very first Civic switch of the game, then there's a turn count you need to let pass before you can change Civics again. (Sometimes can be an issue if you research two Civic techs back to back and you chose to instantly switch to the first one using the popup.)
 
This happened on the first attempt to change civics. All of the civics came up and when I selected the civic, there was no button to accept the change. The bottom bar was completely blank . I tried using the enter button to accept the change but it just went back to the main screen.
 
That isn't normal. A friend of mine had that problem with his regular unmodded Civ4 BTS once upon a time. Is it working normally if you load it up unmodded at the moment?
 
Lenowill, Yes the game works fine with several other mods also. That's why I'm stumped. Actually I'm also having the same problem with EXTRA .
 
K-Mod doesn't make any changes to the civics screen; so it's the just the normal unmodded civics screen being used.

I just through the code for how the civics screen works and I didn't see any problems. It looks like the buttons at the bottom of the screen should be updated every time you click any of the civics. I can't think of any reason why it wouldn't be working, and I've never seen the problem myself. :( Let me know if you find any other information which might be relevant to the problem.
 
Yesterday, I noticed that one of the AI's was still oscillating between tile improvements. It has a uranium resource on which it would build a fort, then replace it with a farm, then a fort, then a farm, etc... So I cranked up good-old debug mode to see what was the matter. It turns out that the problem was that the fort-building AI understood that forts connected resources, but the farm building AI did not.. ie. it would replace the form because it didn't think it gave access to the uranium anyway.

Now, that's a relatively minor problem, and is easy to fix - but when I did a quick scan of other parts of the code that might have made the same mistake... I found that there were other parts of the code that made the same mistake. Lots of them. The original developers, the BBAI guys, and I, had all made the same mistake in different parts of the code. The mistakes affected various parts of the AI and the UI. I spent a big part of yesterday sifting through the code to correct this family of bugs. I think the programming moral of this story is that one should be careful not to make misleading function names, and also - common and important tasks should be done with a single definitive function, duplicated code leads to mistakes.

Anyway, from my point of view the biggest plus to come out of all of this is bonuses with a fort built on them will no longer say "requires [camp, or whatever]"; and neither will obsolete bonuses. I've also made some further adjustments to the recommended worker actions. (ie. the code that decides which worker commands should be highlighted in blue.) I think the relationship between forts and bonuses is now going to be a whole lot less confusing for new players thanks to these changes. :)

Also coming in the next version, the AI will build the Manhattan project a bit less often, but when it is built, they will build nukes a bit more often. The AI for using nukes could still benefit from a lot of work - I'm intending to fix it in small steps like these.

By the way, Lenowill, thanks for your suggestion post earlier. I think there are some good ideas in there that are worth keeping in mind.

@joethejet
It just occurred to me that the blank bottom bar that you saw could be due to a crash inside the python code. I still don't know what the problem might be, but if its still happening for you, the I suggest you turn on logging in the civ4 .ini file, and if you get a python error log, post it on pastebin or something.
 
Did you see that save, in my last post, where the ai moved 4 catapults next to a well defended city of mine?

Btw can u allow me to give a city to my vassal that I just planted near his territory. I made the city to give to the japs but then its not on the trade menu for me to give them...I dont think theres any risk of them "giving it back to me" to exploit the free defenders...

Also, what is the "find city" command, I know there is one.
 
This save shows the ai sending 50 unprotected cannons (all in one stack) into my territory...(near odense)
 

Attachments

  • forkaradoc2.CivBeyondSwordSave
    620.5 KB · Views: 45
Yeah.. I don't know what those guys are doing there. According to debug mode they don't have any current mission, and they start to leave when I end turn... My guess is that they were coming to reinforce an attack stack that was already in your land, but you killed it already. But I can't really tell what they were thinking from this save. To know for sure, I'd need to have a save from before they actually made the decision to move there.

I know that the AI is sometimes reckless with its units when it is trying to reinforce an existing attack stack in enemy territory. I'm not sure how best to deal with it, because sometimes it's a great move, and other times it's a disaster... and it's kind of difficult to tell which it will be until after the fact.

Also, what is the "find city" command, I know there is one.
There isn't one. There was in civ3 though...
 
Top Bottom