[MOD] MagisterModmod

I wanted Engineers to be able to build Railroads (which normal workers cannot build) as well as some improvements like mines and windmills. Engineers still have that ability if they are left with UNITAI_ENGINEER, but then they cannot be automated to build anything and more importantly cannot built a Route To another tile. Using a unit without UNITAI_WORKER as a worker involves a lot of micromanagement.


According to the Lore, Eurabatres is described as "the most powerful creature of the created." Presumably this only means those beings created by The Twenty-One rather than The One, as it would be odd for him to be more powerful than the god who created him, but it is still pretty impressive. The Gold Dragon is much closer to a god than to a mortal being. Eurabatres is the original dragon, the result of a completely new idea on the part of Amathaon. All other dragons are but poor reflections of his majesty. Most of the gods made multiple dragons (Bhall had dozens if not hundreds of fire dragons serving her, but none were greater than Acheron and the lesser beasts have been vanquished and forgotten) as well as several other great beasts to serve as their weapons in the Godswar, which involved expending their own power and spreading it more broadly. (Agares did not create any dragons, beasts, or demons, but he has corrupted enough that were made to serve the good gods that his army is the strongest in every category.) Amathaon made only one, but concentrated so much power in him that he alone could face entire armies of his foes. Eurabatres is also the most intelligent of the dragons. Most of the dragons are simply weapons of mass destruction that follow whatever orders their god gives them. Amathaon so disliked fighting that he delegated all of the decisions pertaining to the war to his dragon. The Golden One was made to give orders rather than take them, and has an unparalleled strategic as well as tactical genius.

If anything, Eurabatres's power is underrepresented compared to the other dragons. I didn't want to risk making him greater than Auric Ascended though.

Nothing can compare to djinn for now. And I never got late game tech past strength of the will, you've boosted tier III units like mage too much, and AI can never use them well. Even in deity, many AI stay backward in tech (maybe they got too many cities and units), while Lanun often advanced but still got only 1 SOD. AI tends to have too many units....
 
I wanted Engineers to be able to build Railroads (which normal workers cannot build) as well as some improvements like mines and windmills. Engineers still have that ability if they are left with UNITAI_ENGINEER, but then they cannot be automated to build anything and more importantly cannot built a Route To another tile. Using a unit without UNITAI_WORKER as a worker involves a lot of micromanagement.
Is it possible to let the AI ignore that ability and just let them attach to cities or fast-build a wonder? The chance that the AI gets the technology for railroads anytime is probably very low and abusing a great engineer for normal building is a real waste. It only makes sense if the AI is waiting for a wonder to fast-build. I doubt that the AI is able to do that (intelligently), therefore it's probably better for the AI to always attach a great engineer to a city.
 
Is it possible to let the AI ignore that ability and just let them attach to cities or fast-build a wonder? The chance that the AI gets the technology for railroads anytime is probably very low and abusing a great engineer for normal building is a real waste. It only makes sense if the AI is waiting for a wonder to fast-build. I doubt that the AI is able to do that (intelligently), therefore it's probably better for the AI to always attach a great engineer to a city.[\QUOTE]

Simple solution would seem to be to make UNITAI_ENGINEER the default AI. Any great engineers created after getting the tech for railroads could have the AI changed to UNITAI_WORKER.
 
There are usually several AIs that get Machinery (and at least one Future Tech, for that matte) by the end of the game when I play. It probably has to do with me usually playing on quick, starting in the Classical Era (this is much better for the AI than Ancient Era starts), disabling all victory conditions, and frequently trading technologies (even though I usually activate No Technology Brokering so the AI doesn't get too far ahead of me).

I would want engineers to keep UNITAI_WORKER for human players, but I suppose I could change it for AI players who have not yet learned Machinery. I think it would probably still be best to let the AI use it as a worker if it does not currently have any workers too.

I just added this code to CvEventManager.py under def onUnitCreated(self, argsList):

Code:
		if not pPlayer.isHuman():
			if unit.getUnitClassType() == gc.getInfoTypeForString('UNITCLASS_ENGINEER'):
				eTeam = gc.getTeam(pPlayer.getTeam())
				if not eTeam.isHasTech(gc.getInfoTypeForString('TECH_MACHINERY')):
					if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_WORKER')) > 1:
						unit.setUnitAIType(gc.getInfoTypeForString('UNITAI_ENGINEER'))
 
I would want engineers to keep UNITAI_WORKER for human players, but I suppose I could change it for AI players who have not yet learned Machinery. I think it would probably still be best to let the AI use it as a worker if it does not currently have any workers too.
That sounds like a good compromise. :king:
 
I played through as the Illians the other day and made a funny discovery. Once Auric ascends, units with Life 3 can 'resurrect' him and create additional Auric Ascended. I think I had 9 of them rampaging by the time I was done. Most of those were by Amurtite archmages who suddenly had a change of heart.

If the Godslayer is meant to give other players a way not to be crushed outright, this is definitely a major way around it. I cleared half the map in a handful of turns.
 
@AMBusam

I discovered that problem myself last week, and fixed it over the weekend.

The easiest effective fix seemed to be editing def Sluagh in CustomFunctions.py to replace
Code:
		elif  iUnit == gc.getInfoTypeForString('UNIT_AURIC') or iUnit == gc.getInfoTypeForString('UNIT_AURIC_ASCENDED'):
			iSluagh = gc.getInfoTypeForString('UNIT_SLUAGH_AURIC')
with this
Code:
		elif iUnit == gc.getInfoTypeForString('UNIT_AURIC_ASCENDED'):
			iSluagh = gc.getInfoTypeForString('UNIT_SLUAGH_AURIC')
		elif iUnit == gc.getInfoTypeForString('UNIT_AURIC'):
			iSluagh = gc.getInfoTypeForString('UNIT_SLUAGH_AURIC')
			#This is to prevent you from being able to ressurect Auric when he ascends instead of dies
			iAscended = gc.getInfoTypeForString('UNIT_AURIC_ASCENDED')
			for pUnit in player.getUnitList():
				if pUnit.getUnitType() == iAscended:
					iSluagh = -1
					break

I just realized that their might be a similar issue with upgrading Anagantios, Dumannios, and Riuros (which Auric cannot resurrect, but those minor leaders can), so I just applied a similar fix there too.


Right now I'm trying to decide whether and how I ought to make it so that the Anagantios, Dumannios, Riuros, Baron Duin Halfmorn, and Gosea units change ownership if and when their respective leaders enter the game after the units are already present. It seems odd for units that should be the avatars of certain leaders to belong to different leaders, but the fact that the revolution component can create multiple copies of a leader complicates things.
 
the fact that the revolution component can create multiple copies of a leader complicates things.

If you want, you can change that. The relevant code is in RevCivUtils.py line ~80-110.
You could maybe just prevent leaders with an avatar unit to occur multiple times.

Besides, I was thinking about a system to name double leaders different, although I will probably not have any time for modding the next few weeks.
 
If you want, you can change that. The relevant code is in RevCivUtils.py line ~80-110.
You could maybe just prevent leaders with an avatar unit to occur multiple times.

Besides, I was thinking about a system to name double leaders different, although I will probably not have any time for modding the next few weeks.


I'd think I'd probably rather just not allow duplicates of any leader. I'm fine with a leader who has already been defeated coming back again, and in some cases it might be nice to allow the leader to come back leading a different civ (since in the scenarios the Ljosalfar Thessa and Svartalfar Rivanna can become Calabim leaders, the Ljosalfar Amelanchier and Svartalfar Volanna can become Doviello leaders, and of course Decius leaves the Bannor to join either the Calabim or Malakim), but having duplicates active at the same time seems wrong to me.

I guess it only really matters for leaders with avatars, but it seems like it would be easier to ban duplicates altogether.

Until I get it sorted out, I think I'll add a break in the custom function def getLeader(self, iLeader), so it will return the original leader of the requested type rather than the most recent duplicate. (It might also make the game run very slightly faster, so I'll probably leave it that way.) It would be rather annoying if a human Auric Ulvin player worked to get as far as Th Draw or the Ascension ritual only to be forced to become a vassal of a recently emerged imposter. The Mercurian Reinforcement spell would also favor Basium's doppelganger over the original the way it is currently written.


I glanced at the code you mentioned, but I don't think I really understand it yet. It looks to me like def getLeaderList( self, iSplitType, iReligion ) : (which the other code calls) should already eliminate duplicate leaders, yet in my current Auric Ulvin game I got one event where my people wanted to turn over control of a city to a duplicate Auric Ulvin.

I also noticed that that piece of code includes another reference to the Agnostic trait which had ignored. I didn't actually remove the trait, so it shouldn't cause any major problems, but I don't use it either. I just edited it so that it also takes into account the leader's religion weighting towards the religion in question; it should now be impossible for a leader to lead a religious rebellion in the name of a religion that he would never otherwise be able to adopt.


Is there any special event for the baron or gosea as leaders making their respective units?

No, not yet at least. The units just happen to be set as the leader's avatars. (Their traits are also restored, in case this was not the first time they created the unit and they already lost the traits after losing the unit the first time.)

I actually hadn't included even that for Duin until a couple hours ago, but it was in place for Gosea.


I just added another passive spell, with this as its prerequisite/effect
Code:
def effectDefectSelf(pCaster):
	if pCaster.isAvatarOfCivLeader():
		return False
	if pCaster.getDuration() > 0:
		return False
	iUnitClass = pCaster.getUnitClassType()
	if isWorldUnitClass(iUnitClass):

		if pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_ILLUSION')):
			return False
		if pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_REFLECTION')):
			return False
		iPlayer = pCaster.getOwner()
		pPlayer = gc.getPlayer(iPlayer)
		if gc.getCivilizationInfo(pPlayer.getCivilizationType()).getCivilizationUnits(iUnitClass) == -1:
			return False
		iLeader = -1
		if iUnitClass == gc.getInfoTypeForString('UNITCLASS_DUIN'):
			iLeader = gc.getInfoTypeForString('LEADER_DUIN')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_AURIC'):
			iLeader = gc.getInfoTypeForString('LEADER_AURIC')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_ANAGANTIOS'):
			iLeader = gc.getInfoTypeForString('LEADER_ANAGANTIOS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_DUMANNIOS'):
			iLeader = gc.getInfoTypeForString('LEADER_DUMANNIOS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_RIUROS'):
			iLeader = gc.getInfoTypeForString('LEADER_RIUROS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_BASIUM'):
			iLeader = gc.getInfoTypeForString('LEADER_BASIUM')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_GOSEA'):
			iLeader = gc.getInfoTypeForString('LEADER_GOSEA')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_HYBOREM'):
			iLeader = gc.getInfoTypeForString('LEADER_HYBOREM')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_JUDECCA'):
			iLeader = gc.getInfoTypeForString('LEADER_JUDECCA')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_LETHE'):
			iLeader = gc.getInfoTypeForString('LEADER_LETHE')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_MERESIN'):
			iLeader = gc.getInfoTypeForString('LEADER_MERESIN')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_OUZZA'):
			iLeader = gc.getInfoTypeForString('LEADER_OUZZA')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_SALLOS'):
			iLeader = gc.getInfoTypeForString('LEADER_SALLOS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_STATIUS'):
			iLeader = gc.getInfoTypeForString('LEADER_STATIUS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_EURABATRES'):
			iLeader = gc.getInfoTypeForString('LEADER_CARDITH')
		if iLeader != -1:
			if pPlayer.getLeaderType() == iLeader:
				return False
			iPlayer = cf.getLeader(iLeader)
			if iPlayer == -1:
				return False
			pPlayer = gc.getPlayer(iPlayer)
			if pPlayer.isAlive():
				pPlot = pCaster.plot()
				if pPlot.isVisibleEnemyUnit(iPlayer):
					pPlot = cf.findClearPlot(-1, pPlot)
				newUnit = pPlayer.initUnit(pCaster.getUnitType(), pPlot.getX(), pPlot.getY(), UnitAITypes.UNITAI_HERO, DirectionTypes.DIRECTION_SOUTH)
				CyInterface().addMessage(pCaster.getOwner(), True, 25, CyTranslator().getText("TXT_KEY_MESSAGE_AVATAR_DEFECT_SELF", (pCaster.getName(),)), '', InterfaceMessageTypes.MESSAGE_TYPE_INFO, pCaster.getButton(), gc.getInfoTypeForString('COLOR_RED'), pCaster.getX(), pCaster.getY(), True, True)
				newUnit.convert(pCaster)
				newUnit.setAvatarOfCivLeader(True)
				newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_REBELLIOUS'), False)
				newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LOYALTY'), True)
	return False

It seems to be working well. In my current game as Auric Ulvin, Riuros led a rebellion in one of my cities. The next time I selected the unit it instantly changed to his control, and I got the message "Riuros cannot serve as your unit while he is his own leader" just as I intended.
 
I hope you add some code to teleport him to the capital city or something. I doubt he would have a long shelf life in a loyalist stack.
 
i notice that after uploading the 12 november version, in this thread, several times you have changed something to the .py files intended to fix bugs or something like that. Do the changes you made also updated to de download from cx.com? Or should I change those .py files myself?
 
Someone mentioned Auric in the thread. Has anyone ever seen the AI build Auric Ascended? I've done it a few times, but have never seen the AI do it. (Of course it is rare for the AI Ilians to make it to the end game in my experience.)
 
I hope you add some code to teleport him to the capital city or something. I doubt he would have a long shelf life in a loyalist stack.
The problem with that is that such units would usually be changing sides before their new owners have capitals.


I suppose I add some code based on a fix I added to the White Hand Ritual's Anagantios/Dumannios/Riuros spawning code. I can make it check to see if the player has a capital and send the unit there if it does, and otherwise begin to cycle through the player's units and send the unit to the same plot as one of them.

edit: I just realized that Puppet states don't start out with capital cities either. I guess I could cycle through the city list instead, perhaps selecting the ciy closest to the unit if there is no capital. I'd probably need to do this in the White Hand Ritual's code too.

i notice that after uploading the 12 november version, in this thread, several times you have changed something to the .py files intended to fix bugs or something like that. Do the changes you made also updated to de download from cx.com? Or should I change those .py files myself?

I have not released any updates since November 12th. You can change those python files as you like, or just wait a few days for another release. There are some python improvements I haven't posted.

Someone mentioned Auric in the thread. Has anyone ever seen the AI build Auric Ascended? I've done it a few times, but have never seen the AI do it. (Of course it is rare for the AI Ilians to make it to the end game in my experience.)

Hmmm...I recall seeing it happen once, but that was in the Mulcarn Reborn scenario, it was several versions ago, and it would not have happened if I had been trying to win instead of patiently waiting for his Ascension. I'm not sure how to make the AI value ascension more highly. It tends to neglect rituals and focus on building more units while at war.


----

It seems that the code I had included in order to prevent Adventurers from creating sluaghs (which could be resurrected) when they are actually only being upgraded instead of dying just doesn't usually work.

I have changed it to something that seems to work much better, but only so long as adventurers all have different names. As such, I have added a passive spell that uses the MarnokNameGenerator to make up names for the adventurers once the unique names set in xml have run out. This solves the problem of duplicating adventurers, but in two specific cases could cause an adventurer to die without creating a sluagh (thus preventing you from ever resurrecting him). The first is when the player chooses to manually change the name of an adventurer to match that of another adventurer, and one of them dies while they are in the same stack. The other case is when an enemy kills an adventurer which its owner has never selected and which is in the same stack as at least one other adventurer which has also never been selected, and there were at least 22 adventurers born before either of those two. I thinking that this is a rare enough case that it can be ignored.

While I was at it, I made it also include the racial diversity feature for those adventurers and made it set the proper race for those named adventurers whose race is known.

I'm wondering if I should extend the code to work for other types of great people too. I happen to know the proper races of several commanders and sages. I could also add promotions other than races based on their names, like allowing Gastrius (the great sage who was the head of the school of Metamagic during the Age of Magic) to start with Metamagic II.

It should be noted however that I cannot make this code apply only when the unit is first created. Players would be able to rename units in order to get those promotions. It would also not be so easy to take the alternate language versions of some names into account.
 
Is having the priests of winter rebel thematically appropriate? The only justifications I can think of are that they no longer believe in Auric-as-Mulcarn, or that they covet power themselves.

The former just feels flimsy. I suppose I don't really know very much about the backstories of the priests (if there are any), but from the feel I get from The White Hand, I don't think it's amibtion that got them to where they are. (Would they have had that much competition?)

And if an Illian somehow grew enough of a spine to complain about how their god was treating them, I think the priests would be less likely to lead them into independence and more likely to just kill them.
 
I just changed it so that (once the White Hand ritual is complete) the code that reassigns units to their eponymous leaders as avatars also assigns Riuros, Domannios, or Anagantios to be vassals of Auric Ulvin (unless they are already his teammates). The White Hand code itself already does that if the players existed at the time of its completion, so it doesn't make a lot of sense for versions of those leaders created a couple turns later to have different loyalties.

Keep in mind that Riuros, Domannios, or Anagantios might form not by leading a rebellion, but as puppets of other leaders who stole cities from Auric. In those cases, the priests would be freeing the cities from oppression, returning them to their god, and keeping those cities to govern in his name as their reward.

Code:
def effectDefectSelf(pCaster):
	iUnitClass = pCaster.getUnitClassType()
	if isWorldUnitClass(iUnitClass):#All avatars are heros, so there is no use wasting computations on other units
		if pCaster.getDuration() > 0:
			return False
		#Sluaghs are the same unitclass as the normal hero units, but need to stay babarians at (0,0) in order to let the heroes be ressurected
		if pCaster.isBarbarian():
			if pCaster.at(0,0):
				if pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD')):
					return False
		#Duplicates from the Hall of Mirrors, the Black Mirror, and the Illusion spell do not count
		if pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_ILLUSION')) or pCaster.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DARK_REFLECTION')):
			return False
		iLeader = -1
		if iUnitClass == gc.getInfoTypeForString('UNITCLASS_DUIN'):
			iLeader = gc.getInfoTypeForString('LEADER_DUIN')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_AURIC'):
			iLeader = gc.getInfoTypeForString('LEADER_AURIC')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_ANAGANTIOS'):
			iLeader = gc.getInfoTypeForString('LEADER_ANAGANTIOS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_DUMANNIOS'):
			iLeader = gc.getInfoTypeForString('LEADER_DUMANNIOS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_RIUROS'):
			iLeader = gc.getInfoTypeForString('LEADER_RIUROS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_BASIUM'):
			iLeader = gc.getInfoTypeForString('LEADER_BASIUM')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_GOSEA'):
			iLeader = gc.getInfoTypeForString('LEADER_GOSEA')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_HYBOREM'):
			iLeader = gc.getInfoTypeForString('LEADER_HYBOREM')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_JUDECCA'):
			iLeader = gc.getInfoTypeForString('LEADER_JUDECCA')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_LETHE'):
			iLeader = gc.getInfoTypeForString('LEADER_LETHE')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_MERESIN'):
			iLeader = gc.getInfoTypeForString('LEADER_MERESIN')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_OUZZA'):
			iLeader = gc.getInfoTypeForString('LEADER_OUZZA')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_SALLOS'):
			iLeader = gc.getInfoTypeForString('LEADER_SALLOS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_STATIUS'):
			iLeader = gc.getInfoTypeForString('LEADER_STATIUS')
		elif iUnitClass == gc.getInfoTypeForString('UNITCLASS_EURABATRES'):
			iLeader = gc.getInfoTypeForString('LEADER_CARDITH')
		if iLeader != -1:
			iPlayer = pCaster.getOwner()
			pPlayer = gc.getPlayer(iPlayer)
			if pPlayer.getLeaderType() == iLeader:
				return False
			elif pCaster.isAvatarOfCivLeader():
				pCaster.setAvatarOfCivLeader(False)
			iPlayer = cf.getLeader(iLeader)
			if iPlayer == -1:
				return False
			pPlayer = gc.getPlayer(iPlayer)
			if pPlayer.isAlive():
				if gc.getGame().getProjectCreatedCount(gc.getInfoTypeForString('PROJECT_THE_WHITE_HAND')) > 0:
					if iLeader == gc.getInfoTypeForString('LEADER_ANAGANTIOS') or iLeader == gc.getInfoTypeForString('LEADER_DUMANNIOS') or iLeader == gc.getInfoTypeForString('LEADER_RIUROS'):
						iAuricPlayer = cf.getLeader(gc.getInfoTypeForString('LEADER_AURIC'))
						if iAuricPlayer != -1:
							pAuricPlayer = gc.getPlayer(iAuricPlayer)
							iAuricTeam = pAuricPlayer.getTeam()
							iTeam = pPlayer.getTeam()
							if iAuricTeam != iTeam:
								eAuricTeam = gc.getTeam(iAuricTeam)
								eAuricTeam.assignVassal(iTeam, True)

				pPlot = pCaster.plot()
				py = PyPlayer(iPlayer)
				if pPlayer.getNumCities() > 0:
					pCapital = pPlayer.getCapitalCity()
					if pCapital.isNone():
						pCapital = CyMap().findCity(pCaster.getX(), pCaster.getY(), iPlayer, TeamTypes.NO_TEAM, False, False, TeamTypes.NO_TEAM, DirectionTypes.NO_DIRECTION,pPlayer.getCity(-1))
						if pCapital.isNone():
							for pyCity in py.getCityList():
								pCapital = pyCity.GetCy()
								break
					pPlot = pCapital.plot()
				else:
					for pUnit in py.getUnitList():
						pPlot = pUnit.plot()
						break
				if pPlot.isVisibleEnemyUnit(iPlayer):
					pPlot = cf.findClearPlot(-1, pPlot)


				newUnit = pPlayer.initUnit(pCaster.getUnitType(), pPlot.getX(), pPlot.getY(), UnitAITypes.UNITAI_HERO, DirectionTypes.DIRECTION_SOUTH)
				CyInterface().addMessage(pCaster.getOwner(), True, 25, CyTranslator().getText("TXT_KEY_MESSAGE_AVATAR_DEFECT_SELF", (pCaster.getName(),)), '', InterfaceMessageTypes.MESSAGE_TYPE_INFO, pCaster.getButton(), gc.getInfoTypeForString('COLOR_RED'), pCaster.getX(), pCaster.getY(), True, True)
				newUnit.convert(pCaster)
				newUnit.setAvatarOfCivLeader(True)
				newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_REBELLIOUS'), False)
				newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LOYALTY'), True)
	return False
 
Keep in mind that Riuros, Domannios, or Anagantios might form not by leading a rebellion, but as puppets of other leaders who stole cities from Auric. In those cases, the priests would be freeing the cities from oppression, returning them to their god, and keeping those cities to govern in his name as their reward.

What about the times when they do form by leading a rebellion?
 
On another topic, does the Mother Lode spell function? I've tried casting it on three occasions, and it never does anything.

Thanks.
 
It makes roads on top of mountains now. It also gives some base chance for a mountain mine to suddenly have mineral deposits.

If you are the Khazad you pretty much have to have the Runes religion to get soldiers of Kilomorph to build mountain mines to get any use out of the world spell.

The Luchiurp Mud Golems can build roads on mountains, not sure if they can build mines. But most often the Luchiurp take the Runes religion so they have no trouble building the mines.

I'm not sure if they do the Luchiurp any good without the world spell for the Khazad though.

I remember playing with Soldiers of Kilomorph building mines. They show on the map as having 3 hammers each in production. I didn't see any hammers added to a city when a mine was built however.

I'm not sure if I tested with Luchiurp or the Bannor at this point though.
 
@A Moon:
Well, I guess you could argue that the priests manged to put down the rebellion and were rewarded with a governorship or that the rebels considered it marginally more acceptable to be ruled by indirectly by a lieutenant priest than directly by a self proclaimed god.

At the moment though, following suggestions by lfgr seems to have broken the revolution code somewhat. Rather than getting one of his lieutenants, the rebels seem to always either form Tethira of the Bannor or result in a python exception. I mentioned it in the More Naval AI thread, and am waiting to see if he will really fix the code this time or if I should revert to how it used to work even if that means the occasional duplicate leader.

@AMBusam:
Mother Lode worked fine the last time I tested it. Note that it works differently than in base FfH2 though. As you can plainly see in my the pedia, it is supposed to add extra commerce yields to peaks, randomly find various resources on those tiles, and connect them with roads, mines, and quarries.

Edit: I thought it was working, but I just tested again and it seemed to do nothing. I'll have to look into this.

Edit2: Somehow if pPlot.getBonusType(-1) == -1 and pPlot.getImprovementType() == -1: got changed to if pPlot.getBonusType(-1) == -1 and pPlot.getImprovementType() !=-1 :

This means that only improved peaks (which would typically mean just the Guardian of the Pristinus Pass, or those mines built by Soldiers of Kilmorph) have a chance of finding any resources or having them connected with roads, mines, or quarries.

I just corrected it.

The peaks were probably still getting extra commerce, but after seeing the complete lack of mines and resources I forgot to look at the mousever for the tiles to check for that. Anyway, it works fine if you change that != to a ==


@sunbeam:
For some reason, the game engine works in such a way that any unit that can build a route (road or railroad) and move through peaks can build said route through peaks. However, building improvements on peaks is impossible without resorting to python. Mines can only be built on peaks through Mother Lode or the Soldier of Kilmorph's Build Mountain Mine spell (which works the same regardless of civilization type).

I just realized that I could probably change the so that units that are able to build mines are able to build them on peaks when they have the Runes religion and/or when their owner has the Runes state religion. (I'm thinking I may make Great Engineers able to move through and build routes in peaks too.) Would that be preferable?
 
Back
Top Bottom