Writing a Novel in NovelCrafter
Part 4: Building a Set of Custom Frameworks & Using them to Make Locations
After the quick detour to look at language / dialect Codex entries in the last part, in this part, I'll design some quick frameworks to use in the Codex as templates that work together. The framework-making procedures before this can be summarized like this:
- Identify something I want to put in the Codex to easily remind an LLM about at need, or all the time.
- Chat with an AI to design a framework to operate like guidelines or a ruleset to invoke, to draw the LLM's attention to.
- Add the framework as a Codex entry and tell NovelCrafter the LLMs must "know" its contents a.) all the time or b.) when reminded.
- When I need the LLM to create something in the category of things a framework covers, just invoke that framework as part of the instructions. For example, in Part 3 the LLM was able to use the Framework for Dwarven language to consistently add some dialect to those characters' dialogue.
In this part, the ultimate goal is to devise a system within NovelCrafter to make it quick and efficient to create new location entries in the Codex. These will work a little like a gazetteer I can refer to - and the LLMs can refer to - when plotting and narrating a story.
Such a system has to be flexible because many things can count as a Location I'd be interested in defining consistently for the AI assistant (and for my own purposes). A location could be the cramped cellar under a one-room cabin, or it could be a mountain range. Even when two locations seem to belong in the same category, like two different towns, one might require details that are irrelevant for the other. For example, if one town is an inland agricultural village at the center of some farms, its details only partially overlap those of another village set on the seacoast and based around a tiny harbor and the local fishery activities.
One solution would be to just make an enormous ruleset squeezed into a single framework. If I use that to guide the LLM to detail a mountain range, it can then read the entire long framework and disregard the bits that do not pertain, like the description of the harbor docks area, or whatever else. In some situations, this could work, even though every time the framework is invoked, the LLM has to use tokens, time, and (sometimes) cost some extra money. But I don't know how many locations I'll need to build, so it pays to build more efficiently.
I had an idea to build a set of smaller, more specific frameworks, but then there is a different kind of waste, in that many kinds of location do share similar properties. In the end, I settled on a modular approach and GPT4o helped design the system.
The Custom Dev Editor's Solution to Modular Location Frameworks
Some conversation with the Customizable Genre Dev Editor AI using GPT4o helped narrow down the categories of potential locations. It was a long conversation, but fruitful; I'll try to cover the important points only.
At this point, I had made some rambling, unstructured entries in the Codex with a "WIP" label added to remind me to tidy them up later, so the Dev Editor was aware of the broad strokes of my genre and setting (stories focused on a large, mountainous, forested island near the coast of a continental mainland). It also had some details about a few main towns, some of the basic geography and some factions of inhabitants. It also had more developed information about the magic system.
Instructions for the Dev Editor using GPT4o:
In the context of the stories I want to tell about people on and around The Island, what frameworks will be useful in helping Large Language Model worldbuilding assistants to create, describe, and understand various locations sufficiently to create a sense of verisimilitude in plotting and prose?
Thank you. Are there any other sorts of locations where the framework you described might fall short and a different framework may be more useful?
Although some of the responses from the Dev Editor (or other AIs) in conversations like this might be long and detailed, and may head off in the wrong direction, it's worth reading through the responses you receive for your own worldbuilding because there will usually be some interesting nuggets of creativity. One tiny example above is that the Dev Editor, even using starchy GPT4o just invents stuff to use as examples. The "Heartwood Tree" of the elves is one example.
I don't like to let it completely off the leash in such cases, though: that detail probably has story potential, but it sounds like it could be derivative of some existing work the LLM was trained on.
Skipping Ahead a Bit
After some more back & forth conversation with the Dev Editor about the most efficient way to detail all the various types of location, the AI explained I should break down the frameworks so that all location descriptions were built by combining:
- A primary location framework, and
- One or more supplementary frameworks
After some more interrogation, the AI suggested a list of broad categories of locations and each could have a shorter supplementary framework. Here's the list of frameworks (templates) it suggested :
Available Frameworks
- Main Framework
- Location Template - Primary
- Supplemental Frameworks
- Location Template - Coastal & Maritime
- Location Template - Natural Features
- Location Template - Nomadic & Temporary
- Location Template - Ruined & Abandoned
- Location Template - Sacred & Magical Sites
- Location Template - Urban
Missing Categories
These location categories cover all the large-scale things I could think of, but not a location like a house or a shop, or even one room, so I asked about that and the AI designed a complete, but much more compact framework for Small-Scale locations. So one of the LLMs can decide whether to use the Primary framework and one or more supplementary frameworks, or it can choose the Small Scale framework.
I noticed that all templates lacked a way to situate a location relative to the other locations, or even within The Island. The AI came up with a "Spatial Framework" to be added to all locations that need this data. In fact, this would be all locations. I think potentially, the Spatial framework could just be combined into the Primary framework, but I hedged because it might be useful at some point to describe spatial relationships differently for large locations and for small locations. For now, here's the updated design:
Available Frameworks
- Main Frameworks
- Location Template - Primary
- Location Template - Small Scale
- Supplemental Frameworks
- Location Template - Coastal & Maritime
- Location Template - Natural Features
- Location Template - Nomadic & Temporary
- Location Template - Ruined & Abandoned
- Location Template - Sacred & Magical Sites
- Location Template - Urban
- Location Template - Spatial Framework
The AI also helpfully explained a viable workflow to use the frameworks to generate and define locations.
If I give an LLM in Chat at least a list of names with categories for each location with a good prompt, it can use the categories to determine which templates to use to best generate and describe each location. There are a few ways to accomplish this, but it's basically a two-step process:
Produce a list of location names with categories, even if those categories do not match exactly with the available frameworks.
Pass that list to an LLM in a prompt to tell it which templates to use, how and when to generate coherent location descriptions.
Here's the basic prompt that instructs an LLM to generate location descriptions. It only needs a list of names with categories.
You are assisting in building a detailed and immersive fantasy world set on and around The Island, an island with a complex ecosystem and various fantasy races. Each location is categorized and requires a specific combination of frameworks to be described accurately. Use the "Primary" framework wherever applicable, supplemented by relevant templates based on the category, and always supplemented by “Spatial Framework”. For smaller-scale settings, use the "Small Scale" framework, always supplemented by “Spatial Framework”. The main purpose of these descriptions is to be added to a fantasy fiction author’s reference gazetteer, so each description may be used as the basis for an engaging part of a character-based fantasy story.
Available Frameworks
Main Frameworks
Location Template - Primary
Location Template - Small Scale
Supplemental Frameworks
Location Template - Coastal & Maritime
Location Template - Natural Features
Location Template - Nomadic & Temporary
Location Template - Ruined & Abandoned
Location Template - Sacred & Magical Sites
Location Template - Urban
Location Template - Spatial Framework
Instructions for Each Location
For each location listed in your last response:
Reference the relevant main framework ("Primary" or "Small Scale").
Integrate the supplemental frameworks based on the location's category.
Ensure the description includes topography, climate, resources, political structure, economy, history, daily life, points of interest, sources of conflict, and spatial relationships.
Provide a comprehensive yet concise description for each location.
Please begin with the first location, and continue through the list, applying the appropriate frameworks for each location.
As expected, the categories don't even have to be very close to the defined frameworks. The language analysis of the models is good enough to sort them.
Also, the list can be more specific. If I want lots of port towns, I'll give the prompt a list of port town names and categorize them accordingly.
Hopefully this helps people guide their own NovelCrafter AI assistants to generate and organize better quality locations (and more).
Before closing, I'll paste in a couple of the templates and one of the locations the prompt above led to. The Claude 3 Sonnet generated the location in this case, but any of the more creative models will do. This is not final prose, but a useful worldbuilding Codex entry.
Wow. I didn't even know there were druids on The Island, nor that they have some kind of portal to the "fey places," which the LLM also seems to have dreamed up. Maybe this can be useful, though...
Happy worldbuilding, everyone.