Author: Gene

Fiancée Game – 06 – UI Work and Combat

Estimated Hours of Work Since Last Update: 12 to 16

   Unlike the past few updates, I’ve been putting a fair amount of work into Fiancée Game over the past few weeks. My goal is to get something playable in her hands by the end of July. I’m fairly sure that if I really bust my butt, I could have something playable in her hands by the end of next week.

   I don’t want to say that this post is going to be massive, but there’s a pretty decent amount of stuff to go over since last post, so, y’know, hold onto your butts, or something!

UI System
   I’ve moved all existing UI elements over to the new UI system introduced in Unity 4.6 (we’re currently in version 5.3, I made most of these elements before Unity 4.0 released) and gotten them jiggered so that they properly place themselves dynamically on the user’s screen.

All elements of the UI dynamically place themselves based on resolution.

   Most of the elements were easy enough to transition over, but I had to reprogram the minimap in its entirety. It was something that needed to be done since the previous method I used to draw tiles was hardcoded to the size of the minimap and was something that I’d always intended to replace.

   While the minimap looks and functions identically I can now, with the re-write, make it scale to be as large as I want it to be. This scaling will be useful later on when I implement a larger ‘world map.’

   I implemented health and energy numerical displays to the player portraits. I’m hoping to eventually get status effects on them, too. Think Baldur’s Gate minus the red coloration on the portrait itself.

Music & Sounds
   I’ve added rudimentary support for a music player to the game. I’m planning to expand it to play music based on where the play is in the world. I don’t expect this to be too difficult to implement since I’ll likely just be reading what music to play based on the tile the player is in. I’ve already added music_Exploration, music_Combat, and music_Boss elements to the dungeon system so it shouldn’t be too painful to hook this into the music player. It’s definitely something low on the priorities list, though.

   I eventually also want to hook the ability to play sounds into the message system. This will mostly be used in combat to play sounds when attacks hit or miss, and when abilities are used. I could also use this for adding sound effects to certain cells when the player enters them.

   The combat system has seen the most work over the past few weeks. I’ve implemented a rudimentary combat loop and enemies now fight back (currently only with basic attacks). I’ve also finally gotten around to implementing enemy name displays and even threw together a (poorly drawn) health display system for the enemies you’re facing in battle. I still want to add some visual feedback (blood splatters, enemies shaking around when hit, floating damage numbers, et cetera) to combat to give some feeling to attacks and whatnot.

Fite me IRL, ye scrubs!

   I currently need to implement a victory/defeat screen so there is a chance for the player to obtain precious loot from defeated enemies, or taste defeat after a total party kill. I also need to stop putting off the implementation of the player’s companion.

Bug Fixes & Functionalizing

   The third enemy present in combat had been causing issues for a while where the game would not properly display its name and its attacks really didn’t do anything. I’d put off working on this until I got to fleshing out the combat system itself. The fix was simple enough, I was just passing a target variable incorrectly. Easy fix, but in doing so I noticed a few other bugs that had crept into the code via lazy copy/past proofing. That’s Late Night Coding™ for you.

   Player health bar displays were bugged (read: not actually displaying health) due to
changing how player health is displayed in-game. I went back and fixed
them. Also fixed a display error that cropped up when health was reduced
to less than 0 and then increased to a value higher than zero again. I still have to implement the companion health bars.

   The biggest bug I fixed was actually with how the combat system read monster stats. Early on I’d run into a bug where sometimes enemies would die even when you missed them without having damaged them in the past. I had no idea what caused this bug, but it revealed itself in earnest once I’d implemented health bars for enemies. Looking into it, it had to do with how C# (and most programming languages) handle copying data. For example, if we were to use the following code to instantiate a new object (assuming that class_Enemy is a class containing an enemy’s stats):
  class_Enemy enemy0 = new class_Enemy();

   We would expect it to create a copy of the data present in class_Enemy within the new enemy0 object. It doesn’t, instead it creates a reference. Why is this? The reason is because by default C# makes a shallow copy of data when you copy it in the above way. What does this mean? Basically this:

Thusly have we learned the value of a deep copy over a shallow copy.
And yes, I’m aware of the typo.

   What this means is that if you change a value in the reference for one object that uses that reference, it changes it for all objects that use that reference. So, if, for example, I had an enemy with 5 HP and dealt 6 damage to it, ALL enemies with the same reference would take that 6 damage.

   While this isn’t a problem in some cases like the player where there’s only one of them, it cause issues where we might need multiple copies of an object that have slightly differing stats. This would be an issue with the item system, too, if I weren’t using static items. It’s certainly something I’ll have to keep in mind in future games, though.

    Finally, I spent several hours segregated a lot of code into its own functions. This makes it easier to call for various things I might need to use it for. Dealing damage, for example, was previously hardcoded into attacks, now I’ve separated it into its own function that can be called wherever I need to do so. This is super handy and cuts down on useless code bloat. There’s still more to be done, though. Lots of old Late Night Code™ remains and needs to be replaced or optimized.

In Closing
   I’ve gotten a lot done in the past two weeks. Substantially more than I’d intended to, in fact. That said, my list of ‘things wot need done’ is still growing more than it’s shrinking. For every feature I implement I make note of things that I want to do to polish it (I want enemy health bars to have visual effects when they take damage, for example) and that bloats out the stuff that I need to do. Most aesthetic features are noted as ‘low priority’ so I don’t feel a need to rush on them compared to more important things like getting various systems implemented.

   I’m thinking that the next thing I tackle will probably be adding the player’s companion to the game followed by implementing proper victory/defeat screens in the combat loop. Past that? Who knows. Maybe some world building is in order. But before I do more building I want to fix doors being bugged…

Read More Fiancée Game – 06 – UI Work and Combat

Dungeons & Dragons Online – Where to Begin?

   Since my first Dungeons & Dragons Online (henceforth DDO) video on my channel, I’ve received a fair few questions from perspective players wanting to to start in the game but being overwhelmed by the choices presented to them.

   DDO has a lot to offer and is probably one of the most unique MMOs I’ve ever played. It’s also one of the more complicated ones. This is compounded by the fact that the developers make changes without really detailing them and the early game is incredibly confusing to new players. I’m hoping that this post will help those folks out just a bit.

   If you’re looking for more mechanics-oriented information on the game you can’t go wrong with a trip over to the community-maintained DDOWiki where devoted players have been chronicling the game’s content for years. There are few better resources for the game than the wiki.

   All that said, let’s jump in!

Differences from Other MMORPGs
   Unlike pretty much every other MMO out there, DDO was originally based on actual pen and paper D&D rules. As such, most players will jump into it not knowing what they’re doing and make a character that they think will be cool but will, in reality, get dead really quickly.

   The prime example I can think of regarding this is the gear proficiency system. In most MMOs a character is limited to a set style of gear based on his class choice. That is not the case in DDO where, generally speaking, any character can wear any armor or equip any weapon so long as they are of the appropriate level. This leads to things like wizards running around in full plate (heavy armor) wielding a great sword and wondering why they can’t cast spells (heavy armor screws arcane spellcasters) and can’t hit anything with their sword (they probably didn’t allocate points to Strength so they can hit more easily, they likely aren’t proficient with the great sword, and they’re playing a class with a low base attack bonus progression).

Don’t be like this wizard! He’s not going to hit anything with that greataxe.

   In DDO a character has a list of proficiencies based on the classes (or feats, see below) that he takes as he gains levels. The aforementioned wizard, for example, is not proficient with any armor and with few weapons. A fighter, by comparison, is proficient with all types of armor (and shields) and most weapons available in the game.

   Attacking and Defending
   Assuming you’re not playing an offensive spellcaster, which I don’t recommend to new players, there are a handful of numbers that you want to get as high as possible as quickly as possible. They are the following:
   Attack Modifier: Your attack modifier is affected by a large number of things. As you gain levels your base attack bonus increases, you add your Strength modifier to attacks made with melee weapons, your Dexterity modifier to attacks made with ranged weapons, you add your weapon’s enhancement bonus to all attacks made with it, and that’s not even counting the bonuses granted by feats, buffs, and gear! Suffice it to say, you want your attack modifier to be as high as possible if you want to hit enemies! Using a weapon that you’re not proficient with grants you a -4 penalty to attack rolls but, on top of that, removes a flat +20% chance to score a hit that you have with a weapon you’re proficient with! Don’t use weapons that you lack the proficiency for!

   Armor Class: Compared to the attack modifier, your armor class is affected by a smaller number of elements. Primary sources of AC are the armor you’re wearing and the shield you’re carrying. Past that, expect to be picking up AC bonuses through magical jewelry (rings of protection and amulets of natural armor) as well as from a few feats and buffs. Do be wary of stacking rules (see below) so you don’t end up wearing a bunch of equipment that doesn’t play nicely together.

   One thing to keep in mind is that if you’re coming from a pen and paper background, attack modifiers and armor class numbers will be very high in DDO compared to where they are in a tabletop game. This is due to DDO using different calculations beyond just die rolls to determine hits and misses.

   Resistances: There are three types of resistances in DDO; energy resistance, magical resist rating (MRR), and physical resist rating (PRR). Their effects are as follows:
     Energy Resistance – Reduces damage from elemental forces (acid, cold, electricity, fire, and sonic) by a flat amount. Something that gives you Fire Resistance 15 would reduce all fire damage you take by 15 points, negating it in some cases.
     Physical Resistance Rating (PRR) – Reduces damage from all physical sources (bludgeoning, piercing, and slashing) by a percentage.
     Magical Resistance Rating (MRR) – Reduces damage from all non-physical sources by a percentage.

   You will generally want to get all of your resistances as high as possible. Gaining energy resistances is fairly easy, whether from gear, potions, or various other sources. MRR and PRR require more investment to acquire in large amounts and both have diminishing returns depending on how high you want to take them. A MRR or PRR of 100 is enough to grant 50% damage reduction, but a value of 250 only grants ~70% reduction to damage taken. Unless you’re planning on playing on the hardest difficulties, hitting 100 should be enough to keep you alive with a bit of occasional healing.

In DDO you go big, or you go home. That AC should be about 10 points higher to comfortably tank Normal difficulty content.
It should be about 100 (yes, I’m serious) points higher to run the highest difficulty currently present in the game.

   Feats are gained as characters progress in level. All characters begin with feats granted by their class, as well as at least one feat of their own choice. Think of them as little perks that you generally get for every 3 character levels you gain. Some classes gain bonus feats just for taking levels in them (fighter is a prime example that gets a bonus combat feat at every even class level).

   When leveling a character, think carefully about feat choices. You can trade feats out ingame, but it is prohibitively expensive at later levels unless you want to pay real money to do so. Above all, avoid so-called ‘trap’ feats. A trap feat is a feat that looks useful (and might be) but whose usefulness quickly degrades as your character progresses. Feats like Acrobatics and Alertness which grant +2 to two skills are examples of trap feats; they’re useful for the first few levels of a character’s lifetime, but quickly become meaningless in the scheme of things and should be traded for a more useful feat as soon as possible.

   In addition to feats, each character has access to a fairly long list of skills. There are two types of skills: class skills, and cross-class skills. Class skills only cost 1 skill point to increase while cross-class skills cost 2. Additionally, class skills have a maximum number of skill ranks equal to your level +3 while cross-class skills have a maximum number of ranks equal to half that.

Allocating skills on a new character. Note the cross-class skills with asterisks next to their names.

   These limits don’t mean that you should avoid putting points into cross-class skills. Some skills can be useful even if you don’t dump a large number of points into them because you can shore up their values with magical items. That said, I would recommend against investing too heavily into cross-class skills unless you have skill points to burn and don’t have any more class skills to invest them into.

   Be sure to read through the information on your skills carefully. Skills with an octagonal icon are passive while those with a square icon are active and require you to actively make use of them. Be sure to never invest ranks in the swim skill, it is completely useless past even the earliest levels of the game once players have access to accessories that grant water breathing (underwater action) that can quickly be equipped when they are needed.

   Rest and Resurrection
  Unlike most MMORPGs, DDO doesn’t generally have regenerating health and mana. The only way to restore health in DDO is via curatives (or very rare items and abilities that let you slowly regenerate) and mana is even more limited. Casters in DDO must learn early to ration their limited supply of spell points for when they’re truly needed. Rest shrines are typically dotted through every adventure and give players a chance to take a break to regain lost hit points and spell points.

   When you rest at a shrine, you heal a number of hit points depending on your Heal skill (or Repair if you’re a Warforged) and regain all spell points you may have expended. In addition to rest shrines are resurrection shrines which allow the dead to return to life should an ally not be present that is capable of resurrecting them.

Resurrection and Rest Shrines provide adventurers with a place to lay back during a quest.

   Stacking Rules
   In DDO most bonuses are given a type (competence, insight, and enhancement will be the ones you see most often) and, generally speaking, bonuses of the same type do not stack. The exception to this is untyped bonuses (that is, a bonus with no type listed for it) and dodge bonuses. This is something to keep in mind when obtaining new magical equipment, be sure to stick to gear that grants different bonuses to the same statistic if you want to get that stat as high as possible!

   At higher levels (and difficulties) of play you’ll also encounter Mythic bonuses on items. These function somewhat differently from other bonuses with regards to how they stack. Mythic bonuses of the same value do not stack but mythic bonuses of different values do stack. This means that if, for example, you had two items that granted a +2 mythic bonus to your Strength score, equipping both of them would only increase your Strength by two points. However, if you had two items and one granted a +1 mythic Bonus to Strength while the other granted a +2 mythic bonus to Strength, they would stack and increase your Strength by three points. Generally speaking items that grant Mythic bonuses are rare. However, with a recent patch, DDO has enabled named items found in Hard difficulty or higher quests to have a small chance to spawn with Mythic bonuses.

Choosing a Race
   Depending on how much power you’re trying to eke out of a character, your race might be super important or not really important at all. I almost always play humans because they begin play with a bonus feat which is very nice; they also gain 1 extra skill point per level which can be nice if you’re playing a character that doesn’t gain many skill points as he progresses.

   Assuming you don’t particularly care about the bonus feat and skill points, I recommend taking a race that will increase your ability scores in whatever class you’re leaning towards. Speaking of ability scores, always aim for a starting Constitution of at least 14 (12 if you’re playing a race with a -2 to Con); the extra HP will be a life saver in the long run!

Choosing a Class
   For new players I highly, highly recommend playing a class that has some form of easily accessible self-healing. As of the time of this writing, this leaves the options of cleric, druid, favored soul, paladin, and ranger. Here’s a quick rundown of the classes to give you some idea of what to look for:
   Cleric: The go-to. I’d recommend this class to all new players. You’ll have the ability to heal yourself from the start and you’ll have access to the warpriest skill tree which grants you a skill at around 7th level that lets you hit an enemy and heal yourself at the same time. On top of that you’re proficient with heavy armor and shields which will help you avoid damage early on. If you don’t plan on playing an offensive caster cleric, you can also grab some fighter levels to improve your combat abilities.
   Druid: Like a cleric, you’ll have self-healing ability from the start. Unlike the cleric you won’t have quite the versatility in your spells or armor, however you’ll have much better offensive spell options in the latter parts of the game. This class is not available to free-to-play players unless you purchase it on the DDO Store. If you’re curious to see how a druid handles in general play, I recommend watching my Derping In DDO series.
   Favored Souls: This is basically a cleric, but you’ll have better saving throws and more spell points at the cost of slower spell progression, less armor proficiency, and a static set of spells that can’t be swapped out at will like a cleric’s can. Also has access to the warpriest skill tree and can trade out favored soul levels for fighter levels for additional combat effectiveness. This class is not available to free-to-play players unless you purchase it on the DDO Store.
   Paladin: As a paladin you won’t get self-healing spells until 4th level. However, you will have access to self-healing in the form of lay on hands and wands from 1st level onward. In exchange for lessened healing abilities, you’ll be able to deal some fairly impressive damage from early in the game.
   Ranger: A more nature-oriented version of the paladin minus the lay on hands class feature.

The many classes of Dungeons & Dragons Online. You may choose three.

   Much like in 3rd Edition D&D, class is somewhat fluid in DDO. You may begin as one class only to transition over to another at some later point in your character’s lifetime. You have twenty levels worth of classes that you can take and can possess up to three unique classes. It is not uncommon (in fact it’s almost encouraged) to ‘dip’ for a few levels into another class to pick up access to prime class abilities. Some popular dips are:
   Fighter: Taking levels in fighter is typically done for bonus combat feats. The first two levels of fighter both grant a bonus combat feat of your choosing. These feats can be useful to take at certain levels to get early access to a feat you may otherwise have to wait to acquire.
   Monk: Two levels of monk grant +3 to all saving throws, access to monk stances, as well as access to the Evasion ability allows you to completely negate a lot of AoE damage that you might be on the receiving end of. Also granted is the ability to add your Wisdom modifier to your Armor Class when unarmored and not carrying a shield.
   Paladin: Two levels of paladin grants Aura of Good which imparts a +1 bonus to AC and saving throws, as well as Divine Grace which lets you add your Charisma modifier to all saving throws. The bonus from Divine Grace is capped at 2 + 3 times your paladin level (+8 when first acquired).
   Rogue: Grabbing a level in rogue at 1st level will allow most characters enough skills to be at least competent at picking locks and disarming traps with the aid of skill boosting items. It also grants access to the supremely useful Use Magic Device skill. A second level of rogue grants the ability Evasion just like a monk.

   In addition to access to class abilities, multiclassing allows access to enhancement trees from the acquired classes. This allows access to useful abilities that would otherwise be missed. Taking two levels of paladin, for example, grants access to the Divine Might enhancement which lets you expend Turn Undead attempts to add your Charisma modifier to your Strength score.

Earning Money
   In the early game you’ll likely be somewhat strapped for cash that you’ll want to spend on curative potions and wands. While you’re on Korthos there really isn’t much you can do to remedy this, however, once you reach the harbor you can begin to collect from collectable nodes. There are a handful of collectables that sell for a fair sum of money on the auction house and some are even used for crafting your own magical items with the Cannith Crafting system.

   It used to be fairly easy to farm for some types of collectables (fragrant drowshood mushrooms were a staple in early level play), but a recent update has modified how they drop to instead spread them out over various level ranges instead being able to get them from one specific type of node. A good reference if you’re looking for a specfic collectable is this thread.

Riches found in the most unexpected places.

   While the recent update to Cannith Crafting has reinvigorated the collectable trade, here are a handful of collectibles that are almost always guaranteed to sell for a decent bit of coin:
   Deadly Feverblanch – These are found in white mushroom collection spots in level 1-5 quests and are worth between 5k and 10k platinum each.
   Eberron Dragonshards – These are very rare but can be found in any collection node. You can find these dragonshards in small, medium, and large varieties. Small shards are worth ~250k platinum. Medium shards are worth between 500k and 750k platinum. Large shards are worth 1 million+ platinum.
   Fragrant Drowshood – These are found in dark purple mushroom collection spots in level 11-15 quests and are worth between 10k and 20k platinum each.
   Lightning-Split Soarwood – Found in alchemy tables and crude alters in level 11-15 quests, this stupidly rare piece soarwood is typically worth 1 million+ platinum.
   Luminescent Dust – These are found in alchemy tables and bookshelves in level 6-10 quests. 3 of these are worth roughly 20k platinum.
   Silverflame Hymnal – These are found in bookshelves in level 11-15 quests. A single silverflame hymnal is typically worth between 10k and 15k platinum.
   Strings of Prayer Beads – These are found in various places in level 1-5 quests and are often dropped by kobolds. 15 of these is worth between 2.5k and 5k platinum.
   Vials of Pure Water – These are found in various places in level 1-5 quest. 5 of them are worth between 5k and 15k platinum.

That’s All for Now!
    Thanks for reading! I hope this brief look at DDO at least gave a vague idea of what the game is comprised of and what to expect within. In future posts I’ll cover some of the early game and provide a character build that should enable most to survive through the latter parts of the game.

Read More Dungeons & Dragons Online – Where to Begin?

Fiancée Game – 05 – Wandering Encounters

Estimated Hours of Work Since Last Update: 4

   As with last time it’s been overlong since I last posted about Fiancée Game. I’d love to give the last excuse as last time (work being busy), but I don’t really have anything to blame but my lack of putting time aside to program. Still, a bit of work has been done!

Message System
   I’ve implemented a buffer system for message handling. Previously all messages would appear in the message box the instant they were ordered. This tends to get confusing in combat where you might make multiple attacks which will quickly fill the message box without actually letting you know what the results of the attacks were.

   Fiancée Game now prints messages in the buffer word-by-word until the buffer is empty. I think this is a much better way of doing things. I do want to implement a ‘lock’ system to the message system that prevents the player from taking action until a given message has finished displaying. I’m thinking that this will mostly be used in combat. I’d also like to get the ability to play sounds along with messages implemented, but it’s not a high priority at the moment.

   In working to get the combat system up to a playable state, I’ve added wandering encounters. As it stands they take the form of floating capsules that meander randomly around the map. They respect walls and pits, so you don’t see them appearing out of nowhere or floating in the air.

Here comes trouble.

   As it stands, all random encounters are with a set group of enemies (a trio of kobolds, for now). I do want to implement randomly selected groups of enemies. Doing so won’t be too much work, but I wanted to get something playable implemented before doing anything complex with it.

   The Fiancée has stated that she’d like to eventually be able to clear areas out but have other (likely optional) areas that have constantly respawning enemies that she can use to grind levels should the need arise. I see nothing wrong with this, though I’m sure figuring out a system of persistence between game sessions is going to be a bit of work.

   My eventual plan, I think, will be something akin to Gauntlet where there are monster spawners that can be destroyed to stop the flow of monsters in a given area. I do plan on having set encounters (boss monsters, rare optional fights, and so on) that are only ever there once and do not respawn. I also plan on having some spawners that the player cannot destroy so that the player has areas to grind out levels if they need to.

   The core combat system is in much the same place as it was as of the last update. I’m hopeful that, having finished working on the above, I’ll be able to put some serious time into getting it fully functioning. There are still some things I’d like to finish with the message system (notably the locking system mentioned previously) before I get everything working fully.

   I’m thinking strongly of overhauling how special properties function on equipment. I’m thinking of moving away from each property being its own class and instead simply making them into variables on the items and having the effect of the property based on the variable.

   This would mostly be for simplifying things on my end and wouldn’t really be noticeable from the player’s side of things since items that have unique properties would still have them, they’d just be a unique variable instead.

   Of course, I could always stop being lazy and instead program a proper effect handler but I’m currently undecided.

Read More Fiancée Game – 05 – Wandering Encounters