I’m a bit of a nerd — as people in this industry tend to be — and alongside my interest in tech and design, I’ve also gotten pretty deep into Warhammer 40,000. To play the game, you build an army list consisting of units (not to be confused with Bosbec Units), which are then represented by the models you build and paint.
To create a strong and balanced list, you need to understand the strengths and weaknesses of each unit so you can pick the right ones to fulfill specific objectives. Without diving too deep into how Warhammer 40,000 works, let’s just say that a model’s stats and abilities are listed on a datasheet, and it’s based on this — along with a bunch of dice rolls — that you determine whether a model can shoot and incapacitate another.
There are many tools online to help with list-building, but I felt something was missing: a quick way to answer questions like “What are the odds that this unit can take out that one?” or “Will this unit realistically be able to accomplish its goal?” when planning your army. That’s when I came up with the idea of building a simulation tool — using online data sources, Copilot in VS Code, and Bosbec Workflows — that could roll the dice thousands of times and calculate the likelihood of one unit defeating another.
Copilot and JavaScript
Partly as an exploration of what Copilot could do, and partly because I wanted to see if I could build this without being a deep-dive programmer, I decided to solve as much as I could just by prompting Copilot.
I started simple: “Give me a function that simulates a dice roll and returns the result.” Then I added “Add one for a three-sided die” because some situations require that.

Once I had the dice rolls, I asked Copilot to add two forms for inputting the attacker’s and defender’s basic stats.


Then I went through all the keywords a weapon can have and their effects. This led to building out the various steps in an attack sequence, and so on.

Once all the steps were built, I wrapped it so that it could be run multiple times per simulation, providing the calculations in a table and charting them in graphs.

Copilot (in my case, mostly running GPT-4.1) was able to interpret chunks of the Warhammer rules that I copied directly, and it built out function after function. As expected, there were some bugs — both in the code and cases where Copilot got stuck in strange loops — but very quickly, I had a working base.
Bosbec Workflows
To avoid manually typing in stats from datasheets, I started thinking about how I could import them automatically. I knew from before that the source I used for unit stats (those familiar with WH40K will recognize Wahapedia) had made their data available for download, so I started there.
On their site, I found direct links to CSV files and documentation on how the data fits together. Datasheets containing attacks, strength, toughness, damage, and so on could be linked to factions and models. The challenge then was: how should I store the data and convert it to a format that I (or Copilot) could use in JavaScript? I didn’t want to spin up a full database with all the infrastructure that entails.
Instead, I built a workflow in Bosbec that downloads the files, transforms the data into the format my code expects, and stores it as Units (this time I am talking about Bosbec Units).

I then created another workflow that I could call via a GET request. It fetches the requested unit(s) based on the endpoint and datasheet ID in the query, transforms the data into a JSON response, and feeds it directly to the JavaScript to populate the fields.


Even though I had some prior experience building things like this, I was still surprised by how easy it felt. Within a few hours, I had set up a backend that could fetch external data, store and transform it, and provide it in a simple, fast way.
Hosting the web
Of course, once I had something working, I wanted to show it to my friends — and that’s when I hit the next hurdle: I needed to host the site somewhere.
In the past, I’ve used web hosts, bought domains, and gone through the whole setup, but I was hoping to avoid that this time. I just wanted a quick way to show the current state of the project.
A colleague suggested setting up an HTTP channel that could respond directly with the HTML, and instead of linking to external JavaScript and CSS files, I could host those files in my Bosbec file library. An hour later, I had a working link where my friends could use my Warhammer simulator and help test and give feedback.

As with any project, there’s still a lot I want to add. But after just a few evenings of prompting and building workflows, I had a relatively big project up and running — something I actually use and have fun with, diving deeper into my favorite game.
I have some experience with HTML, CSS, and JavaScript, but I’m far from an expert. Without Bosbec Workflows and Copilot, this project would have taken a lot longer — if I even managed to complete it at all.
To me, this project is concrete proof of just how powerful the combination of Bosbec + Copilot can be. It enables nearly anyone to quickly build something that not only works, but is also fun to create!
I hope this post inspires you to start building something with Bosbec Workflows. Whether you’re a seasoned developer or just starting out, I’d love to see what you come up with!
Thanks for reading! For the Emperor!
— Johan Levin, Bosbec