Wild Mana for FF

First true version is out. Since I decided to use the Elk as the Creation node guardian, and because I'm tired of keeping up two versions of all my mods, Wild Mana is no longer strictly FF compatible.... Requires FFPlus.


The 'Wild Mana' game option is working perfectly. It's right below either Blessing of Amatheon or Living World..... whichever is lower. Make sure to check any saved options after installing this, as they options themselves will have moved but your saved options will not.

Based on the map size, the option will create an additional 8 to 21 mana, and will then convert around half of all mana on the map to random mana types. Each mana type will then have a 1 in 3 chance of spawning a defender, the list is at the bottom.

I haven't set up the mana to affect terrains or units yet, I'll be doing that soon. Just wanted an initial version out for testing. :lol: Everything works perfectly, just haven't implemented everything I intend to.

Most units are Demons, as a result of being elementals or evil. And good-aligned elementals or angels have been given to the Orc civ for flavour reasons.... better them than the demons, after all. A few animals are in there as well, but not many.

  1. Wild Air - Air Elemental - Demon Civ
  2. Wild Body - Flesh Golem - Demon Civ
  3. Wild Chaos - Chaos Marauder - Demon Civ
  4. Wild Death - Lich - Demon Civ
  5. Wild Earth - Earth Elemental - Demon Civ
  6. Wild Enchantment - Wood Golem - Orc Civ
  7. Wild Entropy - Tar Demon - Demon Civ
  8. Wild Fire - Fire Elemental - Demon Civ
  9. Wild Law - Einherjar - Orc Civ
  10. Wild Life - Angel - Orc Civ
  11. Wild Metamagic - Thade - Demon Civ
  12. Wild Mind - Psion - Demon Civ
  13. Wild Nature - Guardian Vine - Animal Civ
  14. Wild Shadow - Spectre - Demon Civ
  15. Wild Spirit - Monk - Orc Civ
  16. Wild Sun - Aurealis - Orc Civ
  17. Wild Water - Water Elemental - Demon Civ
  18. Wild Creation - Elk - Animal Civ
  19. Wild Force - Dragon Slayer - Orc Civ
  20. Wild Dimensional - 6:str: Gnosling - Demon Civ
  21. Wild Ice - Ice Elemental - Orc Civ
 
Awesome. :D And elk actually does fit well, lot better than what I was getting.

Thanks, looking forward to the terrain/unit affecting versions :)
 
Got a bug. In the attached savegame, i get a reproducable ctd when using the hawk to recon the water node to nw.
ctd.JPG
View attachment Shrike Turn_0085.CivBeyondSwordSave
 
hmm...... Couldn't load your save, but started a new game to test hawks. It looks like I broke the Hawk fix with the new dll, but I added literally two lines of code. Not sure how I could have broken it....

Edit: It appears that I'm right, I didn't break it. Just used Xienwolf's dll, which had a fix for the archers but had broken the hawks. :lol: Reverting to the current patch dll now, I'll update the installer and attach a copy of the dll for those who've already installed it.
 
Hey there Valkrionn thanks for adapting & improving this modmod for FF+ ! I started it for FfH late last year but didn't get much further with it & glad you've made more progress; I especially liked that you were able to implement the stationary node guardians on startup; it makes the nodes both a potential asset, a challenge, and a threat, kind of like the nodes in the classic game Master of Magic.

Anyway unfortunately as esvath mentioned, in trying to get this modmod to play properly there's a problem with AI Adepts not building nodes over any mana types. Apparently in vanilla FfH, the AI had somehow been modded to instead use Workers to build nodes over the Raw Mana only and AI Adepts were made unable to build any nodes at all, I think this was done as a workaround for an earlier FfH bug. I had hoped this would be resolved in the FfH final version, but it is still in both FfH and FF, as a result the AI won't build any node improvements over anything but raw mana, and I wasn't able to find a way around this when trying to update the modmod.

Well it's frustrating I don't know how to fix that; I'd be grateful if anyone else has any ideas. I think it would work fine if AI Adepts would simply be given the normal node-building action that human players have, but I can't figger out how to accomplish that. Maybe an alternate way would be to make mana resources provide resource access without requiring building of a node improvement; and have spell promotions require the appropriate tech in addition to mana resource access (i.e. Elementalism tech + Water mana = access to Water magic.)

Also I see several people posted re requests to have the Nodes spread Forests and other features; that is indeed possible by setting the iFeatureGrowth value in CivImprovementInfos. (I think the Nature Node from my initial version does spread Forest.) The value has to be set pretty high to be noticeable, and it spreads whatever Feature (e.g. Forest, Jungle) is on its tile but won't spread a Terrain Type like Desert.
 
Anyway unfortunately as esvath mentioned, in trying to get this modmod to play properly there's a problem with AI Adepts not building nodes over any mana types. Apparently in vanilla FfH, the AI had somehow been modded to instead use Workers to build nodes over the Raw Mana only and AI Adepts were made unable to build any nodes at all, I think this was done as a workaround for an earlier FfH bug. I had hoped this would be resolved in the FfH final version, but it is still in both FfH and FF, as a result the AI won't build any node improvements over anything but raw mana, and I wasn't able to find a way around this when trying to update the modmod.
It's a bug in the DLL, not a workaround. If I remember correctly somewhere in canbuild it checks for BONUS_MANA and you would have to add a check for the bonustype Mana (I deleted the whole part, so don't ask me what exactly to change). You could try to use the dll from my modmod where this limitation doesn't exist, maybe that will work for you.
 
I was actually already planning on using parts of your dll once the new version of FF comes out, specifically the unitai's, so that should be easy enough to grab too... Was going through it earlier and saw you added an 'upgrade mana' mission for the adepts, so workers no longer have to build anything.
 
Valkrionn, do you still work on the Wild mana or is it kind of finished?
 
Unless I opt to include terrain modifications as well, it's finished. It's one very simple function, controlled by three game options so you can fine tune it. :lol: Could probably be written a bit better, but I'm not worried about it, it's only run on gamestart. The one thing I would like, is a way to randomize where the mana is placed without the popups and sound from the Rites of Oghma ritual.

Spoiler Wild Mana Code :
Code:
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_WILD_MANA):
			bOrcPlayer = gc.getPlayer(gc.getORC_PLAYER())
			bAnimalPlayer = gc.getPlayer(gc.getANIMAL_PLAYER())
			bDemonPlayer = gc.getPlayer(gc.getDEMON_PLAYER())
			iRawMana = gc.getInfoTypeForString('BONUS_MANA')
			iDesert = gc.getInfoTypeForString('TERRAIN_DESERT')
			iGrass = gc.getInfoTypeForString('TERRAIN_GRASS')
			iPlains = gc.getInfoTypeForString('TERRAIN_PLAINS')
			iSnow = gc.getInfoTypeForString('TERRAIN_SNOW')
			iTundra = gc.getInfoTypeForString('TERRAIN_TUNDRA')
			iMarsh = gc.getInfoTypeForString('TERRAIN_MARSH')
			lList = ['BONUS_MANA_SUN', 'BONUS_MANA_ICE', 'BONUS_MANA_AIR', 'BONUS_MANA_BODY', 'BONUS_MANA_CHAOS', 'BONUS_MANA_DEATH', 'BONUS_MANA_EARTH', 'BONUS_MANA_ENCHANTMENT', 'BONUS_MANA_ENTROPY', 'BONUS_MANA_FIRE', 'BONUS_MANA_LAW', 'BONUS_MANA_LIFE', 'BONUS_MANA_METAMAGIC', 'BONUS_MANA_MIND', 'BONUS_MANA_NATURE', 'BONUS_MANA_SHADOW', 'BONUS_MANA_SPIRIT', 'BONUS_MANA_WATER', 'BONUS_MANA_CREATION', 'BONUS_MANA_FORCE', 'BONUS_MANA_DIMENSIONAL', 'BONUS_MANA']
			
			iMana = 15
			if CyMap().getWorldSize() == gc.getInfoTypeForString('WORLDSIZE_DUEL'):
				iMana = iMana - 7
			if CyMap().getWorldSize() == gc.getInfoTypeForString('WORLDSIZE_TINY'):
				iMana = iMana - 5
			if CyMap().getWorldSize() == gc.getInfoTypeForString('WORLDSIZE_SMALL'):
				iMana = iMana - 3
			if CyMap().getWorldSize() == gc.getInfoTypeForString('WORLDSIZE_LARGE'):
				iMana = iMana + 3
			if CyMap().getWorldSize() == gc.getInfoTypeForString('WORLDSIZE_HUGE'):
				iMana = iMana + 6
			cf.addBonus('BONUS_MANA',iMana,'Art/Interface/Buttons/WorldBuilder/mana_button.dds')
			
			for i in range (CyMap().numPlots()):
				pPlot = CyMap().plotByIndex(i)
				if pPlot.getImprovementType() == -1:
					if pPlot.isWater() == False:
						iBonus = pPlot.getBonusType(-1)
						if iBonus == iRawMana:
							iManaRnd = CyGame().getSorenRandNum(100, "Mana Creation")
							iConvertRnd = 60
							if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_FERAL_MANA):
								iConvertRnd = 100
							if iManaRnd <= iConvertRnd:
								sMana = lList[CyGame().getSorenRandNum(len(lList), "Pick Mana")-1]
								iBonus = gc.getInfoTypeForString(sMana)
								pPlot.setBonusType(iBonus)
								if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_MANA_GUARDIANS):
									if iBonus == gc.getInfoTypeForString('BONUS_MANA_AIR'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_LIGHTNING_ELEMENTAL'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_BODY'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_FLESH_GOLEM'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_CHAOS'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_CHAOS_MARAUDER'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_DEATH'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_LICH'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_EARTH'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_EARTH_ELEMENTAL'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_ENCHANTMENT'):
										newUnit = bOrcPlayer.initUnit(gc.getInfoTypeForString('UNIT_WOOD_GOLEM'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_ENTROPY'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_TAR_DEMON'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_FIRE'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_FIRE_ELEMENTAL'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_LAW'):
										newUnit = bOrcPlayer.initUnit(gc.getInfoTypeForString('UNIT_EINHERJAR'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_LIFE'):
										newUnit = bOrcPlayer.initUnit(gc.getInfoTypeForString('UNIT_ANGEL'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_METAMAGIC'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_THADE'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_MIND'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_PSION'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_SHADOW'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_SPECTRE'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_SPIRIT'):
										newUnit = bOrcPlayer.initUnit(gc.getInfoTypeForString('UNIT_MONK'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_SUN'):
										newUnit = bOrcPlayer.initUnit(gc.getInfoTypeForString('UNIT_AUREALIS'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_WATER'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_WATER_ELEMENTAL'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_CREATION'):
										newUnit = bAnimalPlayer.initUnit(gc.getInfoTypeForString('UNIT_ELK'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_FORCE'):
										newUnit = bOrcPlayer.initUnit(gc.getInfoTypeForString('UNIT_DRAGON_SLAYER'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_DIMENSIONAL'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_UBER_GNOSLING'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_ICE'):
										newUnit = bDemonPlayer.initUnit(gc.getInfoTypeForString('UNIT_ICE_ELEMENTAL'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)	
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
									elif iBonus == gc.getInfoTypeForString('BONUS_MANA_NATURE'):
										newUnit = bAnimalPlayer.initUnit(gc.getInfoTypeForString('UNIT_GUARDIAN_VINES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)				
										newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_HELD'), True)
 
it should Probably check for the game options no demons, savages, animals. But good to know that it is finished :). The Arcane UNITAIs aren't yet :(
 
The presence of Monks and Angels as guardians makes me want another good-aligned barbarian civ.

Failing that, how about some mechanic that allows you to recruit good guardians if your civ alignment matches?

A dominate spell that requires a gold cost and and only works on Monks owned by Bhall, with very minimal prereqs? Similar versions for the angel etc...?

I can do the work if you think it would be cool. :)
 
I like it, but think it could be unbalancing...... I want to figure out how to make more barb factions. Angels, to take care of the good barbs, and Mulcarn's Children? for the ice-based barbs. Possibly make angels at war with demons...


Shouldn't be too bad as long as you can't recruit them early. Nastiest "good" critter is...Dragon Slayer? Maybe require a disciple with channeling2?
 
Adding another Barbarian faction isn't TOO hard, as long as you don't want to let them have cities. Still haven't figured out how to get the EXE to allow that one. Lots of places you have to add single lines of code for a new faction, and if you want them to auto-spawn you have to write a function for that, but otherwise pretty simple.
 
Back
Top Bottom