Stupid mod question

Hey guys!

I'm trying to figure out how to add a value to the default game value under monsters, units and such.

 

I've discovered that by deleting the relevant lines of code for stats (Str, etc.) under CoreUnits.xml, CoreSovereigns.xml and such, that the values called out in CoreUnitStats.xml will be used.

What I'd like to do in the various unit/hero/etc. files is to apply a modifier to the base value, instead of defining the value.  This way, if the base value is increased or decreased, these units will still have a correspondingly higher or lower value because of this adjustment.

Otherwise, when I make changes I have to edit each unit and monster not using the base value individually, which is a pain for combat results testing.

 

I know how to do this via spells, but those don't necessarily work outside of the spell environment.

 

Suggestions?

1,467 views 2 replies
Reply #1 Top

   <GameModifier InternalName="HPMultiplierExperienced">
      <ModType>Unit</ModType>
      <Attribute>AdjustUnitStat</Attribute>
      <StrVal>UnitStat_HitPoints</StrVal>
      <Multiplier>1.8</Multiplier>
    </GameModifier>

if it doesn't work when you put it in the unittype, make an abilitybonus and assign the bonus to the unit instead.

Reply #2 Top

That should help.  I'll let you know how it goes!

Thanks! :grin:

 

 

Next stupid question.  For clarity, here's a lost tome that provides a bonus to spell research.

    <GameItemType InternalName="BookOfArcaneKnowledge">
        <!-- Item Display Name/Description-->
        <DisplayName>Hosten: The untold story</DisplayName>
        <Description>Reading this tome bestows a considerable amount of Arcane Knowledge for use in learning new spells.</Description>
    <ShopValue>80</ShopValue>
        <!-- Item Graphics -->
        <IconFile>gfx\items\RegularBook2.png</IconFile>
        <TintR>123</TintR>
        <TintG>16</TintG>
        <TintB>255</TintB>
        <!-- Item Sound FX -->
        <SFX>TurnPageMagical_03</SFX>
        <!-- Item Modifiers -->
        <GameModifier InternalName="Reward1">
            <ModType>Player</ModType>
            <Attribute>SpellPointBonus</Attribute>
            <Value>25</Value>
        </GameModifier>
    </GameItemType>

 

I'd like to change this to a spell that can be researched continuously, that provides a one turn bonus to the number of research points you are accumulating.  Using Refined_Arcania_Amarian as the template:

 

    <TechDef InternalName="Refined_Arcania_Amarian">
        <DisplayName>Refined Arcana</DisplayName>
        <Description>This breakthrough gives our settlements a 10% bonus to Arcane Knowledge production and can be researched continuously. Shard researchers continue to improve the quality of the studies and experiments involved in providing the kingdom with Arcane Knowledge with increasingly positive results.</Description>

        <Image>Building_Human_Wizard Tower1.png</Image>
        <Rarity>100</Rarity>
        <Category>Magic</Category>
        <Infinite>1</Infinite>

-snip- 
        <GameModifier>
            <ModType>Player</ModType>
            <Attribute>AbilityBonus</Attribute>
            <StrVal>A_SpellPoints</StrVal>
            <Value>10</Value>
        </GameModifier>
-snip-


    </TechDef>

 

I want to change the Value effect to, say a 25% boost to accumulated spell points, or a 50% bonus to the number of spell points generated that turn (only).  And make a similar spell for a boost to Gildar.  What would be the best way to express this?

An Elemental Variable Bible would be REALLY nice around now...

This is to simulate the effect I've seen in some other games where you focus your research staff in another direction (Example: neglecting tech to focus on production).