Tweak Mod for Xtended + Master of Mana Updates

Ozzy, I loaded your save. 30 seconds for the first turn, then 40 seconds for the turn after that.

I didn't see anything crazy in your map in debug mode, although I wouldn't know what to look for. Your map is 104x64 whereas mine is 52x32. But it sounds like similar-sized maps worked OK for you in 1.09, if I understand you correctly.
 
Hi I downloaded both savefile and compare the time needed for a turn and yes, there is a great difference (6 vs 30 secs) - and I do not think it can be due to the map size difference (human vs elf) or the number of players (12 v 15)
Comparing a turn from both savegames I can see those major differences in TimeMeasure.log:
Ozzy:
  • Task CvGame::updateMoves : Time Used: 12.74 (51.94)
  • Task Player::doTurn::AI_assignWorkingPlots : Time Used: 11.28 (45.98)
  • Task City::doTurn::zero : Time Used: 12.32 (50.22)

Jet:
  • Task CvGame::updateMoves : Time Used: 3.20 (77.00)
  • Task Player::doTurn::AI_assignWorkingPlots : Time Used: 0.12 (2.87)
  • Task CvCity::AI_doTurn::zero : Time Used: 0.29 (7.03)
Strangely I cannot immediately map this to something added on v0.1 or v0.2... Will have a closer look.
 
Is alignment switching allowed in this mod? The Civilopedia suggests that it is, but as Beeri Bawl I research Ancient Chants, and then if I choose OO or AV, I get the religion in my capital, but it says "Cannot Convert to (OO/AV)". If I choose one of the other religions instead, I can adopt it immediately. I'm not sure whether I need some tech or something to adopt OO/AV, or if it's simply impossible.
 
@SpyFanatic

Hello sir.

I am playing to MoM Extended. At some point of the game, all my units get a permanant fear effect on them so they fail to attack any unit even barbarian, 4/5 times. I tried the dispell spell, to kill close adepts or use a Disjonction. Nothing works. I have no idea were it does come. This is very annoying. Do you know where it comes from?

I wanted to attach the save but I can't find my game saves folder.
 
Another bit of weirdness I've seen is when I open diplomacy with someone I'm at war with, I ask what kind of deal we can make to end the war, the message says that there is no way they could possibly agree to peace, but when I click the cease fire button they accept anyhow.

More weirdness: I've had quite a few enemy units I've converted that just disappear after a few turns. Is that intended? Oh wait... I see now that some of them are illusions, and they say they will die in X turns. Where did those come from? I'm the Balseraphs... could the Hall of Mirrors do that? It'd make sense from the name, but there is no description text about that.

I also see that hostile terraforming goes away after some time. I thought it was permanent. How long does it last? Is that stated somewhere?
 
Last edited:
Done some additional analysis on performance. Still a mystery and I am not sure if conclusion is correct, but running on v0.3 (wip) and commenting (eIndex == GC.getDefineINT("DEFAULT_SPECIALIST") inside CvCity::isSpecialistValid resulted in:
  • Task CvGame::updateMoves : Time Used: 1.32 (71.27)
  • Task Player::doTurn::AI_assignWorkingPlots : Time Used: 0.06 (3.35)
  • Task CvCity::AI_doTurn::zero : Time Used: 0.06 (3.25)
Using OzzyKP savefile, as from some analysis GC.getDefineINT("DEFAULT_SPECIALIST") seems to be the most expensive call.
It still puzzle me on how isSpecialistValid and GC.getDefineINT("DEFAULT_SPECIALIST") are not affecting performances on other users as well - as they seems to be used in other places of the DLL.
 
Thanks Sephi for the suggestion, but where is DEFAULT_SPECIALIST defined? I see a lot of usage but it appears it has not defined in any xml...
In the meantime adding a getter for caching this value lead to even more time used:
  • Task CvGame::updateMoves : Time Used: 5.22 (54.12)
  • Task Player::doTurn::AI_assignWorkingPlots : Time Used: 3.95 (40.95)
  • Task CvCity::AI_doTurn::zero : Time Used: 0.06 (0.64)
Performance analysis is always a big mistery :D
 
Is alignment switching allowed in this mod? The Civilopedia suggests that it is, but as Beeri Bawl I research Ancient Chants, and then if I choose OO or AV, I get the religion in my capital, but it says "Cannot Convert to (OO/AV)". If I choose one of the other religions instead, I can adopt it immediately. I'm not sure whether I need some tech or something to adopt OO/AV, or if it's simply impossible.
I see in CvPlayer::canDoReligion(ReligionTypes eReligion) that:

Code:
if (GC.getLeaderHeadInfo(getPersonalityType()).getReligionWeightModifier(eReligion) <= -100)
{
    return false;
}
if (!isHuman())
{
    if (GC.getLeaderHeadInfo(getPersonalityType()).getReligionWeightModifier(eReligion) < 0)
    {
        return false;
    }
}

which means that some Human Leader are blocked to choose religion on which there is -100 weight (but it is not displayed anywhere from civilopedia), while AI is blocked to have if it is lesser than 0.
Honestly - I do not understand if it is a bug or done on purpose (I have also never noticed it...) so I can either remove the first statement or add to civilopedia,though I prefer the first :lol:
 
Thanks Sephi for the suggestion, but where is DEFAULT_SPECIALIST defined? I see a lot of usage but it appears it has not defined in any xml...
It is defined in globaldefines.xml in vanilla civ4. If a mod or an expansion does not overwrite the value, then the value from the base game is used.

<Define>
<DefineName>DEFAULT_SPECIALIST</DefineName>
<DefineTextVal>SPECIALIST_CITIZEN</DefineTextVal>
</Define>
 
I see ...

Thank you for checking it out. I think you could remove all roleplay-driven religion restrictions from human players except for a couple of "classic" ones such as that the Mercurians can't adopt AV. Removing the restrictions would put the Fall back into Fall from Heaven. 😁

I think Beeri's raw iWeightModifier in the XML is 40 for every religion except AV and FoL, for which the values are 0. But in my game, I couldn't adopt OO and IIRC I could adopt FoL.

For Basium, it's 100 for Order, -10 for OO, and -100 for AV.

So it's likely that the block of code you saw was intended only to implement the Mercurian and similar restrictions, and is not be the cause of what I saw in my game.
 
Last edited:
Another question, I built the Shrine of the Champion and didn't notice any extra promotions. Is that working properly?
It requires a unit at least of level 4 (30px) but it is not mentioned in the civilopedia, will add this comment so it will be more clear
 
Thank you for checking it out. I think you could remove all roleplay-driven religion restrictions from human players except for a couple of "classic" ones such as that the Mercurians can't adopt AV. Removing the restrictions would put the Fall back into Fall from Heaven. 😁

I think Beeri's raw iWeightModifier in the XML is 40 for every religion except AV and FoL, for which the values are 0. But in my game, I couldn't adopt OO and IIRC I could adopt FoL.

For Basium, it's 100 for Order, -10 for OO, and -100 for AV.

So it's likely that the block of code you saw was intended only to implement the Mercurian and similar restrictions, and is not be the cause of what I saw in my game.
Religion weigth of -100 means religion could not be adopted, while a negative one means AI will not adopt religion. Beeri has -100 both for AV and OO, that's why.
About keeping only for 'classical' ones, I am not sure about what is classical and what is not and review all XML values to decide which to keep and which not is a little bit tedious from my side...
My proposed solution would be for the time beeing to not show a religion for the 'pick your religion' if it cannot be adopted (while having spread AV if you can not adopt for your state religion?). Maybe I can add this in civilopedia but I am not sure...
 
@SpyFanatic

Hello sir.

I am playing to MoM Extended. At some point of the game, all my units get a permanant fear effect on them so they fail to attack any unit even barbarian, 4/5 times. I tried the dispell spell, to kill close adepts or use a Disjonction. Nothing works. I have no idea were it does come. This is very annoying. Do you know where it comes from?

I wanted to attach the save but I can't find my game saves folder.
Hi Jojo_Fr
I have no idea about this. Save file are in Documents\My Game\Beyond the sword\Saves\single

Maybe you can look inside? Ideally the best would be the savefile of the turn before this situation arise (with a description of what is done in the turn) so that I can pass the turn and check which events are triggering it.
Maybe by making multiple trials you can also isolate what is the action generating it...

Thanks!
 
The Amurites' world spell blocks many other nonmagical abilities, like getting equipment for your units, building cities or exploring dungeons. Yet spells not cast by units (like terraforming, etc) still work.
I have added a lock also on global spell, but to allow founding cities, getting equipment and exploring dungeon it is very tricky: the way Arcane Lacuna works is to fool that a unit already cast a spell the same turn so that other options are forbidden. To simply remove it means that afterwards each unit will be allowed 2 actions per turn: cast a spell, explore a dungeon for example.
To permanently fix it I believe it means to completely rewrite how Arcane Lacuna works and it will be a little too much for me... Thus it will remains like that: a little too overpowered but maybe not so game changing... (Unless someone else does not want to step in with another proposition)
 
Back
Top Bottom