How to Increase Mana and Health Regeneration

I tried to look in the ElementalDefs xml file and could not find this.

Is there a way to make Mana and Health regenerate faster.  It is far too slow, in my opinion.  I would like to basically double it, but I can't find where this value is stored or even if it can be changed.

Thanks.

23,000 views 40 replies
Reply #1 Top

Under CoreUnitStats.xml there is this:

    <UnitStatType InternalName="UnitStat_HealthRegen">
        <DisplayName>Health Regeneration</DisplayName>
        <DisplayNameShort>HPGEN</DisplayNameShort>
        <Description>Unit regenerates this amount of health per turn.</Description>
        <Icon>HealthRegen_Stat_Icon.png</Icon>
        <Hidden>1</Hidden>
        <AffectPerLevelUpPoint>0.0</AffectPerLevelUpPoint>
    </UnitStatType>

Try adding this to your sovereign:

    <UnitStat_HealthRegen>2</UnitStat_HealthRegen>

Mana would first need to be activated in the core file, tested to see if it works, and the modified in the sovereign's file. Not too difficult but certainly plausible.

Reply #2 Top

Wow, I never thought it would be this hard to do this.

I wanted all units to regenerate health faster.  The slow speed of it serves no purpose as far as I can tell.  The armies are small enough as it is without units having to sit out and regenerate 1 HP per turn.

Maybe the developers will consider increasing the mana regen from 1 in the main game.

This really should have been an easy value to change.

Reply #3 Top

The Tower of Magi is an improvement that increases mana regeneration by 2.  I haven't actually seen the effect in-game yet, but my understanding is that it effects your soverign as well as your units.

Anyway, it has the following modifier on it (from the file Core Improvements/KingdomUniqueImprovements.xml)

<GameModifier>
      <ModType>Player</ModType>
      <Attribute>AbilityBonus</Attribute>
      <StrVal>A_ManaRegeneration</StrVal>
      <Value>2</Value>
      <Provides>+2 Mana Regeneration</Provides>
</GameModifier>

And in the CorePlayerAbilities.xml file there is the following description block

<PlayerAbilityType InternalName="A_ManaRegeneration">
    <DisplayName>Mana Regeneration</DisplayName>
    <Description>Speed at which all mana regenerates for this nation's people.</Description>
    <Icon>Icon_Level.png</Icon>
    <DefaultValue>1</DefaultValue>
    <UsedAsMultiplier>0</UsedAsMultiplier>
</PlayerAbilityType>

I haven't tried it yet, but it looks to me like changing that DefaultValue to 10 would give you a base mana regeneration of 10 per turn.  I'll try it when I get home from work.  Since it is a Player Ablitity I wouldn't expect it to effect tha AI players.

-Sal

Reply #4 Top

Ideally we should find a way to have it affect AI players too.

Reply #5 Top

Yeah, it'll just feel like cheating if only the player benefits.

One idea I had is making it so standing inside your influence grants you +1 mana regeneration in addition to the +1 health regeneration it already provides.  Regeneration while you're out at war or whatever would still be really limited, but at least you'd have the option to teleport back home and get your mana back at a halfway decent rate.  Does anyone know how one would go about doing something like that?

Reply #6 Top

I can't even get just increasing the value to work.

Someone said in another thread it's not an active variable at the moment, but darned if I can get it to activate.

Reply #7 Top

If anyone gets this to work, please let me know.

I cannot.

Reply #8 Top

This is ridiculously bizarre.

There is a file called CoreSovereigns.xml.  In the entries there are the Sovereigns.  Each has a line: <UnitStat_ManaRegen>1.0</UnitStat_ManaRegen>.  [Except the first, which is 1.0000 for some reason.]

 

Changing that to: <UnitStat_ManaRegen>3.0</UnitStat_ManaRegen> has absolutely no effect in the game.

 

Check that:  Changing this file has no effect on the game.  No matter what I change in it, nothing changes.

Why is that?

Reply #9 Top

Changing any of the core files doesnt seem to have an effect, need to put changed files into your "\My Documents\My Games\Elemental" (XP) folder. And probably the proper subfolder too. 

Reply #10 Top

I have gotten the CoreSovereign file to work placing it in the units file.

But changing the mana regeneration values in it does nothing.  You can change the other stuff, however.

James has been very helpful in trying to activate the mana regeneration portion of the CoreUnitStats file, but I can't figure out how to actually increase mana regeneration.

Reply #11 Top

I did this exact thing but how I did it was make a new faction, and then I edited the tech trees and made 2 new study items called Clarity 1 and Clarity 2 that they studied to increase the mana regen 1 point for each level you invested in it.

I edited 3 files to get this to work for my new race.

1. First I edited the faction xml file for me it was Faction_DragonBorn.xml for you it will be whatever you name the factions.

I added this to the race file. <TechTree>TechTree_DragonBorn</TechTree>

 

2. I edited the TechTree_Ammarion file and changed the name to TechTree_DragonBorn.

Also you have to edit the INTERNAL NAME in the file to TechTree_DragonBorn.

Next you add the tech's that you would like to add in the file. Here I put

<Tech>Refined_ManaRegen_DragonBorn</Tech> in the file.

<Tech>Refined_ManaRegen_DragonBorn2</Tech>

 

3. Next step you have to edit the Techs_Ammarion file and define what these 2 new techs do. I did this by adding this to the file.

<TechDef InternalName="Refined_ManaRegen_DragonBorn">
  <DisplayName>Clarity</DisplayName>
  <Description>This breakthrough gives our sovereign the ability to regenerate 1 extra mana per turn.</Description>
  <Image>FireCrystal_Medallion.png</Image>
  <Rarity>100</Rarity>
  <Category>Magic</Category>
  <Infinite>0</Infinite>
  <AppearanceChance>100</AppearanceChance>
  <GameModifier>
      <ModType>Player</ModType>
      <Attribute>AbilityBonus</Attribute>
      <StrVal>A_ManaRegeneration</StrVal>
      <Value>1</Value>
        <Provides>+1 Mana Regeneration</Provides>
  </GameModifier>
  <AIData AIPersonality="AI_General">
   <AIResearchPriority>50</AIResearchPriority>
   <AITradeToGetValue>75</AITradeToGetValue>
   <AITradeOutValue>90</AITradeOutValue>
   <AIAtWarMultiplier>1.0</AIAtWarMultiplier>
   <AIEarlyBuildUpMultiplier>1.0</AIEarlyBuildUpMultiplier>
  </AIData>
 </TechDef>

And here is what it does:

TechDef InternalName is the real name of the tech and how the computer knows to look for it.

DisplayName is what the game displays as the techs name.

Category Magic says what branch you research in order to learn this tech.

<GameModifier> Means it modifies something in the game.

<ModType>Player</ModType> modifies a players attributes.

<StrVal>A_ManaRegeneration</StrVal> this affects the mana regen outside of combat there is a seperate one for inside combat.

<Value>1</Value> And by how much.

 

Here are some other commands that effect mana regen specifically creature abilities.

<PlayerAbilityType InternalName="A_CoreManaRegeneration">
    <DisplayName>Core Mana Regeneration</DisplayName>
    <Description>How quickly this faction rengerates their core mana.</Description>
    <Icon>Icon_Level.png</Icon>
  </PlayerAbilityType>

<PlayerAbilityType InternalName="A_ManaRegeneration">
    <DisplayName>Mana Regeneration</DisplayName>
    <Description>Speed at which all mana regenerates for this nation's people.</Description>
    <Icon>Icon_Level.png</Icon>
    <DefaultValue>1</DefaultValue>
 <UsedAsMultiplier>0</UsedAsMultiplier>
  </PlayerAbilityType>

<AbilityBonusOption InternalName = "ArchMage">
   <DisplayName>Arch Mage</DisplayName>
   <Description>Mana regeneration of the Arch Mage is doubled.</Description>
   <GameModifier>
    <ModType>Unit</ModType>
    <Attribute>AbilityBonus</Attribute>
    <StrVal>A_ArchMage</StrVal>
    <Multiplier>2.0</Multiplier>
   </GameModifier>
  </AbilityBonusOption>

<AbilityBonus InternalName="Regeneration">

    <AbilityBonusOption InternalName = "Regeneration1">
      <DisplayName>Regeneration</DisplayName>
      <Description>This unit regenerates 1 health every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalHealthRegen</StrVal>
        <Value>1.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Regeneration2">
      <DisplayName>Regeneration II</DisplayName>
      <Description>This unit regenerates 2 health every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalHealthRegen</StrVal>
        <Value>2.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Regeneration3">
      <DisplayName>Regeneration III</DisplayName>
      <Description>This unit regenerates 3 health every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalHealthRegen</StrVal>
        <Value>3.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Regeneration4">
      <DisplayName>Regeneration IV</DisplayName>
      <Description>This unit regenerates 4 health every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalHealthRegen</StrVal>
        <Value>4.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Regeneration5">
      <DisplayName>Regeneration V</DisplayName>
      <Description>This unit regenerates 5 health every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalHealthRegen</StrVal>
        <Value>5.0</Value>
      </GameModifier>
    </AbilityBonusOption>

  </AbilityBonus>

  <AbilityBonus InternalName="Clarity">

    <AbilityBonusOption InternalName = "Clarity1">
      <DisplayName>Clarity</DisplayName>
      <Description>This unit regenerates 1 mana every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalManaRegen</StrVal>
        <Value>1.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Clarity2">
      <DisplayName>Clarity II</DisplayName>
      <Description>This unit regenerates 2 mana every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalManaRegen</StrVal>
        <Value>2.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Clarity3">
      <DisplayName>Clarity III</DisplayName>
      <Description>This unit regenerates 3 mana every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalManaRegen</StrVal>
        <Value>3.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Clarity4">
      <DisplayName>Clarity IV</DisplayName>
      <Description>This unit regenerates 4 mana every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalManaRegen</StrVal>
        <Value>4.0</Value>
      </GameModifier>
    </AbilityBonusOption>

    <AbilityBonusOption InternalName = "Clarity5">
      <DisplayName>Clarity V</DisplayName>
      <Description>This unit regenerates 5 mana every turn during combat.</Description>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalManaRegen</StrVal>
        <Value>5.0</Value>
      </GameModifier>
    </AbilityBonusOption>

  </AbilityBonus>

 

Reply #12 Top

Guys listen, changing the core files WILL NOT affect the game unless you do the following steps (PAY ATTENTION NOW)

 

First, you must go into your elemental\data folder and delete the file data.zip. Then you must open up the file you want to edit and do whatever it is you want. Than you must make a shortcut of the elemental.exe file and add to the end of the target the command /createxmlbinary make sure you put a space after the quotes and before the /createxmlbinary command.

 

Than you must start a new game and a new data.zip file will be generated in your elemental\data folder and the changes will take affect!!! yes I am awesome, I know. I don't know if that will make mana regen work, I will try it out.

Reply #13 Top

BlackRain,

Thanks.  I haven't been changing the core files for the most part and then I haven't done it since I was told it does nothing.  I was only trying it because I couldn't get anything else to work.

I have not been able to "activate" the mana regen stat in the CoreUnitsStat file.  So I can change the CoreSovereigns file (the one I have placed in my Users/Elemental/Units directory), but I can't get it to affect mana regeneration at all.

If someone gets this to work, please fill us in.

If a Dev wants to comment, even better. :)

Reply #14 Top

If you look in the CoreRaceConfig.XML file there is a variable for mana but I dont know what it does

 

 <Spellbook>LifeSpellbook</Spellbook>    <A_CoreManaRegeneration>50</A_CoreManaRegeneration>

 

<KnownStartingTech>F_Civilization_General</KnownStartingTech>    <A_CoreManaRegeneration>50</A_CoreManaRegeneration>

 

<KnownStartingTech>F_Civilization_General</KnownStartingTech>    <A_ManaRegeneration>50</A_ManaRegeneration>

 

 

PErhaps these have something to do with it?

Reply #15 Top

Seems mana regen isnt an actual thing, ive even tried applying the bonus from the tower to a ring, to no effect.

 

HOWEVER I have made these:

Included are 3 files, put into the "\My Documents\My Games\Elemental\Items" folder.

Included are:

Mana Regeneration Potion, costs 60 gold regens 5 mana

Mana Ring, Has no effect on Strategic Mana regeneration, however it does provide Tactical mana regeneration. (costs 10 gold)

 

3rd file provides the "stats" for the mana regen, Ive made it so that your mana regeneration will show when looking at inventory screen.

 

Link to zip: #Mana Potion/Ring#

 

**Edit**

Almost forgot to mention, both are unlocked with the "Magical Equipment" tech, one that unlocks first set of magic rings.

 

**Edit 2** 

Fixed broken zip, its now a Rar. if this doesnt work try http://www.fleetsofanarchy.net/ewom/ The XMLs are there. Right click and go "save as"

Reply #16 Top

You guys have been busy!

Hmm, link didn't work for me. Download works but file wont open for some reason; says it's "Invalid".

Reply #17 Top

I found that mana regen is actually taken out of the code, take a look at coreunitstats.xml. The code for mana regen is actually quoted out, they added a <!-- to the code which basically takes it out of the code, just remove the <!-- and see if something can be done. I will try it as well.

Reply #18 Top

BlackRain, that is one of the changes ive tried, unit based strategic mana regen seems to be disabled code side.

 

Changed link, and provided another way to get files.

 

**EDIT**

I managed to get it so that Shrines(When built) provide a mana regen increase to their owner. The file is "shrines.xml", found in the link/folder in my post above. IT IS NOT in the rar file. Ive tested this in a quick game and it works

Reply #19 Top

Good work Tempest!

How did you get the shrines to work?  I can't download the file because it just comes up with a parsing error.

Reply #20 Top

right click and go "save as" to download the file.

 

As to how, this is the Kingdom's Air Shrine, in the xml file:

 

<!--**************** -->
<!--** Air Shrine ** -->
<!--**************** -->
<ImprovementType InternalName="K_Air_Shrine">
<GameModifier>
<ModType>Player</ModType>
<Attribute>AbilityBonus</Attribute>
<StrVal>A_ManaRegeneration</StrVal>
<Value>1</Value>
<Provides>+1 Mana Regeneration</Provides>
</GameModifier>
</ImprovementType>

That Adds a +1 mana regen to the constructed Air shrine, I didnt need to copy the entire building xml. When i did so, it actually had 2 buildings for the shrine exist, and they were the same stats. So in stead i tried to see if It would work like this. Easiest way to explain why it works, is it seems Mods are read after core files, and think of it as adding a value to the "K_Air_Shrine" array. thats an example, dont think thats technically right, but it seems to apply.

Reply #21 Top

Very cool.  Will test tonight.

Reply #22 Top

What folder should the shrines.xml and manaRegen.xml go in?  I put them in the inventory folder and that doesn't seem to work.

 

Sorry, am not a modder =/

 

 

Reply #23 Top

\My Documents\My Games\Elemental\Items

 

Is where my stuff is going ATM, wish they would enable seperate mod folders...

Reply #24 Top

OK, I dropped your four xml files in there, but the first thing I tested (shrines) doesn't seem to boost mana regen?

1.  All files are in the \My Games\Elemental\Items directory.

2.  Use Mods is turned on.

 

Shrines:

1.  I kept starting new games until I had a shard spawn near my home town, then I built the basic shrine on it ASAP.

2.  Cast spells, watch mana regen.  Still only one per turn.

 

As I look at this some more I also can't see your regen display in inventory, and when I research up the Magic tree I can't buy the items either.  So I am probably screwing up the placement of the mods somehow...

Reply #25 Top

Strange, i just tested them (deleted from folder and redownloaded) and they worked. What Os are you using? did you have to make any of the folders?

 

Im using stock game with use local and use mods checked, and those are in my items folder. No issues. If you look at the research and click to see whats unlocked by the Magical equipment research does Mage's ring show there? If it doesnt then file is in wrong spot and game isnt reading the files.