how to get started?

Most of the changes i have made are edits to the core file.  However i realized this is not the best answer because im always forced to redo everything. I realized that i might be better off just making a personal mod out of it. The question i have is - how do i set up the file structure? I don't know how to get started, what to name the files, where to put them or what exactly i need in them to make something work. I don't know when to put all of my things in one file or use multiple files.  If someone could please tell me how to take the changes i have made (mostly changing values) and set them up as a "mod" (instead of using changed core files) that would help a lot.

 

I hate to ask stupid questions like this but this feels a lot harder than civ, but i am sure i can adjust once i know how to set things up to work. Half of my changes are to ElementalDefs, i have also changed values of numerous items and spells, and changed the starting traits/penalties (and making the henchmen traits available for sov creation).  I am not sure i would ever upload it because it is after all just a personal project however if i can eventually set it up to work as a mod instead of by core file edits, i might consider it once i finish it.

 

My compliments overall to the bajillions of conditions, effects and functions i am able to use! Now if only i could figure out how to sort it correctly. Thank you for your patience.

12,730 views 26 replies
Reply #1 Top

I believe you'll find some answers here https://forums.elementalgame.com/437102

For ElementalDefs.xml you need to copy the entire file to /Mods/ folder and then change it. You can't take just a part of it to edit.

Reply #2 Top

ah, so i just create one folder (for the mod) then a file for weapons, file for armor, file for spells, a copy of the modified ElementalDefs -

Are there any other files i will need the whole file there for or just ElementalDefs?  I have made changes to CoreWorldResources, CoreShards, CoreWeapons, CoreArmor, CoreItems, CoreQuests, CoreUnits, CoreUnitStats, CoreAbilities, CoreSpells, Treaties, TaxRateDefs and Wildlands.

 

So far i think i will try to make 3 subfolders - Unit Changes, Equipment Changes, Sovereign/Faction Changes.

 

Would i be able to make a Faction trait that costs 1 point and gives 2 Sovereign Creation points to sovereigns made with that faction?  I know how to make the trait but i have no idea how to add points to the Sovereign Creation screen for that faction.

Reply #3 Top

Coreworldresources
CoreShards
CoreWeapons
CoreArmor
CoreItems
CoreQuests
CoreUnits
CoreUnitstats

those you should only copy what you intend to change or add

CoreAbilities
CoreImprovements

those are special, when you re-define an existing type the old tags are not forgotten. See https://forums.elementalgame.com/434780

CoreSpells also see the link above

Treatires, TaxRateDefs and Wildlands I don't know.

 

 

 

Just so we are on the same page ,the /mods folder should be in My Documents\My Games\FallenEnchantress\ not the installation directory.

 

I don't believe that you can give a faction +2 sovereign points as a faction trait. You may be able to tie it to the blood trait by giving it a cost of -1, although I haven't tried that.

Reply #4 Top

After catching up on the tutorials i am surprised that it "just reads" the My Games\FallenEnchantress\Mods folder.

 

So, last question. I would like to make an item. I want to call it "Blade Attachment". I choose the gladiator armor for the icon and base it on a two-handed weapon. Lets pretend i make a race called "Mechos".  Will i be able to make "Mechos Arms" only available to mechos on creation? Would i be able to make "Mechos Blood" prerequisite to equip it?

Is it possible to make an item non removable once equipped? (Fusion Arm).

Lastly, lets say i want "Mechos" to have a new building, "Factory". I know how to make the building but i do not know how to make it so only Mechos can build it. Thank you for your patience - i have the rest figured out so far.

Reply #5 Top

1) You can have an item restricted to a faction or a race for unit design and the shop, but there is no good way to limit a random item found in loot to Mechos only. You cannot use the bloodline as prerequisite, items only accept the unit's level as prerequisite for champions.

2) Only if you put it in at the unit's creation (unit design/custom sov creation). Otherwise no.

3) The easiest way is to give your faction a new faction ability. For example the Scrying Pool improvement has this:

        <Prereq>
            <Type>AbilityBonusOption</Type>
            <Attribute>Enchanters</Attribute>
            <Target>Player</Target>
        </Prereq>

which links to this in CoreAbilities.xml

    <AbilityBonus InternalName="EnchantersAbility">
        <AbilityBonusType>Player</AbilityBonusType>
        <AbilityBonusOption InternalName="Enchanters">
            <DisplayName>Enchanters</DisplayName>
            <Description>Unlocks the Sindarian Staff, which gives additional Dodge, and the Leht Staff, which fires lightning.  It also unlocks the Scrying Pool improvement which gives the city an extra Essence.</Description>
            <Icon>Ability_Runemasters_Icon.png</Icon>
            <GameModifier>
                <Provides>Unlocks the Sindarian Staff, which gives additional Dodge, and the Leht Staff, which fires lightning</Provides>
            </GameModifier>
            <GameModifier>
                <Provides>Unlocks the Scrying Pool improvement which gives the city an extra Essence</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

and it is applied to the Pariden faction in their CoreRaceConfigs.xml

<SelAbilityBonusOption>Enchanters</SelAbilityBonusOption>

Reply #6 Top

Can i use the /mygames folder to mod a default nation or sovereign?  For instance, i intend to remove Warrior Tech and add that ability to Warrior Caste.

My concern is doing this might have adverse effects to the default nations.  Yithril has both Warriors Tech and Warrior Caste.

 

So, i changed warrior caste to

            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>A_TrainedUnitBonusLevels</StrVal>
                <Value>1</Value>
                <Provides>+1 Level for Trained Units</Provides>
            </GameModifier>
                 <GameModifier>
                <ModType>Player</ModType>
                <Attribute>UnlockTech</Attribute>
                <StrVal>Training</StrVal>
                <Provides>Faction starts with the Training technology, allowing them to construct Barracks and train Spearmen</Provides>
            </GameModifier>
            <Cost>1</Cost>

End of quote

 

Now, how do i make the WarriorsTech dissapear? (or for simplicity, just disable it from showing up?  Can i place both my new warriors caste and a modified warriors tech into the /mygames folder to overwrite the "WarriorsTech" to be removed, and the "Warriors Caste" have both effects? The hope is to avoid "conflicts".

Reply #7 Top

Unfortunately both RaceConfigs and AbilityBonusOptions are not overwriting properly right now from the /mods/ folder.

Instead of trying to change the existing faction abilities, why not create a new one instead?

Reply #8 Top

I would just create Warrior Society to combine the 2, however I am afraid default guys like Yithril will go bonkers if WarriorsTech is not there. It would feel redundant to have Warriors, Warrior Caste and a third, combo of the 2 on the faction creation screen. Is there a way to just hide WarriorsTech and Warrior Caste and only show Warrior Society?

 

Ive already learned a lot in these short hours.

Reply #9 Top

Because of the bugs above I really can't think of a way to do it from the /mods/ folder.

The best I can think of would be to give them a cost of 5000 points or so.

Reply #10 Top

I reconsidered - I think i will make WarriorsTech add 10% attack (copied from tech tree) and civics add either 10% gildar or -10% unrest. This would allow me to make Warrior Caste give trained units -10% exp to level (instead of +1 level) if possible. 

Reply #11 Top

In CoreRaceTypes, i see the special units (slaves, henchmen, etc) coded in, and nowhere do i see the "train henchmen" ability to indicate a connection between Train Henchmen and Henchmen units.

 

I was hoping to grant a list of monster units (instead of human ones) to a trait and hook it to a bloodline...  Can a monster unit be made to equip items?  Can a champion or sovereign be an elemental or dragon?

Reply #12 Top

There isn't a direct connection between those traits and the units. The traits are freely given to sovereigns of that faction. The units are unlocked for everyone playing that faction's race.

I'm not sure if hooking new units to bloodlines is a good idea, since they appear on champions and sovereigns that surrender to you. I'd recommend linking them to faction traits instead.

A monster can be made to technically work like a champion, but you'll run into a lot of problems with the equipment. Generally speaking, a monster with <SkeletonPath>Gfx\HKB\Units\K_Male_Skeleton_01.hkb</SkeletonPath> will do fine if converted to a champion. Anything else probably won't work. Remember to set their UnitModelType to something standard.

Instead of making them champions that can equip gear, you can also make them just normal units that get traits on level-up like the Sion.

Reply #13 Top

   <AbilityBonus InternalName="WarriorCasteAbility">
        <AbilityBonusType>Player</AbilityBonusType>
        <AbilityBonusOption InternalName="WarriorCaste">
            <DisplayName>Warrior Caste</DisplayName>
            <Description>Units require -10% Experience for level</Description>
            <Icon>Ability_WarriorCaste_Icon.png</Icon>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>UnitStat_ExpToNextLevel</StrVal>
                <Value>-0.1</Value>
                <Provides>Units require -10% Experience for level</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

End of quote

 

Hopefully this will reduce -10% exp to level up from all units trained by said faction.

    <AbilityBonus InternalName="WarriorsTechAbility">
        <AbilityBonusType>Player</AbilityBonusType>
        <AbilityBonusOption InternalName="WarriorsTech">
            <DisplayName>Warriors</DisplayName>
            <Description>Faction starts with the Training technology, allowing them to construct Barracks and train Spearmen</Description>
            <Icon>Ability_Warriors_Icon.png</Icon>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>UnlockTech</Attribute>
                <StrVal>Training</StrVal>
                <Provides>Faction starts with the Training technology, allowing them to construct Barracks and train Spearmen</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>A_TrainedUnitBonusLevels</StrVal>
                <Value>1</Value>
                <Provides>+1 Level for Trained Units</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

End of quote

 

Now, both of these should be worth taking.  I considered using the values of "Trainer" or "Bard" however i realized giving each unit that could get out of hand.

 

So i can not make the Binding Elementals, and various demons wear armor or weapons. I won't let it ruin this for me, instead i will give this faction some other bonus.  Some factions can not use ranged weapons or armor - perhaps i should design this one with the idea that it won't be able to use either up front and instead give these units a few abilities such as bash, maul, or a few spells. I could even give a few special buildings that add bonuses to units.

 

This feels a lot like D&D.

This is part of what i like about FE - there are other ways to do almost anything. 

Reply #14 Top

I'm not sure about that first trait, I don't think you can affect next level exp like that. I can't think of a good way to do it though, besides making an item accessory you can equip for free.

 

Reply #15 Top

Yes, UnitStat_ExpToNextLevel is a "wrapper". Those are calculated unitstats, you cannot modify it. To boost experience, use UnitStat_ExpBonus. Although I'm not sure how to implement it for free for all trained units to get +10% experience... other than to make an accessory item.

Reply #16 Top

I was hoping to just reduce the overall exp needed to level rather than adjusting the exp rewarded per battle. I guess i can't do that, but i could have it give the altar bloodline for free to trained units? Or give trained units a trait similar to potential, trainer or knowledge?

 

I could just make it give "Commander" to the sovereign.  I was going to make it a Sovereign trait, but instead i could make Warrior Caste do this.

    <AbilityBonus InternalName="WarriorCaste">
        <AbilityBonusType>Champion_Talent</WarriorCaste>
        <AbilityBonusOption InternalName="Commander">
            <DisplayName>Commander</DisplayName>
            <Description>+10% Experience</Description>
            <Icon>Ability_TrainerI_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>Training</StrVal>
                <Value>10</Value>
                <Provides>+10% Experience</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Defensive</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

End of quote

Would this cause "Trained Units" to get 10% experience bonus (similar to being created with potential)?  Could i give trained units Altarian Bloodline?

Reply #17 Top

I don't recognize "Training" in that context.

We used to be able to apply a trait to all trained units, but I just looked it up and it's not working anymore.

Perhaps a spell that you cast on all your cities? That could give all trained units from those cities a trait.

If this were any other stat than experience it would be a lot easier. It's very easy, for example, to just give a faction +10% accuracy. But experience is a bit tricky since the ExpBonus unitstat is 0 from the start.

Reply #18 Top

Maybe i could give all units +5 defense?  Tough gives all units 10% hit points for the faction, i could use that "base" and instead copy in the stoneskin effect changing 3 to 5?  or maybe 2 would be better balanced unless i want <cost>2<cost> which would almost be worth defense 3...

 

If i give Defense 3, how would that treat Binding demons and trained spiders/summoned wargs, bandits, silver tounge, etc.? (assuming i use toughness as a base to give "all units in the faction"

Reply #19 Top

      

    <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AdjustArmyStat</Attribute>
                <StrVal>UnitStat_ExpBonus</StrVal>
                <Value>15</Value>
                <Provides>+15% to the Army's Experience</Provides>
            </GameModifier>

End of quote

Would this work? ToughEmpire and General provided the idea for it.

Reply #20 Top

I don't think so. I really can't think of a way besides adding an accessory or a spell you cast on every city.

Reply #21 Top

I am a little lost on syntax, which of these has what consequences? I am trying to make "every army" have +3 defense, not every individual troop. I can live with this being a sovereign ability that applies to his army but prefer to make it a faction ability that applies to "all armies".

 

    </AbilityBonus>
        <AbilityBonus InternalName="LegionAbility">
        <AbilityBonusType>Player</AbilityBonusType>
        <AbilityBonusOption InternalName="Legion">
            <DisplayName>Legion</DisplayName>
            <Description>+3 to the Army's Defense</Description>
            <Icon>Ability_TrainerI_Icon.png</Icon>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>UnitStat_Defense_Blunt</StrVal>
                <Value>3</Value>
                <Provides>+3 to the army's Blunt Defense</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>UnitStat_Defense_Cutting</StrVal>
                <Value>3</Value>
                <Provides>+3 to the army's Cutting Defense</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>UnitStat_Defense_Pierce</StrVal>
                <Value>3</Value>
                <Provides>+3 to the army's Pierce Defense</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
    </AbilityBonusOption>


    </AbilityBonus>
        <AbilityBonus InternalName="Legion2Ability">
        <AbilityBonusType>Player</AbilityBonusType>
        <AbilityBonusOption InternalName="Legion2">
            <DisplayName>Legion 2</DisplayName>
            <Description>+3 to the Army's Defense</Description>
            <Icon>Ability_TrainerI_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustArmyStat</Attribute>
                <StrVal>UnitStat_Defense_Blunt</StrVal>
                <Value>3</Value>
                <Provides>+3 to the army's Blunt Defense</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustArmyStat</Attribute>
                <StrVal>UnitStat_Defense_Cutting</StrVal>
                <Value>3</Value>
                <Provides>+3 to the army's Cutting Defense</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustArmyStat</Attribute>
                <StrVal>UnitStat_Defense_Pierce</StrVal>
                <Value>3</Value>
                <Provides>+3 to the army's Pierce Defense</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
    </AbilityBonusOption>
    </AbilityBonus>

End of quote
Reply #22 Top

as for exp, i will just attempt this for a sovereign ability instead.

 

    <AbilityBonus InternalName="CommanderAbility">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
        <AbilityBonusOption InternalName="Commander">
            <DisplayName>Commander</DisplayName>
            <Description>+15% to the army's experience</Description>
            <Icon>Ability_TrainerI_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustArmyStat</Attribute>
                <StrVal>UnitStat_ExpBonus</StrVal>
                <Value>15</Value>
                <Provides>+15% to the Army's Experience</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
    </AbilityBonusOption>

End of quote
Reply #23 Top

We used to be able to apply a faction ability trait to all trained units, but it doesn't work anymore. I can't think of a way to automate it.

Reply #24 Top

could something like this be done?

            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustArmyStat</Attribute>
                <StrVal>UnitStat_Attack_Boost</StrVal>
                <Value>3</Value>
            </GameModifier>

End of quote

 

So i can not effects related to ModType Player with AdjustArmyStat - only ModType Player. I am trying to learn when to use ModType Player, Unit, Champion_Talent - and what Attributes (AdjustUnitStat, AdjustArmyStat, etc) i can use with which.

Reply #25 Top

I haven't tried that, but I do happen to know WolframAlpha did just that in a mod the other day for a trait owned by a champion.

Sounds like you are heading into that territory where no one has ventured before.