taw's blog

The best kittens, technology, and video games blog in the world.

Monday, May 06, 2013

Small Unix utilities written in Ruby - part 3

Naughty cat by kevin dooley from flickr (CC-BY)

Here's the third instalment in my ongoing series (Part 1. Part 2).

All utilities mentioned are available on github.

flickr_find

Find Creative Commons licenced photos on flickr.

Usage example: flickr_find cute kittens.

flickr_get

Download best quality version of a photo from flickr and annotate it with proper file name.

Usage example:

    flickr_get http://www.flickr.com/photos/pagedooley/386303100/

which will be saved as ~/Downloads/naughty_cat_by_kevin_dooley_from_flickr_cc-by.jpg

I've been using flickr_find and flickr_get for years on this blog.

It requires objectiveflickr gem.

osx_suspend

OSX surprisingly lacks an easy way to suspend your current session. This utility does just that.

rand_passwd

Have you ever needed to quickly generate a new password? This utility generates easy to type (lower case letters only) 12 character password, with 56.4 bits of entropy, so you never need to reuse the same password across multiple sites.

webman

The most annoying thing about man pages (and even more about this silly GNU info idea) is that they display in terminal, where they're really painful to search. What man really needs is in-browser display.

Here comen webman. It is fuly intended to be used with alias man=webman in your ~/.bashrc. It finds proper man page, groffs it to HTML, caches that in ~/.man_cache since groff is slow as hell for some reason, and opens your favourite browser.

The code looks fairly overengineered, since the actual script I use also checks EC2 (so I can man page for both OSX and Linux programs with the same command), and this stripped down and somewhat refactored version is still a bit on the complex side.

If it fails to find man page for any reason, it opens relevant Google search instead.

If you need to open it in a terminal simply pass -T flag.

It wasn't tested outside OSX environment yet, so pull requests welcome. Further cleanup pull requests also very much welcome.

Thursday, April 18, 2013

jrpg is on github now

Abby - cat loaf 1 by DirtBikeDBA (Mike) from flickr (CC-NC-ND)

jrpg is on github now!

The scripts to make OSX and Windows packages not included, since half of them lives on the other side of VMs.

git doesn't love big binary blobs, and jrpg includes quite a few, but it should hopefully be all right. Maybe I'll rearrange them somehow to reduce their size or move them outside git repository.

There's also ton of things I could improve in jrpg, but I'm making no promises.

Sunday, April 14, 2013

magic/xml gem published

"Cat Scratch Fever!" - Ottawa 2002 by Mikey G Ottawa from flickr (CC-NC-ND)

Once upon a time I built gems for my libraries, but then rubygems site migrated like three times, and I really didn't feel like keeping track with all that, so I stopped doing anything.

Now I pushed magic-xml gem to relevant gem repositories (it has a dash like github repository name).

Apparently bkkbrad made magic_xml (with underscore) gem based on earlier version as well. Which brings me to:

Public service announcement

Everyone, it's time to talk serious business. Ruby community must decide if it wants dashes or underscores in gem name, and it must decide it now.

  • 15578 gems have underscores
  • 17127 gems have dashes
  • 1465 mix both in their name!!!
This is insanity. It's also a pretty safe bet github has something to do with it - I love you guys, but it's really time to get your act together.

I'll be using dashes, since that's what github seems to be promoting, and I tend to put my software on github these days.

Other goodies

A lot of my small utilities depend on magic/xml, so this will allow me to publish them without having to bundle magic/xml library (even it's just one file, very old school).

For now I just pushed lastfm_status program - which does precisely what its name implies - to unix-utilities repository, but I'm sure there will be more, especially once I figure out which of my programs break half of Internet's Terms of Service enough to get banned, and which only a little ;-p

Thursday, April 11, 2013

More small Unix utilities written in Ruby

eating grass 2 by lotusgreen from flickr (CC-NC-SA)

Here's the sequel to my "collection of small Unix utilities written in Ruby" post and github repository.

Useful technique - Pathname

One thing I forgot to mention the last time - Pathname library.

Pathname is an objects-oriented way to look at paths in a file system. A Pathname object is not the same as a File or Directory object since it's not opened - and might not even exist yet. It's also not like String since it has all the filesystem awareness.

For very simple scripts it's fine to use just plain Strings to represent filesystem paths, but once it gets a bit more complicated your script will get a lot more readable with Pathname - and it costs you nothing.

Let's just look at fix_permissions utility. Here's the core part:

class Pathname
  def script?
    read(2) == "#!"
  end

  def file_type
    `file -b #{self.to_s.shellescape}`.chomp
  end

  def should_be_executable?
    script? or file_type =~ /\b(Mach-O|executable)\b/
  end
end

def fix_permissions(path)
  Pathname(path).find do |fn|
    next if fn.directory?
    next if fn.symlink?
    next unless fn.executable?
    fn.chmod(0644) unless fn.should_be_executable?
  end
end

Since Pathname overloads #to_str method it can be transparently used in most contexts where String is expected - including printing it, file operations, system/exec commands and so on. You'll rarely need to use #to_s - mostly when you want to regexp it.

I feel Pathname#shellescape should exist, but since it doesn't that's one place where you need to use .to_s.shellescape for now.

So what does this script do? First we add a few methods to Pathname class. It already knows if something is a directory?, symlink?, and executable? (that is - has +x flag).

We want to know if it is a script. And that's easy - just read(2) as if it was a File to read first two bytes. It looks much more elegant than File.read(path, 2) != "#!" we'd need if we used Strings - not to mention how String class is really no place for #script? method so we'd probably use a standalone procedure.

Next let's make file_type method - and use #shellescape to do it safely. Unfortunately that one is only defined on Strings.

After that it's just one regexp away from should_be_executable?.

Once we defined that notice how easy it is to dig into directory trees with Pathname#find, and then just use a few #query? methods to ask the path what it is about, then #chmod to setup proper flags.

Other very useful methods not present in the script are + for adding relative paths, #basename/#dirname for splitting it into components, and #relative_path_from for creating relative paths.

While I'm at it, use URI objects for URIs you want to do something complicated with rather than regexping them - usually your code will look better too.

Individual commands

colcut

Cuts long lines to specific number of characters for easy previewing.

    colcut 80 < file.xml

fix_permissions

Removes executable flag from files which shouldn't have it. Useful for archives that went through a Windows system, zip archive, or other system not aware of Unix executable flag.

It doesn't turn +x flag, only removes it if a file neither starts with #!, nor is an executable according to file utility.

Usage example:
   
    fix_permissions ~/Downloads
    
If no parameters are passed, it fixes permissions in current directory.

progress

Display progress for piped file.

Usage examples:

       cat /dev/urandom | progress | gzip  >/dev/null
       progress -l <file.txt | upload

By default it's in bytes mode. Use -l to specify line mode.

If progress is piped a file and it's in byte mode, it checks its size and uses that to display relative progress (like 18628608/104857600 [17%]). Otherwise it will only display number of bytes/lines piped through.

You can also specify what counts as 100% explicitly:

     progesss 123456
     progress 128m
     progress -l 42042

It will happily go over 100% on display.

since_soup

Link to soup posts starting from the post before one specified.

Usage example:
   
    since_soup http://taw.soup.io/post/307955954/Image

sortby

Sort input through arbitrary Ruby expression. A lot more flexible than Unix sort utility.

Usage example:
   
    sortby '$_.length' <file.txt


RPGToolkit TST to PNM converter

Zorro at D&D by ex.libris from flickr (CC-NC-ND)


Here's a funny story - I found this converter in my ~/everything local git repository. I have no recollections of ever writing this converter, but it sure looks like my coding style from ancient days, and I think I wrote it while looking for tiles and other graphic resources for jrpg.

This tool converts TST format used by RPG Toolkit (tiles free for noncommercial use) to convenient PNM format you can then convert to whatever you wish using standard image processing tools. I ended up not using these tiles, so I forgot about the converter completely.

It's a small thing, but file format converters are one thing that's most annoying when you can't find it, so on an off chance that someone needs it someday, enjoy it on github.

Saturday, April 06, 2013

Various old projects migrated to githtub

Fluffy Buff Tom and Bike Frame by Chriss Pagani from flickr (CC-NC-ND)

Once upon a time I did "software triage"  to decide which of my software are viable, and which are dead.

Today I took another look at it, and decided to move most of my old projects - even ones that are pretty much dead - from variety of places like Sourceforge, GNU Savannah, Google Code, and tarball dumps on ftp server to github.

I don't really expect any of them to see much use, but there's always an off chance, and if I didn't move them to github, I might as well simply delete them from the Internet completely.

Here's the list of migrated projects:
  • RPU - my MSc thesis. If you want to see how to write compilers in OCaml, it might be somewhat useful.
  • iPod-last.fm bridge - I'm a Sansa Clip user now, and there's no way in hell I'm going back to iPods, but if you need this script updated (I have no idea if it still works or not), ask me, and I could probably figure out how to update it
  • tawbot - Wikipedia admin bot. I know once upon a time it had quite a few users, but I haven't heard from them in a while. If you need help with it, ask away.
  • XSS Shield for Rails 1.2.x - very similar system is included in recent Rails, so I doubt anybody needs this today.
  • freetable - HTML table generator. I know it had users once upon a time, no idea if they're still active.
  • jsme - Driver to use joystick as mouse on Linux. I made it ages ago because I accidentally my whole mouse port. I really doubt anybody would need that today, or that it would even work.
  • gtkidp - Interface for Internet Dictionary Project files. I like command line dictionaries, and I contributed to dictd stuff because Wikipedia made this kind of stuff cool, but these days it's probably not going to see much use. I don't even know if it works with recent varieties of Gtk.

Still TODO


I'm still not sure what to do with the ftp server I used to put my stuff on. Using less eye-violating styling would be a good start. I'm not entirely sure why the hell I picked that color scheme in the first place, and if it was meant as some kind of a joke or not.

And there's still my local ~/everything git repository. I put a few of its utilities on github, but there's orders of magnitude more code there - some even doesn't violate any website's ToS. There are 218 top level directories there, I'm sure at least 10% of them could be made public without any major problems.

And a lot of the software migrated to github still needs some serious work, like turning them into proper gems, compatibility with modern versions of everything and so on. If you have any special requests, just contact me.

Sunday, March 24, 2013

Mod review: CK2Plus

Characteristic "all flickrd out" by zenera from flickr (CC-SA)
Mod review: CK2Plus for Crusader Kings 2.

After extremely disappointing Fallout: New Vegas DLC Dead Money, I decided to do something else - check some mods.

I took CK2Plus mod, enabled gender equality submod for hilarity, tweaked ruler designer costs to something lower (since CK2+ made it even harder than vanilla, they disabled all the excommunicated/wounded/etc. trickery, and adjusted relationship costs to something more sensible, so I can't even figure out how to min/max that), then I picked the kingdom of Ethiopian Jews and started playing as Jesus of Christ dynasty in what I thought would be a few hour distraction before my anger levels at Bethesda let me go back to the Fallout Scroll series.

The good

It went much better than expected.

I needed to figure out everything from scratch, since the mod nerfed a lot of cheap gamey tactics from vanilla CK2:
  • retinue is much smaller, but still totally worth it
  • mercenaries now cost something like 2x as much - which moves them from essential in every war to something to be used sporadically. You can take one loan via decision now (not sure how they scale that, 100 gold is not really much) - I had to do that to get mercs and it was sad.
  • Holy Wars now cost 100 piety per duchy for neighbouring countries, 250 for non-neighbours. (crusades are presumably still free)
It also tweaks a lot of extremely annoying vanilla mechanics:
  • demesne size starts higher, but increases with stewardship less, making it quite tolerable without making stewardship overpowered (it was in reasonable 5-7 range so far)
  • no more ridiculously massive penalties for culture differences
  • recently conquered provinces get 5 years of no levies/taxes penalty no matter what it is, not up to 20 like in vanilla depending on culture/religion
  • crown laws are much more sensible and their changes just require big prestige cost - so you can quit gavelkind with your first ruler if you want, it will just cost you
  • things like summer fairs, feasts, hunts, etc. do not scale cost based on your income so they're not ridiculously expensive (and totally worthless since benefits do not scale) when you're big
The game also added a ton more decisions, new ambitions, a bit more stuff on African part of the map, tweaked de jure kingdoms/empires system into something much more sensible - it still sucks, but nowhere near as much as vanilla's empires for everyone. Between a ton of titular kingdoms and empires and de jure drift it works tolerably well.

How the campaign went

All this seems like too much for AI, and instead of traditional HRE/Poland/Sweden joint Holy War roflstomping Norse and Romuva regions in 20 game years, they are doing well. There is some holy waring going on in Spain, southern Italy, and east Anatolia, but it's within historically reasonable range.

For me it was almost like a game of Total War - get up to 100 piety somehow, Holy War a duchy, rinse, repeat. I might be an underdog, but Red Sea and Arabia region being divided by Miaphysites, Shiites, and Sunnis made this viable.

Piety was nearly useless in vanilla, but it's surprisingly important in this kind of endless holy war - I can get +25 every 3 years for 50 golds by giving to charity, I get some piety by converting population, Summer Fair/educating kids have a few decisions for +5 piety each - I was optimizing my piety just as hard as infamy in EU3.

Unfortunately there wasn't that much diplomacy involved - both Miaphysite Christians and Muslims refused to get into any kind of alliances with me, their claimants refused to come to my court due to different religion, so the best I could do was time the wars against minor Shia countries to whenever Fatimid Egypt had civil war of some kind and couldn't help.

Eventually all Miaphysites and minor Shia leaders fell thanks to timing, better maneuvering thanks to Red Sea naval drops, and some occasional mercenaries, and it was just me, huge Shia Fatimid Egypt blob, and twice as huge Sunni Seljuk Turks blob - and to make matter worse with a marriage alliance between Fatimids and Seljuks.

I thought that's where the game gets hard, but then Shia Caliph died, the Shia-Sunni alliance got broken, Fatimids got into constant civil wars, the Pope called a successful if somewhat late crusade on kingdom of Jerusalem - and I couldn't resist going into a series of truce-breaking Holy Wars to break what was left of Fatimids. Meanwhile Seljuks are trying to get Basra back, which I opportunistically seized during one of their civil wars.

The bad

The mod has some glitches. When you load a game, you need it to advance 1 day before it recalculates vassal levies correctly - so it's literally impossible to save just before starting a war - you can't start a war on a fresh save (well, you can but if you raise levies without waiting a day you'll be screwed).

Realm view in vanilla was a reasonable way to see how many troops a country has - unfortunately in this mod it seems horribly bugged and sometimes it said thing like "300", then the country would raise 2000+. At other times it seemed to work fine.

I seriously disliked how they nerfed the already overnerfed Ruler Designer. It's already the weakest feature of the game, it's just insane to make it even worse.

The game also suffers from the common problem that any mechanic that's difficult enough to be a challenge for players, will be completely impossible to use for AI.

The weird

And as always, there are just weird things. Gender equality submod lets you give titles and council positions to women (except Muslims), while sons still have precedence over daughters - that's reasonably historical with some hand waving, except maybe for women leading armies part.

This also means abundance of decent vassals to choose when giving away provinces, since you have 2x as much choice.

I'm sure the mod was not meant as "use Holy Wars to paint the map in your color" thing, but the great thing about sandbox strategy games (if this is not a name, it should be) is that you can do silly things.

There was this curious thing in Ruler Designer - 0 cost "Immortal" trait. I don't know if it really makes your ruler "immortal" or just less likely to die at random. If he ever gets too old, I'll just console-kill him. Probably once I conquer Jerusalem, which will hopefully be in 10-15 years now unless Seljuks attack me again and I have to spend years defending myself from Turkish waves rather than painting the map.

I find localized titles rather silly. I'm fine with emirs and sheiks and religious titles, but what the hell are the Jewish and African titles about? History books and the Bible call Jewish kings "kings", not whatever is this thing game uses. If your game is not localizing Polish "Duke of Silesia" as "Wojewoda Śląski" why the hell are you translating Jewish names?

By the way I really want to rant how contrary to CK2 naming nonsense independent dukes and ruler of duchy-level provinces under king usually use separate title system, but this post is already getting long.

The mod also changes its mind on everything every other minor version - any kind of summary you'll see (like the one on the wiki) will be wrong on half the points.

CK2Plus also lacks any kind of real website (it seems to be developed on Something Awful forum - it's like 4chan except you have to pay $10 bucks to get in), so you'll see old versions of it scattered all over the Internet. The most recent version seems to be 1.33.15.

This seems like one place with the up to date download.

Summary

If you don't mind a few glitches, it's mostly a lot better experience than vanilla.

Wednesday, March 13, 2013

Simple and correct algorithm for determining colors of Magic: the Gathering deck

nemo lit v2 by MorrowLess from flickr (CC-SA)


This sounds like something completely trivial, but every single site including deckbox, tappedout etc. is doing it wrong, so I'm writing this public as a public service announcement.

Wrong algorithms everybody uses

There are two very popular algorithms:
  • Check colored symbols on lands, use that as deck's colors
  • Check colored symbols in mana cost, use that as deck's colors
This sounds about right, but it fails on anything more complicated than a core set intro pack:
  • Phyrexian mana a deck has no way to pay for other than with life counts - so all Pod decks ever were suddenly "/u" because of 1-of Phyrexian Metamorph, half of UW Delver decks were "/r" because of some sideboard Gut Shots etc.
  • Hybrid mana makes a deck all its colors, so deck with no mana sources but basic Mountains which contains and some Boros Reckoners and Rakdos Cacklers is somehow an R/b/w deck.
  • Reanimator decks which literally cannot cast half of their off-color fatties still count their colors.
And in addition to extra colors this logic would also miss a lot of cases, like non-land mana sources, sources of "any" colored mana like Cavern of Souls, off-color activated abilities and so on.

Basically, a total disaster. Now if there was no way to do it correctly or the algorithm to do so was too complicated that would be excusable, but it turns out it's really simple.

Simple and correct algorithm

So here's a simple definition which deals with all these problems. X is one of the colors of a deck, if the deck:
  • Can use one of its cards to generate mana in color X
  • Can pay colored mana cost X to cast one of its cards or pay for ability on one of its cards (colorless mana costs don't count, hybrid, 2/c, and Phyrexian mana costs are all treated the same as normal costs)
And the algorithm is correspondingly simple:
  • Take all cards of the deck, including its sideboard
  • List all colors any of these cards could produce
  • List all colors any of these cards could use
  • Intersection of these two lists is the answer
And that's all! It's really simple, and deals with all problems I mentioned.

Thanks to Oracle using very regular templating it just takes a few regular expressions to make a list of colors card generates and can use. I even put the list on github as .tsv file.
41/365 Who Me? by Will Hastings from flickr (CC-NC)

Possible and impossible improvements

There are some decks for which simple algorithm given here doesn't work perfectly, but for such cases I haven't been able to find any consistent answers, and any more complex algorithm just lead to different problems.

The monored deck mentioned before with Boros Reckoners and Rakdos Cacklers is correctly identified as monored, but if we include Cavern of Souls in it, it's now R/w/b, since you can now tap Caverns for white/black and use it to cast Reckoner/Cackler - you have no real reason not to tap it for red, but the algorithm doesn't know that.

The algorithm could instead try to find the smallest group of mana colors fully cast everything, but then if you for some inexplicable reason put Cavern of Souls and Boros Reckoner in otherwise monogreen deck, minimal coloring for this deck would be both G/r and G/w - G/r/w the algorithm gives wouldn't be minimal, and G would be incorrect. There's simple mathematical proof based on lattices that explains why this won't work if you want to do some theory. The algorithm could check if lattice's least upper bound is also a solution, and if so give it, otherwise give greatest upper bound, but it's fairly inelegant.

One way the algorithm could be improved but at cost of quite a bit of complexity is by tracking entire costs as an unit, not each symbol. So an otherwise monogreen deck with Progenitus, Quicksilver Amulet, and Noble Hierarch will be treated as G/w/u (since w/u are in colors of Progenitus, and Hierarch can pay for them), even though it's literally impossible to hardcast Progenitus. This is one area where a better algorithm is possible, but it doesn't seem to be worth sacrificing simplicity.

The algorithm doesn't track number of colored mana sources, so otherwise monogreen deck with 4 Birds of Paradise and Progenitus is treated as 5-color deck, even if it doesn't have any way of casting hard-Progenitus without 8 Birds. This is difficult to fix, since any kind of "another mana of the same color" effects, untap effects, blink effects, clones, etc. can all increase amount of colored mana, and we'd need to track them. Right now we don't need to care since they never add another color.

And then of course there could be crazy decks. Maybe your plan is to Act of Treason someone else's guildmage and your 5-color mana sources are meant for paying that? Or maybe you're planning to steal some Birds of Paradise for your off-color flashback costs which you have full intention of paying? With enough crazy it's possible to come up with a deck that breaks every algorithm.

Available on github now


I put script implementing algorithm described in the post on github. Feel free to use it any way you wish.

Saturday, March 09, 2013

Borderlands series review

Cowboy cat by Infomastern from flickr (CC-SA)

As you might have noticed I enjoy video games and cats a lot, so today I'd like to review Borderlands series in one go - some time ago I played Borderlands 2 (as Zero and then halfway through as Geige), and then replayed Borderlands 1 with all the DLCs.

The games have far more similarities than differences so it makes more sense to review them together.

The good

First of all, Handsome Jack - Borderlands 2 managed to pull off one of the most memorable antagonists in the history of gaming, even though you only actually meet him in a brief (and fairly easy) fight. In most games villains are totally replaceable, and you could switch any Mr Doom with Doctor Destruction or Big Bad Alien and nobody would even notice - you just go forward because quests tell you to, not because you care about the ending all that much. In Borderlands 2 Handsome Jack contacts you every now and then to taunt you and otherwise acts as a total douche and throughout the game he manages to build a lot of personality this way. I'd give some examples, but I don't want to be spoilerific about something so awesome.

The next great thing is cartoonish style. Yes it's a postapocalyptic wasteland kind of environment, but it manages to be really happy and colorful! Just as Simpsons (in the old days), South Park and Family Guy (more recently) have shown - you can get away with a lot more if you look silly and cartoonish. I don't really see any "serious" series being able to pull off things like Tiny Tina.

That's one thing I really disliked about Fallout: New Vegas and Skyrim - they try too hard to keep this awful brown/grey/different shade of grey (plus some snow white in case of Skyrim) color palette popularized by "serious business" modern shooters, and it really doesn't suit them.

I really liked how various playable characters from Borderlands 1 become major NPCs in Borderlands 2 - that's the best storyline transition to the sequel I've seen in any game.

I absolutely loved how you can respec your characters for a small fee. In far too many games you need to make your spec choices before you have any idea what you're doing, and there's no way out of them other than by restarting the game. The idea is either that it's "serious business" or that it adds to replay value, but it's bullshit either way - every game should have some way to respec your character, no exceptions.

Another thing I quite liked contrary to many other reviews is how vehicles worked. In most games they are pretty awful. In particular Bandit Technical with barrel catapult was a lot of fun to drive.


Aww cowboy cat by roboppy from flickr (CC-NC-ND)

The bad

The worst thing about Borderlands is levelling system - it's almost as bad as Oblivion. It forces you to do all the side quests in the right order, since if you delay any for a few levels it will be laughably easy.

The first time I played Borderlands 1 before any DLCs came out, it was a reasonable game. The second time I played it with all the DLCs at about the level I was supposed to - and because I got a bunch of levels fighting DLC zombies the entire main story line (and all the side quests since their level is linked with story line level) were just laughably easy.

Levelling systems for open-ended games are always a problem, but in Borderlands the difference even 1 or 2 level difference makes is so ridiculously big even minor problems completely screw the game the way they wouldn't usually.

Borderlands 2 figured this out and at least moved all DLCs to after the main campaign, except for Geige one which provides a new character without any new missions.

A fairly annoying thing is that enemies respawn too fast. I'm not terribly fond of respawn mechanics in general, even though I realize they're essential, but it's one thing for enemies to respawn after you leave the map and come back a few days later, not respawning 5 minutes after you kill them like routinely happens here.

Just like with every other game I really hated max item limit. It was especially horrible in Borderlands 1, so on my second playthrough I just edited the save game to make it 99 before I even started playing. Dear games, stop doing this bullshit. It's tedious and doesn't provide any value whatsoever. In Borderlands 2 at least it was possible to increase it by spending some eridium, so it ended up being less annoying, but I'd still much rather not have any limits.

I'm not a big fan of the random item looting mechanic. It's pretty much inevitable that 99% of random items will be worse than your current item, and it's just unnecessarily tedious to sort them out. What's worse - 99% of quest reward items tend to be total crap, or 100% if you do quests out of level order. This by the way annoyed me far more in Skyrim where unique Daedric artifacts were a lot worse than random crap you could make with medium-level blacksmithing. Why can't games simply increase power level of unique items across the board to make this at least somewhat less annoying? 

While I really loved Borderlands 2's primary antagonist and he together with many other memorable characters drove the storyline well, Borderlands 1's storyline was of simply "go there, shoot some bandits" variety. 

The rest

Borderlands 1 and 2 are very similar games in most ways. Some people have irrational dislike for sequels being too similar mechanically to the originals, but I don't mind - I'd much rather see the sequel keep parts that worked and improve what didn't (like Borderlands 2 with the storyline and various minor enhancements) than completely screw everything that was good about the original, like:
  • Witcher 2
  • FarCry 2
  • Crysis 2
  • Doom 3
  • and other such total crap (OK, Witcher 2 wasn't as crappy as the other examples, but drop in quality from awesomeness of Witcher 1 was huge, and only partly explained by pandering to the dirty console-playing peasants and their shitty controllers)
I totally don't care for multiplayer nonsense Borderlands is full of. Multiplayer coop is just a stupid idea every time, and the only proper kind of multiplayer is pure PvP.

Anyway, I recommend both games very highly despite all their issues.

Tuesday, March 05, 2013

Fallout: New Vegas review


Scooter-Upon-Spacetone, March, 2010 by Maggie Osterberg from flickr (CC-NC-SA)


I didn't really play any of the earlier Fallout games (I tried the original Fallout once, I didn't like it much), but I sure played a lot of Elder Scrolls, so I thought why not try Skyrim: New Vegas as well?

I quite like the game - it might even be legitimately somewhat better than Oblivion and Skyrim - and the review will mostly compare it to these games. And disregard chronological paradox of New Vegas being actually older than Skyrim - that's the order I played them, so that's how I'm going to review them. Also I'm going to do some Skyrim bashing, even though I enjoyed it a lot.

The good

First, I like the genre of Skyrim-style sandbox games a lot - there's a lot of content to explore, and if you want you can go pretty deep into backstory and stories of individual characters, but none of that is forced.

New Vegas has very different atmosphere than Skyrim - and I don't mind happy epic fantasy, but here it's executed much better. Nothing like "Hi there new guy, how would you like to become our new Archmage even though you can't cast anything stronger than apprentice level Firebolt?". At least Oblivion for all its other faults executed epic fantasy a lot better.

The faction system is really neat, with (sort of) "good guys", (sort of) "bad guys", and a lot of minor factions all being very well characterized and interesting. Skyrim had unjoinable Hitler-Elves, Nord Ku Klux Klan lead by [SPOILER REMOVED, ask in Hitler-Elves Embassy for details], and the guys who were pretty much prefect do-gooders except for trying to execute you in the intro, for no particular reason. Forsworn had a neat backstory, but they're also unjoinable. Oh and there's this so called "main quest" with both factions being basically total asses, and in any case you can be on best terms with both if you don't care for some minor quests.

New Vegas has a lot more options for customizing your character and your choices have much bigger consequences. It really made no sense how in Skyrim you could be playing Khajiit (totally forbidden from entering any cities) and nobody would even make a complaint. You could even join the Nord KKK playing as one of the races they lynch as a hobby. Part of it was also crappy balance - Skyrim's offensive magic was crappy, 2/3 of all enemies (all Draugr, all Nords etc.) were immune to cold so cold offensive magic was even worse, with so many missions involving going to dungeons to kill Draugr any kind of peaceful or sneaky character was pretty much not viable etc. You could do some fun things and sneaking atop dragon's tower to backstab dragon with 30x dagger sneak attack damage was a very memorable moment, but 95% of the gameplay time was the same regardless of who you were playing.

One really great thing is total lack of levelled enemies. This was the single biggest issue with Oblivion, and Skyrim only halfway fixed that. I'm not sure if not having any level-dependence would work that well in epic fantasy setting, but Skyrim still has too much of it.

I also quite liked how enemies in New Vegas rarely respawn. For some time I even thought they don't respawn at all - it turns out they do, but only in certain locations and very slowly, so you get much better sense of making progress cleaning the world from bandits and other dangers.
Scooter-Upon-Spacetone, March, 2010 by Maggie Osterberg from flickr (CC-NC-SA)

The bad

But enough with complaining about Skyrim, let's get to complaints about New Vegas.

The worst part of all is the user interface. Elder Scrolls games sucked here hard as well, feeling like they were all designed console-first, PC is an afterthought, but it was nowhere near as bad as this Pip-Boy nonsense. How hard would it be to map M to map, I to items, J to quest journal, 1/2/3/4 to switch weapons, and so on? You need to go through 3 or 4 screens to do one simple action, then another 3 or 4 screens back to something else.

Probably the worst part of the overall abysmally designed interface is the local map. It doesn't show anything! It's just a vague blob of blurred pixels background showing nothing whatsoever - and in many locations they didn't even bother with blurred pixels. Would it kill them to make it minimally readable, and perhaps add a few colors to the interface?

It's a nice coincidence that my character is claustrophobic, so I can always blame this crap and getting constantly lost and generally confused indoors on my condition, but it seems pretty much impossible to play a non-claustrophobic character.

And speaking of maps - global map is strangely tiny and packed with locations. I know it doesn't really matter and the alternative of spacing them a bit further apart wouldn't really do much once you activate all fast travel locations, and how it's all consoles' fault (like almost everything else bad about gaming).

One thing that was sort of nice was how many quests people would give me, requiring various things done in even far away places, many of them inaccessible yet due to my low skills in something or other. Except this got instantly screwed because most of these quests didn't get to the quest log, and since I couldn't do them right away I'd forget about them by the time I could. Skyrim's minor quests list was just an amazing idea.

New Vegas suffers from Skyrim's problems of absolutely shitty encumbrance system (in both games ~ player.modav carryweight 9000 and forget about this nonsense), horrible inventory management, shopkeepers having very limited money to buy things from you (here at least this is much less serious issue than in Skyrim where it was just ridiculous). To this it adds another annoyance of item repair, which is only partially excusable by the apocalyptic setting.

Visually both New Vegas and Skyrim suffer form 95% of locations looking pretty much identical. This is one area where Oblivion is still unmatched. It's more a problem in Skyrim since apocalyptic wasteland excuse works in New Vegas's favour, but even in an apocalyptic wasteland a bit more variety was definitely possible.

The weird

New Vegas has this fairly ridiculous V.A.T.S. thing where you can switch to something vaguely resembling a turn-based system in the middle of combat. They integrated it with real time combat a lot better than I expected, but it still feels just weird.

There's a strangely high number of rapey parts. I don't terribly mind, and with people murdering and torturing each other as a routine matter there's going to be some raping as well, but it feels weird in a non-Japanese video game.