Android:Netrunner on OCTGN

A short introduction to Android:Netrunner, it’s OCTGN plugin and a short step-by-step guide to get it up and running.

Android:Netrunner logo. A woman under a blue light, wielding virtual interfaces with both handsI mentioned a while ago that the first and most basic version of Android:Netrunner has been released on OCTGN, and you haven’t really heard from me since. Well the reason is that I was too busy coding improvements for it. I think it’s time to give my latest creation the usual treatment and announce it here.

So Android:Netrunner is a new reimplementation of the Classic Netrunner, but given a really good polishing in the rules and art by Fantasy Flight Games. The game has not been released yet ((Release Date is mid September 2012)) and it already seems like it’s going to be a runaway success! There an absurd amount of excitement for the new version online and the game has been sitting in the hottest games of Board Game Geek for weeks now. It’s sitting in the second rank for customizable games, even before people has a chance to really make decks with it.

The game is a unique blend of asymmetric gameplay combined with a significant element of bluff. This combination, along with the Cyberpunk setting and the (now) Noir flair of the Android universe, makes it a very interesting and exciting game to play.

At the moment of release there’s going to beย  7 factions to play with. 4 Corporations, and 3 Runners. One of the runners is even going to be an anarchist ((Supposedly. I’m not convinced FFG understand anarchism enough to do it justice. Noise, the first Anarch runner seems more bent on mindless destruction rather than anything else. Lets hope future expansions show us a better aspect of the movement.)) playing around with computer viruses. The game comes out with 113 unique cards which is light for a first expansion, but not particularly limiting. You can check out this thread for some in-depth and in-flavor analysis on the runner factions.

I’ve played about 8 games on OCTGN until now, just with the starter decks, and I’m really liking what I see. The feeling I get when I play this game is that it has more cohesion within each faction. They each have a specific style of play that they favor and their faction cards complement it. In deck construction you can use cards from other factions to complement your strength and perhaps even do something completely uncharacteristic and throw your opponent off. I think this cohesion is good because it allows some natural balance as it’s impossible to defend from all angles, so it comes down more to whoever can use their limited tools and some good bluffing to avoid exposing their weak points and hit their opponent where they can defend the least.

So, for anyone interested in trying it out, here’s some instructions on how to get it to work with OCTGN

A Game of Android:Netrunner on OCTGN in progress
The Jinteki Corporation VS a Shaper runner. The runner has just stolen an agenda and the Jinteki is punishing her by doing net damage.

Once everything is set up, you need to find someone to play with. You can go to the Host/Join tab to see if anyone has a game waiting. If nobody does, host your own and put in the title that you’re a new player. There’s a lot of people who will help you learn

Once you find someone, one of you hosts and game and the other joins. Leave the two-sided checkbox checked and make sure that whoever is going to play the Corp is set as player [A] (the host can click on the letter to switch it) and once the game is started, load your starter decks. Things should be fairly intuitive but keep in mind these basic things in relation to the OCTGN engine plugin.

  • First thing you do after you load a deck is Setup (Ctrl+Shift+S). This will check if your version is up to date, show you the Message of the Day, and also give you some Tips on playing the game.
  • At the start of your turn, declare it with F1.
  • At the end of your turn, declare it with F12. Make sure the game announces that your turn has ended and is not expecting you to discard down to your max hand size ๐Ÿ˜‰
  • If you’re a runner, start a run with [F5] – [F8], or by playing cards. Once your run has ended, finish it with [Esc] is unsuccessful, or with [F3] if successful.
  • Double-clicking is your friends. Almost everything you want to do, you do it by double-clicking on the card in question.

The below video will take you through a step-by-step tutorial on using OCTGN to play Android:Netrunner

There’s a lot of other tricks you can use in the engine and most of them have been put into the “Did you Know” starting tips. So pay attention and you’ll be flying through the controls in no-time. Any new innovations I add to it, are also going to appear in the changelog and future MotDs, so you’ll know when good stuff has arrived. In fact I’ve been coding like crazy for the last few weeks, much to the annoyingment of the wifey. So much so that I’m starting to feel like this.

A card from Android:Netrunner. A hacker jacked into his interface is using powerful drugs to focus and bypass corporate defenses
Coding an ANR plugin is kinda like this.

There’s already a large group of players using the Android:Netrunner OCTGN plugin daily, since unlike my other plugins, this game is hot stuff. You’ll find a lot of potential opponents to test your deck-building and bluffing mettle.

If you’ve enjoyed this plugin, feel free to give a diesel tip, to fund further caffeine-fueled development ๐Ÿ˜‰



Good Running!

Android:Netrunner plugin now available for OCTGN

You can now play the game while you’re waiting for it to be released in the stores ๐Ÿ˜‰

Yesterday night I finally managed to release the first working version of my Android:Netrunner plugin for OCTGN. The plugin came out so quickly because it’s a direct port of my Netrunner plugin, which is already at a very polished level. All I had to do this time was fork the code, carefully search and replace the various keywords and work on making the basic scripts (setup table, play card from hand, trash card, start/end turn) work with the new card properties.

I am very thankful to the people online who came forward to provide censored scans or cards and other paraphernalia, xml exports and even the image for my new table board. Thanks a lot everyone, you know who you are. I would never have done it so quickly without you.

And I’m still not done of course. I’m merely warming up in fact. There’s at least 2 more days of frantic coding ahead of me, so that I can bring the core set and the game to the same level of polish as the original netrunner. I need to put in all the scripts for the cards, tweak and bugfix the existing code (although there’s far less script crashes than I expected) and then, finally I can relax by starting to play Guild Wars 2 which will have just come up.

In fact GW2 should already be active for me, since I pre-purchased, but it’s just my luck that I’m working on the weekend. But even if I weren’t, I don’t think I would even try to play without getting ANR finished. I’m far too dedicated to it to stop now.

It’s actually weird just how much I’ve been hooked to coding for this card game. I haven’t even checked my RSS feed, of which the priority items only are already ~500. That’s going to be a PITA to get though.Worth it though.

Anyway, at the moment, anyone can download the basic first version as well as the required markers. One can also download the first set, in its censored version. You can find all the links in the forum.

Why is the first set censored you ask? Well from what people tell me, FFG, the creators of Android:Netrunner have this unwritten policy that they allow online versions of their LCGs, as long as the cards text is censored in some way for the first six months a set is out. Apparently they are likely to send you a nastygram or an outright DMCA request to your host if you don’t abide by this. I have no idea how true this is, as I’ve only heard it third hand, but there you have it.

Because of this, I’ve avoided uploading an uncensored set to my website as I’ve done with all my other CCGs, as I may wake up one morning with my site (or Google account, had I used google drive) taken down. I also didn’t upload the censored version because of the same concerns, given that this is, again all third hand knowledge.

To tell the truth, this whole policy is not only unnecesarry, but also counter-productive. From my experience, most people play card games online when there’s absolutely no other option (and maybe not even then). I’ve yet to see anyone who does it because they’re too cheap. This doubly goes for LCGs which do not have the collectible aspect and thus I can guarantee you that 95% of the people playing have bought the cards. If anything, having an online version is helpful as it increases exposure to the game, and it allows people to check it out and see if they like before they buy. It will absolutely boost sales, particularly with the price ranges of LCGs.

With Android:Netrunner, it’s makes even more sense to allow the uncensored cards at this moment. The game is not even out. Excitement is running out and letting people play a version online (which is never as fun as playing the actual game) can create more buzz and talk about your game. But because of this misguided overall policy of FFG, I’m afraid to do so, as it might lead to action against me. For doing something nice for others and FFG no less. But these are the pains of our culture of permission and intellectual lockdown. Company policies are just as often driven by their legal department, rather than what makes business sense.

But enough about that. Now is the time to grab the OCTGN plugin, a friend and give the whole thing a whirl. And remember, the version you play now is about 10 times worse than the final one I’m going to be releasing in a day or two. So even if you’re not impressed with it currently, check back again when the automations are in place and see what you think then.

The rigors of OCTGN development

Developing in OCTGN is like drinking pure lemon juice every 5 minutes. Lemon juice LACED WITH CRACK!

I must have spent 16 hours a day on the weekend coding my netrunner plugin and yesterday I stayed until 5am coding the latest features. I don’t know why, but this kind of thing is addicting to me. I just can’t tear away from my computer while my code is still not working. If I don’t get to a working state, I won’t go to bed. And given the sorry state of the OCTGN debugger, something that I think will have fixed in 20 minutes, ends up taking 1.5 hours. Of course my wife is none too impressed by this, since I end up telling her that I’ll be going to bed “soon” and when I get there, it’s not even in the same timezone as “soon”.

WTF is this shit?!

And speaking ofย  a debugger, can I rant about the one, or rather lack of one in OCTGN 3 for a moment? Dear gawds I want to rip someone’s head out at times. It is so bad that the only thing I get is a python syntax check when I try to install a new version of the plugin, and even then, when it finds unexpected sytax (eg, a missing closing parenthesis, a bad indentation etc) it will report the correct issue, but then point to the wrong line of code! You can see that in the screenshot on the right, where I removed a colon after a loop opened, so it got confused by the line break. It then reported a line 30 lines above it! it seems that the more deep in the code the error is, the larger the offset of the line reported. This makes finding syntax errors an absolute pain in the cohones. But this is nowhere near as bad as how non-existent runtime debugging is.

If an error appears during runtime (e.g. trying to read a variable that doesn’t exist, like a typo), the only thing I get is a python aborting error that mentions the very first function I called in OCTGN. So if I have a complex structure where the first function can call upwards of 20 others, included nested calls etc, then imagine one script failing with this error. There is absolutely no clue where to begin looking! I used to have to manually enter short pop-up windows in the code, that would inform me where I’m at in the code, so that I can begin to even track the issue. Tracking a small case-sensitive typo could take from 5 to 20 minutes, depending on how much code I wrote in between. Now? I’ve written my own “soft” debugger inside the python script, which accepts levels of verbosity and spits out messages such as which function I am entering/leaving, and what the result of regex commands are. It’s not perfect, but at least it narrows down my search considerably, and I don’t have to repackage the plugin just to insert some error tracking code.

Why would I repackage the whole plugin to test a line of code, you ask? Fool! A sane development environment of course provides some way to alter code on the fly, not to mention a runtime debugger. But OCTGN is no same development environment. If anything, it’s actively taxing your sanity as you spend 10 minutes for the 1000th time, trying to track which of the 10 variables in a function failed to receive a value somewhere. But if that wasn’t enough, the lack of a way to modify your code while in the game, means that the only way to make small changes in order to try and fix issues is to:

  1. Exit the game you’re currently in.
  2. Make your changes in the python code and save the file.
  3. This is what you get if you try to install a new version of a plugin with the same filename as the previous version.

    Re-add the python file into your .o8g file (a simply .zip, renamed). I use 7zip’s handy function to remember the previous names of files you’ve compressed into, so I just select the relevant directory, “compress to” and then select the name. So it adds and replaces to the existing .o8s files with the same name in the current directory. But make sure the .o8g file you’re putting it into does not have the same name as the .o8g file you used last time! Since OCTGN always keeps the current plugin files open in the system, if you try to reinstall a file with the same name, it will fail. So what I do is keep two .o8g in the folder, Netrunner-OCTGN.o8g and Netrunner-OCTGNa.o8g, and every time add the latest changes to the other one.

  4. Go to the Game tab.
  5. Select “Install Game”.
  6. Find your new .o8g file and select it. This takes 2 extra clicks for me since for some reason Windows 7 or OCTGN, I don’t know which, refuses to remember the name of the previous directory I was in last time I installed a game.
  7. Press OK to install it. Hope you didn’t miss any syntax errors. If you did, you have to close the almost-useless error pointer, go back, fix the issue, and then start from step 2 again. But THIS time you have to use the same .o8g name you just used, as it didn’t actually install it, so it’s still using the old one. Make sure you remember that info, because this shit’s written nowhere…
  8. If you had no syntax errors, then it will allow the plugin to be updated after a confirmation dialogue (extra click there.)
  9. Once your plugin is updated, reinstall the sets, if I’ve made any changes to the autoscripts of the cards. Fortunately, those don’t lock the files, so I can re-use the same filenames and don’t have to keep track of which file I installed last time.
  10. OCTGN randomly decided to keep one file open. Why OCTGN? Whhhhhy?

    However, sometimes OCTGN will decide to keep one of your set files open anyway, usually because you looked at one of those cards last (although OCTGN is using an internal DB now). In case you see those lovely red errors when installing the sets, the quickest way to fix it is to restart OCTGN, including logging-in again. Mmmm, I loves me some time wasters…

  11. Go to the game Host/Join tab.
  12. Click “Host” to start a game lobby.
  13. Select the Game you will play from the list.
  14. Provide a lobby name (or click OK to accept the previous one.)
  15. Press Start.
  16. Wait 5 – 10 seconds for the board to load.
  17. Load my debugger (which I’ve conveniently coded so that it spawns 6 cards with abilities I’d like to check and the environment to use them in. In the past I had to always load a deck, use the Setup function, and then fish for the cards I wanted to check.)
  18. Test the new code.

My now I’ve gotten so proficient at this, that I can do this whole procedure in under a minute. However I need to do this for everything. From the smallest typo, to the biggest code blunder in the universe. Can you imagine the overhead of this? I can tell you, it’s absolutely ludicrous. I would code 50 times faster, if I could make code changes and re-run the same code WITHOUT FRIGGING EXITING, REPACKAGING,REINSTALLING and RESTARTING MY GAME EVERY TIME! The fuck!

So imagine doing all that, and then realizing you didn’t fix the issue at all. Imagine you don’t even know where to being looking for the error, so you have to do this whole process 2 or 4 times, just to enter enough messages and error hooks in the places you suspect the problem is, just so that can begin to track it down. I’ve spent hours in issues that would have normally taken me seconds, just because I couldn’t track it easily (think: regression bug) Fun!!!

Fuck you OCTGN! FUCK! YOUUUUUUUUUUUUUUU!

Oh yeah, did you see that wonderful error above. This is the totality of the console I have in the game. A lot of goddamn scrolling involved to perhaps get an idea where the error happened. As you can see, by default, it tells you fuck-all where the error would be. Not only that,ย  but the error will appear before ALL the notification you’ve put in the code, because python processes the code faster than OCTGN puts out notifications. So first you see the error, and then you see your debugging messages you’ve inserted into the code. Talk about mindfuck.

Oh sure, you see that it was the “useAbility()” function, but that’s just where the rabbit hole starts. In fact, this particular error was caused by a regex which I hadn’t configured to process numbers in the text of special Autoscripted announcements. So one group in the regex results was empty. This was the 10th function or so called from useAbility()…It took me half an hour to track that down, and that was WITH my custom-made debugger spitting out the actual last function used until now. Good fucking luck figuring that out just from that message…

You need to be a goddamn zen coder to not be ripping your testicle hairs out with OCTGN. You need to be able to write flawless code the first time around, because if you don’t, you’d better write your own debugger first before you even begin to write any sort of advanced plugin. And then you’d better have the patience of a Go grandmaster…

Why yes, I have asked the developers for more debugging tools, more than 4 months ago, multiple times, why do you ask..?

Phew! Glad that’s out of my system

However, for all its failings, OCTGN is still top of the line among card game engines, primarily because of its integration of Iron Python. It has its quirks (some of them quirkier than others) but the flexibility and power of using python in the backend just can’t be topped. Other card games like GCCG also support some sort of scripting, but then you have to learn its own internal syntax, which is definitely not as advanced as the capabilities of python. This is why, for all its failings and frustrations, I still stick with OCTGN. It’s the first engine that allowed me to fully realize my vision for how a card game engine online should work (i.e. automation up the arse!).

Hopefully the new version that’s in development will have *something* better than this sorry situation. But I swear if they have to break my existing python code in 20 different ways due to a new interpreter (like what happened when moving from OCTGN 2 to OCTGN 3) without giving me a proper debugger, I’m going to cry…Imagine having to debug 3000 lines of code times 4 plugins…

Aaaanyway, it is what it is. Still, through the fire and flames, I’ve still created a plugin I am proud of, and soon I’ll be using the existing code to implement Android: Netrunner. So why don’t you give the current plugin a run and let me know what ya think. You don’t want to let all that past frustration go to waste, do you? Do you?

Bastard.

 

 

Netrunner on OCTGN

Netrunner, the game of Cyberpunk asymmetrical net-warfare can be played online. And soon Android Netrunner as well.

netrunnerAh another one of these posts.

So after Dune, I got into developing a Netrunner plugin. I don’t remember exactly why, I think I noticed that the existing plugin had a few bugs and/or could use a few tweaks now and there. I edited it a bit to polish it a bit more, then I edited a bit more to take off some rough edges and…well, one thing led to another and I’ve written another 2000 lines of code >_<

It’s all good though, I was always interested in Netrunner, even though I didn’t get into it when it was active (it had already died when I started diversifying from Magic:The Gathering). With this particular plugin I went completely overboard in the scripting department, writing flexible code to automate around 70% of the various card effects in the game, so that you can just play a card and it works without you fiddling with counters and markers. This is even far beyond the Dune CCG plugin I’ve coded, but then again Netrunner’s card effects and rules are not as convoluted as Dune’s.

For those curious, there’s a lot of reasons to be interested in Netrunner. It’s one of the few (or is it the only?) asymmetrical card games out there, with the two sides of the game having completely different mechanics and strategies. One is always attacking, and one is always defending, but depending on the cards each player uses, the roles might be temporarily reversed as well. It also has bluffing build-in to its system in a way that even Doomtown cannot achieve, and that is a game based on Poker! If you like games which involve an element of bluff, Netrunner is absolutely something you should check. The setting is cyberpunk which is rare in itself, but not only that but it’s made with a degree of humor and 90s pop-culture reference that you can’t help but love. It’s especially cute to see how wrong they go the future in some issues, especially in how IT would progress. In Netrunner’s world things like newsgroups and BBS’ and jury-rigged computers are still big, which is something that gives the whole theme a nice William Gibson and 80’s IT sheen. I love it.

Finally I can’t help but mention that there’s a reboot/reimplementation of the Netrunner franchise from FFG, called Android Netrunner which is set in a different universe but retains a lot of the flavour and (hopefully) improved card game mechanics. It’s also an LCG which means it not a huge money-sink if you want to enjoy it, and it can cater to both those who like to dabble in deck-design and those who just want to pick up cards and play. Since Netrunner was one of those CCGs which kept a large cult following after more than a decade after its end, you can enjoy how many people have come out of the woodwork for the new part of the franchise. It’s going to be big!

Naturally an Android Netrunner plugin will be forthcoming and in it I plan to re-use a lot of the code I wrote for Netrunner, so there’s that ๐Ÿ˜‰

EDIT @ 02/07/2013 : I’ve moved the installation instructions on to the dedicated page for this game definition. Please follow the step-by-step installation instructions for Netrunner CCG there.

 

Once everything is set up, you need to find someone to play with. Once you do, one hosts and game and the other joins. Leave the two-sided checkbox checked and once the game is started, load your decks. Things should be fairly intuitive but keep in mind 4 basic things in relation to the OCTGN engine plugin.

  • First thing you do after you load a deck is Setup (Ctrl+Shift+S)
  • At the start of your turn, declare it with F1
  • At the end of your turn, declare it with F12. Make sure the game announces that your turn has ended and is not expecting you to discard down to your max hand size ๐Ÿ˜‰
  • Play cards from your hand with the “Pay and Install”ย  (double-click with the mouse) or “Play at no cost”

And some more advanced stuff starting from version 2.1.x

  • Most card will automatically trigger their abilities when played/scored/rezzed so you don’t need to do anything else. Pay attention to the notification area for messages from them.
  • Cards with abilities which increase your MU, Hand Size, etc will automatically increase it when they come into play and reduce it when they go away, as long as you don’t drag&drop them in or out of the table manually. Use the built-in commands for that. Rez, Derez, Trash etc
  • Cards with abilities you activate while they’re in play (like programs, agendas, upgrades etc) will trigger them when you double-click on them. If they have more than one ability (such as most icebreakers), the game will prompt you to select one and pay the appropriate cost.
  • Cards which reduce the cost of other card’s abilities, will also automatically work. If you have a card which has tokens which can pay the cost for activating icebreakers, they will be automatically used when you use one such ability. If you have more than one of these cards which can affect such costs they will be triggered in the order you put them on the table. If you wanted to use the tokens from another card instead, you can simply drag the token manually to the other card afterwards.
  • There are cards which will automatically do damage to your opponent and thus discard random cards from their hand. Due to the way OCTGN works, this may crash the game if you opponent was manipulating the same card. There is a warning before all such damage that will warn you to inform your opponent to be hands-off while the effect is in progress. This warning will also give your opponent the opportunity to play cards which prevent damage.
  • Yes, cards which reduce damage taken have been automated and work automatically depending on the kind of damage you take. As before, they too get triggered by the order they’ve been put on the table, so if you didn’t want to lose the counters from one particular card, just drag them in from the card you did want to use.
  • Some cards require that you select a target from the table or your hand.ย Do this before you play or activate the card. If you don’t the action will abort and the game will inform you to select your targets first. As always, keep your eye on the chatbox for such warnings.
  • Cards which have effects which trigger at start/end of turn (i.e. refilling bit markers on them) will automatically work.
  • If you don’t like some or all the automations, you can disable some or all of them. Go to the game menu, and you can disable damage automations (i.e. your opponent will have to use the damage options manually but those won’t automatically use the damage prevention cards), Turn Start/End automations and Play/Score/Rez Automations (i.e. mostly everything). If you find that you’d rather do everything manually, just disable all of them and you’ll have an experience as with most generic card game engines.

Phew, that should be the most basic things about the new automations. In general if you’re not sure if a card is automated, simply play it and see what happens. You will be surprised at how many cards just work.

You can find updates discussions about the plugin in the forum

Enjoy!