1. Elemental: Reforged
  2. News
  3. Dev Journal #11: Modding your own Fantasy World

Dev Journal #11: Modding your own Fantasy World

[p]The Elemental series is, by far, the most expansive that Stardock has ever made; most of it was barely exposed to the player base in our quest to reduce memory. This time, not only can we expose it all, we can enhance it and integrate into Steam Workshop.[/p][p]The dated visuals of Elemental: Reforged do have one major advantage: It makes modding a lot more approachable and easier. Let’s take a look at what we have and what we want to do.[/p][p][/p]
The Tile Editor
[p]Every cup, every barrel, every table in this game is placed onto an area which then gets saved out as a tile. Quests, Goodie Huts, City Improvements, etc. all reference a tile. Under the covers, these are just XML files that reference the little 3D assets (now FBX files).[/p][p]Here’s me making a backyard BBQ…poorly.[/p][p][/p][p][/p][p]I have a huge palette of things I can choose from to put in there, including little people, particle effects, furniture, buildings, you name it.[/p][p][/p][p][/p][p]Here I’ve made a little keep. You can see the pieces at the top.[/p][p]When I’m done, I will have two options:[/p]
  1. [p]Save it to disk.[/p]
  2. [p]Upload it to Steam Workshop. (We do plan to support other modding platforms later.)[/p]
[p][/p][h2]Using Tiles for Quests, Improvements and Lairs[/h2][p]A tile design on its own doesn’t do much. It needs to be hooked to something:[/p]
  1. [p]A quest location.[/p]
  2. [p]A City Improvement.[/p]
  3. [p]A Goodie Hut / Monster Lair.[/p]
  4. [p]etc.[/p]
[p]Let’s start with City Improvements. [/p][p]Right now, it’s quicker for us to just make an improvement in XML. Here’s what the Merchant looks like:[/p]

TXT_IMPROVEMENTS_MERCHANT_DISPLAYNAME
TXT_IMPROVEMENTS_MERCHANT_DESCRIPTION
1
River
SwampTerrain
City
Category:Land
Forest
110

Resource
Gold
2
1
TXT_PROVIDES_GILDAR_PER_SEASON_2
1


12
Merchant

Art_Merchant
[p]Now, we understand some people might find this intimidating, so either we or someone else (here’s a good “Vibe Coder” thing) will crank out a little front end to make this even easier. [/p][p]The ArtDef at the bottom is where the tile design comes in:[/p]
      
KingdomStyle
K_Merchant_01
K_Construction1x1_01
Improvement_Merchant.png
Improvement_Merchant_C.png
K_Merchant_02_Thumb.png

K_Merchant_02_Thumb.png

[p]The Tile Design is the file name of the thing you saved, plus you can have some icons and such for it that are just PNGs.[/p][p][/p]
Making Maps
[p]The map editor was a labor of love for us. We loved maps of Middle Earth, whether it be the Third Age or Beleriand, and you can tell on this map editor that we designed it to make fantasy maps.[/p][p][/p][p][/p][p]Like with the Tile Editor, players will be able to save a map to disk or share it on Steam Workshop.[/p][p]You can create full-on stories with this by putting quest locations and such.[/p][p][/p][h2]Quests[/h2][p]Speaking of quests… They are super easy to make.[/p][p]When you see our quest format, we think you’re going to love it if you’ve ever had to…deal with other systems:[/p]

TXT_QUESTS_QUEST_FEARFUL_MERCHANT_DISPLAYNAME
TXT_QUESTS_QUEST_FEARFUL_MERCHANT_DESCRIPTION
1
TXT_QUESTS_FEARFUL_MERCHANT_REWARDTEXT
Armor_WardingKiteShield.png
Minor
1
QuestLocation
EventLocation
1
Rank_MorriganTheMad.png
QuestLoc_Inn1


Unit
GiveExperience
6




Resource
Fame
10



0
1
TXT_QUESTS_FEARFUL_MERCHANT_OBJECTIVE0_DESC


Map
CreateGoodieHut
Terrorized Workshop
GH_Quest_Workshop
6




Mana_32.png
TXT_QUESTS_FEARFUL_MERCHANT_OBJECTIVE0_TEXT
0

Success
ClearGoodieHut
GH_Quest_Workshop
RevealTarget

TXT_QUESTS_FEARFUL_MERCHANT_OBJECTIVE0_CHOICETEXT
M_Darkling_Shaman_Card.png
Gfx\\\\Medallions\\\\Medallion_Frame_01.png

TXT_QUESTS_FEARFUL_MERCHANT_CHOICE0_DESC
1

100
DarklingShaman
0
0

DarklingShaman
Brunthus the Tenebrous
5


Darkling
UnitGroupingType_Party
1


Darkling
UnitGroupingType_Party
1




TXT_QUESTS_FEARFUL_MERCHANT_CHOICE1_DESC
0
TXT_QUESTS_FEARFUL_MERCHANT_CHOICE1_POPUP



1
2
0


Mana_32.png
TXT_QUESTS_FEARFUL_MERCHANT_OBJECTIVE0_TEXT
0

Success
BattleFinished
DarklingShaman
Victory

TXT_QUESTS_FEARFUL_MERCHANT_OBJECTIVE1_CHOICETEXT
Crates.png
Medallion_Frame_01.png

TXT_QUESTS_FEARFUL_MERCHANT_CHOICE2_DESC
2


Resource
Metal
50




TXT_QUESTS_FEARFUL_MERCHANT_CHOICE3_DESC
2


GiveItem
KiteShield_Warding





2
1

[p]Like with the Improvements, someone, or us, will make some simple friendly front end for this, but making quests is ridiculously simple. BTW, you can hard code your text here…not that we did…cough.[/p][p]It may look long until you realize it’s just a recipe for what happens when and where. All the assets involved are either XML or PNGs.[/p][p]So, want to just make an RPG story to share with your friends or the general public? Here you go.[/p][p] [/p]
Particle Editor
[p]How about particles? For spells, or ambient effects? Yep you can do that here.[/p][p][/p][p][/p][p]And you can attach these to pretty much anything you want.[/p][p]Here’s how spells are done:[/p]

TXT_SPELLS_HASTE_DISPLAYNAME
TXT_SPELLS_HASTE_DESCRIPTION
TXT_SPELLS_HASTE_FORMATTEDDESCRIPTION
T_Haste_Painting.png
T_Haste_Icon.png
1
0
Unit
UnitEnchantment
Tactical
Defensive
Buff
FriendlyUnit
Haste_Adept

AbilityBonusOption
Air1


Mana
5


Unit
AdjustUnitStat
UnitStat_CombatSpeed
1
Hasted
-1
E_Celerity_Particle

\[UnitOwner_GetNumAirShards]


\[Calc] + 5


\[Calc] + 5



255

IsTargetWorthy

\[Unit_GetHPCurrent]


\[Calc] > 10



Spell_Haste_01
Spell_Haste_02
[p]This is the Haste Spell.[/p][p]See the E_Celerity_Particle?[/p][p]That’s just the name of the saved file: i.e,. E_Celerity_Particle.xml. I kid you not. You just make your effect, save it to disk (or download it from Steam) and refer to the file. As long as it’s in the “data” directory it’ll find it (have you noticed you don’t have to put in file paths?).[/p][p][/p]
Making and Sharing Civilizations
[p]This is an area of immense potential (now). Because Reforged supports FBX, there’s nothing stopping 3D artists from making their own unique races (and probably showing us up), but you can also make your own civilization.[/p][p][/p][p][/p][p]So, while we don’t intend to have Elves, Dwarves, Orcs and so forth in, modders will be able to do some crazy things.[/p][p][/p][h2]The Power Of 64-Bit[/h2][p]In the original War of Magic and Fallen Enchantress, we had these tools, but we didn’t dare look at them funny because we’d get out of memory errors if we added say too many chairs to a scene or made a map with one too many quests. It was extremely painful and frustrating. By today’s standards, this game has pretty small memory requirements, but in 2010, it was brushing up against the 2GB limit.[/p][p]My friend and, back in 2010, competitor, Dan Baker was dealing with this as the lead graphics engineer on Civilization V, which shipped a month later. They were pulling every trick they could to make Civilization V run on 32-bit machines without crashing. The change to 64-bit was, no pun intended, game changing, and now, thanks to it, you will soon have the ability to build your own fantasy worlds.[/p]