Carnosaur vs Tree Lord

14 Jul 2017

A couple pics from a battle this afternoon.


Seraphon Bastiladon and Ripperdactyl Riders

14 Jul 2017

Thank you to my girlfriend Amanda for taking these photos of my recently finished Ripperdactyl Riders and Bastiladon.

I used polyurethane on the Solar Crest for the Bastiladon. It makes the gem shine and glint when light hits it. I really like it!

bastiladon
toad
It's really coming together as an army.

IMPORTXML (Google Sheets) FAQ and Optimization

28 Jun 2017

Update: 10-27-2020

I got an email from a reader Ryan, who wrote the following:

Hey Davis. I ran across an old May 2017 blog you wrote about refreshing Google Sheets imports. It was hugely helpful and I want to thank you.

I think Google Sheets may have changed since your post and now IMPORTXML doesn't refresh with any changed cell.

I found the following changes worked:

I changed all my references for IMPORTXML to the cell holding the updated URL with the #{random number}
I deleted all the code that tries to remove and recreate the formulas
I created a 5 minute trigger that runs the function to update the cell with the random number.

Thanks so much for your contribution!

I haven’t personally tested this, but I can confirm that my old IMPORTXML statements no longer work. Give this a try!


NOTE: The below doesn’t necessarily apply anymore (as of late 2020)!

I got an email from a reader John who had some issues running the IMPORTXML script that I’d posted about in May.

A couple of clarifying pieces of information:

How do I get the Google Sheet ID?
  • The var id = '' requires your Google Sheet ID. The easiest way to get this ID is to look at the the URL of your Google Sheet.
  • Example: https://docs.google.com/spreadsheets/d/1234567890abcdefghijklmnop/edit#gid=1957285
  • The id is the hashed value between d/ and /edit, so in this case, var id = '1234567890abcdefghijklmnop';.
I keep getting the “Service using too much computer time for day” email error. Any way around this? Is it possible to have the script run on only one particular page rather than every page in the sheet? I wonder if that might help. Or another way?

Are you sure you really need to search each sheet, row, and column for the existence of IMPORTXML statements, and then, and only then, update a cell every five minutes?

Would the script run just as well if you just update a cell every five minutes regardless of conditions?

You really just want a script that updates the number after the hash #, e.g. cell E2 in "http://example.com/xmlfeed#"&E2.

I recommend that you make one new sheet (make it the last sheet in the whole workbook) that will contain all of your IMPORTXML statements. If you’re doing cryptocurrency stuff like most people using the script, name the sheet Prices, and that’s where all of your other sheets can reference values.

What I do is just have a page where all of the links have their # number pointed at cell E2. Then my script looks like the following. Remember that IMPORTXML runs every time you change the hash number, so all we really need is a script that updates one cell every few minutes. We don’t need to search for IMPORTXML and waste computing time when we know that we definitely want this cell updated!

function RefreshImports() {
  var lock = LockService.getScriptLock();
  if (!lock.tryLock(5000)) return;

  var id = "your_google_sheet_id";
  var ss = SpreadsheetApp.openById(id);
  var sheets = ss.getSheets();
  // Get the last sheet
  var sheet = sheets[sheets.length - 1];
  // Use a blank cell here, set it to whatever you want
  sheet.getRange("E2").setValue(Math.round(Math.random() * 100000));

  lock.releaseLock();
}

Using a one-page approach will condense your IMPORTXML statements, making them easier to find, and it’ll help avoid the “Service using too much computer time for day” issue, since it’ll require next to zero computation time to run this script.


Seraphon Skink Priest

20 Jun 2017

I’ve finished painting a quick Skink Priest for my Seraphon army.

Seraphon Skink Priest Seraphon Skink Priest Seraphon Skink Priest
Seraphon Skink Priest Seraphon Skink Priest Seraphon Skink Priest

Nothing too fancy with this guy, just a nice little feather gradient, some gold jewelry, and a custom-ish base. I’ve decided on a palette of emerald/gold/white to signify my heroes. Normal schmucks just get pink shields to tie them together.

Unfortunately, I over-primed this model. If you look closely you can see the bubbling paint on the feathers, and a distinct lack of feather-like texture as well. Definitely over-primed! Oh well, on a small piece like this, you’re not going to notice at a distance.

I’m happy with the general color scheme (picked by my girlfriend Amanda, who is infinitely better with color theory than I am). On my next Skink model, I will be very careful to not over-prime it.

Next up is a unit of Kroxigors, a Bastiladon, and three Terradon Riders. A lot of work!