Brad Wardell's Blog


AI: Writing writing writing

Published on Sunday, February 19, 2012 By Brad Wardell In FE Sneak Peeks

There’s so much text in Fallen Enchantress that author Dave Stern and I are thinking of having an e-book for players. There’s a lot of material and now that much of it is getting integrated, we hope it’ll start making the factions more distinct.

I can tell you that the AI behavior now follows the writing.

Writing and AI behavior are two key elements. In Galactic Civilizations, all races were the same other than their graphics, text, and AI behavior.  And all that AI behavior work would have been for nothing, imo, if players weren’t made aware that they were actually playing differently.

The world of Galactic Civilizations has some great heroes and villains.  The Drengin think you’re delicious. The Yor are bemused that meat can talk. The humans want to get along…but, don’t ever think the talking apes from Sol 3 won’t grind you into dust if they have to.

Elemental has some really great factions too.  Both before release and after release, we’ll be doing a lot more to make them feel and play differently.

I have my own biases for the different factions.  In my mind, as I code up my interpretation of the various XML tags I’ve come up with some basics on how they behave:

  • Pariden is bugged that the riff raff are squabbling over what is rightfully theirs
  • Capitar are a bunch of objectivists.
  • Altar wants to unite everyone – except the Empires who they despise
  • Tarth doesn’t like anyone.
  • Gilden are Paladins. Noble and honorable beyond reason.
  • Magnar are evil but make no bones about it.
  • The Wraiths would rather everyone just die. Nothing personal though.
  • The Urxen

I’m still working out some of the others in my mind in terms of programming them.

The way this comes through is in terms of whether they’re paying other players to do things to each other (don’t tick off Pariden as you will find others suddenly attacking you). Another area this comes through in what they say to you when they interact with you.  There’s also what units they build, how well they defend their cities, their biases in research, what they like to build in their cities, etc.)

This is why it’s so important to get good writing and have it communicated – without it, players may not realize just how much the AI is thinking about what say Gilden builds in their cities versus Yithril.

In GalCiv, this was communicated clearly to players via in-game dialog.  In beta 2, we’ll start doing more with this.  And what they say depends on who you are and how you’ve played.

From a player point of view, it lets me incorporate different strategies into the game.  Rather than trying to come up with “the best” overall strategy, I can implement several different ones (some of which may fail).

image

And a gratuitous tactical battle shot:

image

image

AI: Closing the deal

Published on Saturday, February 18, 2012 By Brad Wardell In FE Sneak Peeks

You’ve won.

Or

You’ve lost.

But the game won’t end.

The ultimate outcome is known. The rest is just theater.

Boring theater at that.

This is the ultimate fate of so many 4X games.  You know you’re going to win (or lose) eventually but you still feel like you have to go through the motions of slogging it out. 

For Beta 2, the AI will just surrender when it’s hopeless.  But humans have the choice to fight on.  Because there’s always hope.

In the game I’m playing right now, the AI has me down to my last city.  But he can’t take that city.

image

They have me surrounded. But they can’t take the city.  I am not sure they can.

image

And I can’t take them.

I’m down to my last city.

They’ve destroyed all my outposts. My shards are gone. My metal is gone.  I have just this one city.

Different Ideas

Laying siege is how this sort of thing would historically work.  Have the player lay siege and it’ll slowly wear me down.  This fails because my army in the city is easily powerful enough to wipe out any individual army that would try to lay siege. Plus, it’s a pretty significant game mechanics to add, test, and balance this late in the game.

The idea I’m playing with tonight involves magic.  If you can’t take the city by force, make it miserable to live there through magic until the city finally destroys itself if not countered (which I wouldn’t be able to since I have no mana).

Tactical games: Kiting

Published on Saturday, February 18, 2012 By Brad Wardell In FE Beta

http://en.wikipedia.org/wiki/Kiting_(video_gaming)

This is an issue that, as the AI guy, I'm still struggling with.  How to defend against this?

I've been tempted to have the AI do it to the human but the more I think about it, the more unsatisfying that would be.

In beta 1, the kiting issue isn't huge because the tactical maps are so small. But in Beta 2, they start to get a lot more interesting (I have one map that is basically inspired from Demigod complete with multiple paths).

I'd be interested in hear different ideas on how to prevent excessive kiting.

Fallen Enchantress: BETA 2 Preview

Published on Friday, February 17, 2012 By Brad Wardell In Elemental Dev Journals

Greetings!

It’s hard to believe it was just under a month ago that Fallen Enchantress went into public beta.  We’ve gotten a lot of great feedback, a lot of bug reports, crash reports, and suggestions.

Next Thursday, we plan to release BETA 2 which is intended to go out to everyone who purchased Elemental: War of Magic in 2010 plus anyone who has pre-ordered Fallen Enchantress.

Today, I’m going to walk you through some of the changes Derek and his team have implemented.  Those of you who were Fall From Heaven Fans or Galactic Civilizations fans will hopefully see the combination of the two really starting to show in beta 2.

Character Creation

image

We have gotten a lot of feedback with regards to the “first impression” elements of Fallen Enchantress. Part of that goal is to make it clear to players what the distinctions are between each faction and each sovereign.

Visual Pass

image

Across the board the art team has started to put in the Fallen Enchantress specific art assets.  This effectively means the world will look quite different.  More punch, less blah when it comes to the scenery.

image

User Interface

image

Beta 2 is our first pass with displaying the path of a selected unit.

image

The main map UI has bee modified as well to place the often missed Govern button down with Spells and Turn in the bottom right.  In addition, important events now pop out for a turn from the side to inform players of events without interrupting the action.

image

The new Kingdom Report screen helps players see where their kingdom stands as well as how far along they are towards achieving victory in one of the 4 victory conditions.

Music & Sound

Beta 2 includes the first set of new sound effects for Fallen Enchantress along with many new musical tracks to help bring the world to life.  I suspect the sound will be something that has amongst the biggest impact since FE beta 1 barely had any.

Balance Changes

Balance changes will be both subtle and obvious to players.  Fallen Enchantress provides 3 different technology paths to choose from.  Beta 2 is designed to give each technology tree its own path to world domination.

image

The Warfare path is much the same as it was with Beta 1. The key resource for mundane warfare is metal, a resource that players pursuing this much live and die by.

The Civilization path has been altered to give more emphasis on building up your Empire through using diplomatic power. The resource of power here comes in the form of Diplomatic capital which is spent recruiting mercenaries, monsters and other factions to the war fighting for you.

The Magic path has gotten the most love.  Between raw mana power and magical equipment that uses crystal in lieu of metal, you can end up with a very powerful force of magical units.  Mages, Warlocks, and all manner of new units start to appear as the player goes up the magic tech tree.

Champions are automatically able to cast spells.  What makes the sovereign special – as a channeler – is they’re the ones with the ability to derive mana from the shards. All spell casters use the global pool supplied, ultimately, through your channeler.  The bottom line, lots more magic being thrown around.

Caravans are gone. They were a held over idea from GalCiv II that never made the sense in the Elemental universe. Roads now grow up somewhat more organically based on  your civilization techs with corresponding economic benefits.

Pacing

Beta 2 is our first pass at nailing down the three distinct acts of Fallen Enchantress.

Act I has the player exploring the world, building up their kingdom and trying to keep the world from ruining them. (Explore, Expand).

Act II begins when players determine the strategy they’re going to use to achieve victory. Maybe they’ll do it by building lots mundane units, maybe they’ll focus on a handful of champions, maybe they’ll recruit their armies, maybe they’ll build a force of powerful, magical armies or maybe they’ll amass enough mana and spells to bring ruin to their enemies and glory to their friends. (Exploit)

Act III is the end game, it’s the execution of their strategy. And this is where a lot of thought and effort has been put in.  Wrapping up the epic wars, quests, schemes, etc.  For me, personally, I enjoy being able to do very horrible things to my enemies with mana. If I have enough mana, I should be able to bring down the pain to those who oppose me while making my kingdom a land of gods.  This means expensive spells that can be stacked but don’t necessarily have upkeep. 

image

In addition, the final quest and the spell of making are in the process of being made a lot more interesting and accessible.

AI

I would be remiss to not talk about the computer players. The tactical battle AI has been written from scratch for Beta 2. Late game, there will be no mistaking that this is a game with magic. Watching players and AI setting things up with their spells, countering each other spells, etc. is very enjoyable. I have come to the point where I end up watching the battles on auto play instead of using auto-resolve because it’s fun to watch ala GalCiv II battles. 

image

The AI is much improved when dealing with custom created factions. In my game, I have created all my favorite Tolkien races and put them up against me. The AI will use the attributes that go with them to make them play differently. So my "Orcs” play quite differently from my “Elves”.  Modders, post-release will of course be able to take this to ridiculous level.

The AI is also much better strategically. It manages groups of armies now, this is something I never did get quite right in GalCiv II’s AI but the FE game engine makes it a snap for me to organize vast swaths of units and treat them as a single unit – and they don’t have to be on the same tile so it’s not some obnoxious death train. 

As a result of the AI improvements, the harder difficulty levels, where the AI gets special bonuses, have been drastically turned down.

The AI will raze cities and will surrender rather than dragging the game on endlessly. How they play depends pretty heavily on the faction. So don’t expect them to train or

Misc

I’m only scratching the surface here and I’m forgetting lots of small and large balance tweaks to the game ranging from cost of upgrading units (much cheaper) to the pacing of the tech tree to the cost and maint of units.  You’ll have have to wait and see for answers on all those things. 

I will say Champions are still very powerful but they will level up much slower if you try to just create a stack up them.  I had..ahem…a game last night where my “mega stack” of 5 champions got killed by a single AI champion because my stack was only level 5 and the AI champion was level 8 (and since the AI now makes great use of magic in tactical battles, it can do some horrific things to those who are unwary).  On the bright side, trained units don’t count against you in terms of experience sharing. So put that champion with lots of trained units, it’s what the AI does.

When will the final version be released?

We still see months of work ahead of us. We don’t have a specific “gold” date yet.  We intend to follow-up with a BETA 3 roughly a month from now. We’ll have a better idea where we are at that point to start thinking of release dates.

Cheers!

More Beta testing of 0.80

Published on Thursday, February 16, 2012 By Brad Wardell In FE Sneak Peeks

Elemental: Fallen Enchantress is the first Stardock game I’ve been the lead developer on since The Corporate Machine.  Being able to dedicate development time to a game was made possible by last year’s sale of Impulse to GameStop. And I’m having a blast.

Those of you who have been with us since the original Elemental: War of Magic have hopefully noticed some changes besides visuals and game play.  My focus has been on performance, robustness (which is different from stability) and of course my particular coding niche, multithreading. Hence, in the upcoming beta 2, I’ll be extremely ticked off if it crashes for anyone in any way ever.

Now, Beta 2, which is due next week for you guys, is going to be a pretty big change from beta 1.  I won’t spoil things by listing those changes except to say that we’ve taken your crash logs, your feedback and combined it with our own list.

Personally, the thing I’m noticing the most, the #1 thing that screams at me, is that battles are magical duels. Part of this is because for beta 2, the tactical battle AI is in. And part of it is just because more spells keep pouring in.

An aside: Let’s talk about spells

As I play the game, I think “I have all kinds of mana”. There’s a TON of shards in beta 2. They’re common. You are swimming in mana income. Which means we have to provide interesting ways to use that mana.

So as I play, I have been building up a file called BradSpells.xml which is, simply put, spells that I am lobbying for inclusion into the game.

Let me show you how easy it is to add a spell –- if a monkey like me can do it, anyone can:

<SpellDef InternalName="BlessCity">
  <DisplayName>Bless City</DisplayName>
  <Description>Decreases unrest in friendly city by 10%.</Description>
  <Image>S_Inspiration_Painting.png</Image>
  <IconFG>S_Inspiration_Icon.png</IconFG>
  <IconBG>S_Inspiration_Icon_BG.png</IconBG>
  <IconColor>217,206,225</IconColor>
  <AutoUnlock>1</AutoUnlock>
  <CanStack>1</CanStack>
  <SpellType>Strategic</SpellType>
  <SpellClass>ImpResourceBooster</SpellClass>
  <SpellSubClass>Other</SpellSubClass>
  <SpellTargetType>FriendlyCity</SpellTargetType>
  <SpellResourceCost>
    <Resource>Mana</Resource>
    <Amount>500</Amount>
  </SpellResourceCost>
  <GameModifier>
    <ModType>Resource</ModType>
    <Attribute>Unrest</Attribute>
    <Duration>-1</Duration>
    <PerTurn>1</PerTurn>
    <Value>-5</Value>
  </GameModifier>
  <ValidTerrainCategory>City</ValidTerrainCategory>
  <AIData AIPersonality="AI_General">
    <AIPriority>30</AIPriority>
  </AIData>
  <HitSoundFX>Spell_DarkEnchant_01</HitSoundFX>
  <SpellCastEffectName>Brilliance</SpellCastEffectName>
  <SpellCastEffectScale>.4</SpellCastEffectScale>
  <SpellDefEffect>
    <EffectName>S_Inspiration_Particle</EffectName>
    <LocalPosition>0,0,0</LocalPosition>
    <EffectScale>0.75</EffectScale>
    <EffectDelay>0.5</EffectDelay>
    <SnapToTerrain>1</SnapToTerrain>
  </SpellDefEffect>
</SpellDef>

This is just copy and paste from other spells that are remotely similar.  Bless City is one that can STACK. That means you can put lots of them on your city.  I also made one called Curse City which does the opposite to an enemy city (increases unrest).  I am hoping that we can put something in where if unerst == 100% then the dice start to roll and if they fail their roll, the city razes itself.

Speaking of which, SOME of the AI factions will raze your cities if they capture them and they don’t want to keep it.

I’ve got a bunch of these kinds of spells that I’ve whipped up that reward me for having a crapload of mana. 

 

My Test Game: Begins

image

This is a 1 on 1 game. I just want to see how the AI does.  This is on “Normal”.

image

Now, in beta 1, your offensive strategy largely consisted of going up the warfare tree.

But in beta 2, diplomatic capital and crystals matter equal to metal. One lets you recruit from the countryside and the other lets you have tons of magical equipment.

 

MONEY MONEY MONEY

The AI’s handling of money in beta 1 was…non ideal.

image

So in Beta 2, the system works on the concept of a credit score. Smile

The calculation behind that simple –4 to +4 number is a bit crazy but it lets the AI get an idea of how he’s doing and what he should do.

Those silly monsters

image

This is a Dreadling.  What a joke right?

image

These are Dreadlings. Not such a joke.

I like Dreadlings because I like to feel like a big man. And a big man can kill lots of things. It’s like in SWTOR where my 10th level Sith feel big because he can kill all kinds of stuff (but if he steps off on a level 20 planet he’ll die by a random blaster shot).

Exploring

image

It is morally wrong that I cannot use this cool weapon right now. In fact, you know what? I’m taking this game back to the store right now.

Tactical Maps

I don’t know about you but if I saw those same tactical maps, regardless of how large my army was I was going to die.  I don’t want to sound melodramatic but in the history of all mankind, no pain was greater than having to see the same tactical maps in all situations.

image

 

So I wrote a bit of code and asked Paul to help me on designing a series of new tactical maps that are based on a lot of different things including the number of units in the battle.

image

The AI likes to get on hills for some reason…

image

…no idea why

Meeting Magnar

Our lawful evil adversary, Magnar has shown up on the scene on turn 60.

image

They’re only 2 points behind me which isn’t too shabby.

NOW they must die…

I’m going to keep doing this until the AI gets good at handling this because it’s what any decent player will do: I’m going to put together the best stack I can and go after them.

There is nothing wrong with stacks.  The question is how to deal with them. If you have all your eggs in a single stack, then they should take your largely undefended cities or crush your stack.

image

Magnar’s crappy artwork needs to go away soon. Ack.

Anyway, now they will die.

image

I took their first city easily.

I can tell already they’re doomed.  Notes taken. New build.

Second game.

Second game..ended less well for me.

image

I meant to lose.

 

Third Game (No more Mister Nice Guy)

image

Pioneers are now very inexpensive.

Ok. Lost. But I meant to lose…I was…you know, testing and what not.

Fourth Game

image

Ok. Lost again. Must be some sort of bug. No way this is happening legitimately.

FE 0.80 random notes

Published on Sunday, February 12, 2012 By Brad Wardell In FE Sneak Peeks

image

In today’s game it’s a 4-way battle on a small map.

I’m still in the stage of trying to keep the world from murdering me.

image

Playing with a couple of new spells.  Destiny’s Gift sucks up 100 mana but increases a random stat. Given enough time…and enough mana you can make a champion a god. Which is the caveat. The spell can’t be cast on the Channeler, only a champion.

image

FE 0.80: AI Test Game

Published on Sunday, February 12, 2012 By Brad Wardell In FE Sneak Peeks

Version 0.80 is an internal build of Fallen Enchantress.  This is basically a test of the AI on normal.

I’m playing as Relias, the sovereign of Altar, a Kingdom of Men.

My opponents are the Blood Elves of Magnar, The Mancers of Capitar, and the Wraiths led by Ceresa.

Note: I’m playing in the debugger so please bear that in mind before commenting too much on graphics as these are set to minimum.

An early battle:

This is the new tactical AI in action.  I’m not sure I like what it decided.  The wolves decided to bypass my strongest unit in order to target my weaker champion. But in doing so they were vulnerable to my main guy.

So let’s see what we can do next…

Did Apple put something in Microsoft’s water supply?

Published on Sunday, February 12, 2012 By Brad Wardell In Personal Computing

Details on Windows 8 on ARM are revealed.

You can read Paul Thurrott’s pretty thorough look at here.

So let me make sure I am understanding this:

If I want to make a Windows 8 desktop app (by far the largest market) I need to develop one way (Win32 for all practical purposes and WinRT..maybe..eventually).

If I want to make a Windows 8 phone app I have to use a completely different method.

And if I want to make a Windows 8 tablet app I have to use a totally different way.

And, by the way, if I want to release my stuff in the latter two methods, I have to use the Windows Store, run by the same company that make XBox Live such a miserable experience to support.

And we would do this…why?

Is Microsoft trying to force me to develop for iOS? It sure seems that way. They’re taking a shrinking market and splintering it three ways (4 if you count WinRT on the PC).