Gamebook store

Showing posts with label Gemini. Show all posts
Showing posts with label Gemini. Show all posts

Thursday, 24 September 2026

My sweet Claude

I'm a technophile through and through, but even I know that not everything that can be done should be done. Case in point: there's a service where you can order up a plot and characters and have a bespoke novel written and printed just for you.

(Hang on a tick, though. We'll be talking about AI here, and I can't be doing with the obligatory two minutes' hate of people telling me their tribal identity via a series of muddled anti-AI arguments, so take a look at the blog policy on that one, and if it's not to your taste then come back tomorrow.)

OK, so this customized novel service involves 'romantasy' books and the way it works is each reader specifies their required hero and heroine type, the degree of steaminess, whether the relationship should be bittersweet or rosy, and any necessary plot details. Then an AI writes the thing, the company prints a copy, and it's yours for a mere $89.

I have no doubt the results are as horrible as they are expensive. There is quite enough human-generated slop in publishing without pressing a button and having machines add infinitely more. The AI models get grammar and spelling right, and their prose style is marginally better than some bestselling authors, but they still shouldn't be allowed anywhere near the actual authorial process. For one thing, speaking as a writer, the words are the fun part. Why would I want anyone or anything else to do the writing for me?

I do use AI every day, though, in the tedious support tasks for which, if gamebooks and roleplaying games made any money, I'd hire an assistant. This month I'm making a push to complete my pet project, Jewelspider, a book which is now over two hundred pages long and three years late. I'm drawing on a host of primary sources, many of which are in Latin, French or Middle English. Finding all references to medieval lycanthropy, say, in a few dozen books like that could eat up weeks -- or I can get Gemini Notebook to help me and have those weeks free for writing instead.

In the middle of that, I'm still fielding the dozens of micro-tasks that would suck up time if I let them. A publisher needed me to give them a list of fifty scenes to illustrate in a couple of gamebooks I wrote  years ago. I'd have to re-read the books, find fifty key scenes, and collate all the text the artist will need across several sections. That's a few days of the most mind-numbing work... for a human. Claude read the books, found fifty different dramatic scenes, made sure to avoid spoiler scenes, and from my text pulled together a briefing for the artist for each illustration. I was able to check that list in an hour, make a few corrections, and it was good to go.

Then an app developer who is considering adapting another series of mine asked if I could provide them with a list of every item that can be picked up in the books, where they can be used, what they do, and where the player can lose them. That's a good month of work as the books were written decades ago and I don't still have the flowcharts. But Claude did the job in twenty minutes and gave me all the info in an Excel spreadsheet. It was two hundred items, incidentally. If I'd done that myself I'd still be working on it now.

Another app developer is producing an audio version of my gamebook Heart of Ice. Every few days they send me the scripts. That's dozens of pages to check, not only for dialogue but for the logic markup that drives the game. If I allowed myself to get pulled down that rabbit hole, Jewelspider would never get finished. So Claude took a look and came back with a list of the things I needed to take a closer look at -- dialogue given to the wrong character, inconsistent tagging, that kind of thing. Another couple of weeks saved. When the developer emailed to say they'd be recording the next day and the actors needed a pronunciation guide to all the items, names, places, etc, in the book, it could have meant me pulling an all-nighter. Claude took ten minutes to find all the words that might get mispronounced along with suggested alternative ways to say them, so all I had to do was tell Claude which were right and I got a list back with both a plain phonetic respelling and (for especially diligent thespians) an IPA version of each word.

The AI dealt efficiently with chores that once would have cost me time and energy, of which I nowadays have far less than I did in my youth, allowing me to focus on the creative part of my job: the actual writing. And if you're interested in Jewelspider (which is all-human work, both the writing and the art) please come over to Patreon and take a look.

Friday, 11 July 2025

The magic of the machine

All five Vulcanverse books are now available in ebook format for Kindle and as watermarked PDFs on DriveThruRPG. If your friends scoff at the very suggestion, saying, "But the full-colour hardbacks look so amazingly collectible!" -- well, they have a point, but you can counter with the fact that you'll be getting the entire open-world series (6115 gamebook sections, and getting on for three quarters of a million words) for less than the price of a single paperback book.

The Sisyphean task facing me was hyperlinking all those sections. You can see from the image above what the text looked like. I had the five books in Word and I was quickly able to convert all the centred numbers to headings. You can hyperlink to headings, so that was the first hurdle. But then I thought about the task ahead. More than six thousand sections meant about twelve thousand hyperlinks to put in. If I did those by hand it would take weeks of mind-numbing labour.

Ah, but that's 2024 thinking. We're in the future now. I keep extolling the benefit of writing with AI. What better use of it could there be than saving me hours and hours of drudgery? I presented the problem to Gemini 2.5 Pro:

"I have several Word documents into which I need to insert hyperlinks. Each document has numbered sections, typically from 1 digit to 4 digits -- so, for example, 1, 2, 3... to 1499, 1500, 1501, say. Those numbers are styled as headings in Word. Then in the body of the text I have a bunch of links, also numbered, like so: ► 1, ► 2, etc. I want to link those so that the number after the arrow is hyperlinked to the corresponding heading. For example, given ► 188 the "188" would link to to the heading labelled 188. Rather than do this laboriously by hand, I'm hoping you can write me a macro that will add all the hyperlinks automatically."

Gemini quickly came back with a macro to run in Word. And here's a bonus: a human coder would certainly have told me that I should have written the book in Twine to begin with -- in other words, "I wouldn't start from here." But I had it all in Word, so who cares what I should have done if I'd thought about it a couple of years ago? I needed the solution to this problem right now. LLMs don't scold you, they just get on with it.

Gemini's macro hyperlinked the whole of a Vulcanverse book in a few minutes. The only snag was that it hyperlinked every instance of a number N to heading N, and that included hyperlinking stat bonuses, the costs of items for sale, and numbers given in difficulty checks -- whereas I only wanted it to hyperlink numbers that followed a ► , ie in the format "► N", indicating a player option. Gemini suggested a couple of fixes but those didn't work. At this point it was time for the human writer to earn his keep. I said:

"The new macro is inserting hyperlinks for all instances of ► N but also hyperlinking any number N regardless of whether or not it was prefixed by "► ". I have thought of a possible solution that would save me having to completely reformat the original document. What if I replaced all "► N" with "► xyzN". If you rewrite the macro to search only for "xyzN" and hyperlink those, I can then globally remove the "xyz" and we should be left with hyperlinks only where we want them. I suggest this on the theory that it's the search for ► that is confusing the VBA editor."

That met with Gemini's approval. "Your proposed workflow is a classic troubleshooting technique," it said. "If the target is ambiguous, make it unambiguous. By 'salting' the numbers you care about with a unique prefix, you create a perfect, undeniable target for the macro, completely eliminating the possibility of it acting on the wrong numbers. I am confident this will work."

The best-laid plans of mice, men and machines... The new macro added the hyperlinks, and as promised the hyperlink was only on the numerical part of any instance of "xyzN" (so that I could remove the "xyz" without losing the link), but any given link for a number N didn't necessarily point to the heading N, but to the first occurrence of the number N anywhere in the Word document. Since a number frequently might be mentioned before the heading corresponding to that number, we were still stuck.

My first thought was that the macro was having trouble identifying the headings, so a possible fix would be to run a macro that created a set of bookmarks from the headings. So, for example, heading 323 would lead to the creation of a bookmark labelled bookmark_323 (because bookmarks can’t have names that only comprise digits). We’d end up with a bookmark list: bookmark_0001, bookmark_0002, etc, all the way to bookmark_1800 or whatever. Then we could run a modified version of the hyperlinking macro that would only link to corresponding numbers in the bookmark list.

By this point I'd begun to lose confidence in Gemini 2.5 Pro so I turned instead to Claude Sonnet 4. I didn't give Claude my proposed solution of creating a bookmark list as I wanted to test it properly against Gemini, so I just showed it the macro I had been using and told it the problem. "I can see the issue with your macro," said Claude almost immediately. "The problem is in how you're creating the hyperlinks. When you use SubAddress:=headingNumberText, Word is searching for the first occurrence of that text anywhere in the document, not specifically looking for a heading with that text. The solution is to create proper bookmarks for your headings first, then link to those bookmarks. Here's a corrected version of your macro that should work properly."

Now, this was encouraging. Claude had come up with the same solution as me (not always a good sign in and of itself, admittedly) and its code was considerably tighter than Gemini's. Not only that, Claude's macro ran faster and with no errors. Some twenty minutes later I had all five Vulcanverse books fully hyperlinked. (And the Fabled Lands books after ten or fifteen minutes more.) It's a perfect example of how AI tools can make a writer's life so much easier. All the words and storylines are by me and Jamie, all the illustrations are by Mattia Simone and the art team at Vulcan Forged; only the grunt work was done by machine.