Brad Wardell's Blog


Elemental Modding: Part 2 – New Factions

Published on Monday, August 2, 2010 By Brad Wardell In Elemental Dev Journals

During the early betas of Elemental, we let users creation their own factions during the game setup. But over time, we kept getting more and more good ideas on how to make this more sophisticated that it became impractical to foist such a complex system onto the player (the UI would just get crazy).

Moreover, having to UI drive faction creation was resulting in factions that were more or less the same. So we moved this into the area of modding.

Let’s create a new faction. I’m going to create a new file called Froglers.xml and put it into my units directory in documents\my games\elemental

Inside I’m putting this file:

<RaceConfigs>

    <RaceConfig InternalName="Froglers">
        <DisplayName>Frog People</DisplayName>
        <Capital>Ribit</Capital>
        <ShortName>Froglers</ShortName>
        <LeaderName>Frogboy</LeaderName>
        <PopulaceName>Human</PopulaceName>
        <Description>This amphibious race hops on all fours.</Description>
        <Alignment>Good</Alignment>
        <FactionAllegiance>Kingdom</FactionAllegiance>
    <DefaultCityWallSet>CityWalls_Fence</DefaultCityWallSet>
    <NewCityHubType>Outpost</NewCityHubType>
    <CapitalHubType>Outpost</CapitalHubType>
    <!-- Race Stuff -->
    <RaceClassification>Frogs</RaceClassification>
    <RaceDisplayName>Frogs</RaceDisplayName>
    <RaceInternalName>Race_Type_Frogs</RaceInternalName>
    <MaleUnitType>Skath</MaleUnitType>
    <FemaleUnitType>Skath</FemaleUnitType>
    <GenericUnitType_Male>Skath</GenericUnitType_Male>
    <GenericUnitType_Female>Skath</GenericUnitType_Female>
    <TraderUnitType>Skath</TraderUnitType>
    <StartingUnitType>Kingdom_Soldier</StartingUnitType>
    <StartingUnitType>Kingdom_Pioneer</StartingUnitType>
    <ChooseFactionBack>Faction_Background_Altar.png</ChooseFactionBack>
    <UnitScale>1.0</UnitScale>
    <UnitSkinColor>32,255,32</UnitSkinColor>
    <UnitHairColor>155,255,75</UnitHairColor>
    <UnitClothing1Color>120,25,20,255</UnitClothing1Color>
    <UnitClothing2Color>78,60,55,255</UnitClothing2Color>
    <UnitMetalColor>145,145,145,255</UnitMetalColor>
    <BuildingPrimaryColor>165,255,130</BuildingPrimaryColor>
    <BuildingSecondaryColor>75,255,50</BuildingSecondaryColor>
    <BuildingRoofColor>90,255,10</BuildingRoofColor>
    <ZoneOfControlColor>165,255,30</ZoneOfControlColor>
    <TechTree>TechTree_Froglers</TechTree>
    <KnownStartingTech>Frogler_Starts</KnownStartingTech>
    <EnvironmentTerrainType>2</EnvironmentTerrainType>
    <PreferredLogoType>KingdomCrest2</PreferredLogoType>
    <SovereignUnitType>Lord_Relias</SovereignUnitType>
    <Spellbook>LifeSpellbook</Spellbook>
    <A_CoreManaRegeneration>50</A_CoreManaRegeneration>
  </RaceConfig>

</RaceConfigs>

 

Now, if you pop this in it’ll crash. That’s because we have to define some things first:

  1. RaceClassification
  2. RaceInternalName
  3. TechTree
  4. KnownStartingTech

Without those 4 things defined, the game won’t know what to do with this faction.  It is in these 4 things that we ultimately make what is special and unique.

I also cheated in terms of the 3D modeling. I used Skaths as my units. Skaths kind of look like frogs in the game so I figured…

We’ll need to define what Frogs are as a race. And we’ll need to come up with a technology tree for them.

Stay tuned.

Elemental Modding: Part 1 – The Basics

Published on Monday, August 2, 2010 By Brad Wardell In Elemental Dev Journals

The first thing to understand about Elemental is that almost everything is put into the DATA directory of Elemental (in program files\stardock\elemental.

By contrast, things you mod should go into the documents\my games\elemental\units directory in general (eventually we’ll just put a general mods directory).

Inside the Data folder is the English directory. As its name implies, we switch this directory based on localization (so there will eventually be a German, French, Spanish, Italian, Polish, Russian, etc. directory).

If you change HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Stardock\Drengin.net\Elemental to have language be say German, I THINK you can actually create a sub-directory called German, copy everything from English into it and start making a German version but I haven’t tried this yet.

Basic Rules to Follow

Here are some basic rules to follow:

  1. The files are irrelevant. Don’t try add on to an existing file. Create a new file. My suggestion is to create files named like UserName_TypeOfFile (example: Frogboy_KlingonRace.xml)
  2. The directories matter. The game scans certain directories at certain times during loading. It goes by the XML keys inside the files and loads them as necessary. Units get loaded up at the launch of the game (something we need to fix because it causes the game to kind of hang).
  3. The XML keys are the (no pun intended) the key. For instance, there’s a file called CoreBoots.xml. The game could care less about that. What it does care is that at the top of the file it says <GameItemTypes>. That means the game will read these in as game items.
  4. Be aware that these XML files have to be read in by the game. If you find loading slow, it’s because it’s parsing megs of XML files as is. It’s a constant battle we’ve faced – wanting to give you fancy stuff without slowing down the loading of the game.

The Basic Objects

Near the top of any XML file you can find out what type of objects are going to be in that file. Elemental has only a handful to deal with:

  • GameItemTypes (things a unit may have on it)
  • UnitTypes (Types of units – a dragon, a bandit, an ogre, Procipinee)
  • MapTypes (Types of maps, currently tiny, small, medium, large, tactical). You can add your own of any size.
  • Spells (Spell Definitions – Fireball, Haste, etc.)
  • TerrainTypes (want more terrains? You can add plenty of additional terrains, this is also where you specify what tactical battle maps should come up. In beta 4, we only have 1 per terrain. yawn)
  • Campaigns (want to make your own RPG? This object type defines them)
  • ImprovementType(for adding city improvements)
  • Quests (defining quests)
  • TileDesigns (these are created by the tile editor) Nearly all our XML files in the game are these.
  • EffectBlueprints (these are credit with the effects editor)
  • GoodieHutTypes (these are the notable locations)
  • QuestLocations (these are where quests originate)
  • MultiplayerMaps (these are maps that will be used as seeds for single and multiplayer)
  • AbilityBonuses (this is where special abilities are added for units, in beta 4 we don’t really use this but in the release version we will)
  • RaceConfigs (this is where you define entirely new factions)
  • TechTrees (this is where we specify specific technology trees. In beta 4 we only have two, eventually each faction will get its own)
  • AIPersonalities (this is where we define AI personalities for use by the game, in beta 4 we only have 1. And until i’m happy with the AI, there will only be 1 made by me).

Over the coming weeks, we’ll go over this one by one. If someone wants to put this into a wiki and elsewhere, that would be great.

LA Bound

Published on Monday, August 2, 2010 By Brad Wardell In Elemental Dev Journals

Paul Boyer and I are on our way to LA to demo the near final version of Elemental. G4’s Xplay is our first stop. It’ll be the first time that the finalized UI system starts to get shown.

Wish us luck!

Mod Week Begins

Published on Monday, August 2, 2010 By Brad Wardell In Elemental Dev Journals

This week, as time permits, I’m going to start documenting all the files and mods for players.

If the community wants to set up a Wiki or something to put this stuff together in, that would be great.

Here’s my first tip because it’s been driving me crazy:

image

In RangedAttackspells.xml you can change the speed of the arrow.  Right now, it’s crazy slow and it’s absolutely maddening.

Elemental: We’re so excited!

Published on Saturday, July 31, 2010 By Brad Wardell In Elemental Dev Journals

imageAugust 24th…HURRY UP!

First off, we’re so ready to not be dealing with the beta content. If I have to deal with “You got Gildar!” one more time I’m going to scream. If I go into a tactical battle able to cast a half dozen spells per turn with a single unit I think I’ll curl up. Dealing with the UI as it is in beta 4 makes me cringe.

But it’s more than that. A lot more than that.

What is Elemental? What can you expect? How can you explain it to other people?

I’ve been bedeviled with this issue for months when marketing wants me to explain what Elemental is.

Consider this, my friends: How often do you see new AAA franchises begun? It’s pretty rare. And for good reason. Those of you in the beta understand.  When you are building on a sequel, if there’s something not done, you can just point to the previous  version’s code. In Elemental, we had nothing.

Moreover, when was the last time a new strategy game was made from scratch using the computing resources of 2010 versus  being tied to decade old design decisions? I remember in GalCiv, every time I wanted to eliminate its awful painful economic system (5 sliders!) I’d get screamed at by the community.

So again: What is Elemental?

The released version of Elemental is 3 things:

1. It’s a strategic RPG game (The Campaign = Book 1: Relias).

2. It’s a stand-alone strategy game (The sand box, which is where the beta has been about).

3. It’s a platform (The modding tools). The campaign is made with the mod tools.

The Campaigns for Elemental: War of Magic are broken into at least 3 books. The first book comes with the game. Relias. It’s had its own development team dedicated to just it and you guys haven’t seen it.  Here’s some hints: There is NO technology tree in it. It’s where all the cut scenes and Random House work has been going into and it rocks. Future books will be released in the future.

The stand alone game changes dramatically from week to week based on your feedback. And that’s the way we like it. I’ll be sad when the beta ends only because I really like hearing your ideas and criticisms. We get so inspired by some of the great ideas that the community has come up with.

We will really need to sit back and take an inventory on just how much of a massive impact for good that the beta has had.  Consider just the economic and research systems and how much better they are from our original concept.

Now, I do regret that those of you playing beta 4 will not easily recognize the final game. I mean that literally. The final game will look quite a bit different in terms of UI and gameplay. There are good reasons to hold back on this stuff until as late as possible.

Then there’s the platform.  Originally, we were going to make it all Python driven. But then we realized just how much we could do with XML. Eventually, we’ll expose in-game APIs as Python so people can do even more. But I have to say, the XML data driving has been a real game changer (did I mention that the campaign was done purely in XML?) As an old C programmer, I find this stuff amazing. Seriously, look at some of the spell books. How did they do randomization in XML? I don’t know. But they did it. I take back all the mean things I’ve said about Web developers and XML developers.

Stardock: We’re an indie

It’s not readily known but Stardock is one of the oldest game companies in the industry. Our first released game came out in 1994.  We were an OS/2 developer until 2000 so it’s only been in the past 10 years that most people have heard of our games.  But because we’re an indie with our own platform (Impulse) we can do as many updates as we want as often as we want. 

Let’s talk about the post-release updates:

1. The reviews and sales do not affect this. Even if people hate it, we love it. And we’ll keep working on it long after release because we love Elemental. We’re dedicated to it. And Stardock’s existence isn’t predicated on Elemental’s success.

2. Our updates are OPTIONAL. If you buy the retail DVD, you don’t have to update (at least not initially, we may get to a point with the modding tools this Fall where we’ll need people to update so that they can partake but we’ll see).

3. The point about optional updates matters. Because we will continue to make substantial updates to the game as time goes on. If you like the game as-is, you don’t have to update (unless you play MP).  But the beta community and us are constantly coming up with new ideas and I’m sure release players will have their own ideas.  I’d still like to see dungeon crawls in.  If you’ve played with the map editor, you’ll see we already support making Dungeons. I.e. we’ve already spent a lot of $$$ making art assets so you can make your own dungeons. But the game itself doesn’t have them. Yet.

4. We’re here.  When you’re on the forums, you’re not talking to just some support people (they’re here too! Hi guys!). You get to talk to us directly. We’ll agree, disagree, or give feedback.

Where will the game be available?

Okay, so here’s the deal on that:

In North America, you’re set.  Walmart, Best Buy, Gamestop have all been in the beta (yes, their buyers do play the games before they pick them up). And they all plan to carry it.  Pretty much everyone who carries PC games in North America will be carrying it.

Australia. They’re all set too. It’ll be at retail in Australia.

Russia. Yep. They’re set up too believe it or not.

Europe…Well, not so much. There are currently no plans to have a retail presence in Europe. I don’t want to talk too much about this lest I get into trouble but let’s just say, our previous games have been available in retail in western Europe and as much as we like making a nickel per copy sold, we think we’ll pass this time. The retail situation in Europe is just insane and in the age of digital distribution, we’re just not willing to put up with it anymore. One world. One price.  If there’s anything that would make the lives of Europeans easier in terms of getting the game via Impulse, let us know. I know people.

The Collector’s Edition

The response from retailers on the Collector’s Edition has been unexpectedly strong.  Having lots of in-box stuff (the Elemental CE box is going to be fat) seems to have hit a note with retailers and so many of them are picking it up.  We plan to only do one manufacturing run because well, frankly, the profit margins on the collector’s edition isn’t as good as the standard edition but even still, if you can afford it, get it. Holy cow is it awesome. If you miss the golden age of PC games (included 150+ of reading material, figurines, cloth maps, posters, etc.) get the collector’s edition.  As someone who has gone to bed reading various Civilization manuals over the years (and who can forget Ultima IV!?) the CE version really does make the case IMO as to why it’s good to give customers more than merely a piece of digital media.

What’s going to be better than Beta 4? What isn’t changing?

I think it’s pretty well known I don’t like Beta 4. I’m not a troll. I’m the designer. I’ll bullet point my gripes:

  • Casters should not get to cast spells more than 1 per turn.
  • The UI makes me cry. Clickity click click click. What’s going on?
  • Goodie huts are boooring.
  • The spells are booooring.
  • Tactical combat is boooring.
  • The spell books are confusing and make me feel violated and I’ve already consulted my attorneys about the issue. (Sorry Stardock, it’s too late already)
  • The spells are all the same and boring.

These are the kinds of things people can expect to change by release.  Technical people can tell you that this stuff is pretty trivial. Making a game is a lot like writing a term player expect that we have to program the word processor prior to actually writing the term paper. After programming the word processor, writing the term paper doesn’t seem so bad.

So we’re all here. Ready to make gaming history! Only 24 days remaining! Of course, bear in mind that Beta 4 and Beta 3C were only 7 days apart. So what I’m saying is that Elemental 1.0 on August 24th is going to be a first person shooter. Enjoy.

Regular lighting vs. advanced lighting

Published on Saturday, July 31, 2010 By Brad Wardell In Elemental Dev Journals

image image

It’s interesting to see a case where one isn’t definitely better than the other. Regular lighting looks pretty good I think. It’s sharper. Advanced lighting looks good too. It’s softer. I wonder if this should be renamed to Soft Lighting or something because it implies that one is more “advanced” than the other.

OUT OF MEMORY: WE NEED YOUR HELP!

Published on Friday, July 30, 2010 By Brad Wardell In WOM BETA Builds

There is a nasty memory leak that we're having a heck of a time tracking down.

It doesn't happen consistently and in fact, it doesn't happen to us at all.

Here is what we need:

1. If have experienced out of memory problems,  low the game resolution and run the game in a window so that you can bring up that task manager (Ctrl-Shift-Esc). 

2. On the Processes list, you should see Elemental. Its memory should start at around 600MB and, over the course of a game, creep up to around 1.2GB. This is normal. 

3. The memory, once you get going in the game, should NEVER go up by more than 5MB in a given turn.  If it does, then whatever is triggering the memory explosion has started.

4. We are looking for saved games, theories, debug.err files, anything that can help us reproduce it. If we can reproduce it, we can eliminate it in hours. But it's the reproducing that's giving us fits.

Thanks!

Farewell Goodie Huts

Published on Friday, July 30, 2010 By Brad Wardell In Elemental Dev Journals

As we move towards release many of the assets in the beta make their exit. We shall miss them (well, maybe not).

The finished quests start to get put into place, the finalized notable locations begin to be inserted and the unreleased spell books and special abilities start to get implemented.

The beta program has largely been about testing out systems and mechanics. Some mechanics, like the per city level building limiter, didn’t survive. Others, like influence based resource control, replaced them.

Memory Problems

The area we need the most help on right now has to do with out of memory issues. This is something we’re very concerned about because it’s not easily repeatable (but very easy for those who run into it).  So we’ll be asking users who run out of memory to get us their debug.err and their saved games so we can look at it. It could be as simple as some building in the game taking up some crazy amount.  It shouldn’t be hard to track down something that eats up over 100 megabytes per turn (or so you’d think anyway).

The other area we’d like to hear from you are all your ideas, suggestions and wish lists.  We want to make sure Elemental is something really special on day 1 as well as set the game on the path to evolving over time.

New Quests

One of the types of quests that I’m enjoying are the ones where you have to collect various items and bring them back to someone to get them made into a special item.  I’m looking at adding the ability to trade these items between players so if the AI players have found Midnight Stones (for instance) and you need one more to get the boots of eternal dodging then you can trade with them for that midnight stone (and vice versa if they need something the AI can come to you and try to trade for it).

Special Abilities

Here’s a sampling of some of the special abilities we’re putting in:

Poison Shot
Tangled Web
Vengeance
Sanctuary
Deadly Bite
Immunity
Blink
Rain of Stone
Flame Strike
Maul
Sprint
Savage Strike
Confusion
Drowning Strike
Crushing Blow
Dominate
Hurricance
Backstab
Tremor
Searing Attack
Agonizing Fear

But if you have your own special abilities you’d like to see, go ahead and post them and explain what they do. Keep in mind, the more convoluted they are, the less likely they are to go in (e.g. Moonlit Dance – if full moon, target unit has a chance of doing a special dance that causes adjacent units to mimic dance draining them of their will to live if they have an intelligence less than 8 but greater than 4).

Anyway, we’re pleased with how the game is turning out. The only thing we’re sweating right now really is the out of memory issue.

Okay, second update is up

Published on Thursday, July 29, 2010 By Brad Wardell In WOM BETA Builds

We got the second update with all the new maps and such in. So we should be good to go.

If you experience any problems, report them. Even if you think they're known. Also, if you find you can't do something report it even if you think it's "user error". In the beta, our policy is that there is no such thing as user error. Just bad UI design.

Just make sure you post your debug.err (at the very least) and if applicable your dump file if you had a crash.

Note: The only crash bugs we are aware of is when you're doing a new game within a game or switching between editor and game or vice versa.

We consider anything than rock solid going forward as unacceptable.  In fact, I am preemptively returning Elemental to the store for a refund just to drive home the point.