[MOD] MagisterModmod

Interesting. I dont have Magister's mod installed on my machine at the moment. What is special / different about those two units?
They are capable of attacking without declaring war, though they're not Hidden Nationality. I'm not certain at the moment as this machine doesn't have Civ4 installed, but I believe they use AlwaysHostile? Although, now that I think about it, the cities they were stationed in might have also had a Ring of Warding up. However, none of the stuck units were summons or summoners. I don't recall having any issues with normal Hidden Nationality units causing WoCs, even when a Ring of Warding is involved, so chances are this particular lockup is due to AlwaysHostile or whatever flag/attribute is used on Dragon Fanatics and Wyvern Riders.
 
I've repeatedly had WoC lockups when one or two units from a civilization with which I have Open Borders attempts to attack a Dragon Fanatic or Wyvern Rider garrisoned in one of my cities. Skipping or deleting the unit(s) in question resolves the issue, and moving the DF/WR further from my borders or onto an inaccessible tile appears to cause the AI to ignore them. I've seen them cause lockups on both PatrolMove and ConquestMove in the AI log, for what it's worth. Haven't seen any other repeatable WoCs in the last two or three releases.

Those last couple of log entries are interesting because it is just one unit involved in the loop. The DLL has code to force the game out of a loop if its due to a single stuck unit, so these log entries indicate to me that the issue does involve a python call somewhere.



Interesting. I dont have Magister's mod installed on my machine at the moment. What is special / different about those two units?
Dragon Fanatics and Wyvern Riders a have the bAlwaysHostile tag in my modmod. Unless you have recently dealt with the C++ end of that tag, handling requests I made a long time ago, then they can cause all sorts of issues.

The big problem seems to be that bAlwaysHostile units don't count as enemies when in non-enemy cities as far as actually attacking them goes, but they do seem to count when it comes to being able to plan an attack. The attacking unit may keep trying to attack the unit in the city but never be able to complete the attack.

bAlwaysHostile units are also able to conquer rival cities and superforts without war. (I blocked this in python and gave the units the bNoCapture tag to handle it, but would prefer a more permanent solution in the DLL.)


I also made the various equipment units count as bAlwaysHostile, so that rivals could capture the equipment that has been dropped and so pick it up themselves. I have noticed that this can cause the equipment to be destroyed if it was dropped in a city and if the city was handed over to another player (usually a puppet state) upon being captured.

I already added a spell to let a unit player convert a teammate's equipment to his control so he can take it. I could easily add a similar spell to let players take unguarded equipment from their rivals.

(Honestly I'm thinking bAlwaysHostile is not the best way to handle the equipment though. I just probably just change it on my own.)

I would prefer it if the <UnitInStackPrereq> and <PromotionInStackPrereq> did not only check the player's own units, but if tags like bImmuneTeam/bImmuneNeutral/bImmuneEnemy limited what units it checked.



Doubled Immortality-granting promotions appears to cause some odd behavior. I haven't done any testing, but in my latest game one of my Adventurers is being duplicated whenever it upgrades. He currently has both Immortal from Blood of the Phoenix, and Life III. The resulting clone loses Immortal but retains Life III, I believe. Adventurers with Immortal but without Life III don't clone on upgrade.
I'll look into this.

I already added code to remove the Immoral and Life III promotions during the "And now for Something Completely Different) effect, but changing promotions for upgrading units is not something the game makes easy.


It looks like the code that removes immortal-granting promotions stops looking after finding the first one.
Spoiler :

Code:
void CvUnit::doImmortalRebirth()
{
    joinGroup(NULL);
    setDamage(75, NO_PLAYER);
    bool bFromProm = false;
   	for (int iI = 0; iI < GC.getNumPromotionInfos(); iI++)
	{
        if (isHasPromotion((PromotionTypes)iI))
        {
            if (GC.getPromotionInfo((PromotionTypes)iI).isImmortal())
            {
                setHasPromotion(((PromotionTypes)iI), false);
                bFromProm = true;
              [COLOR="Red"]  break;[/COLOR]
            }
		}
	}

	if (!bFromProm)
	{
        changeImmortal(-1);
	}

    doEscape();

	// Sephi AI (Immortal Units heal)
    if (!isHuman())
    {
        getGroup()->pushMission(MISSION_HEAL);
    }
	// Sephi AI End
If worst comes to worse, I could make it so that Life III does not itself make a unit immortal but rather grants the immortal promotion too whenever it is granted, and so that the resurrection spells remove that promotion too.

Is there any particular reason the Guardian Elemental from the Tower of Elements has Hidden Nationality? The AI seems to like suiciding on them when you have Open Borders.
I used the Lair Guardian promotion for this, mostly so that the unit would not remain held if something kicked it out of the city. This promotion grants a permanent HN status because it is also used for barbarian units generated from lairs which should not be friendly to Barbarian trait civs.

Since the promotion already uses python to remove itself when the unit leaves a city or permanent improvement, I think I'll try making it apply the normal HN promotion to barbarian units instead of having HN status built in to itself.
Black Mirror-ed Great Engineers are capable of building improvements.
I'm not sure I'd consider that a problem any more than Black Mirror-ed combat units being able to attack. It would be a problem if they were able to hurry wonders, found buildings, or start golden ages, but I'm pretty sure they cannot.
In the Order vs Veil rioting event, which offers the choice between 50% removal of the selected religion, 25% of both, or tossing the rioters in the dungeon, the dungeon option was unavailable to me despite having a dungeon present. Possibly caused by the dungeon being provided by the Tower of Eyes rather than being built?
This appears to be handled around like 15775 of CvCity.cpp
Code:
//FfH: Added by Kael 09/21/2008 (so setting a buildingclass without a change number will make the event require that building to be in the city)
		if (kEvent.getBuildingChange() == 0)
		{
			if (getNumRealBuilding(eBuilding) == 0)
			{
			    return false;
			}
		}
//FfH: End Add
I'm not sure why Kael chose to use "Real" there, but it would cause the effect you describe. I'd suggest Tholal change this.
 
Because of a typo in my previous reply, even thou I did edit it just now, I would like say I CAN PROVIDE/UPLOAD my savegame if somebody wants to take look at it. How in the h**l I managed to write "can't" instead of "can" in my previos reply is beyond me..........:D:confused::hmm::dunno:
 
I'm thinking of changing the Werewolf mechanic a little bit. How does this sound?

The Werewolf promotion would no longer block the ability to cast spells, but Ravenous Werewolves would start with a new promotion that does so. This would still prevent the exploit of having infinite lycantropic archmages or high priests, which was the point of giving the werewolf promotion that effect. It would however not stop Baron Duin Halfmorn himself from using abilities, picking up/dropping equipment, becoming a Vampire, etc.

Duin would gain a new ability to Dominate Werewolves, very similar to Magnadine's Mesmerize Mercenary ability but of course for Werewolves instead of Mercenaries.

Duin would be changed from UNITCOMBAT_BEAST to UNITCOMBAT_MELEE, so I wouldn't have to worry about issues related to this hero being captured by Beastmasters. (I believe that that sometimes threw off the Sluagh mechanic that should make sure he is resurrected with the right promotions.) Other Werewolves would remain Beasts.

(Note that in the lore, Duin does most of his fighting in his human form, using a cudgel rather than teeth or claws and wearing expensive armor. It is easier to keep his wits about him to devise tactics and command his followers in this form, although he will quickly shift to his bestial form in order to remind the new werewolves that he is the Alpha of their pack.)

Ravenous Werewolves would start not only be Enraged but also Rebellious, unless their owner also controls the Baron himself.

Lycanthropy would not only spread when a werewolf wins a battle, but would also have a (smaller, perhaps 10% as much) chance of spreading when the werewolf is defeated (unless the winner remains uninjured, has the Werewolf Slaying promotion, or is Immune to Disease). The unit would remain under its own owner's control, unless its Rebellious nature makes it turn barbarian or if Duin dominates it.
 
As it is the werewolf can't use the portals. Which means he can't go with the armies. So that'd be good.

Also, on the subject of portals, can you think of a way to make the AI use them? I've never seen one use them. Which means they're a freebie for the player, who doesn't need a freebie.

On a different subject, is there a reason stone is not a resource in FFH?
 
Can I get one of the older versions? Like July or older. It looks like the archive on moddb only stores the last version.
 
So it seems like i found an issue with the Doviello, at least when playing online. If I use the Issue Challenge ability it causes our game to go out of sync. And here I was wanting a lot of units to fight each other so that I can see who comes out the strongest. :(
 
So it seems like i found an issue with the Doviello, at least when playing online. If I use the Issue Challenge ability it causes our game to go out of sync. And here I was wanting a lot of units to fight each other so that I can see who comes out the strongest. :(

Multiplayer really is this mod's biggest flaw imo. Just way too much stuff going on at once. In the midgame already it becomes unplayable due to out of sync, and that's just with two players!
 
Is it possible to use some modules with this mod? I would really love to use the khazad: the next generation module with this mod.
 
I'm not a big fan of modular modmods and am unfamiliar with that one, but suspect it would likely overwrite some important files. You could go through and make it compatible, but I don't intend to do so.
 
I do have another question cause I know little to nothing about coding, etc, but why is the turns times in some mods much longer then compared to others. For example me and a friend do see a pretty big wait between turns using Magister Modmod compared to some other mods. I also have had an increase in wait time with the turns with the SNV version for Ashes of Erebus, but the normal version (I guess we can call it that) is fast. My only guess it it has something to do with the optimization of the mod in question.
 
Turn times can depend on many factors.

Spells, especially those with with python prereqs, are a common culprit. There are many more of those in this modmod than the main mod.

In this modmod I think the CvGameUtils.py function unitCannotMoveInto(self,argsList) slows things down the most. The code placed here must run whenever a unit is going to move and whenever an AI considers moving any unit anywhere. It may not be a big deal in when the total number of units is small, but because huge once armies grow large enough. Disabling this callback by default was responsible for most of the speed improvement between vanilla CivIV and the BtS expansion.

Kael and Tholal don't use that callback due to its inefficiency, but this modmod needs it in order to make the Ring of Warding function properly to block hostile summons from attacking the city. I also use it to stop undead units from attacking Shrines of Arawn, and to block the demon lords and Balors from entering non-hell terrain outside their team's territory (until the last Armegeddon event removes the Bound by Compact promotion).

It was also used to stop bAlwaysHostile units from going where they shouldn't (capturing superforts without war, or entering rival cities without war and then stopping other rival units from being able to go there), but in response to Tholal's recent post I just switched all those units to Hidden Nationality (not the HN promotion, but the inherent HN status for the unit) instead and deleted the superfluous code. That should make things a bit faster.

AI issues also slow things down, and removing bAlwaysHostile should help with that too.

Hopefully Tholal will soon address the other AI issue caused by groups containing some units that can move through peaks.
 
answering for AoE (though i'll only do this once, after that we can get to our own thread if we want to continue discussing this)

there shouldn't be anything that causes a noticeable difference in turn time between AoE Normal Version and SVN Version, so if you can repeatedly see an important difference on similar settings, please mention it in our thread, possibly with a save file so that we can take a look, thanks
 
Oh yeah I should mention something I found slightly strange when playing a game online. Now I don't have the save for this (I saved over it by mistake) and I am not really sure if it was a bug or not, but what is the chances of the AI founding Ashen Veil on turn 17 on prince difficultly. I found it to be rather fast for something that should take quite a few techs to get.
 
Top Bottom