Advanced Civ

I tried another on Immortal and found it very difficult again as well. I've decided once again that Emperor is probably best for me. However, if you would like to suggest the settings for a game on Immortal, that sounds interesting to me. It is very, very hard to win without the pyramids though. And it is, of course, very difficult to get the pyramids without being rushed. Let me know if you want to give it a try. Personally, I always play on Marathon, huge world map with realistic starting locations, and about 25 civs, by the way, and generally with "No tech trading". Marathon would be my main preference though. It would be fun if Keldath would take up the challenge as well! Let me know.
 
@f1rpo I'm sorry for your wasted time, I sent my game folder to the person I was playing with, and there was no more out-of-sync error, so the mod was fine, it was all about slightly different clients.
 
Oof, Marathon. Unless that'll make others want to jump in, I don't think I'm interested. I was more picturing myself making several attempts until some strategy works, and a big slow game isn't well suited for that.
I suppose the Pyramids are making such a difference because possibilities for peaceful and violent expansion are very confined on Immortal and Representation helps a small empire not fall behind technologically too much.

@Rawwwrr: Great, no worries.
 
That's fine. Thanks for the offer though. Right now I'm playing again on Diety, huge world map, marathon. I've built the pyramids as Rome and I'm still doing well at about 1000 AD. Wish me luck!
 
Hello, I'm new to this mod and I have a few questions. I generally like to play the Terra map and I relocate my Settler to the new world so I have the entire land mass to myself, so every time I play, I build the Great Wall because otherwise the Barb onslaught is relentless. After playing a few games with Advanced Civ, the option to build the Great Wall does not appear. Has it been disabled in this mod? How do I re-enable it if so?

Also, when I double click on a stack of the same unit, they don't group together in a single unit. Instead I have to press Control then click the stack. Also, when my grouped workers complete an improvement they un-group. Are there any settings or changes in the code I can make to fix these minor complaints?
 
The Great Wall should require Masonry and two regular Walls in arbitrary cities. And the tooltip of the (grayed-out) building button should say so too. That change can be undone by replacing the list of PrereqBuildingClasses of BUILDINGCLASS_GREAT_WALL in Assets\XML\Civ4BuildingInfos.xml with an empty list: <PrereqBuildingClasses/> The other changes that the mod makes to the Great Wall can also be reverted there; they're tagged with advc.310. On a side note, Barbarian units should not seek out civ cities much so long as the number of Barbarian cities on the continent is greater than the number of civ cities. That's a change I've implemented in order to make the New World less hostile for the first colonists.

For the other two issues, the DLL would need to be recompiled.

The double-click change is probably this item in the K-Mod changelog:
v.127 changelist said:
+ Changed the functionality of double-clicking a stack of units. Double-click will now wake all of the units without changing their current groups.
These are the corresponding Git commits: 1 2
Those are from 2012. I've been playing with K-Mod for so long that I didn't even remember the original behavior. Looks easy to undo apart from the DLL compilation.

The worker change ...
AdvCiv 0.99 release notes said:
• Unit cycling asks players to give orders to groups in which only some units are able to move. This should make it easier for players to avoid leaving moves unspent by accident, especially worker moves. [advc.153]
... goes back to this suggestion from early 2021. Re-reading my documentation in the manual, I see that I was aware that ungrouping could be undesirable:
Spoiler :
myself said:
The goal is to make sure that the player is aware of unspent movement points and to help [them] spend those points by selecting a sensible set of units. However, the game must not split up large groups that the player may want to keep intact. [...]

For build, pillage, bomb(ard), it seems fairly likely that the player will want to give orders to any units with movement points left, and those groups are unlikely to be very large or, if they are, the split is likely going to be uneven (only so many units can bombard or pillage a tile). For movement (including attacks), groups can be arbitrarily complex and it may well be that the player wants to keep the group together in one tile.
Regarding that last point, Leoreth had convinced me not to split groups that are on the move:
The only thing I am not sure about is Move. I agree that BtS stopping unit cycling and forcing you to manually skip turn on the entire stack is annoying. But seeing the stack split might be more so. I am obviously extrapolating from my behaviour, but when I have 2 movers and 1 movers selected in one stack, I intend to move them together as such (for example, for defensive / unit counter purposes). Although it might be useful in some situations where the opportunity to attack with the 2 movers might present itself.

Of course, skipping turn on the entire stack, or having the 2 movers split off and then getting to skip their turn is the equivalent amount of trouble, and is nicer for unit cycling. But then next turn, I have to group both stacks again if I want to move them together. It seems like this rule ultimately comes out as the game telling the player that units with different moves should not be in the same selection group. I think that's different than the other missions (pillage, attack, build) because there the split is enforced by circumstances (and their best-guess optimal handling), but here it's an inherent unit attribute that makes it come into effect every turn that units are moving. I am also worried about e.g. stacks of naval units, that tend to more naturally have different speeds. For example, Galleons escorted by Frigates, or just a stack of Frigates and SotL.
Looking at the Git commits, it seems that, through a DLL change, MISSION_BUILD could simply be excluded here in the same way that MISSION_MOVE_TO is already excluded. I can see how, at least in the late game, the ungrouping can cause more disruption that it is worth, and that some sort of option would be desirable. I guess just a checkbox "Wake Group Once 1 Unit Can Move" under General > Commands on the BUG menu. That should then also affect pillaging, bombarding and air bombing. And it doesn't actually affect movement ... Often tricky to name BUG options comprehensibly with the limited available space. Maybe "Wake Worker Group If Any Can Move". It's probably not much help anyway because I wouldn't get around to adding the option and publishing an update until who-knows-when. Well, I did make a note.
 
Was it my imagination, or does slavery give 24 hammers at any game speed?
 
24 is the base yield in the mod (Civ4HurryInfos.xml). Should get fully adjusted to game speed. iUnitHurryPercent is 250 for Marathon, 150 for Epic, 67 for Quick (Civ4GameSpeedInfos.xml). The modifier gets applied here:
Spoiler :
Code:
int CvGame::getProductionPerPopulation(HurryTypes eHurry) const
{
	if (eHurry == NO_HURRY)
		return 0;
	return (GC.getInfo(eHurry).getProductionPerPopulation() * 100) /
			std::max(1, GC.getInfo(getGameSpeedType()).getHurryPercent());
}
In a quick test on Epic, after 100 turns on AI Auto Play, the UI tells me that I could sacrifice 1 population to hurry a Spearman that still needs 34 production – if the city had enough population. (It's only size 1.)
 
Don't know if you intend to keep making additions to the mod, but one quick game with Rise and Fall reminded me of AI tech priorities: things like Shaka refusing to tech currency which is a vital tech or how many techs one can get by researching what the ai doesn't. Also in regard to the rise and fall mode, I think there should be less chapters of greater length; even in marathon with 85 turns the room for manoeuvre outside a rush is too small imo.
 
I've also found R&F games useful for identifying glaring AI deficiencies. The first few games I tried, I usually had to produce a bunch of extra workers right after taking over. Or I found that my capital was on some endless quest for the Moai Statues (despite plenty of yet unworked river tiles). Tech evaluation was the last thing karadoc had been working on:
[...] In any case, the quality of the evaluations for individual techs is far more important that the depth of the search. So although I'm still tinkering with the way the AI looks ahead, I think the biggest improvements would be in how certain things are evaluated...

For example, currently techs which enable buildings are evaluated based on how much the benefits the buildings would give the player's cities... but it doesn't take into account having a "building backlog". I know as a player I'm far more likely to benefit from unlocking a building if I don't already have other stuff to build. But the AI doesn't take that into account. Similarly with units, evaluates units based on what they can do... but doesn't take into account how many of them they are likely to build before they are obsolete. If that kind of stuff could be evaluated properly, it would probably help the AI. (But I'm unlikely to get around to that at this stage. My work on K-Mod has slowed to near zero.)
As for Currency, I don't think that tech is as crucial for the AI as for humans because the AI isn't going to benefit nearly as much from gold trading. They're not going to use Wealth a lot either, perhaps mainly because they need to produce more military units than humans do. Even the extra trade routes ... more commerce is always better, but, due to reduced expenses, the AI is at least not in a position of being unable to expand further without Currency. But you're probably right that Currency is still neglected too much by the AI. Even if it's not as important for the AI, the potential for human tech trades is indeed problematic. I also have a note in the manual that says "Currency still seems to be underrated (and Code of Laws overrated)." That's in the context of having already tweaked the calculation so that extra trade routes in future cities are given more weight. I remember that the evaluation is actually quite straightforward, just predicting the extra commerce. One can always just experiment with iAIWeight values in XML, but getting the AI to value techs for logical reasons – which should then work well across all game settings – is laborious. So, yeah, short of some stopgap measure for an egregious case or two, I don't think I'll be working on that.

85 turns on Marathon ... that corresponds to just 34 turns on Normal speed as far as research is concerned. Yes, that seems too short. Looking at the formula, it seems that the Normal-speed chapter count gets multiplied by the mean of 100% and the Golden Age multiplier, i.e. (200+100)/200=1.5 on Marathon. Rounding to nearest should then result in 11 chapters. Let's see ... yes, that's what I also get in a test. I don't think I had actually tested this on Marathon at all. (Epic, yes.) Chapter length is 105 turns. Are you getting more than 11 chapters? Or fewer than 1250 turns in total? 105 is probably still too little. With 9 chapters, there would be about 125 turns; perhaps that's reasonable. Could get there by moving the Golden Age modifier closer toward 100%, i.e. (200+100+100)/300=4/3. There's a change I can manage to implement! :D Though uploading an update is another matter still ... As a temporary measure, lowering RF_CHAPTERS_BASE in GlobalDefines_advc.xml from 7 to 6 should work.

Edit: I see that the civ count can have an impact too. With more than 18 civs, there might be more chapters. I should look into that adjustment too. And maybe 10 chapters of about 115 turns is better. The formula above would put Quick speed at 7, same as Normal speed, which seems one too many; length would then be only 40 turns. Epic should probably result in 8 chapters of 85 turns.
 
Last edited:
Ah I made a mistake, I was playing on Epic. I still think however that it was overall feeling too short and that less chapters overall would probably be better to allow for the best impact.

And regarding Currency, even if they don't use build wealth as much as players do, by the +1 extra currency alone I would rate it as one of the most important classical tech. The impact of course matter from situation to situation, but considering more commerce it is a dual econ and tech boost, it is hard to see what general conditions would made early medieval techs more relevant. AI leader personalities are also at fault here as if IIRC Shaka is one of those that could go into rifles without currency researched yet. I think a possible solution would be for AI to value cheaper techs more so that they don't go in the spiritual journey of divine rigth + nationalism without some key medieval and classical techs researched.
 
Hey budd @f1rpo y,
Hope you sound and well.

I saw a strange issue with autoplay
Clicking ctrl and shift and x doesnt fire the auto play pop up.
The ctrl and shift B does work.
I changed the kb_X to kb_p, just to test and it worked (though p also gave me change civ :)).
In using you latest as usual of 1.11.
Any thoughts?

very odd,
i did some prints,
looks like KB_X is int 45 while it expects 36. i checked the finputdevice.h and the cvgamecoreutils.
i changed
if theKey == int(InputTypes.KB_X) or theKey == int(InputTypes.KB_B)
TO:
if theKey == int(InputTypes.KB_Z) or theKey == int(InputTypes.KB_B)

maybe its something with my keybord def?
 
Last edited:
I changed the kb_X to kb_p, just to test and it worked (though p also gave me change civ :)).
Finding any available key combo is kind of a challenge. :) I could only imagine that something running in the background blocks Ctrl+Shift+X (or Ctrl+X, Shift+X or even just X). Hopefully not some part of Win 11. I know my old version of Photoshop can block Esc when I play Civ 4. Searching for something in your mod that consumes the key presses seems a little farfetched. I'm also not sure to what extent the DLL and Python get to observe how keyboard input is processed. Well, I guess you could've added a unit command with a hotkey or somehow unlocked an existing command ... If I search my XML folder for "<HotKey>", nothing with an X comes up. I guess there could still be hotkeys somehow dormant in the original game's files and of course a few are implemented through onKbdEvent in Python and shortcut key in the BUG Config. Hm, including Ctrl+X for hiding the Strategy Overlay. But I don't suppose that one could be clashing with AI Auto Play.

Edit: Oh, I see you've just made some progress on the issue, regarding the int codes ...
 
hey,
super odd.
i switched to an old install i had, not completed version. since i cant debug in my steam one as we know,

i wonder if its related. maybe my graphics card drivers overwrite this. lord knows/
so yes, i used KB_Z, i cant see in all the files usage for it , so its valid i guess,

btw remember when i said my load takes time -> not with this version. another oddity.

maybe ill try to just add a button for auto play.

also,
after almost 20 years of civ4, i finally bother to find how to print stuff from the python to the debug file :)
 
@Rawwwrr: Great, no worries.
I couldn't write right away, unfortunately nothing has changed, the desynchronization continues, I tried to play with three different players. I'm attaching an archived Logs folder, maybe it will help somehow. I have applied the fix you recommended for OOSLogger.py There is no encoding error, but the desynchronization warning continues. Both me and the other player sometimes had it after using the catapult, but this is just one of the possible scenarios for its appearance, sometimes it just appeared out of the blue. Sometimes we need to wait 10-15 seconds and the notification disappears, but most often waiting does not help and one of the players has to reconnect, for a while it helps. Sometimes the desynchronization notification appears for a split second and disappears.
 

Attachments

Back
Top Bottom