Crystallized Mana; Conquerable Nodes

orlanth

Storm God. Yarr!
Joined
Nov 17, 2001
Messages
1,805
Crystallized Mana

Here is an edited version of Civ4BonusInfos.xml that causes the world to start with mana deposits specific to the various magic types.

Rather than being found as generic mana crystals that can be developed into whatever type of node you want, you will come across deposits of specific Mana types (ie Air Mana, Life Mana, Spirit Mana etc) and will have to develop your strategies around that. You will still need to research the appropriate tech and have an Adept create a node as usual. If you manage to reach Metamagic II, you can still Dispel any node back into raw mana which can be shaped however you like, making Metamagic a much more important part of the game.

  • There is more mana overall than the default game; you will have access to a good variety of magics but will be unable to fully bend them to your whim until you reach Sorcery and secure access to a Metamagic node. The abundance of each type scales with the number of civs, and there is also a random component; there will generally be at least one of each mana type somewhere on every map.
  • The different mana types will most likely be found in specific terrains/areas; with Earth Mana being found in Hills; Fire Mana in Plains/Deserts away from rivers, Death Mana in bleak Desert or Tundra, Shadow Mana closer to polar regions, Sun Mana nearer the equator, etc. (Thanks to the FfH team already making graphics etc for each mana type, this minimod was quite easy to do and the different manas already look very good on the map.)
  • A fair amount of the original raw "colorless" mana crystals can still be found, which can be freely shaped by the first to bind them to a node. They are distributed evenly over wide areas so you will have a good chance at securing at least one, allowing you some flexibility early on (choose carefully..)
  • Mana deposits have been added to the resources the AI uses to adjust fair starting positions, and the AI has been made more willing to trade most mana resources, for the right price.
  • Sources of Metamagic are placed strategically across very wide areas. There will on average be only one for every two civilizations. :D The value the AI places on Metamagic has been increased.
  • Mana types will have a minor effect on the yield of the tile they're found in (+1 :food: for Life, +1 :hammers: for Earth, etc) I also included a new Civ4ImprovementInfos.xml so that building a node on each mana type will give various type-specific benefits to local tile yield.

(Anyone is welcome to take/edit/adapt this however they see fit.)

instructions:
- backup old XMLs
- unzip to Fall from Heaven 2 033/Assets/XML/Terrain
 

Attachments

I've also been trying out a new Civ4ImprovementInfos.xml that enables "conquerable" nodes (again, a la Master of Magic..) that start out "wild" when the world is created, and will sporadically generate barbarian units specific to their magic type until they are occupied and pillaged by a civilization. They then leave behind the appropriate type of mana crystals which can as usual later be harnessed to create a Node.

Using XML I was able to create a Wild version of each node that seems to work fairly well, but the XML tags available for initial placement of improvements appear quite limited (ie there is no bRequiresBonus to place Wild Node improvements over the mana bonuses generated by Civ4Bonusinfos.xml.) As a result, initial placement would have to be totally random using iApperanceProbability, which could prove unbalancing.

Other issues are that the generated units often don't fortify over their nodes to protect them; and that national borders still seemed able to encompass wild mana nodes even after setting bOutsideBorders=1.

I'll attach this initial attempt at a Civ4ImprovementInfos.xml with the wild nodes included; but they currently don't generate on game creation unless you place them manually in WorldBuilder. If anyone has any insight on to how to place these into the game initially, I'd be grateful.. Maybe some sort of Python event that places Wild Node improvements over the mana bonuses? (this would also make for a great Amurite World Spell.. could cause quite an uproar replacing everyones mana sources with monster-spewing wild nodes, but you'd have to use carefully since it would also mean all that mana suddenly became raw and shapeable..)

[edit: working version below]
 
If you can figure out how to make barbarians protect the "wild" nodes, I would love you; I am having a similar problem with being unable to get barbarians to protect spawn features I add. I imagine it's in the python somewhere, but I can't find it.

Also, OutsideBorders doesn't work like you think. All it means is that the improvement is allowed to be built outside of player borders (this will need to be turned on for any map-generated improvements to have a legal place to appear).

And the best way to place the wild nodes would indeed be in python. You'd probably want to add something to onGameStart in EventManager.py that checks the world for mana resources and then has a chance of creating a "wild" node. It wouldn't be pretty, but it would work; I recommend you look at the Amurite worl spell in SpellInterface.py for an idea of how the code would work, although it would have to be heavily modified. The only other manner to do it, cleaner but less controllable, would be to reduce the spawn rate of crystallized nodes, allow "wild" nodes to randomly spawn at a low rate, and then have them create their own mana type on their tile with the BonusConvert tag.
 
Could take a look at Marnok's Dungeon code and adapt that for wild nodes. Nodes could have spawn code attached to them. I am thinking gate creatures would be nice to randomly come out of wild nodes. Then you have a spell for pacifying the node, which as a result manually places a node on the tile. It could even be randomized to be raw or a specific flavor of mana.
 
how to implement in FF? If I try it, the option to go in a lair is available for every single tile, even without lairs. It's just two files, so I suppose it's Ctrl-C / Ctrl-V at the correct position? :)

great idea and mods thanks a lot!

regarding the wild nodes, what about an event, that triggers a Quest (Ctrl-Tab) when a unit enters it, and the event produces something like 3 bears and if you succeed, the quest is solved and the wild mana is "sealed" and ready to get a node.
 
Thanks for the input.. I think Jhoniten is right that explorable nodes would work best as an extension to Marnok's Explorable Lairs mod. I just took a look and there are tons of great features in there. Marnok is still developing the mod & it is planned to be integrated into the next version of FfH, so I may wait till then to try implementing some node effects using it.

MaxAstro, it looks like spawned units' guarding of specific tiles/improvements is handled by likesImprovement in marnok.py, which I think is already partly incorporated in Fall Further.

Here are versions of the XML for Crystallized Mana for use with Fall Further 0.42 patch G. (The initial framework for conquerable nodes is also included in Civ4ImprovementInfos.xml but again not enabled to autogenerate on the map.) Tarquelne also posted a special version for working with Scions of Patria addon in pg 2 of this thread. Also, if you want to play with just the specialized mana types but no local tile yield bonuses for building nodes, you can just use the Civ4BonusInfos.xml file.


Instructions:
Unzip to Fall Further 042/Assets/XML/Terrain
 

Attachments

btw, if you wanted an easier implementation of this (without touching the bonus file) you could add a check to onGameStart in CvEventInterface.py that would run through all the plots, find raw mana nodes and upgrade them to random upgraded node types.

It would take a little python knowledge but it would allow you to do this as a game option, and you wouldn't have to mess with any xml files at all. Check out the THAW code in that same section for an example.
 
Thanks Kael! But having already done it the XML way, I liked how BonusInfos enabled flavor terrain placements and probabilities for the various mana types (I made it slightly less common to get random extra Earth/Life/Death/Spirit mana to offset potential extras from the unique features), and especially the iUnique tag which was important for fair distribution of Metamagic and raw/colorless mana. (this is actually an excuse for not knowing much python, which I would have to learn anyway to try making the nodes explorable..) ;)
 
Wild Mana Nodes - Working Version

LOL I realize now what Kael was saying :hammer2:. It was possible to still use the new XML for bonus placement and adapt some of the ongamestart code pretty easily to enable the "wild" nodes.

So here is a working version with monster-spewing mana nodes for anyone who's into that sort of thing ;) (Again, the initial nodes will sporadically generate barbarian units specific to their magic type until they are occupied and pillaged by a civilization. They then leave behind the appropriate type of mana crystals which can later be harnessed as usual to create a Node.) Hopefully later integration with the Marnok mod should allow for spawned creatures to guard their nodes and possibly enable some cool node events.


Instructions
(this will probably work only with unmodified FfH 2.033, I will likely upload a Fall Further one later)
copy CvEventManager.py to Assets/python
copy XML files to Assets/XML/Terrain

If you want to edit the percentage of nodes that start out "wild", open CvEventManager.py in a text editor and search for "wildchance". I set it at 100% cos I'm mean like that :p
 

Attachments

Niiiice...

Several questions, here :

1. Do the AI understand what tech they need to build the node? I got a game where AI dont build any node at all. Instead, they covered those node with cottages.

2. If I install a new patch, do I have to re-copy these files? Will these files "damaged" the patch? Or is there a way to integrate the option into game option? Send a petition to Kael, maybe? ;);)

3. On the wild node, what kind of monsters? I don't think a Fire elemental rampaging my new civ is challenging. It would be devastating... :cry::cry:

Love your work, keep it up!
 
1. Do the AI understand what tech they need to build the node? I got a game where AI dont build any node at all. Instead, they covered those node with cottages.

had the same problem. I think the AI knows which tech is needed, but the problem is, that in the beginning it makes sense to build a cottage (or a farm) there and later on, the AI just doesn't have the option to destroy an improvement of itself [from him?]. Maybe it would make sense (even for normal FFH) to make it just plain impossible to build a cottage or farm on a mana node. Of course this would take away some possibilities for the human player as well, but at least it would be fair.

Great thing the wild nodes mod!
 
I'm pretty sure the AI can and WILL ( happily ) build new improvements on old ones. at least, it was that way in BTS. it was actually an issue, as AI workers loved to farm over towns and then cottage and then fort etc. didn't notice it in FFH yet, but I haven't really checked on the AI workers whereabouts actually.
 
I tested this and this is the result:

I gave Cassiel, the AI, some crystalized Mana that had a town, along with a pig, that had a town and a corn which had a town. As well as Crystalized mana without town. (see the screen shots in the zip file). I gave him some Mages and some Workers as well as all technologies to build every node and pasture, workshop, farm.

After 40 turns he DID build a farm on the corn and a pasture on the pig, but he did not change the towns on the crystalized nodes. But he DID change some Farms to Workshops.

Then I thought I'll test the "normal" mana and I checked if he would trade for Earth mana, which he would (for corn). Surprisingly he DID build one water node on a normal mana even though he has water in his palace and cold've have it earlier if he would destroy the cottage. He further built a Entropy node.. It seems the AI knows at least which mana is good for him...

Then I thought maybe it's because he needs the Villages for research and gold. So I built more villages without resources under them (Aside from one Gold for testing purposes). Well, he did build a mine on the Gold. AND (under the dragon) he destroyed one village for one mine.

On the same picture I then built 4 new crystalized nodes Without any villages and look what happens: well, he built a village over/under the life mana. later on every other new crystalized mana.

So I thought, maybe he has not enough mages, and needs them to fight of barbarians. I gave him PLENTY of adpets, but without a result, other than a normal mana on which he built another Entropy node.

I also gave him some techs like the one to build genesis and I put his city at 20 people, to enhance the chance he would use the Enchantment and Health Nodes, but he does not.

One other test: with amurites, I gave them plenty of normal mana without towns and some body mana under a town as well as two normal mana with towns.

The result: the AI builds mana nodes when there are towns, if it is normal mana, but not at the body mana nodes. It seems therefore, that it does not know that crystalized mana can be used for mana nodes as well.

sorry for the report :( , I hope it helps, though. (this was not the FF version, but the FFH 033 version). I did not find anything in the files Civ4improvementinfos and civ4bonusinfos (not that this means anything ;) )so I guess maybe it's a python thing?

EDIT: one question is of course: is the AI able to build a node on a previously pillaged pyre of the seraphic? if not, then the problem is not with the crystalized mana mod, but with the bonus itself.
 

Attachments

I tried this mod out last night with the conquerable nodes. I played on a tectonics (60% water), Noble, raging barbarians with barbarian world, 16 players, double the animal spawns, blessings...


Dear God, more than half the civs have been wiped out by turn 50, 3 were within 5 turns! My two cities have been under almost relentless assault from pit beasts, hosts, undead, lightning elementals, tar demons and flesh golems and I have slowly began finding and nuking the wild mana nodes. I had a blast and this modmod has really taught me some things about civ. Also some AI players seem to have adapted to good defense (the svartalfar for example had like 6 warriors per city and were nuking wild nodes as well) My question is this...does raging barbarians affect the spawn rate for these nodes cos I was regularly encountering assault forces of about 4 to 6 units at a time?

Also I have not yet seen any creatures guarding mana nodes, instead they spawn and attack?
 
I'll try merging this with FF and see what I can do with AI weights. At least I'll try to play with them.
 
Thanks for the reports! To look into AI node construction, I gave the AIs plenty of Adepts & the appropriate techs in WorldBuilder and put an assortment raw and crystallized mana nearby, then spied on them with Loki to observe their behavior. To my surprise they hid their Adepts inside a city, built some Workers, and the Workers came out and constructed a node over the raw mana (!) I erased and reinstalled FfH3033f with no mods and saw the same thing. Also tried that w/ the pillaged Pyre gelvan suggested & the AI couldn't build a node there.

So there must be something very specific in FfH about how the AI builds nodes but I'm unable to find it in the python or XML.. could anyone who knows shed some light? (On the bright side it does look like the AI is trying to stamp out Wild Nodes appropriately, though maybe slightly less efficiently than a human would.)

liver that sounds like quite a cataclysm! I'm not surprised since the spawn rate should be affected by the game settings (plus adding Blessings as well would lead to even more nodes, which if they're 100% wild with an increased spawn rate could have a dramatic effect!) If you want to try raging/blessings with less node threats you could tweak "wildchance =" in CvEventManager.py (or you can just let them rage away..) Yep the spawned units aren't yet guarding their nodes in a suitably MoM-like way; that may require adapting some further code from the Marnok mod (which I believe will be in the next FfH version release). Esvath the node spawns are currently all around strength 4 to 6 - I was tempted to include Elementals but decided that could be a tad *too* challenging, lol
 

Attachments

  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    142.8 KB · Views: 143
Heh like I said it is a lot of fun!
 
Back
Top Bottom