[MOD] MagisterModmod

It is basically the codes you typed above.
Screw Windows 7 then :D

When I was installing and patching, got some errors in overwriting some files even though I install as administrator.
In the end I copied the whole civ iv folder from win xp over and it worked fine, so I can't be bothered reinstalling.
Autoplay in the WB also gave me problems when it worked fine in old pc, but since nobody said anything, I assume it is only on my side as well. :D
 
It does not seem like the operating system should matter so much, especially since I'm using Windows 7 (64 bit) too.

I wonder if there are other players of this modmod who would have such problems, on whose account I should refrain from that style of coding.

Your autoplay code never worked for me, as it was missing the parameter referring to the ID of the player whose turns should be autoplayed. I just assumed that FfH2 or MNAI added a parameter that BtS did not have.
 
Your autoplay code never worked for me, as it was missing the parameter referring to the ID of the player whose turns should be autoplayed. I just assumed that FfH2 or MNAI added a parameter that BtS did not have.

Its because Tholal added in the AutoPlay from Revolution.

Just add in the active player. So, for example instead of CyGame().getAIAutoPlay(), write: CyGame().getAIAutoPlay(CyGame().getActivePlayer())
 
I was not completely certain what modcomp it came from, but I did see that Tholal wrote it that way elsewhere so I made that change a long time ago.
 
While playing Khazads, I founded Empy and 4 or 5 civs turned overcounsil. I switched too at this same turn and, despite that, I was neither eligible (while I had immediatley built Dies Diei), nor even elector at the elections. According to the official result, I had "abstained"... Weird, IMHO.

BTW, why do the AI always propose stupid resolutions (like outlaw gulagarm or desert rose), before the useful ones (open markets, radiant, etc).
 
Playing as the Kuriotates, I noticed that, while Dryads start with Creation I and can get the Creation II and Creation III promotions, they cannot cast any Creation spells, I think because they do not start with Channeling I/II/III. I doubt this was intended.

On the Overcouncil, I have recently noticed that the AI will sometimes call for required civics even before those civics are available (immediately on the founding of the Overcouncil). Being forced into Republic or Liberty early on or abandoning the Overcouncil can be crippling, and it tends to cripple the AIs in the Overcouncil as well.

In general, I think the ability of the Overcouncil to force certain civics should be removed. From a flavor perspective, most of the Good civilizations would not prefer something resembling a Republic anyway, and it is highly out of line with "period" society. Only the Luchuirp seem to have anything approaching a central democratic society. The Ljosalfar are a rigid aristocracy, the Bannor are a rigid theocracy, the Kuriotates are clearly designed with God King in mind, though he may prefer democracy at a local level, the Elohim are a decentralized system of local leaders, and the Malakim historically were led by petty kings (e.g., Kane) and now have a fanatical devotion to a single leader. Similar for Liberty, though quite exactly what "Liberty" means in the flavor is not well-established.

I would eliminate the Overcouncil civics resolutions and replace them with something a bit more flavorful: I would (a) permit "Good" civilizations to use Slavery normally but (b) allow the Overcouncil to vote to outlaw Slavery, banning all Overcouncil members from using Slavery. The "Good" civilizations are not supposed to be goody-two-shoes, and slavery (or something not called slavery but slavery in all but name) from a historical perspective was a reality in nearly all urbanized societies. It would be odd if slavery were not permitted in a wide range of societies on Erebus simply because they align with "Good" gods when being "Good" does not clearly equate to goodness from a moral perspective. The vague real-world analogues of those Good civilizations with real-world analogues all had slavery as well. On the other hand, outlawing slavery does seem like something the Overcouncil might decide to do, far more likely than forcing each of their member states' leaders to submit to elections or free the press.
 
None of the Channeling promotions are required for any spells except Create Puppet, Graft Flesh, and Lichdom.

The Creation II & III spells are limited to being cast by Living units. I believe I did this because there was some issue caused by allowing the Infernals to create buildings that add food to their fallow cities. Perhaps I should have just added some python to block it being cast in fallow trait cities.

I forgot that Dryads were given the Elemental racial promotion, which makes them not count as living units.

Perhaps I should just give the spells a prereq that makes then not work in Fallow trait cities.


The game mechanics don't really give python/xml modders a lot of control over how resolutions work. I cannot make the AI players favor some resolutions more than others, or intelligent decide how to vote. I cannot trigger a vote or set a resolution as having passed, which makes play testing much harder. I cannot add any sort of python prereq to the resolutions. I can add a bit of python that is called once the resolution passes though.

After thinking it over a bit, I think I will follow Hightower's suggestion and have an Outlaw Slavery resolution instead of Force Republic/Liberty/Scholarship.

The Outlaw slavery resolution's passage would delete all of the slave units owned by its members as soon as it passes, and forbid
----
Since so many players have complained about it being too imbalanced to grant the founder of a religion a free priest, I'm thinking of changing it so that they only get an extra normal disciple and whoever researches a religion-founding technology after already having the Priesthood technologywill get a priest instead of a mere disciple. I may also make it so that researching Priesthood will grant a free priest of your current state religion.


I'm just implemented and am about to test a feature that will cause your state religion to provide a free source of its most closely associated mana type, while also reducing your supply of the opposing mana type by 2.

For example, having The Order as your state religion would grant a free source of Law mana while reducing your supply of Chaos Mana by 2, thus requiring 3 sources of chaos mana for you to even count as having the single source requires for purchasing a chaos promotion of building The Tower of Necromancy or Tower of Mastery.

In older versions I made state religions adjust the amount of mana you were counted as having for the purpose of getting free promotions, but I got rid of that a couple months. This new way actually changes the mana supply, thus allowing or preventing the purchase of spell sphere promotions too.

In order to avoid some issues whereby the effect could be applied too many times, I have had to use dummy buildings instead of adjusting the bonus supplies in python. For some reason, buildings can provide -2 sources of a resource but trying to make them provide -1 instead makes them grant +3.


It appears that def onCityDoTurn(self, argsList): actually runs when a city updates its production, whereas all of the code that Kael and I have placed there in the past were for things that should really run each turn. As such, I decided to move all of that into a new function in custom functions, which I call in Begin Player Turn and which will loop through all of a player's cities at the start of the turn. Doing it this way also let me make things more efficient b defining variables once for all cities instead of once for each city. I have yet to test to see how it works out though.
 
I found a bug on the lair exploration (easily reproducible with the WB). When the lair is entirely surrounded by either friendly units or impassible terrain weird thing happens.

- foes supposed to appear by the lair (spectre, etc...) do not. Actually it makes sense, but this allows a potential abuse in the lair exploration.

- when a powerful ennemy appears to defend the lair, the unit that was exploring the lair is just destroyed, while it should be transported on a tile with other friendly units.


----

I'm just implemented and am about to test a feature that will cause your state religion to provide a free source of its most closely associated mana type, while also reducing your supply of the opposing mana type by 2.

It makes sense but can lead to non desirable results for the towers. For instance, if the khazad follow RoK, they will get extra earth and lose air mana. They are a terrian civ following a terrian religion and it is coherent that it is more difficult for their adepts to get air spells. What is less coherent is that it will make getting the tower of the elements (that is very useful for their mucomyds) much more difficult as they need to get 3 air mana.

There is a similar problem for the ice/fire mana for the white hand.

For the order/overlords, chaos and law belong to different spell spheres, so it is not a problem. Probably even a good thing to make the tower a necromancy very difficult to get for an order follower. Making the Tower of divination and its free tech very difficult for an OO follower is a bit harsh, though

No problem for Empy and I think for FoL and AV.

Not sure it is possible to separate mana for spells and for the towers, but it would be better like that.
 
In the case of small bad things lke spectres, the units are generated the same way as they would be from finding a tribal village. I don't know that there is much I can do about thay.

I just set the big bad code to use pUnit.jumpToNearestValidPlot(). That could still kill the unit, but only if the game really cannot find anywhere to put the unit. I'm not really sure why I did not use this before, but there could be a good reason.

----

Some of what you seem to assume as opposite spheres are wrong.

The sphere opposite of Ice is not Fire, but Nature. Fire is the opposite of Water. Bhall was the enemy of Mulcarn merely because Sucellus and Danalin both chose to stay neutral, which meant they were really on the same side as the good guys but focused on protecting their own domains rather than fighting for the fate of the world.

The state religion mana changes I implemented are:

The Order: + 1 Law, -2 Chaos
The Empyrean: +1 Sun, -2 Shadow
The Runes of Kilmorph: +1 Earth, -2 Air
The Fellowship of the Leaves: +1 Nature, -2 Ice
The Octopus Overlords: +1 Water, -2 Fire
The Council of Esus: +1 Shadow, -2 Sun
The Ashen Veil: +1 Entropy, -2 Creation
The White Hand: -1 Ice, -2 Nature


I'm not too concerned with the Khazad having a tougher time getting the Tower of Elements. They are very much not a magic oriented civ. The cannot normally build units that summon elementals anyway. Also, Air mana is available through multiple unique features.

Those following The Octopus Overlords would have just as much trouble getting the Fire Mana for the Tower of the Elements. Fire mana is however available from 3 unique features and a wonder, not to mention 2 shrines and multiple palaces. It should be the easiest mana to come by. Also, the Cultists Tsunami spell makes Fireballs a bit less important.
 
The new update is ready now. This one will break saved games.

It includes WorldBuilder 3.15. I extended the new ability to copy the status of units to other units to include the FfH2 specific stuff. I added the ability to edit the Armageddon Counter, Armageddon Counter Limit, and Scenario Counter in the Game Data screen.

You may download the Installer here or the Archive here



Edit: I just found a bug that I should have found a fixed before I uploaded, but it is too late now and I really don't feel like uploading again today just for this. I'll fix it in the next release, but you'll probably want to fix it sooner.

This:
Code:
def reqAbundance(pCaster):
	pCity = pCaster.plot().getCity()
	if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_ABUNDANCE')) > 0:
		return False
	pPlayer = gc.getPlayer(pCity.getOwner())
	if pPlayer.hasTrait(gc.getInfoTypeForString('TRAIT_FALLOW')):
		return False
	return True

def reqFertility(pCaster):
	pCity = pCaster.plot().getCity()
	if pCity.getNumBuilding(gc.getInfoTypeForString('[COLOR="Red"]BUILDING_ABUNDANCE'[/COLOR])) > 0:
		return False
	pPlayer = gc.getPlayer(pCity.getOwner())
	if pPlayer.hasTrait(gc.getInfoTypeForString('TRAIT_FALLOW')):
		return False
	return True
Should be this:
Code:
def reqAbundance(pCaster):
	pCity = pCaster.plot().getPlotCity()		
	if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_ABUNDANCE')) > 0:
		return False
	pPlayer = gc.getPlayer(pCity.getOwner())
	if pPlayer.hasTrait(gc.getInfoTypeForString('TRAIT_FALLOW')):
		return False
	return True

def reqFertility(pCaster):
	pCity = pCaster.plot().getPlotCity()	
	if pCity.getNumBuilding(gc.getInfoTypeForString([COLOR="Red"]'BUILDING_FERTILITY[/COLOR]')) > 0:
		return False
	pPlayer = gc.getPlayer(pCity.getOwner())
	if pPlayer.hasTrait(gc.getInfoTypeForString('TRAIT_FALLOW')):
		return False
	return True
Edit: I also just now came across this bug, which seems odd because I had not touched it in the past few releases.
Code:
def spellCallBlizzard(pCaster):
	iBlizzard = gc.getInfoTypeForString('FEATURE_BLIZZARD')
	iX = pCaster.getX()
	iY = pCaster.getY()
	pBlizPlot = -1

	for iDirection in range(DirectionTypes.NUM_DIRECTION_TYPES):
		pLoopPlot = plotDirection(iX, iY, DirectionTypes(iDirection))
		if not pLoopPlot.isNone():
			if pLoopPlot.getFeatureType() == iBlizzard:
				[COLOR="Red"]pBlizPlot = pPlot[/COLOR]
	if pBlizPlot != -1:
		pBlizPlot.setFeatureType(-1, -1)
	pPlot = pCaster.plot()
	pPlot.setFeatureType(iBlizzard, 0)
	iTerrain = pPlot.getTerrainType()
	if iTerrain == gc.getInfoTypeForString('TERRAIN_GRASS') or iTerrain == gc.getInfoTypeForString('TERRAIN_PLAINS') or iTerrain == gc.getInfoTypeForString('TERRAIN_DESERT'):
		pPlot.setTempTerrainType(gc.getInfoTypeForString('TERRAIN_TUNDRA'), CyGame().getSorenRandNum(21, "Blizzard teraform") + 3)
	elif iTerrain == gc.getInfoTypeForString('TERRAIN_BROKEN_LANDS') or iTerrain == gc.getInfoTypeForString('TERRAIN_FIELDS_OF_PERDITION') or iTerrain == gc.getInfoTypeForString('TERRAIN_BURNING_SANDS'):
		pPlot.setTempTerrainType(gc.getInfoTypeForString('TERRAIN_WASTELAND'), CyGame().getSorenRandNum(21, "Blizzard teraform") + 3)
Code:
def spellCallBlizzard(pCaster):
	iBlizzard = gc.getInfoTypeForString('FEATURE_BLIZZARD')
	iX = pCaster.getX()
	iY = pCaster.getY()
	pBlizPlot = -1

	for iDirection in range(DirectionTypes.NUM_DIRECTION_TYPES):
		pLoopPlot = plotDirection(iX, iY, DirectionTypes(iDirection))
		if not pLoopPlot.isNone():
			if pLoopPlot.getFeatureType() == iBlizzard:
				[COLOR="Red"]pBlizPlot = pLoopPlot[/COLOR]
	if pBlizPlot != -1:
		pBlizPlot.setFeatureType(-1, -1)
	pPlot = pCaster.plot()
	pPlot.setFeatureType(iBlizzard, 0)
	iTerrain = pPlot.getTerrainType()
	if iTerrain == gc.getInfoTypeForString('TERRAIN_GRASS') or iTerrain == gc.getInfoTypeForString('TERRAIN_PLAINS') or iTerrain == gc.getInfoTypeForString('TERRAIN_DESERT'):
		pPlot.setTempTerrainType(gc.getInfoTypeForString('TERRAIN_TUNDRA'), CyGame().getSorenRandNum(21, "Blizzard teraform") + 3)
	elif iTerrain == gc.getInfoTypeForString('TERRAIN_BROKEN_LANDS') or iTerrain == gc.getInfoTypeForString('TERRAIN_FIELDS_OF_PERDITION') or iTerrain == gc.getInfoTypeForString('TERRAIN_BURNING_SANDS'):
		pPlot.setTempTerrainType(gc.getInfoTypeForString('TERRAIN_WASTELAND'), CyGame().getSorenRandNum(21, "Blizzard teraform") + 3)
 
does the new update have everything from the older ones?
 
Yes, if past results are anything to go by.
 
All of my updates include all of the files needed to run my modmod, except for those it copied from The Fall from Heaven 2 folder.

Since Platyping uploaded another update last night, and since I had a couple of bugs to fix, I have gone ahead and released another update today.


MagisterModmod for FfH2 last updated on 2/22/14 at 10:40 am.

You may download the Installer here or the Archive here

Edit: and now I find yet another python error in code I have not touched in months.

In CvSpellInterface.py, there is a bug in line 632 because iX and iY are not defined. Those actually are defined in lines 611 and 612, but those are commented out when they should not be.

And now I find a couple bugs in my worldbuilder merge. In line 909 of WBUnitScreen.py, pUnitX.setBaseCombatStrDef(Info.getCombatDef()) should be pUnitX.setBaseCombatStrDefense(Info.getCombatDefense()) and in line 914, newUnit.setSummoner(-1) should be pUnitX.setSummoner(-1)

In line 8645, iLabor = pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_LABOR')) should be iLabor = gc.getInfoTypeForString('CIVICOPTION_LABOR')
iLabor = pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_LABOR'))
 
The new version seems to run much slower in between turns.

Also, what map do you guys play on? It's hard for me to figure out which is best...

I like Erebus Continent mapscript.
 
Playing as the Clan of Embers. Settled my city next to a goblin fort with a goblin protecting it because of the peace with the barbarians. Problem is that every turn I get the notice that "Troops from The Barbarian State have been spotted near Braduk The Burning!" which is annoying since we're at peace. I haven't checked if that has an effect on my automated workers yet.
 
The Undercouncil only has 6 members in my game, but claims there are 8 when proposing resolutions.

I've found that if a member of a Council is removed from the game while still a member of the council, the game will not remove their vote from the required number for any resolutions. If enough civilizations have died, this can make it impossible for a council to pass anything.
 
Druids can upgrade marsh grassland, but Genesis leaves marsh unchanged.
Is there any specific reason for that?
 
Back
Top Bottom