[MOD] MagisterModmod

Hello, after completeing City of the Thousand Slums the UI does not seem to adjust to +3 radius properly:
https://i.imgur.com/36ve65s.png
It initially shown default +2 radius, until LMB 'd on the plots that should be worked:
https://i.imgur.com/yFcJpdl.png
Can't scroll map in city view to 'tap' plots on the north though.
Second thing i noticed would be lack of pedia access on UI:
https://i.imgur.com/kHupM9O.png

[edit1:] temporary fix if someones struggling:
https://forums.civfanatics.com/threads/changing-the-zoom-in-the-city-screen.528983/
post no 10 by Noyyau.


Thanks, having a blast with the mod so far, level of polish is seriously impressive.
 
Last edited:
Hello!

Recently, I got the idea to find for each religion added by the Magister in his modmod its own set of music and songs. I managed to write them in the code, and the music is played while the corresponding religion is the state one. There was a problem about which I would like to consult with you. After adopting a new religion, all screens of diplomacy with other leaders lost their theme music, replaced by the sounds of the fall / rise of demons / angels.

I noticed a similar problem with the religion of the White Hand when it was adopted as a state religion. Judging by the fact that the Magister could not / did not have time / forgot to fix this problem, I have concerns that the game code has a limit on the number of musical themes / eras and, as a result, errors arise.

I ask you to advise me on this topic, I really want to emphasize the individuality of each religion)
 
It looks like lfgr just released a patch for MNAI, which moves Aggressive AI into a game option and fixes the AI bypassing war declarations checks.
 
Hey, I was playing a lot of this modmod recently and I love it so much although it is impossible to go to next turn after some time:

Around turn ~200 in most of my games, I am hit by two issues:

1. End turn -> and I stuck "Wait for other Civilizations...", game becomes not responsible

This might be avoided by reloading save (with rolling new random seed option set on), but it is still a pain.

2. CTD after ending my turn. Reloading save don't really help...

I tried reinstalling Civ4 and mod but it seems it still occurs.

I use GOG version civ4 3.19 (currently I tried both with and without unofficial patch for 3.19), Win10, latest MagisterModMod (2021 September if I remember correcly) and FFH2 from moddb, also latest version.

No idea what's causing it. Probably some AI doing weird stuff. I really wanna play a full game but I can't event reach mid/late game.
 
Hey guys, I have a question regarding the Magister modmod: The turn times seem quite long? Am I doing something wrong? I am playing with 10 AI on a large map, but other mods seem to do that pretty fine (e.g. the C2C mod). Is there something I can do to improve this?

Also; I see many new religions, but the wiki is not very helpful in telling me when/how I discover those? The requirements are listed as "never".
 
@up: I can confirm i have the same problem. Although i mostly play on marathon, figured that may be an issue, mixing that with a large map make AI turns slow down significantly - up to a point that game is borderline unplayable on turn 1000+.

On a separate note, i've found something ... problematic. BARBARIAN trait tends to get buggy in the late game, causing AI barbs to declare a war and peace just turn later, every turn.
 
How am I supposed to build pirate ports? I thought I just need a work boat and be Lanun? I can't find any other requirements??

EDIT: Even on normal speed and a standard map with 5 (!) civs, the turn times grow a lot after a few hundred turns. It seems strange that the turn times are even slower than C2C on a larger map!?

On a further unrelated note: I love all the stuff this mod adds? Has there ever been any talk about adding a separate Guilds/Culture/Magic tree? It seems strange that my nation might be ruled by mighty mages but don't know how to make a wheel...
 
Last edited:
I am planning to have a new version out this weekend.

I have merged the new MNAI update and so long as I don't use the new COUNT_SUMMONS_PER_CASTER global define I think I have it working without python errors.

It seems like it is running a bit faster than before.

I went ahead and eliminated the sphere specific dragon fanatics and the various Wyrmhold buildings, which were doing more to clutter the game than to make it enjoyable.


I have Empower Engines working as the Enchantment 2 spell, but decided to make it grant just one of the caster's summon perks to each mechanized unit in the stack per casting rather than all of them at once.

Most mage and archmage level spell spheres and affinities have summon perks. Dimensional grants Flanking promotions, Enchantment grants Drill promotions. Air affinity or Air 3 grant Fair Winds both as the perk and as the randomly applied promotion, as mages and archmages becoming Airborne at random was too annoying.

I decided that Extension III and IV were just too overpowered, especially with the new summon perks, with applying perks to mechanized units, and with Planar Binding letting you keep summons with a lot of movement around indefinitely when it doesn't miscast.


I have eliminated the House of Plenty national wonder and changed both the priest and high priest spell.

The curator's spell is now "Hospitality," a bRequiresCaster spell building that adds health, happiness, area health, area happiness, trade routes, GP rate bonus, and doubles the maintenence costs of the city.

The Genius spell is now Rejuvenation, which restores any (non equipment, non-race) promotion from a unit's XML defines that had been somehow lost and reduces the level of nearby units by 1 and reduces their xp to some random value appropriate to the new level. That can allow your units to level up for promotions more often, and could be used to prevent rival adepts from getting enough levels to upgrade to mages or archmages. Couatl is now a hero instead of a national unit, and can use the Rejuvenate spell too.

The Kuriotates can no longer train Pixies in a city with the Pixie Garden, but can instead use a Pixie to found the Pixie Garden once they have the prereqs.


The various temple founding abilities have bIgnoreHasCasted, so they can be used after using other spells.


The affinity versions of spells no longer have bIgnoreHasCasted (as it was causing an issue letting those spells be used near the Nullstone Citadel) but many also lack bHasCasted.


The effects of Spell staffs letting units cast again or of Archives applying Cloistered are now called in "def cast(argsList):" after the actual spell effect instead of only being part of another spells PyPrereq, which I hope will reduce the risk of OOS issues. I'm afraid it would only matter for python spells though, so it may not help with any OOS issues from xml only spells.


I got rid of the PyHelp functions for spells adding buildings, since the MNAI version is just as good and I assume running it in C++ makes it faster. I kept my custom strings for summons and promotions though as I prefer it showing summon perks and identifying the targeted units.


Since I noticed the MNAI changelog says "Lair spawning now respects national/team/world unit limits," I am thinking of perhaps reintroducing the Wyrmholds but as improvements that will randomly generate barbarian Dragons of the associated types. If so I'd probably have Stir from Slumber add various improvements at random on appropriate tile types (water tiles for scaled dragons, peaks for Fang Dragons, Ancient Forests for Seed Dragons, etc) and might make them provide mana. I might let Cult of the Dragon units have the ability to summon dragons from their Wyrmholds, and let other units explore the lairs for results like finding a Dragon's Hoard.



Edit:
After a little playtesting I am finding that when I make the Rejuvenate resistible as intended it seems like everyone always resist it, making it an annoying waste. When it is not resistible it seems way overpowered.

I still really like the spell effects but am thinking it may belong at Creation IV instead, as a special spell just for Majen and very high level archmages after Omniscience.

The current Creation IV spell just creates a Golden Age without consuming the caster, which seems weak compared to some of my mother Channeling IV spells but appropriate for high priest called a Genius who has all the other abilities of great persons.


I went ahead and implemented the Wyrmholds as improvements, although I have not added the code to make Stir from Slumber generate them yet. They seem to be generating 1 dragon and stopping, as they should as I gave all the dragons a team limit of 1. After slaying one dragon another one will eventually appear. I added a Wyrmhold improvement for Acheron just to test that with a world unit it would never generate more. The dragons are not held to their lairs with any promotion like Lairguardian but the AI seems to prefer to have them stay put to guard the lair, I think due to code that was supposed to prevent skeletons and lizardmen from wandering off their lairs until the next spawn comes.

I am considering whether it might make sense to have Acheron's Wyrmhold be a unique feature randomly placed at the start of the game which would generate hm that way instead of having a barbarian city needed to built it and train him.
 
Last edited:
Suggest if dragons can spawn they're given UnitAI_Animal or similar preventing them from attacking cities. Even if they stay as lair guardians generally, it would be pretty disastrous if a orc warrior wanders onto the tile and frees Acheron to burn down a continent.
 
I'm leaning towards leaving Acheron alone and just making Stir from Slumber create the generic dragons and their lairs.

The code seems easier to give the barbarian state random dragons and then put their lairs on the same tile rather than picking appropriate lairs that can generate them. The lairs could still generate more if the first dragon is killed or captured though.

When I said I'd probably release this weekend I thought I would not be working tomorrow, but now know I will. Also I found out that my sister and her kids will be visiting, and need to clean up a bit before they arrive. There is still a chance for a release on Sunday night but more likely after that.


Edit:
I discovered that if I place the dragons first before their Wyrmholds, that the AI does not decide to have the dragons guard their lairs but immediately sends them on a rampage wiping out civilizations.

I guess I could add the dragons, put the Wyrmholds on their tiles, then delete the dragons (removing their dragon promotion first to prevent them from leaving dragon bones) and then let the lairs generate replacement dragons naturally.

Alternately I could try to write code similar to Armegeddon Hellfire for each type of Wyrmhold, trying to take into account the appropriate climate for each species. That sounds harder though.

Most of my modding today was spent finding or creating appropriate artwork for each of the dragon's lairs. For some I'm just reusing features or buildings, while for some I made custom art reskinning or combining elements from other structures. It is really annoying that the game uses at least 4 different incompatible versions of NifSkope saves, preventing me from combining the elements I'd most like to put together.

I am debating whether or not to include a Spire Dragon Wyrmhold. Canonically the dragons are extinct, but there are rumors that a clutch of Spire Dragon Eggs exists somewhere. I am thinking I may include a Wyrmhole using the art of the Nest/Breeding Grounds from Orbis, but just have it provide Metamagic mana instead of actually spawning any dragons.


I am thinking of giving Dragon Fanatics, or possibly any Cult of the Dragon units, special abilities that can be used only on or near the Wyrmholds. Perhaps if they find a vacant Wyrmhold they could summon the dragon under player control instead of as a Barbarian. Perhaps they could just get some free promotions.

I am considering reintroducing the dragon-specific dragon fanatics that I deleted since my last release, but making it so that they cannot be trained or upgraded as normal units but are transformations Dragon Fanatics can undergo only when near the appropriate Wyrmhold. You wouldn't have the clutter of 22 different unit types, but an unaffiliated fanatic would swear loyalty to the first dragon or Wyrmhold it encounters.
 
Last edited:
I'm leaning towards leaving Acheron alone and just making Stir from Slumber create the generic dragons and their lairs.

The code seems easier to give the barbarian state random dragons and then put their lairs on the same tile rather than picking appropriate lairs that can generate them. The lairs could still generate more if the first dragon is killed or captured though.

When I said I'd probably release this weekend I thought I would not be working tomorrow, but now know I will. Also I found out that my sister and her kids will be visiting, and need to clean up a bit before they arrive. There is still a chance for a release on Sunday night but more likely after that.


Edit:
I discovered that if I place the dragons first before their Wyrmholds, that the AI does not decide to have the dragons guard their lairs but immediately sends them on a rampage wiping out civilizations.

I guess I could add the dragons, put the Wyrmholds on their tiles, then delete the dragons (removing their dragon promotion first to prevent them from leaving dragon bones) and then let the lairs generate replacement dragons naturally.

Alternately I could try to write code similar to Armegeddon Hellfire for each type of Wyrmhold, trying to take into account the appropriate climate for each species. That sounds harder though.

Most of my modding today was spent finding or creating appropriate artwork for each of the dragon's lairs. For some I'm just reusing features or buildings, while for some I made custom art reskinning or combining elements from other structures. It is really annoying that the game uses at least 4 different incompatible versions of NifSkope saves, preventing me from combining the elements I'd most like to put together.

I am debating whether or not to include a Spire Dragon Wyrmhold. Canonically the dragons are extinct, but there are rumors that a clutch of Spire Dragon Eggs exists somewhere. I am thinking I may include a Wyrmhole using the art of the Nest/Breeding Grounds from Orbis, but just have it provide Metamagic mana instead of actually spawning any dragons.


I am thinking of giving Dragon Fanatics, or possibly any Cult of the Dragon units, special abilities that can be used only on or near the Wyrmholds. Perhaps if they find a vacant Wyrmhold they could summon the dragon under player control instead of as a Barbarian. Perhaps they could just get some free promotions.

I am considering reintroducing the dragon-specific dragon fanatics that I deleted since my last release, but making it so that they cannot be trained or upgraded as normal units but are transformations Dragon Fanatics can undergo only when near the appropriate Wyrmhold. You wouldn't have the clutter of 22 different unit types, but an unaffiliated fanatic would swear loyalty to the first dragon or Wyrmhold it encounters.

I don't think the problem of rampaging dragons is going to be fixed if you manage to figure out how to make the dragons act as lair guardians. You're still going to have a situation where all it takes is for one other barbarian to wander onto that tile and risk the guardian being unleashed. Again, I suggest giving them Animal AI, or if not, making sure they have a promotion that holds them in place for a while.

I like the dragon fanatic idea.
 
My Order Banner game won't allow me to reach the turn where I obtain Fanaticism. Avoiding the tech or forever swearing off Order were the only things that let me continue. Building Chalid also gives me a never ending end of turn wait. I have two known religions I must disable in this current version. I don't know if there's any more religions that may suddenly end the game.
 
Hi all! Decided to think about what a High Priest of a Body religion would look like here, so I made a quick sketch. The higher the priest in the hierarchy, the less clothing he wears (within reasonable limits)), and the more muscle mass he has and the older he looks (the influence of body dominion). How do you like this idea?
Высший жрец Тела.jpg
 
Perhaps. But if you have a religion based off a sphere of magic that manipulates the human body like clay why stop at just muscle mass? Wouldn't it make sense to make your body as beautiful and perfect as you can get it? And probably as young as well. So you might have a 90 year old high priest that looks like a 30 year old Greek god. But that's only the tip of the iceberg. Depending on just how powerful the body sphere is in FFH lore you might just abandon the human form completely and have fun with the model.
 
Hello again! I continue to make sketches on religions. I already uploaded the sketch attached to the post on the Fall from Heaven reddit, but did not receive feedback on the corrections of this sketch, and I would like to receive it here (I really hope). In this picture, I suggested how an elf (and most likely not only an elven race) would look like professing the Order. If the Sons of Discord would keep the sword constantly in their hands during their rites and other religious things, then Orders, as it were, also holds it in their hands (in the region of the pommel), but in the mode of constant readiness and in the form of a cross (+ a little sends Christianity, from where my opinion was the inspiration for the creation of the Order). The higher the priest in the hierarchy, the more he is armored (in this sketch, the Confessor) and the longer his sword is, up to the two-handed one in the High Cleric.
Конфессор2этап.jpg
 
How are things looking, Magister? It would be great to see new version soon - the previous version still has barbarian religious units spawning, and the ruthless AI makes it not fun to play.
 
How are things looking, Magister? It would be great to see new version soon - the previous version still has barbarian religious units spawning, and the ruthless AI makes it not fun to play.
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.

Most of the changes have been discussed in this thread already, but a last minute change made only this morning was causing the dragons spawned from Wyrmholds to start with the Lair Guardian promotion but giving the Dragon Fanatics a spell that can not only remove the Lair Guardian promotion from a nearby dragon but can also direct the dragon to attack the nearest enemy units.
 
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.

Most of the changes have been discussed in this thread already, but a last minute change made only this morning was causing the dragons spawned from Wyrmholds to start with the Lair Guardian promotion but giving the Dragon Fanatics a spell that can not only remove the Lair Guardian promotion from a nearby dragon but can also direct the dragon to attack the nearest enemy units.
Thanks for this. A question: theres any difference between mapscript, in relation to dragon lairs and all the new stuff? Like, i know for a fact that PerfectWorld2 (the best map IMO) doesnt have some terrain features like others.
 
Thanks for this. A question: theres any difference between mapscript, in relation to dragon lairs and all the new stuff? Like, i know for a fact that PerfectWorld2 (the best map IMO) doesnt have some terrain features like others.
The lairs are added via python when the ritual is completed, not at the start of the game via mapscript. (If I added them at the start of the game, then dragons would start appearing very early.) I guess the mapscript would matter for the Scaled Dragon lair if it generated absolutely no water tiles or for the Chthonic Dragon if there are no peaks whatsoever, but otherwise I wouldn't worry about it.
 
I just found my first post-release bug a couple minutes ago. I'm not sure how it eluded me, as it was in a spell I haven't touched in several weeks and was sure was working before.

In the Repair spell, I somehow omitted or deleted the definition of the Retrofit spell used in order to make the Ringgiver's Repair spell also upgrade Golems to gain the promotions from the Luchuirp unique buildings.

The code should be this:
Spoiler :

Code:
def reqRepair(pCaster, iAmount = 30, eSpell=-1):
    pPlot = pCaster.plot()
    sRetrofit = 'SPELL_RETROFIT_GOLEM'
    iGolem = gc.getInfoTypeForString('PROMOTION_GOLEM')
    iRusted = gc.getInfoTypeForString('PROMOTION_RUSTED')
    lCombats = [gc.getInfoTypeForString('UNITCOMBAT_NAVAL'), gc.getInfoTypeForString('UNITCOMBAT_SIEGE')]
    for i in xrange(pPlot.getNumUnits()):
        pUnit = pPlot.getUnit(i)
        if pUnit.getDuration() > 0:continue
        if pUnit.isHasPromotion(iRusted):
            return True
        iRace = pUnit.getRace()
        if iRace == iGolem:
            if reqRetrofitGolem(pUnit, sRetrofit):
                return True
            if pUnit.getDamage() > 0:
                return True
        if iRace == iGolem:
            return True
        elif iRace == -1:
            if pUnit.getUnitCombatType() in lCombats:
                if pUnit.getDamage() > 0:
                    return True
    return False
def spellRepair(pCaster, iAmount = 30, eSpell=-1):
    pPlot = pCaster.plot()
    sRetrofit = 'SPELL_RETROFIT_GOLEM'
    iRusted = gc.getInfoTypeForString('PROMOTION_RUSTED')
    iGolem = gc.getInfoTypeForString('PROMOTION_GOLEM')
    lCombats = [gc.getInfoTypeForString('UNITCOMBAT_NAVAL'), gc.getInfoTypeForString('UNITCOMBAT_SIEGE')]
    for i in xrange(pPlot.getNumUnits()):
        pUnit = pPlot.getUnit(i)
        if pUnit.getDuration() > 0:continue
        if pUnit.getDamage() == 0:continue
        iRace = pUnit.getRace()
        if iRace == iGolem:
            pUnit.changeDamage(-iAmount, PlayerTypes.NO_PLAYER)
            pUnit.setHasPromotion(iRusted, False)
            if reqRetrofitGolem(pUnit, sRetrofit):
                spellRetrofitGolem(pUnit, sRetrofit)
        elif iRace == -1:
            if pUnit.getUnitCombatType() in lCombats:
                pUnit.changeDamage(-iAmount, PlayerTypes.NO_PLAYER)
                pUnit.setHasPromotion(iRusted, False)
def helpRepair(lpUnits, iAmount = 30, eSpell=-1):
    szBuffer = ''
    pCaster = lpUnits[0]
    iCount = 0
    lTargets= []
    lRusted = []
    lRetrofit = []
    pPlot = pCaster.plot()
    sRetrofit = gc.getInfoTypeForString('SPELL_RETROFIT_GOLEM')
    iRusted = gc.getInfoTypeForString('PROMOTION_RUSTED')
    iGolem = gc.getInfoTypeForString('PROMOTION_GOLEM')
    lCombats = [gc.getInfoTypeForString('UNITCOMBAT_NAVAL'), gc.getInfoTypeForString('UNITCOMBAT_SIEGE')]
    for i in xrange(pPlot.getNumUnits()):
        pUnit = pPlot.getUnit(i)
        if pUnit.getDuration() > 0:continue
        if pUnit.isHasPromotion(iRusted):
            lRusted.append(pUnit)
        iRace = pUnit.getRace()
        if iRace == iGolem:
            if reqRetrofitGolem(pUnit, sRetrofit):
                lRetrofit.append(pUnit)
            elif pUnit.getDamage() == 0:continue
            iCount += 1
            lTargets.append(pUnit)
        elif iRace == -1:
            if pUnit.getDamage() == 0:continue
            if pUnit.getUnitCombatType() in lCombats:
                iCount += 1
                lTargets.append(pUnit)
    lTargets = list(set(lTargets))
    if len(lRetrofit) > 0:
        szBuffer += helpRetrofitGolem(lRetrofit, sRetrofit)
    iCount = len(lRusted)
    if iCount > 0:
        szBuffer += helpTogglePromotionsSpecificUnits(lRusted, eSpell, [], ['PROMOTION_RUSTED'], False)
    iCount = len(lTargets)
    if iCount > 0:
        if iCount == 1:
            pUnit = lTargets.pop(0)
            pPlayer = gc.getPlayer(pUnit.getOwner())
            sList = "<color=%d,%d,%d,%d>%s</color>" %(pPlayer.getPlayerTextColorR(), pPlayer.getPlayerTextColorG(), pPlayer.getPlayerTextColorB(), pPlayer.getPlayerTextColorA(), pUnit.getName() )
            szBuffer += localText.getText("TXT_KEY_HELP_SPELL_TARGETS_THIS", ( sList, ))
        elif iCount > 0:
            sList = ''
            while len(lTargets) > 0:
                pUnit = lTargets.pop(0)
                pPlayer = gc.getPlayer(pUnit.getOwner())
                sList += "<color=%d,%d,%d,%d>%s</color>" %(pPlayer.getPlayerTextColorR(), pPlayer.getPlayerTextColorG(), pPlayer.getPlayerTextColorB(), pPlayer.getPlayerTextColorA(), pUnit.getName() )
                if len(lTargets) > 0:
                    if len(lTargets) == 1:
                        sList += " and "
                    else:
                        sList += ", "
            szBuffer += localText.getText("TXT_KEY_HELP_SPELL_TARGETS_THESE_COUNT_LIST", (iCount, sList, ))
    return szBuffer
edit: I at first posted a wrong correction, thinking that eSpell in spellRetrofitGolem(pCaster, eSpell), reqRetrofitGolem(pCaster, eSpell), and helpRetrofitGolem(lpUnits, eSpell) should haave been an index instead of a text string.

edit2: I noticed the python error when the game froze up and thought it was related, but unfortunately it still seems to hang at that same point despite the changes. Also, the eSpell parameter of the Retrofit Golem spell is entirely optional and never actually gets used for anything, so you could just use eSpell, -1, or omit the parameter altogether instead of definine sRetrofit.
 
Last edited:
Top Bottom