Magister Modmod

I got rid of the barbarian dummy unit representing Brigit. Instead of capturing a unit (which can be difficult if the unit entering the tile belongs to a civ that is at peace with the barbarians, and could eliminate Brigit if the unit has hidden nationality) I made freeing her simply a matter of casting a spell while on the tile. The spell can only be cast by a level 14+ unit on the unique feature's tile, and requires that you have the Fanaticism technology and not be evil. Freeing Brigit makes you Good.

The fire mana is the only indication of the archangel of fire. If it happens to be by a river you can use it, and if it happens to be within cultural borders during an advanced start game you can build a road to it then. (Also note that I made it possible to purchase mana nodes in advanced start games.)


Freeing Odio is an addition I made a long time ago. It can be cast by any level 11+ unit on the tile of Odio's Prison once you have the Rage technology, and are not Good. Freeing Odio makes you evil.

Just as Brigit was the Archangel of Fire, Odio was the Archangel of Body. Thus, his prison is a source of body mana. (I believe that my original modmod was the first to make this change, but many others soon adopted it.) I currently have it set up so that freeing him destroys both the improvement and the mana, although for some reason freeing Brigit leaves the mana intact.

(Brigit was imprisoned by Bhall at the end of the Age of Magic when she refused to follow her goddess's decision that they become Evil. Odio was imprisoned at the end of the Age of Dragons by Kilmorph, after he had disobeyed Aeron's command to honor the truce that had been made to facilitate the negotiation of The Compact. As he was leading an Army of Ira against the worshipers of Kilmorph, she demanded that Aeron remove all protection from him and allow her to do with him whatever she wished.)

I could have sworn that I'd included a Runes of Kilmorph High Priest spell which would imprison Odio again, but I see no indication of that in the code.



Most of the Illian rituals are only possible when you own Auric, whether in his mortal or Ascended form. The Illians depend heavily on their God-king, and are lost without him. Fortunately, Life III now provides the option to bring him back from the dead, so long as he did not fall to The Netherblade. (Even then it is possible, but you have to destroy that otherworldly weapon first.)
 
and how exactly do you destroy the Netherblade? (or any piece of equipment actually)
 
I added a spell to do so. It requires Dimensional II and Spirit II. A similar spell can destroy the similar piece of equipment used by Basium. I meant for the spell to only show up when some unit in the stack had the equipment promotion, but having a python result without a python prereq means that the spells show up for any Dimensional II/Spirit II units.
 
Gotcha. What special abilities/powers does Basium's hammer have?
 
Units killed by the Malleus Vindex will not be retuning as Manes until after the war hammer is destroyed. (Technically it is units killednear it; I think I'd have to make SDK changes for it to allow me to keep track of what unit killed a unit as I wanted to, so the equipment actually passively gives a temporary promotion to all units in adjacent tiles.) You can use it to mow down armies of evil units without fear that they will be coming back to serve the Infernals. If it is destroyed though the demons it killed will return just as the evil mortals do.


It also provides 2 holy combat and a 70% bonus vs Demons.


I meant to make it (and the Netherblade) negate the immortality of its victims, but I forgot to add that code. Considering that all of the demon lords are now inherently immortal, this could be considered significant.
 
Hmm, was Malleus Vindex inspired by WH 40k?

The 70% bonus seems quite significant ... how does Basium vs Hyborem 1 on 1 work now?
 
Not really.

It was mostly inspired by the pedia entry where he uses it to kill a Balor and the Kuriotates mages who summoned one in his tent as a way to demonstrate that they'd learned how to use evil magic to fight evil. That, and my Kael claiming that while demons can merely injure angels enough that it can take years for them to regain the strength to enter Erebus again Basium makes a point to imprison his enemies and intends to keep them locked away until the day The One returns to destroy them forever.


(A couple years ago I started writing a complicated backstory for the weapon, but eventually decided that I was not comfortable departing that much from established canon. In this tale, the weapon was originally created by Junil for use by one of his most powerful champions, Talio, the Angel of Retribution. Talio and Basium were the closest of allies and best of friends during most of the Godswar, and Talio frequently lent use of the Malleus Vindex ("Avenging Hammer") to Basium. Basium believes that Talio was ambushed by demons when not armed with his artifact and slain, and his passion for slaying demons is driven largely for a desire to avenge this loss. Complications may arise when he learns that Talio was not slain, but rather had been a morally ambiguous figure who had been living a double life, fighting with Basium to even the odds when Evil was prevailing and turning around to fight beside Odio when it was time to make Good pay for the harm it had done to evil. While Basium has been fighting to honor Talio's name, Talio has been fighting in honor of Odio, and has risen to the position of Aeron's new de facto archangel, a fact which could shake Basium's resolve and perhaps predicate his fall. The weapon is still closely tied to Talio and has been excreting an evil influence on Basium, tricking him into playing a part a crucial role to the evil gods' plans to destroy the world.)



I haven't tested it specifically, but I'd suspect that Basium would kill be able to send Hyborem back to his capital pretty easily. Hyborem is still pretty strong though, and immortal. Basium must rely on mortal civs to summon him back to Erebus when he passes away.
 
I take it you are still playing as the Grigori, and that this hunter is an Adventurer, and that is has quite a few levels by now? If so, this is to be expected, but has nothing to do with the portal.
Adventurers have a knack for finding trouble, and habit of going off on their own whenever they are in unowned lands to exploring things that no one else would think need exploring. In my modmod the Adventurer promotion has a PyPerturn effect that causes this, with the chance of doing so being based on the unit's level.
Spoiler :

This is not actually a new addition, but there was a typo preventing it from working back in the March version. (It was still hiding python exceptions when I tested it then, so I had not noticed that the parameter I was giving the function was pCaster but only caster was used i the actual code.) I don't think I've ever actually seen in work in any of my test games, but I haven't played as the Grogori much or let my adventurers leave home much when I did. Glad to hear that it is working! Although, if it is happening as often as you say, I should probably reduce the chances somewhat, or maybe just remove the part of the code that makes higher level units get better results.

If you want to avoid the risk of these random explorations, just move the unit back into territory that someone owns.
Spoiler :

That was exactly the case... My hunter was an adventurer too and he was exploring some unclaimed territory. He was past level 10 too.

Nice addition in fact... it was just so suprising that i thought it was an other bug ;).

Perhaps was I "lucky" for the frequency, but it happenned to this hunter really often.
Not all the results were good (get mutated, diseased and enervated at some times)

Is the barbarian territoy considered as owned by someone?
 
I believe barbarian territory does count as owned. Unowned cannot be within any cultural borders at all. There is generally not a lot of exploring going on late in the game, as most of the land then is taken. (I suppose you could put an adventurer on a ship and go fight sea monsters though.) Having the chance of exploring tied to the unit's level helps make it more likely to happen when a late game adventurer does happen to be on one of those few wilderness tiles.


If your unit was level 10, then it would have a 10% chance of going exploring every turn in the wilderness. It would also have almost no chance of getting a Big Bad result from the explorations, although Small Bad results could still happen. Mutation, enervation, and disease are small bad thing, whereas the emergence of an army of Ogres and Azers would be big bad. When I tested the system yesterday, the worst result I got was Comillo becoming demon possessed and crazed. He then died making a stupid attack, but I managed to bring him back from the dead before too long, and then chose to promote him to an Archmage instead of a Ranger. Then he died again, and was again resurrected to be a Beastmaster.


I'm thinking that maybe I should have it trigger a message explaining that the Adventurer has had a random encounter or something. I believe a brief explanation of the ability is mentioned in the promotions tool tips though.
 
It is also recommended that you switch the order of lines 6587 and 6588 in CvSpellinterface.py before playing games with the Illians, unless you want them to get an enormous stack of Auric Ulvins instead of only one.

do I still have to do it and what exactly?
 
I think there should be an installation guide as to all commas that need to be removed, and all lines that need to be switched ;)
 
Decided to try the infamous MagisterModMod for the first time :)
Playing as the Infernals I found a few python errors:

Happens as soon as the game starts. Seems to occur on any map.
Spoiler :
attachment.php


Happens anytime I kill a unit.
Spoiler :
attachment.php


Otherwise seems good so far :goodjob:
Attached a save game just in case.

Edit: Is it intended for Hyborem/Balor/Demons etc to be able to enter Tundra and Ice? Currently they can.
 

Attachments

  • Game Start Error.jpg
    Game Start Error.jpg
    100.5 KB · Views: 999
  • Unit Killed Error.jpg
    Unit Killed Error.jpg
    109.3 KB · Views: 345
  • Bugs.CivBeyondSwordSave
    Bugs.CivBeyondSwordSave
    71.2 KB · Views: 80
Thanks.

I'm not sure why the HidePythonErrors option keeps turning itself on in my version, and hiding such things from me. These particular python errors don't actually cause a problem though, apart from perhaps annoying you.


The first of those is intended to make sure that unique features always have the proper resources on their tile. For some reason, being placed on Floodplains tends to prevent that. (For some of them I made their PythonOnMove calls add the proper bonus, but it seems a waste to add such calls to all improvements that create bonuses.) I'm not sure if this code will work for this purpose or not now that I've fixed in on my version. I already had a similar code in place for when an improvement is added. I was thinking that Thaw option might be removing the bonuses, but that code looks like it leaves tiles with improvements alone. I'm not sure the code I added there even when corrected actually do anything useful. The error there shouldn't actually cause a problem.



I was confused by the second exception at first, as there was no iUnit in that line, but then I realized that I've added a couple lines since then. The problem is that I define iUnit within the if statements, but this si not really a problem as having iUnit undefined would count the same as it being -1 and prevent any code using the variable from being called anyway. I went ahead and added iUnit = -1 at the start of the Mokkas Cauldron function anyway in my version though, so that in my next minor release this error won't be reported.



In some past versions I included hellish versions of Tundra and Ice, as well as Oceans and Seas, but have not done so yet here. I may add them back and prevent the demon lords from entering any non-hellish tiles.





By the way, what would you think of the Amurite Worldspell, Arcane Lacuna, gaining the additional effect of revealing and labeling every source of mana in the world?
 
Thanks.
I was confused by the second exception at first, as there was no iUnit in that line, but then I realized that I've added a couple lines since then. The problem is that I define iUnit within the if statements, but this si not really a problem as having iUnit undefined would count the same as it being -1 and prevent any code using the variable from being called anyway. I went ahead and added iUnit = -1 at the start of the Mokkas Cauldron function anyway in my version though, so that in my next minor release this error won't be reported.

In some past versions I included hellish versions of Tundra and Ice, as well as Oceans and Seas, but have not done so yet here. I may add them back and prevent the demon lords from entering any non-hellish tiles.

By the way, what would you think of the Amurite Worldspell, Arcane Lacuna, gaining the additional effect of revealing and labeling every source of mana in the world?

I solved that second problem by adding a iUnit = -1 near the start of onUnitKilled just before the "if not unit.isImmortal():" line.

Adding the hellish Tundra, Ice and Oceans would be excellent and restricting the Demon lords to it would be perfect. Then maybe you could have Hyborem in flight mode fly over hellish ocean to get to other continents that have adjacent hell terrain. Nasty :eek:

Also, I think the addition to the Amurite world spell would definitely be flavoursome, so long as you restricted the sight to only the tile that the mana is on, and perhaps prevent meeting new civs this way. I think you can set visibility to 0? and it will only show the tile.

Anyway, alls going well so far.

Edit: One thing I noticed, is it possible for fallow civs workers to have the "create farm" button removed so that automated workers won't create farms. It really gives them no bonus. They should be building only cottages and workshops on flatland.
 
The way I currently have it set up on my computer now is based on how the Elohim ability to see all Unique Features works. (In my version whoever owns the Celestial Compass gets this effect too; this was also made Auric's favorite wonder, because it is extremely important for Auric to be able to find Letum Frigus and the bones of Drifa.) It reveals (and in my version also labels) the tiles, but does not give visibility. You can see what bonus, feature, improvement, territory, and city may have been there at the point when it was revealed, but you won't know if or when things change unless you get close enough to see the tiles.


Spoiler :
Code:
	def showUniqueImprovements(self, iPlayer):
		pPlayer = gc.getPlayer(iPlayer)
		iTeam = pPlayer.getTeam()
		for i in range (CyMap().numPlots()):
			pPlot = CyMap().plotByIndex(i)
			if pPlot.getImprovementType() != -1:
				iImprovement = gc.getImprovementInfo(pPlot.getImprovementType())
				if iImprovement.isUnique():
					pPlot.setRevealed(iTeam, True, False, TeamTypes.NO_TEAM)
					[B]CyEngine().addSign(pPlot,iPlayer, CvUtil.convertToStr(iImprovement.getDescription()))[/B]



	def showMana(self, iPlayer):
		pPlayer = gc.getPlayer(iPlayer)
		iTeam = pPlayer.getTeam()
		for i in range (CyMap().numPlots()):
			pPlot = CyMap().plotByIndex(i)
			if pPlot.getBonusType(-1) != -1:
				iBonus = gc.getBonusInfo(pPlot.getBonusType(-1))
				if iBonus.getBonusClassType() == gc.getInfoTypeForString('BONUSCLASS_RAWMANA') or iBonus.getBonusClassType() == gc.getInfoTypeForString('BONUSCLASS_MANA'):
					pPlot.setRevealed(iTeam, True, False, TeamTypes.NO_TEAM)
					CyEngine().addSign(pPlot,iPlayer, CvUtil.convertToStr(iBonus.getDescription()))
			elif pPlot.isCity():
				pCity = pPlot.getPlotCity()
				for j in range(gc.getNumBuildingInfos()):
					if pCity.getNumRealBuilding(j) > 0:
						iBuild = gc.getBuildingInfo(j)
						if iBuild.getFreeBonus() != -1:
							iBonus = gc.getBonusInfo(iBuild.getFreeBonus())
							if iBonus.getBonusClassType() == gc.getInfoTypeForString('BONUSCLASS_RAWMANA') or iBonus.getBonusClassType() == gc.getInfoTypeForString('BONUSCLASS_MANA'):
								pPlot.setRevealed(iTeam, True, False, TeamTypes.NO_TEAM)
								CyEngine().addSign(pPlot,iPlayer, CvUtil.convertToStr(iBonus.getDescription()))

Right now I'm trying to decide what do do about plots that provide multiple types of mana, for example the plot holding a city that contains the Aquae Sucellus, Bazaar of Mammon, Shrine of Sirona, Library of Oghma, Guild of Endeavors, and a Palace. Currently, it will label only the mana found as the first FreeBonus of the last building it checks. I'm wondering if maybe in such cases I should not label the type of mana, but rather count the number of mana sources found on the tile. I'm also wondering if I should make it ignore national wonders, including Palaces, instead only showing sources of mana that can be captured.
 
Right now I'm trying to decide what do do about plots that provide multiple types of mana, for example the plot holding a city that contains the Aquae Sucellus, Bazaar of Mammon, Shrine of Sirona, Library of Oghma, Guild of Endeavors, and a Palace. Currently, it will label only the mana found as the first FreeBonus of the last building it checks. I'm wondering if maybe in such cases I should not label the type of mana, but rather count the number of mana sources found on the tile. I'm also wondering if I should make it ignore national wonders, including Palaces, instead only showing sources of mana that can be captured.

I think showing only capturable mana would be useful. Also listing number of mana sources for plots with more than one would be more useful than listing the first one only. Perhaps list the first mana, and then state number of others: eg "Life Mana + 2 others".

Anyhow, another python error, this time with the Evangelize spell, easily solved:
Spoiler :
attachment.php

Just change both pBestUnit to pUnit on line 2062. Civilopedia could use some strategy text for this spell. Quite useful actually. Converts units to your religion.

Edit: I have noticed a bit of an exploit playing as the Infernals. Hyborem can summon up to 2 Balors (they last 2 turns). Each Balor can summon up to 2 Imps (Also last 2 turns). These can then be suicided against say Acheron to get a consistent supply of manes. In fact probably any summons could be "Mane farmed". So maybe summons should get a "Summoned Unit" promotion, and any unit that dies with this promotion won't come back as a mane, angel, via Soul Forge etc. Be sure to make sure Mimics can't steal this promotion ;)
 

Attachments

  • Evangelize Bug.jpg
    Evangelize Bug.jpg
    121.5 KB · Views: 328
Me again :crazyeye:

Got this error:
Spoiler :
Traceback (most recent call last):

File "CvSpellInterface", line 32, in effect

File "<string>", line 0, in ?

File "CvSpellInterface", line 5546, in perTurnTeachMagic

NameError: global name 'pCaster' is not defined
ERR: Python function effect failed, module CvSpellInterface
basically Govannon teaching. Looking at the code :
Spoiler :
Code:
	if len(lList) > 0:
		iAdept = gc.getInfoTypeForString('UNITCOMBAT_ADEPT')
		iAnimal = gc.getInfoTypeForString('UNITCOMBAT_ANIMAL')
		iBeast = gc.getInfoTypeForString('UNITCOMBAT_BEAST')
		pPlot = caster.plot()
		iPlayer = caster.getOwner()
		iTaught = 0
		iProm = lList[CyGame().getSorenRandNum(len(lList), "Govannon")]
		for i in range(pPlot.getNumUnits()):
			pUnit = pPlot.getUnit(i)
			if pUnit.getOwner() == iPlayer:
				if pUnit.isAlive():
					if pUnit.getUnitCombatType() != iAnimal and pUnit.getUnitCombatType() != iBeast:
						if iProm == iMagLib or pUnit.isHasPromotion(iMagLib) or pUnit.getUnitCombatType() != iAdept:
							if not pUnit.isHasPromotion(iProm):
								pUnit.setHasPromotion(iProm, True)
								iTaught += 1
								[COLOR="Red"]CyInterface().addMessage(caster.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_MAGIC_TAUGHT", ()),'',1,gc.getPromotionInfo(iProm).getButton(),ColorTypes(8),pCaster.getX(),pCaster.getY(),True,True)[/COLOR]
I'd say this is simply copy pasta errors. All the "pCaster" should be "caster" in the CvInterface().addMessage lines. There are several occurences further down in this function as well.

Edit: And another :
Spoiler :
Traceback (most recent call last):
File "CvSpellInterface", line 32, in effect
File "<string>", line 0, in ?
File "CvSpellInterface", line 5573, in perTurnTeachMagic
IndexError
:
list index out of range

ERR: Python function effect failed, module CvSpellInterface

Spoiler :
Code:
		if iTaught == 0:
			[COLOR="red"]iProm = lList2[CyGame().getSorenRandNum(len(lList), "Govannon")][/COLOR]
			for i in range(pPlot.getNumUnits()):
				pUnit = pPlot.getUnit(i)
				if pUnit.getOwner() == iPlayer:
					if pUnit.isAlive():
						if pUnit.getUnitCombatType() != iAnimal and pUnit.getUnitCombatType() != iBeast:
							if pUnit.isHasPromotion(iMagLib):
								if not pUnit.isHasPromotion(iProm):
									pUnit.setHasPromotion(iProm, True)
									iTaught += 1
									CyInterface().addMessage(caster.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_MAGIC_TAUGHT", ()),'',1,gc.getPromotionInfo(iProm).getButton(),ColorTypes(8),caster.getX(),caster.getY(),True,True)
									break
		if iTaught == 0:
			[COLOR="red"]iProm = lList2[CyGame().getSorenRandNum(len(lList), "Govannon")][/COLOR]
			for i in range(pPlot.getNumUnits()):
				pUnit = pPlot.getUnit(i)
				if pUnit.getOwner() == iPlayer:
					if pUnit.isAlive():
						if pUnit.getUnitCombatType() != iAnimal and pUnit.getUnitCombatType() != iBeast:
							if pUnit.isHasPromotion(iMagLib):
								if not pUnit.isHasPromotion(iProm):
									pUnit.setHasPromotion(iProm, True)
									iTaught += 1
									CyInterface().addMessage(caster.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_MAGIC_TAUGHT", ()),'',1,gc.getPromotionInfo(iProm).getButton(),ColorTypes(8),caster.getX(),caster.getY(),True,True)
									break
both lines should be CyGame().getSorenRandNum(len(lList2), "Govannon")
Edit2: This doesn't solve the problem. I still get the error. So maybe the lines need to be wrapped in an if len(lList2) > 0: or something?
 
You've found a lot of little errors which I've now fixed. Thank you very much.


The summoning for Manes/Angels/Soul forge production exploit you mentioned is non-existent though, as those only work for living units and all summoned units in the game have a race that makes them not be considered living units (Demon, Angel, Elemental, Illusion, or Puppet). The only exploit I may have introduced here is that demonic summons can become manes if they to or near Basium's Malleus Vindex. The way I was forced to code this though prevents you from just sacrificing your summons in battle against Basium though, as the promotion that effects their fate is only given out then the wielder of Malleus Vindex is the unit selected. You'd have to make all you summons near said unit and hope it attacks.


I just realized that a change in the code which I made to allow the resurrection of Mardero and Saverous will also allow heroes to be resurrected from the illusionary copies made by the Balseraph Hall of Mirrors, while the real hero is still alive. I better change that.
 
You've found a lot of little errors which I've now fixed. Thank you very much.

No worries :)

As for the "Mane farming", try Infernals. Get Hyborem near Acheron. Summon Balor. Balor summons Imp. Use Imp to attack Acheron. Imp dies and quite often comes back as a mane. Not always, but enough to be called "Mane farming". I literally could sit there all day with Hyborem summoning Balors, which summon suicide Imps, until all my cities have population 50 or something ridiculous.

Maybe this is only a problem for the Infernals?

Anyhow, I think an endless supply of manes is a bit OP for the Infernals :eek:

Edit: I have attached a save game to illustrate the problem. Near Acheron is 4 Imps, all summoned by the Balors that Hyborem summoned. Simply attack Acheron with them. Notice that you now have gotten "free" manes in your cities from your own Imp summons.

It wouldn't be so bad if it was restricted to your own created units. But I could still create Imps normally in my cities, send them in a huge stream towards Acheron to die, and then they come back as manes. Thus creating the Imps faster and faster as my cities grow to enormous population.

Keep repeating until every city has 50 plus population and now you have an unstoppable advantage over everyone else :scan:
 

Attachments

Back
Top Bottom