Fallen Enchantress: Legendary Heroes

Fallen Enchantress: Legendary Heroes

Not enough ratings
Fallen Enchantress Modding Introduction
By these people
A quick overview of some of the modding capability for Fallen Enchantress.
   
Award
Favorite
Favorited
Unfavorite
Introduction
It is relatively easy to add gear, attributes, spells, and many other gameplay items to Fallen Enchantress due to its intentionally straightforward data design. Clearly, the capability was important to the developers. They have provided other tools to mod other aspects of the game: A tile creator to design the look of an individual overworld map tile, a map editor to design gameplay maps, a particle creator to make your own particle effects, and a faction creator to add your own factions to the game. Each of these could have a guide of their own. This guide will focus on items that can be added to the game through use of XML. It assumes prior XML knowledge.
Getting Started
First, in order to use mods you'll need to enable them in Fallen Enchantress. It's under “Options” in the left-hand side “General” column.


Once this is activated, the game will search the mods folder for files. By default it should be in Documents\My Games\FallenEnchantress\Mods (Or, for Legendary Heroes, in Documents\My Games\LegendaryHeroes\Mods).



Also by default, there will be a few folders. New XML files you introduce can go in subfolders you create, much like I have set up here.

The “Dodgy Staff” folder is one I have created and put my modded items in. This is useful for organizing your mods, so you can enable/disable them by swapping out folders. We'll go over exactly what I have put into Dodgy Staff later.

The last thing you'll want are the default data files. These are to be used as a reference and example of what can be done. These can be found in the Steam\SteamApps\common\Elemental Fallen Enchantress\data\English folder (Or Steam\SteamApps\common\FE Legendary Heroes\data\English for Legendary Heroes).



Just about everything is implemented through these XML files, and what all can be done with them is beyond the scope of this guide. First we'll be looking at CoreArmor, CoreItems and CoreWeapons to learn how to add new equippables to the game.
Let's Add a Weapon!
Whoa, slow down there, chief. First let's take a look at the XML structure of the weapon:



Here's part of the club's pertinent tags. (And yes, my Dodgy Staff file is open in another tab! Excitement!)

The GameItemType tag and its InternalName are required. Make sure to chose a unique internal name. The player, however, will never need to see it, so don't worry too much about what you choose as long as it's unique, has no spaces, and you can remember it when you need to refer to it.

The DisplayName tag is what gives it the name the player actually sees. Whatever is between this will be the name of the item. Likewise, the Description tag defines the Description of the item. This is pure flavor, so just give it an interesting string.

The Type tag is where things start getting interesting. GameItemType covers a lot of different ground, so in this instance it needs to be identified as a weapon. Similarly, WeaponType and WeaponUpgradeType both help define the kind of weapon it is. The options for WeaponType include Blunt, Spear, Staff, TwoHanded, and OneHanded, while the options to WeaponUpgradeType include Blunt, Staff, ColdStaff, FireStaff, Spear, Axe, and Blade. The difference is that WeaponType defines how it is wielded, while WeaponUpgradeType defines what class it belongs to.

CanBeEquipped is a simple boolean. Set it to 1 if the item is equippable. This will be true for most weapons.

AdditionalTrainingTurns adds to the base training time. This, in addition to special resource costs, is used to balance weapons' cost against their power. If you're trying to create a balanced mod, keep that in mind and look at other weapons to get a sense of what this should be.

ShopValue has a similar purpose: For items that your champions find lying around, this is the value that a shop will sell it for. (They will buy it for 1/5th the price, quite a racket if you ask me!)

GameModifier is the tag where the magic happens! Sometimes literally. GameModifier tags tell exactly what this item does. An item can have multiple GameModifier tags and each has a number of nested tags.

The ModType tag defines what gets modified. For Weapons, Armor and Items this is almost always Unit – it means that whatever Unit it is equipped to is the thing that gets these modifiers. Attribute defines kind of modifier it is. In this case, Club has three GameModifiers that each have AdjustUnitStat. Which stat gets adjusted is defined by the StrVal tag, and how much it gets adjusted by is defined by Value. UnitStat_Attack_Pierce is the generic physical damage. UnitStat_CombatSpeed is Initiative.

UnitStat_BashChance is kind of special. It adds the bash passive ability. Value there is related to the chance of it occurring – I believe it is the percentage of damage that applies to the bash chance. The Provides tag in that particular GameModifier is a text string that summarizes the ability for the player. The string itself doesn't have a gameplay effect, but you should let the player know what it does.

The next (and last) GameModifier that the Club has has the UnlockCombatAbility Attribute, which grants the Unit the Combat Ability listed in StrVal. This StrVal is actually the InternalName of an Ability defined elsewhere, so if you desire, you can make a new Ability and apply it to a new weapon! (More on Abilities later!) Once again, Provides is just a text string.

IsAvailableForSovereignCustomization is another boolean value. Set it to 1 to let it be available for selection when creating a sovereign.

RarityDisplay has absolutely nothing to do with ponies. (Valid values are Common, Uncommon, Rare and Unique, though it appears to just be a string.)

The Prereq tag has a series of nested tags. It lists a prerequisite condition that needs to be met before the item can be equipped. The example for the club shows that the Player needs to have GreatHammers. As you can see, it's similar to GameModifier.

AIData helps control the AI's decisions when choosing weapons. This shows a priority of “80” as a blunt weapon.

ArtDef defines which model the item uses. The GameItemTypeArtDef tag is only needed if you're defining a new model. If you're going to reuse one already in, it's unneeded. Creating new models is also beyond the scope of this guide. (As well as my abilities.)

There are a number of other tags that can appear, such as Likelihood, which governs actual item rarity; and the boolean HeroOnly, which means it can't be selected for normal units. Looking through the files and experimenting is a good way to figure out what they all do.
Now Let's Add a Weapon!
Now that we've looked at the basic layout of a weapon, let's look at my custom staff!



Here you can see my custom staff – the Felisian Staff. It has a new and important tag: ProductionRequirement. This can be added to make the item cost resources, in this case 5 refined crystal. You can also see some different GameModifier tags adjusting weight, dodge,



and max counter attacks. You also see an example of using a researched technology in the Prereq tag.
6 Comments
umer99115 Aug 27, 2020 @ 1:05pm 
can i get a copy of weapon mod please? Wanted to mess with it for a bit
[WEDC]grandmasterB Jan 18, 2015 @ 2:22am 
tyvm, awesome forum. gonna keep me bussy for way to long :-D
these people  [author] Jan 17, 2015 @ 5:17pm 
Sadly, no, there isn't a Steam workshop for it. :( However, you can go to the Modding forums to find mods. This post is particularly helpful: http://forums.elementalgame.com/446461
[WEDC]grandmasterB Jan 17, 2015 @ 12:57pm 
so there arent pre made mods i can steam dowload? gotta make it myselfe :(
it realy enhances a gaming community.
these people  [author] Jan 17, 2015 @ 10:00am 
Yes, that's correct! It's really just a mod I made for myself, since I wanted to have an option for a later-game staff that granted dodge. But it also made a good example.
[WEDC]grandmasterB Jan 16, 2015 @ 1:01pm 
the dodgy staff in the excitement tab lets you play with your felisian staff if i got it correctly :)