[MOD] MagisterModmod

The new version was uploaded a few minutes ago.

I have not slept enough lately so I plan to wait until after a meeting tomorrow afternoon before I include any detailed descriptions of this update.

Thanks Magister! Really appreciate the work you put into this mod.
 
Can confirm that there is some issue with Fanaticism and Order religion. I play as Bannor and I go uresponsive game when I finish research Fanaticism as Bannor(Order) or when I try to reconvert to Order as Bannor with Fanaticism researched :/
Any fix for that?
 
Can confirm that there is some issue with Fanaticism and Order religion. I play as Bannor and I go uresponsive game when I finish research Fanaticism as Bannor(Order) or when I try to reconvert to Order as Bannor with Fanaticism researched :/
Any fix for that?
Is this with the new version or an old one?

I've occasionally gotten the game hanging for no apparently reason, but my quick test using worldbuilder to set up a Banner game soon to research Fanaticism had no issues.
 
I have exactly the same problem described by Ziominik, only to the problems with the crash of the game for Bannor with the state religion the Order, the adoption of the religion of the Eternal Cabal for Bannor and Sidar is added (tested in two separate games) and the research at this moment of the Fanaticism technology. What is important, if the AI researches Fanaticism with the above religions, then the game behaves normally. Perhaps the crashes are related to the use of the russian localizer, but this assumption has not been tested.
 
Is this with the new version or an old one?

I've occasionally gotten the game hanging for no apparently reason, but my quick test using worldbuilder to set up a Banner game soon to research Fanaticism had no issues.

This problem has been manifesting since the 2021 version of the mod and is still haunting.
 
I had a similar problem. I had summoned Basium as the Bannor, and switched to him. The game crashed when I converted Basium to Order. Note that the Mercurians possessed the AV holy city and Stigmata on the Unborn, and the Bannor were in Runes and Crusade.
 
As the Lanun, my pirate coves are spawning barbarian pirates. Is this intended? It makes the tiles unworkable unless garrisoned, and is a very strong Barb unit to spawn this early into the game. (Normally garrisoning would not pose a problem, besides a bit more upkeep/production, but I spawned next to the Maenalus, which makes it quite irritating.)

Edit: also, all scenarios appear to be broken again. Not sure if you said you had fixed that between this patch and the last patch.
 
Last edited:
There is a CTD that occurs if you use a Vagrant to build an adventurer's guild before you research Guilds. It says Guilds is required but it allows you to sacrifice the unit to build the adventurer's guild anyway. It then crashes the next turn.
 
This problem has been manifesting since the 2021 version of the mod and is still haunting.
Hello!

I have the exact same issue: I am playing as the Bannor, order state religion, if I research fanaticism the game freezes on the turn that fanaticism is due to finish researching. I know this is tied to fanaticism because if I select another tech to research the game can progress normally.
Once the game freezes it requires a complete restart of the computer as nothing else can fix it
I am using the latest version of the mod, freshly downloaded. I am also using the GoG version of civ 4 under windows 10. I can confirm that it is not linked to any localization issue as I am using the game in the original English language.
 
AI always beeline for arcane, making them too weak, having only 3-power warriors and adepts around 100 turn.
 
AI always beeline for arcane, making them too weak, having only 3-power warriors and adepts around 100 turn.
You can select the option "no AI minimun levels", and play on the hardest difficult. I dont have that problem if they take their time.
 
Hello!

I have the exact same issue: I am playing as the Bannor, order state religion, if I research fanaticism the game freezes on the turn that fanaticism is due to finish researching. I know this is tied to fanaticism because if I select another tech to research the game can progress normally.
Once the game freezes it requires a complete restart of the computer as nothing else can fix it
I am using the latest version of the mod, freshly downloaded. I am also using the GoG version of civ 4 under windows 10. I can confirm that it is not linked to any localization issue as I am using the game in the original English language.

In this case, it is not necessary to solve the freezing problem by completely restarting the computer. All you have to do is create a new desktop with the Win + R key combination. The next step is to go to the new desktop, open the Task Manager and calmly (at least it works for me) shut down the Civilization 4 process. I warn you !!! Make sure that the Task Manager is closed on the main desktop, otherwise when you open it on the additional desktop, the computer will send you to the already open task manager, where you will not be able to complete the game process)
 
Hey Magister, a question. Are you suposed to see all "masks" items only with the "perfect sight" attribute? or anything that sees invisible for that matter? What is the purpose of all the "mask" items if they are invisible all the time?
Had a very cool event with Barbatos btw, only possible because i could see his mask with a "perfect sight" unity.
 
Getting another CTD on Turn 278. Looks like based on the AI log its crashing during Khazad's turn, but getting all his units and cities to skip doesn't accomplish anything. There's also no python error log. Wondering if it has something to do with the Revolutions module since those keep happening during his turn because of Calabim. Any ideas?
 

Attachments

  • Brendan TURN-0278.CivBeyondSwordSave
    856.7 KB · Views: 17
  • BBAILog - Brendan.txt
    17.1 KB · Views: 18
In this case, it is not necessary to solve the freezing problem by completely restarting the computer. All you have to do is create a new desktop with the Win + R key combination. The next step is to go to the new desktop, open the Task Manager and calmly (at least it works for me) shut down the Civilization 4 process. I warn you !!! Make sure that the Task Manager is closed on the main desktop, otherwise when you open it on the additional desktop, the computer will send you to the already open task manager, where you will not be able to complete the game process)
It took me a while to figure out what you were talking about. The problem is that win+R opens the command prompt. What you probably meant was press win+tab which did open up a second desktop to which I was able to switch and force the game to shut down. Thanks for the tip!
Unfortunately we still don't seem to have any solution for the error itself. It looks like I will have to wait until another AI researches fanaticism and trade for it. I hope this will not cause a crash.
 
It took me a while to figure out what you were talking about. The problem is that win+R opens the command prompt. What you probably meant was press win+tab which did open up a second desktop to which I was able to switch and force the game to shut down. Thanks for the tip!
Unfortunately we still don't seem to have any solution for the error itself. It looks like I will have to wait until another AI researches fanaticism and trade for it. I hope this will not cause a crash.
One thing I might try is giving myself fanaticism in WB the turn before I researched it. I see no no reason why it would be different, but it is an easy thing to try.
 
Does anyone know how the AI calculates which tile units afflicted by fear flee to? They always seem to advance towards further into my territory. Could be useful at times, but seems like I'm just aiding the army towards their goal in the early game when movement is slow. Was hoping to hold off a stack while I brought forward reinforcements. My thinking is that if you're confronted by some abomination, you'd be more likely to flee in the direction of your own lands, if that's even possible to with the civ code.
 
I still have not found out what connection, if any, Fanaticism has to the game freezing.

The thought randomly came to mind that it could be related to world spells. Are you playing with that game option to allow or disable them? I generally use the option to turn those off, so I could be missing some bug related to them that could be happening for those who have the option turned on.

I did change the prereqs of some world spells, such as making Rally require The Order instead of Bannor. (Now that I think of it that particular change may be kind of dumb, as the spell forces a change to the Crusade civic that other civilizations cannot use.) Maybe there is something hardcoded in the AI code that I overlooked which points the AI towards trying to use a spell and confuses it when the prereqs are different?


---

I made sure all of the scenarios were working at some point last year but did not test any of them just before the last release, so something may have broken.

I was intending to update The Cult to include various Wyrmhold improvements, but never got around to it and wanted to get a version out on the date I'd already written in the version number. I figured people didn't want to wait and that the scenarios could be the focus of a later more minor update.

Note that the scenarios for this modmod are found in PrivateMaps (which is necessary if you want the option to load them as Custom Scenarios from the main menu), not in Assets\XML\Scenarios where Kael hid them away. The way the installer works those scenarios remain there and are not overwritten, so they are almost certainly broken.


---

Does anyone know how the AI calculates which tile units afflicted by fear flee to? They always seem to advance towards further into my territory. Could be useful at times, but seems like I'm just aiding the army towards their goal in the early game when movement is slow. Was hoping to hold off a stack while I brought forward reinforcements. My thinking is that if you're confronted by some abomination, you'd be more likely to flee in the direction of your own lands, if that's even possible to with the civ code.

It is determined by this code in CustomFunctions.py
Code:
    def doFear(self, pVictim, pPlot, pCaster, bResistable=True):
        if pVictim.getDuration() > 0:
            return False
        if bResistable:
            if pVictim.isImmuneToFear():
                return False
            if pCaster != -1:
                if CyGame().getSorenRandNum(100, "Resist Fear") < pVictim.getResistChance(pCaster, gc.getInfoTypeForString('SPELL_ROAR')):
                    return False
        iX = pVictim.getX()
        iY = pVictim.getY()
        pBestPlot = -1
        iBestPlot = 0
        for iDirection in xrange(DirectionTypes.NUM_DIRECTION_TYPES):
            pLoopPlot = plotDirection(iX, iY, DirectionTypes(iDirection))
            if not pLoopPlot.isNone():
                if not pLoopPlot.isVisibleEnemyUnit(pVictim.getOwner()):
                    if pVictim.canMoveOrAttackInto(pLoopPlot, False):
                        if abs(pLoopPlot.getX() - pPlot.getX()) > 1 or abs(pLoopPlot.getY() - pPlot.getY()) > 1:
                            iRnd = CyGame().getSorenRandNum(500, "Fear")
                            if iRnd > iBestPlot:
                                iBestPlot = iRnd
                                pBestPlot = pLoopPlot
        if pBestPlot != -1:
            pVictim.setXY(pBestPlot.getX(), pBestPlot.getY(), False, True, True)
            return True
        return False
Making it more likely to flee in the direction of your own lands could be tricky.

It would not be hard to bias this code in favor of picking a plot that is owned by the same player as the fleeing unit. It would only be slightly harder to make units less likely to flee onto plots owned by the same owner as the unit causing fear. The code could look something like this:
Spoiler :
Code:
    def doFear(self, pVictim, pPlot, pCaster, bResistable=True):
        if pVictim.getDuration() > 0:
            return False
        if bResistable:
            if pVictim.isImmuneToFear():
                return False
            if pCaster != -1:
                if CyGame().getSorenRandNum(100, "Resist Fear") < pVictim.getResistChance(pCaster, gc.getInfoTypeForString('SPELL_ROAR')):
                    return False
        iX = pVictim.getX()
        iY = pVictim.getY()
        pBestPlot = -1
        iBestPlot = 0
       
        iPlayer = pVictim.getOwner()
        pPlayer = gc.getPlayer(iPlayer)
        iTeam = pPlayer.getTeam()
        eTeam = gc.getTeam(iTeam)
       
        for iDirection in xrange(DirectionTypes.NUM_DIRECTION_TYPES):
            pLoopPlot = plotDirection(iX, iY, DirectionTypes(iDirection))
            if not pLoopPlot.isNone():
                if not pLoopPlot.isVisibleEnemyUnit(pVictim.getOwner()):
                    if pVictim.canMoveOrAttackInto(pLoopPlot, False):
                        if abs(pLoopPlot.getX() - pPlot.getX()) > 1 or abs(pLoopPlot.getY() - pPlot.getY()) > 1:
                            iRnd = CyGame().getSorenRandNum(500, "Fear")
                           
                            if pPlot.isOwned():
                                if pPlot.getOwner() == iPlayer:
                                    iRnd += 200
                                elif pPlot.getTeam() == iTeam:
                                    iRnd += 100
                                elif eTeam.isAtWar(pPlot.getTeam()):
                                    iRnd -= 200
                                if pCaster != -1:
                                    if pPlot.getOwner() == pCaster.getOwner():
                                        iRnd -= 200
                                    elif pPlot.getTeam() == pCaster.getTeam():
                                        iRnd += 100
                            if iRnd > iBestPlot:
                                iBestPlot = iRnd
                                pBestPlot = pLoopPlot
        if pBestPlot != -1:
            pVictim.setXY(pBestPlot.getX(), pBestPlot.getY(), False, True, True)
            return True
        return False

Of course, this change would do absolutely nothing if all of the tiles surrounding the frightened unit have the same owner.

You could make the code find the location of the player's capital city or find the nearest city and then compare distances, but that code could get messy quick and would use up a lot more resources.
 
I still have not found out what connection, if any, Fanaticism has to the game freezing.

The thought randomly came to mind that it could be related to world spells. Are you playing with that game option to allow or disable them?

I play with world spells enabled.
Generally I play with pretty much everything enabled. So unfortunately I don't have more information right now that could help isolate the issue.
 
It's not a big enough deal to waste any time on it, especially if it could affect performance or cause issues. I really shouldn't have been neglecting my military so much.
 
Top Bottom