Panels: Stack-tab

New Drupal Modules - 20 January 2017 - 1:06pm

This module defines a Panels pane style which changes from stacked to tabbed as the screen width shrinks.

User stories:

As an themer, I want to be able to make panel panes that switch between stacked and tabbed view as the user's viewport changes, so that I can save vertical space when my site is viewed on a mobile device.


This module requires the following modules:

Drupal 7 version:

Categories: Drupal

Free Exclusive Enforcer Miniature Available This Weekend From Mantic

Tabletop Gaming News - 20 January 2017 - 1:00pm
Seems this is the weekend for special deals, apparently. Not that I mind it at all. Mantic’s special is that qualifying orders in their webshop placed this weekend will get themselves a free exclusive Enforcer Miniature added to it. From the announcement: Exclusive free miniature available from the Mantic Games website this weekend This weekend, […]
Categories: Game Theory & Design

Learn from devs on Cuphead, Overwatch and more at GDC 2017's Animation Bootcamp

Social/Online Games - Gamasutra - 20 January 2017 - 12:39pm

Artists and animators, take note: GDC 2017 organizers remind you to check out all the great talks taking place during the day-long Animation Bootcamp that helps kick off next month's conference. ...

Categories: Game Theory & Design

Aten Design Group: Custom Permissions with Node Access Grants in Drupal 8 and Drupal 7

Planet Drupal - 20 January 2017 - 12:22pm

For many Drupal web sites setting permissions for anonymous, authenticated, and admin users through the GUI is sufficient. For example, all published content should be visible to all users, authenticated users can leave comments, and admin users are allowed to create content. For more advanced use cases the popular contributed module Content Access (beta for Drupal 7, dev for Drupal 8) allows much finer grained control over read and write access to nodes by content type, and can even specify access differently for individual nodes.

When even more complex permissions are needed many choose to implement hook_node_access(). Permissions management with hook_node_access() does have a few disadvantages:

  • Unwieldy implementations can cause considerable performance bottlenecks
  • Node operation links like View or Edit associated with node permissions aren’t automatically added or removed
  • Views queries are unaffected; content could be displayed to a user in a views block which they would otherwise not have access to

Managing permissions with hook_node_access() works fine in many cases, but it’s not the most flexible way to manage access to your nodes.

Custom permissions with node access grants in Drupal 8

A more robust solution to complex permissions is to use the node access system with hook_node_access_records() and hook_node_grants(). Hook_node_access_records() is called when each node is saved. That’s where grants are setup to view, update, and/or delete a node. Hook_node_grants() is called to determine access and is what is used to check the node_access table.

The good news is node access grants work (almost) exactly the same in Drupal 8 as in 7.

When researching how to implement node grants, I had come across relatively simple examples where access was based on a user’s role or organic groups properties. Since the user object is passed to hook_node_grants(), it’s trivial to determine which user should get access. But, what if access to view or edit a node is based on a combination of factors? This was the situation I recently had to deal with.

The implementation below creates a View grant for accounts that meet a specific criteria. The code for the actual criteria has been omitted. It also creates a full access grant for administrators using a zero as the grant id -- not to be confused with the UID associated with anonymous users.

function MODULENAME_node_access_records(NodeInterface $node) { // code to get accounts that should have read access is not shown foreach ($accounts as $account) { $grants[] = array( 'realm' => 'custom_access', 'gid' => $account->id(), 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, 'langcode' => 'en', ); }   $grants[] = array( 'realm' => 'custom_access', 'gid' => 0, // This is the admin GID, not the $account->uid associated with anonymous 'grant_view' => 1, 'grant_update' => 1, 'grant_delete' => 1, 'langcode' => 'en', );   return $grants; }

Above is part of a hook_node_access_records() implementation. The node_access tables store:

  • Node id: The unique node identifier.
  • Realm: A string that can be whatever you want. This can be useful to group different kinds of access; using the modulename is typical.
  • Grant id: An integer value often used to group access. If for example some users can only read the node, and others can read, update, and delete, you might use 0 and 1 for these two sets of users. In our case there are a small number of users who should have read access and this is determined by code based on multiple factors. For this reason we set a grant for each user using the user id.
  • Grant_view, grant_update, grant_delete: Use 0 for no access, 1 for access.
  • Langcode: Language code.

Below is the hook_node_grants() implementation. This is called each time access to a node needs to be determined; so the simpler the code, the better. If the node_access table has an entry for the node id being accessed, permissions with the matching value for realm and grant id will be granted. First the account is checked for the administrator role, and the grant id 0 is returned if there’s a match. If not, and if the user isn’t anonymous, the function returns a grant with the user’s id. If there’s a match in the table, access will be granted based on the values for read, update, or delete. If this grant doesn’t match an entry in the table, access will be denied. Finally, if the user is anonymous an empty array will be returned, denying access.

function MODULENAME_node_grants(AccountInterface $account, $op) { $grants = array();   if (in_array('administrator', $account->getRoles())) { // gid to view, update, delete $grants['custom_access'][] = 0; return $grants; }   if ($account->id() != 0) { // otherwise return uid, might match entry in table $grants['custom_access'][] = $account->id(); }   return $grants; } Implications of custom node access grants

One of the limitations of implementing custom node access grants is the effect on database queries. If the current user does not have access to a particular node it won’t be included in query results. This makes sense for Views since you wouldn’t want to display nodes a user shouldn’t have access to. However, if in code you need to query nodes in the background, the query is limited to those the current user can access. If for some reason a view should ignore access checks, that’s configurable with the "Disable SQL rewriting" option in the Views GUI.

For queries in code, starting in Drupal 7.15 the syntax for disabling access checks while performing a query is below:


in Drupal 8 the same thing is accomplished with:


Using node access grants isn’t always necessary to manage your permissions, but it allows for more complexity than many contributed modules and is more efficient than many custom hook_node_access() implementations.

Categories: Drupal

Special Weekend Sale For Mutant Chronicles

Tabletop Gaming News - 20 January 2017 - 12:00pm
So, January can be a bit of a bummer. The holidays are over. It’s cold (or, should be, anyway *looks outside* …). You don’t generally want to go out too much. Well, Modiphius is looking to cure some of those New Year’s woes. They’re running a Mutant Chronicles sale over on their website this weekend. […]
Categories: Game Theory & Design

DrupalCon News: Drupal and PHP: Two Parts of the Whole

Planet Drupal - 20 January 2017 - 11:36am

Thanks to the release of Drupal 8, PHP and Drupal are forever more two sides of the same coin. DrupalCon Baltimore will have some specific tracks dedicated to all things Drupal, but we also think it is important to showcase the PHP side as well. After all, good developer practices are good regardless of the chosen outlet. These shared experiences and practices help us discover new tools, abilities, and ways of thinking.

Categories: Drupal

Commerce order number

New Drupal Modules - 20 January 2017 - 11:29am

Commerce order number is a module for
Drupal Commerce, that provides an
extensible framework for generating ID independent order numbers.

By default, Commerce sets the ID of the order entity as order number as well,
which leads to gaps (unfinished carts) and not always ascending order numbers.
This can cause problems, if orders are exported to external accounting systems,
when sequential order numbers are presumed.

Categories: Drupal

Friday Snippets

Tabletop Gaming News - 20 January 2017 - 11:00am
And we’ve made it, once again, to Friday. Woot! The weekend lays ahead of us. If you’re lucky, you’ve got some gaming scheduled. That’s what I’ll be doing. In the meantime, we’ve got our regular set of bite-sized gaming stories for you. On the platter today we have: Sine Tempore Coming To Kickstarter, Devil’s Run […]
Categories: Game Theory & Design

Elite: Dangerous Role Playing Game Up On Kickstarter

Tabletop Gaming News - 20 January 2017 - 10:00am
Man, this might make you feel old. Elite, the space trading game, came out 30 years ago. Well, I guess it’s as good a time as any for them to come out with an RPG based on the system. That’s where Elite: Dangerous comes in. The campaign to fund it is up on Kickstarter now. […]
Categories: Game Theory & Design

New Project Z Deals From Warlord Games

Tabletop Gaming News - 20 January 2017 - 9:00am
Zombies! Zombies everywhere! And boy, did they all stink. But, they’re dead. Waddya expect? Well, the folks at Warlord Games are looking to spread the zombie plague out a bit by sending some your way. Why would you want to buy zombies? Well, they’ve got a couple great deals going on right now for Project […]
Categories: Game Theory & Design

InternetDevels: Migrate API in Drupal 8 and a glimpse at the migration process

Planet Drupal - 20 January 2017 - 8:05am

Drupal 8 is so irresistible in its innovations that it just makes you wanna… pack your things and migrate! ;) To “pack” your website’s content and configuration carefully and move them to Drupal 8, there exists a cool tool called Migrate API. As with any relocation, it's easier to “pack your things” when they, let's say, fit into “standard boxes”. The same applies to websites: the less custom functionality they have, the quicker the upgrade process will go.

Read more
Categories: Drupal

Battlefront Features Mot-Schützen Kompanie For Team Yankee

Tabletop Gaming News - 20 January 2017 - 8:00am
So, we’ve seen a couple different vehicles lately for the East German forces in Team Yankee, but those APCs need to carry around someone, right? Well, that’s where the Mot-Schützen Kompanie comes in, of which we get a deeper look at in this article. From them to you: The Russian BMP-1 is the successor to […]
Categories: Game Theory & Design

Beyond 50/50: Breaking Down The Percentage of Female Gamers by Genre - by Nick Yee Blogs - 20 January 2017 - 7:12am
Using data from over 270,000 gamers, we’ve put together some findings on the percentage of female gamers across game genres.
Categories: Game Theory & Design

Adaptive UI for Video Games - by Thomas Cashman Blogs - 20 January 2017 - 7:05am
mini2Dx 1.3.0 introduced support for adaptive user interface layout and navigation to allow for single UI implementations to work on all screen sizes and input devices. We explore a a high level overview of how the framework achieves.
Categories: Game Theory & Design

How to fix stuttering in scrolling animations - by Franco Bugnano Blogs - 20 January 2017 - 7:05am
As I started working on our next game, I noticed a very strange and unpleasant behaviour: when scrolling the viewport, the animation was stuttering. Here's how I fixed it.
Categories: Game Theory & Design

2017 - What’s Going to Happen? - by Dylan Moran Blogs - 20 January 2017 - 7:05am
Nintendo have grabbed the year by the horns by showcasing the Nintendo Switch and announcing new entries for the hit Fire Emblem series.
Categories: Game Theory & Design

New Legio Custodes Releases Available To Order From Forge World

Tabletop Gaming News - 20 January 2017 - 7:00am
I was a custodian for a while. I worked at a grocery store, a college sports arena, and a hospital (not at the same time). I tell you what, though, I never got to use any cool equipment like dreadnaught suits and grav tanks. Man, space-janitors in the Warhammer universe get all the cool gear! […]
Categories: Game Theory & Design

Adyen Payment

New Drupal Modules - 20 January 2017 - 6:16am

More soon...

Categories: Drupal

New Guild Ball Releases Available From Steamforged Games

Tabletop Gaming News - 20 January 2017 - 6:00am
Season 3 of Guild Ball somewhat-started when we got the stat cards right after Steamcon. But I know a lot of people (myself included) have been really wanting to get the actual Season 3 stat cards. I mean, sure, the print-outs work, but just like getting the official token packs, there’s just something about having […]
Categories: Game Theory & Design

Creating Plot on the Fly

Gnome Stew - 20 January 2017 - 12:00am

Campgrounds are always a great source for creepy…

Players often go left when you expect them to go right. Every GM knows this, but most of us still come to the table with material prepared ahead of time. Experienced GMs know how to plan for adjustments when players eventually do the unexpected thing, however it’s still all built on the framework of their plan. But what do you do if you need to create an engaging, entertaining and coherent game out of thin air?

Many of the games I have run in recent years call for this type of on-the-fly plot creation. Most of the PbtA (Powered by the Apocalypse) style games work like this and I have been running quite a few of them. Monster of the Week has been my go-to impromptu game for a few years now, and Masks: A New Generation is becoming a fast favorite. These games, and others like them, require the players to make their characters together and for the GM to source the table for the information that will flesh out the world the characters inhabit and the story backbone of the game they’re playing.

This isn’t to say that someone couldn’t do any prep for this style of games. You can still go into a game session with an idea of what the plot is going to be, but the GM is still expected to be able to fully incorporate the characters and the ideas the players bring to the table. You’re not going to know WHO the characters are until the players make them, so you have to be able to take the disparate puzzle pieces the players give you and turn them into a game for everyone at the table.

So how do you do that? How do you create a coherent plot on the spur of the moment?

First, you need to understand the essence of the genre you’re running. If you know the common themes and tropes of the genre, you have the foundational toolbox to guide the players in creating characters that fit in that setting and bring the game to life. Without these tools, it becomes difficult to do the game justice and player expectations may run flat. Basically, if you’re running a Masks game, you better have an understanding of what teenage super hero stories are about. If you’re trying your hand at Monster of the Week, some familiarity with Buffy the Vampire Slayer, Supernatural, or other inspirational shows for that game are important.

 When they come up with those background hooks for their character, they’re telling you the type of game they want to play. Second, mine the hell out of the information the players give you as they create their characters. When they come up with those background hooks for their character, they’re telling you the type of game they want to play. It honestly can’t be said any plainer than that. If their history mentions a villain, a special object, a mysterious place, an important friend, or whatever, they want to see that show up during game play. They’re giving you a gold mine of ideas to use for the game. No matter what you have prepped for plot, they’ll most remember the parts of the game intimately tied to their characters.

Third, weave multiple character backgrounds together in the plot of the game. Take a thread from one character and tie it to an interesting bit from another character to help propel the action of the game. You don’t need to do it with every single character at the table, especially if the players have done a good job of tying their characters together, but pulling two or three of them together will be enough to draw in the whole table. This is also a good way to spread the spotlight around and make sure everyone at the table gets a chance to shine.

“Easier said than done, Ang. Why don’t you give us some examples.”

Sure! I can do that. Since I’ve used Monster of the Week and Masks as my referenced games so far, I’ll give you an example from each of those. Both of these were run at different gaming events this past Fall.

Example One:

This was the very first time I ran Masks. It was for six players who had never played before, but most of whom had a pretty good understanding of the super hero genre. They gave me the following characters:

  • Beacon – Haze, a snarky teenage girl that discovered she could phase through objects and enjoyed hanging out with super heroes and doing that whole crime fighting thing.
  • Legacy – Aeronaut, a young man who found his father’s equipment from his days as the first Aeronaut. His father had disappeared during a fight with Dr. Nacht eight years ago.
  • Protégé – Mirror, a rich teenager who had been home schooled for most of his life, but who had been highly trained by his butler, secretly the hero Smoke. He could manipulate portals.
  • Outsider – Cerulean, a blue alien ‘kid’ who decided that Earth was far more interesting than home was. Whether Cerulean was a boy or a girl was up for debate.
  • Transformed – Bogey Man, a quiet and reserved boy that had the misfortune of getting kidnapped and experimented on with a strange meteorite that turned him into a hulking brute.

Malls are great for all the innocent bystanders.

To start off, I pulled in a thread from the Transformed. He’d quite nicely given me a mysterious organization that was experimenting on people using a rock from space. They were notified of a disturbance at the mall where a villain of some sort was threatening an outdoor food court. When they arrived, they noticed the similarities between the berserk creature attacking people and their buddy, Bogey Man. Instantly the player of Bogey Man was engaged and trying to reach out to the obvious victim of the same people who hurt him.

That fight continued with the players trying to subdue the ‘monster’ and keep the civilians safe. A couple of out-of-place bystanders caught the eye of the Beacon and the Legacy. They weren’t panicked and they looked like they were talking into ear pieces of some kind. Here’s where I started weaving in bits from the Legacy’s background and his father’s arch rival, Dr. Nacht. The two characters confronted the observers and a quick side fight ensued before one of the goons used a teleport to escape. Being young and impulsive, the players decided their characters would jump on the guy and teleport with him rather than being smart and waiting for their friends to wrap up their fight.

This left me with one group inside a secret villain base and the rest of the group having to figure out how to find out where their friends went. There was an amusing phone call in the mix where it was revealed that the super serious Protégé was using Wannabe as the ring tone on his cell phone. It was enough to lead them to one of Dr. Nacht’s old bases where it was discovered that one of his henchmen, The Nurse, was using the meteorite to experiment on people to try and create a squad of controlled super brutes. I also briefly brought in the Outsider with some deeper knowledge of the meteorite and its properties.

Example Two:

At a recent con, I ran a pickup game of Monster of the Week for six friends. They all knew each other, so they easily created a tightly interwoven group of Hunters. They gave me:

  • Chosen – Ronald Berenstein, a big dumb jock that had been kidnapped by a cult with Native American influences and trained to be a guardian. Against what, he had no idea. Now he mows Gina’s lawn while she tries to figure out what to do with him.
  • Expert – Gina Rumsfeld, a middle-aged woman whose power was knowing stuff. She was the nexus for the whole group, providing them with information and direction. She was also Meredith’s aunt.
  • Flake – Bridgette North, a wannabe private investigator that was able to string random events into a conspiracy. Slightly crazy and indebted to Gina for saving her life.
  • Professional – Jamie Smith, a tall, blond, beautiful bad ass that worked for a secret government organization that had initially assigned her to keep an eye on Gina and Meredith. Had her loyalties changed recently?
  • Spooky – Bree, a creeptastic young girl that just seemed to show up and follow the team around. It turns out, she’d used her powers on Gina and knew how she would die, but she wouldn’t tell anyone that.
  • Wronged – Meredith St. Cloud, who had been in the system since she was six years old when she had been framed for the murder of her entire family by a beautiful and cruel fae. Gina’s player decided that the fae that framed Meredith was actually trying to get back at her, making the whole incident ‘her fault’.

Instantly, I was drawn to the twisted family connection between the Wronged and the Expert. I was going to have to use that, but I couldn’t be obvious with it until later in the game. They had done a good job of describing themselves as a fairly cohesive monster-hunting team, so I didn’t have to do too much work to get them interested in a hook. I threw the Flake a pattern of disappearances at a campground an hour north of their base. The Professional quickly jumped in and contacted her friends at the FBI and local police departments to discover a couple of missing person reports and minor theft incidents that the police hadn’t yet connected together.

They decided to check into the campground undercover and start investigating the staff, the current campers, and the sites of disappearances. The reports of theft were flavored to have a very mischievous fae feel, but that conflicted with a deeper exploration of the abandoned camp sites that the Chosen and Expert recognized as sign of a wendigo. This was confusing since the two types of threats were not creatures that ever really worked together.

As night fell, the game started coming into its climax and the wendigo attacked. As they were in the middle of a fight with it, the fae started appearing and neutralizing other members of the team not directly involved in the fight. As the wendigo died, the fae queen that had initially framed the Wronged all those years ago appeared. She had grown bored and decided it was time to reveal to her victim why she had chosen her to hurt. She and her minions had lured the wendigo into the area to pull the team into her domain and let them wear themselves out fighting it while she gave the Wronged the “gift” of truth. With an evil laugh, she disappeared, having succeeded in causing a rift.

There was a tense, silent moment as the Wronged faced off against the Expert. She then broke her weapon and walked off into the night, leaving them all behind and ending the game on a cliffhanger.


These are the methods I use to create a plot for a game at a moment’s notice, but I also fully advocate for using them for campaigns or more traditional games. Pulling on threads from your players and the characters they’ve created is going to help get them invested in the game and coming back for more, whether it’s a campaign or just playing with you again for a convention one-shot.

I’m curious, what methods do you use to pull adventures together on the spot? I’d love to hear your examples of games you created out of nothing.

Categories: Game Theory & Design


Subscribe to As If Productions aggregator