Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
135d53bae6 | ||
|
|
0e62bf8c60 | ||
|
|
981e63fcb8 | ||
|
|
d1b01fb422 | ||
|
|
88af3553b4 | ||
|
|
3a7d376e95 | ||
|
|
4d5044a4ee | ||
|
|
ec28babb7b | ||
|
|
505e573d60 | ||
|
|
d37798b21c | ||
|
|
047302c94a | ||
|
|
632e55e73f | ||
|
|
de7e077565 | ||
|
|
dcef48441e |
@@ -114,7 +114,7 @@ And so play proceeds.
|
||||
|
||||
Don't panic. Your GM will help guide you through what dice to roll and when. You'll soon be anticipating what to roll and when.
|
||||
|
||||
Okay, how does the GM decide on the target number for these dice rolls? Well, they make it up. If the GM is running a pre-made module the type of roll and the target number will be specifed in the module, but often your character will be trying something the module does not provide information for, so the GM will make something up on the spot. The harder the thing you are trying to do, the higher the target will be. Sometimes the GM will tell you the target but often they will not. It depends on the GM and whether they feel it will add to the fun if the player knows the target number. If you are planning on being a GM we will cover how we go about deciding this later. Sometimes the rules offer guidance, but the GM can ignore or modify this as they wish. For example, the Dungeon Master's Guide (DMG) says that a character can jump horizontally up to their Strength (one of your characters attributes) in feet if they have a run up of at least ten feet. Say Thrud had strength of 17 they can jump 17 feet horizontally. Why did the GM make the player roll a dice then? Perhaps they decided Thrud was tired as it was late in the day, or they had just been in combat. Perhaps the GM decided the terrain was unven warranting the roll. Whatever the reason the DMG says that a DC 10 Athletices check is apporiate for tricky situations. Is this what the GM was using? Who knows. Again it is up to the GM to decide the DC for the specific situation.
|
||||
Okay, how does the GM decide on the target number for these dice rolls? Well, they make it up. If the GM is running a pre-made module the type of roll and the target number will be specifed in the module, but often your character will be trying something the module does not provide information for, so the GM will make something up on the spot. The harder the thing you are trying to do, the higher the target will be. Sometimes the GM will tell you the target but often they will not. It depends on the GM and whether they feel it will add to the fun if the player knows the target number. If you are planning on being a GM we will cover how we go about deciding this later. Sometimes the rules offer guidance, but the GM can ignore or modify this as they wish. For example, the Dungeon Master's Guide (DMG) says that a character can jump horizontally up to their Strength (one of your characters attributes) in feet if they have a run up of at least ten feet. Say Thrud had strength of 17 they can jump 17 feet horizontally. Why did the GM make the player roll a dice then? Perhaps they decided Thrud was tired as it was late in the day, or they had just been in combat. Perhaps the GM decided the terrain was uneven warranting the roll. Whatever the reason the DMG says that a DC 10 Athletices check is apporiate for tricky situations. Is this what the GM was using? Who knows. Again it is up to the GM to decide the DC for the specific situation.
|
||||
|
||||
Offsetting the difficulty of the roll target, your character has innate abilities, skills, magic items, and other effects that make the task easier (or harder). All of these effects are represented by roll modifiers that you add to or subtract from the actual dice roll. The final number is then compared with the target and the GM narrates your success or failure.
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
+++
|
||||
title = "Finding a Game Online"
|
||||
date = 2024-08-21T09:00:00Z
|
||||
draft = false
|
||||
summary="You want to try RPG but how do you find a game online?"
|
||||
categories = ['Player']
|
||||
prev = ['/post/do-you-want-to-play-a-game/']
|
||||
+++
|
||||
|
||||
Role Playing Games sound fun? How do you find a game?
|
||||
|
||||
Play online or in person? Back-in-the-day most people met in person (sat around a table) to play table-top RPGs (the name kinda gives this away). A common experience though was for groups to break apart as players had to move because of "life" (kids grow up and go to separate colleges, college students graduate and take jobs in different locales, etc.). This sucks and players then either quit the hobby, played infrequently (when the old group could assemble), or found new groups. Whichever, it was dissruptive and often difficult.
|
||||
|
||||
Now we can play online. Some folk find this an inferior experience to playing around a table and I sympathise with this view. There is little better than sitting round a table with a group of friends to while away a few hours in epic battle, crawling a dungeon, or investigating a new world. That said, it can be a challenge to all gather like this, especially as people grow older and accumulate responsiblilities with family, work, etc. In these circumstances playing online is, in my opinion, no only a practical solution but often a superior experience as one can play with people all over the world, playing in multilpe games is as simple as loggin in, and therre is always a game to play in when you find yourself with a few spare hours to play.
|
||||
|
||||
How the do we find an online game? There are endless possibilities, here are just a few...
|
||||
|
||||
The "big dog" is [Start Playing Games](https://startplaying.games/). Here you will almost always find a game to play. Most games are pay-to-play and vary widely in price (the average seems to be around $18 US as I write this).
|
||||
|
||||
An alternative is [Tabletop Wizard](https://www.rpgtablefinder.com). A small collection of RPG tables, but you may find something to your taste.
|
||||
|
||||
If you have more lead time, try the following:
|
||||
|
||||
* On Reddit:
|
||||
* [r/Foundry LFG](https://www.reddit.com/r/FoundryLFG/) for Foundry VTT groups.
|
||||
* [r/lfg](https://www.reddit.com/r/lfg/) for more general "Looking For Group"
|
||||
@@ -0,0 +1,18 @@
|
||||
+++
|
||||
title = "Github Repository Setup"
|
||||
date = 2024-08-22T09:00:00Z
|
||||
draft = false
|
||||
summary="Learning Foundry VTT Module Development from the very start"
|
||||
categories = ['Technical', 'FoundryVTT', 'Foundry VTT for Module Developers']
|
||||
prev = ['/post/lets-build-a-module/']
|
||||
+++
|
||||
|
||||
In the [previous post]({{< ref "/post/lets-build-a-module/" >}}) I proposed we build a couple of Foundry modules. This post starts that process, looking at Github to hold our module code.
|
||||
|
||||
{{< youtube nXZ-fwcygYk >}}
|
||||
|
||||
Although not a detailed lesson on Github, this session covers:
|
||||
|
||||
* Setting up your account to use SSH keys.
|
||||
* Creating a repository to hold our module.
|
||||
* Cloning that repository to our local development machine so we can work on the module.
|
||||
@@ -0,0 +1,41 @@
|
||||
+++
|
||||
title = "Local Project Documentation Setup"
|
||||
date = 2024-08-24T09:00:00Z
|
||||
draft = false
|
||||
summary="Learning Foundry VTT Module Development from the very start. In this session: setting up the local project dcumentation system."
|
||||
categories = ['Technical', 'FoundryVTT', 'Foundry VTT for Module Developers']
|
||||
prev = ['/post/fvtt-mod-dev-local-project-setup/']
|
||||
+++
|
||||
|
||||
Continuing our Foundry VTT module development journey. Having set up some basic tooling on our project we now want to keep our project well documented.
|
||||
|
||||
{{< youtube _p_1ItoDo8U >}}
|
||||
|
||||
In this session we set up a system for creating a documentation website. We cover:
|
||||
|
||||
* Creating a 'starter' set of documentation'
|
||||
* Create a system for transforming that source into a web site.
|
||||
* Putting all this into our project version control system.
|
||||
|
||||
# Why go to all this trouble?
|
||||
|
||||
## For users...
|
||||
|
||||
Firstly, our users will likely want some documentation helping them to use the module.
|
||||
|
||||
It make sense to keep this alongside the module code to make it easier to keep the documentation in line with each release of the module. (There is little more annoying, as a user, than checking documentation to find it is only relevant to some version of the module that you are not, or worse cannot, use.)
|
||||
|
||||
## For Foundry administrators/game masters...
|
||||
|
||||
Adminstrators will appreciate it if we produce clear, concise release notes explaining changes we make to the module. This is especially true if the changes are likely to change their players' experience (or worse, break their current setup).
|
||||
|
||||
The objective here is to provide just enough infomation so that administators can make the decision about updating a module (and what work might be involved to adopt a more complex update).
|
||||
|
||||
## For developers...
|
||||
|
||||
Finally, it is nice for developers to have docmentation for our code. While I believe that code should be (so far as practicable) self-documenting there is certainly a need in anything but the most trivial module, for documentation that:
|
||||
|
||||
* orients the developer, letting them know the broad architecture and function of the module, and
|
||||
* documents *why* certain design decisions where taken.
|
||||
|
||||
While some of this can, and should, be in comments in the code, there is a lot of useful information that belongs in external documentation.
|
||||
@@ -0,0 +1,25 @@
|
||||
+++
|
||||
title = "Local Project Setup"
|
||||
date = 2024-08-23T09:00:00Z
|
||||
draft = false
|
||||
summary="Learning Foundry VTT Module Development from the very start. In this session: setting up the local project."
|
||||
categories = ['Technical', 'FoundryVTT', 'Foundry VTT for Module Developers']
|
||||
prev = ['/post/fvtt-mod-dev-github-repository-setup/']
|
||||
+++
|
||||
|
||||
Having cloned our Github repository to our local development machine we now set up some basic tooling that will help later as we develop our module.
|
||||
|
||||
{{< youtube 8Qm0XJSWqYU >}}
|
||||
|
||||
In this session we set up:
|
||||
|
||||
* [`npm`](https://www.npmjs.com/), initialising our project.
|
||||
* [`husky`](https://typicode.github.io/husky/) to marshal our `git` hook scripts.
|
||||
* [`commitizen`](https://github.com/commitizen/cz-cli) to enforce standard `git` log messages.
|
||||
|
||||
These tools provide some 'guardrails' on our project that, although they may seem onerous now, will pay dividends later by facilitating:
|
||||
|
||||
* The production of consistent a changlog for our release notes (poviding users and other developers with timely and accurate details of what changes occur to our module).
|
||||
* Management of our release versioning.
|
||||
|
||||
A few minutes of setup now will save hours over the life of our module.
|
||||
@@ -0,0 +1,22 @@
|
||||
+++
|
||||
title = "Foundry VTT Ground Up Part 1"
|
||||
date = 2024-08-21T09:00:00Z
|
||||
draft = false
|
||||
summary="Learning Foundry VTT from the very start"
|
||||
categories = ['Game Master', 'FoundryVTT', 'FoundryVTT Ground Up']
|
||||
prev = ['/post/setup-a-local-foundryvtt/']
|
||||
+++
|
||||
|
||||
Having set up a Foundry Virtual Table Top (VTT) (locally, on your own server, or on one of the cloud services) you, the Game/Dungeon Master (GM), are confronted with the task of setting up your VTT. In a series of articles we will step through setting up Foundry VTT for Dungeons & Dragons 5e (although a lot of this material will apply no matter your chosen game system).
|
||||
|
||||
{{< youtube kJh_fkLvtVM >}}
|
||||
|
||||
In this first installment we look at:
|
||||
|
||||
* Installing the game system (this is essentially the 'DM Guide' and 'Players Handbook' for FVTT)
|
||||
* Create an empty world
|
||||
* A lightning fast tour of the standard interface
|
||||
* Add Users/Players
|
||||
* Create an empty Scene
|
||||
* Create Actors (player characters) and let Players access them
|
||||
* Create Tokens to represent Actors on our Scenes
|
||||
@@ -0,0 +1,23 @@
|
||||
+++
|
||||
title = "Foundry VTT Ground Up Part 2: Basic scenes"
|
||||
date = 2024-08-27T09:00:00Z
|
||||
draft = false
|
||||
summary="Going from grey background to interesting scene"
|
||||
categories = ['Game Master', 'FoundryVTT', 'FoundryVTT Ground Up']
|
||||
prev = ['/post/fvtt-v12-ground-up-part-one/']
|
||||
+++
|
||||
|
||||
Last time we looked at the Foundry VTT interface. We left our world with two scenes, but these were rather dull as they were just gridded grey backgrounds. In this session we introduce basic scene setup.
|
||||
|
||||
{{< youtube ADf2Vvu0wpI >}}
|
||||
|
||||
In this installment we look at:
|
||||
|
||||
* Adding a background.
|
||||
* Adding a foreground.
|
||||
* The relationship between layers.
|
||||
* How elevation effects tokens and layers.
|
||||
|
||||
The diagram below shows the layers we use in this session and their relationship to one another.
|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
@@ -0,0 +1,125 @@
|
||||
+++
|
||||
title = 'Investigating a FoundryVTT Install'
|
||||
date = 2024-07-30T09:00:00Z
|
||||
draft = false
|
||||
summary="Layout of a new Foundry Install"
|
||||
categories = ['Technical', 'Game Master', 'FoundryVTT']
|
||||
prev = ['/post/setup-a-local-foundryvtt/']
|
||||
+++
|
||||
|
||||
In the [previous post]({{< ref "/post/setup-a-local-foundryvtt" >}}) we installed FoundryVTT using Docker (if you used another method then you will need to locate the `data` directory for your installation). In this article we will take a quick tour of the filesystem created and some of the Foundry VTT user interface (UI).
|
||||
|
||||
If you left your Foundry instance running then skip this step, but if not we should restart it. Assuming you used Docker simply
|
||||
|
||||
```bash
|
||||
cd ~/foundryvtt
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
To restart the Foundry server. (To stop the server `docker compose stop` in that same directory. Stopping the server like this will not lose any data.)
|
||||
|
||||
Move in to the `data` directory and look at the files Foundry has created.
|
||||
|
||||
```bash
|
||||
cd data
|
||||
tree
|
||||
.
|
||||
├── Config
|
||||
│ ├── admin.txt
|
||||
│ ├── license.json
|
||||
│ ├── options.json
|
||||
│ └── options.json.lock
|
||||
├── Data
|
||||
│ ├── modules
|
||||
│ │ └── README.txt
|
||||
│ ├── systems
|
||||
│ │ └── README.txt
|
||||
│ └── worlds
|
||||
│ └── README.txt
|
||||
├── Logs
|
||||
│ ├── debug.log
|
||||
│ ├── diagnostics.json
|
||||
│ ├── error.log
|
||||
│ └── news.json
|
||||
└── container_cache
|
||||
└── foundryvtt-11.315.zip
|
||||
|
||||
9 directories, 11 files
|
||||
```
|
||||
|
||||
As mentioned in the last post the `container_cache` is used by the Docker image and is not part of Foundry itself. The other directories are though.
|
||||
|
||||
In `Config/admin.txt` you will find a long string of characters, this is an encrypted form of the `foundry_admin_key` we set in `docker-compose.yaml`. On a normal installation you can reset your administrator password by deletind this file. On a Docker installation like ours you can look in `vttsecrets.json` to see the password, or simply change the password in `vttsecrets.json`, then delete `Config/admin.txt`, and restart Foundry using `docker compose restart`.
|
||||
|
||||
In ` Config/license.json` is, unsuprisingly, your license.
|
||||
|
||||
In `Config/options.json` are Foundry server options. We will take a look at these one day, for now just note they are here. The `Config/options.json.lock` is an empty directory used internally by Foundry, ignore it for now.
|
||||
|
||||
Various log files live under `Logs`. These can be useful if we have issues and we may need to supply these to developers, so it is as well to know they are here. The `Logs/news.json` is actually displayed on the right side of the Foundry setup screen.
|
||||
|
||||
The directory we are most interested in is `Data`.
|
||||
|
||||
## Data
|
||||
|
||||
Under `Data` we have three top-level directories.
|
||||
|
||||
|
||||
1. `modules`---Contains all of the extension/add-on modules we insstall.
|
||||
2. `systems`---Contains all the game systems we install.
|
||||
3. `worlds`---Contains the worlds we create and install.
|
||||
|
||||
Currently each of these contains only a `README.txt` file that explains what the directory is for.
|
||||
|
||||
We will be revisiting the `Data` directory often.
|
||||
|
||||
## Foundry VTT Setup
|
||||
|
||||
Switching our attention now to Foundry VTT. Fire up your browser and visit [http://localhost](http://localhost). Depending on where you left off previously you may need to accept the license etc. but assuming you are continuing on from the previous post you should be looking at the Foundry Setup Screen.
|
||||
|
||||

|
||||
|
||||
### Installing the D&D 5e game system
|
||||
Before anything else let's tell Foundry we want the D&D5e system installed. If it is not already selected click on `Game Systems`. Then click `Install System` to open the `Install System` dialog.
|
||||
|
||||

|
||||
|
||||
Into the search bar at the top, enter `dnd5e`. This will filter the list of available game systems (when I did this I ended up with just one, the one we want). Find `Dungeons & Dragons Fifth Edition` and click the `Install` button on the right.
|
||||
|
||||

|
||||
|
||||
|
||||
Close the `Install System` dialog (click `Close` in the top right of the dialog).
|
||||
|
||||
Foundry will move you on to installing a `Game World`, but click back to `Game System` and you should see the D&D Fifth Edition game system.
|
||||
|
||||

|
||||
|
||||
|
||||
Jump back to look at the file system. Under `Data/systems`, in addition to the `README.txt` we now have a `dnd5e` directory. Under this `dnd5e` directory are many files and directories that contain details of the D&D5e game system along with helpful assets and content from the D&D Standard Reference Document made easily accessible within Foundry.
|
||||
|
||||
In order to check out this game system we need a "world", so let's set one up now.
|
||||
|
||||
### Creating a world
|
||||
Click on the `Game Worlds` header of the Foundry Setup screen and then click `Create World`
|
||||
|
||||

|
||||
|
||||
This will open the `Create World` dialog.
|
||||
|
||||

|
||||
|
||||
We will do the minimum setup for now. Just enter a `World Title` "TEST" and select `Dungeons & Dragons Fifth Edition` from the `Game System` dropdown. (**Note** that the `Data Path` is set to a default name---lowercase version of the `World Title`---under the `/Data/worlds` directory. We could change this, but don't.)
|
||||
|
||||

|
||||
|
||||
Click the large `CREATE WORLD` button.
|
||||
|
||||
You will now see your new `TEST` world listed on the `Game Worlds` tab of the Foundry Setup screen.
|
||||
|
||||

|
||||
|
||||
Skip back and look at the file system. Under `/Data/worlds` you now see `test`. This directory holds all the data specific to the `TEST` world. We will revisit this later.
|
||||
|
||||
What about modules? We will circle back to modules later but for now this is all we need to finally investigate Foundry VTT itself. We begin this in our next session.
|
||||
|
||||
For help with this post please use the [Discord channel](https://discord.com/channels/1226222567292145786/1267486648011329576) and be sure to refer to this post's link ({{< permalink >}})
|
||||
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 344 KiB |
|
After Width: | Height: | Size: 115 KiB |
@@ -0,0 +1,161 @@
|
||||
|
||||
+++
|
||||
title = "Let's build a module"
|
||||
date = 2024-08-17T09:00:00Z
|
||||
draft = false
|
||||
summary="Starting to build custom modules"
|
||||
categories = ['Technical']
|
||||
prev = ['/post/investigating-a-foundryvtt-install/']
|
||||
+++
|
||||
|
||||
If you are like me you like to spend time getting your setup "just so". This often means using add-on modules to extend Foundry VTT. There are many modules available ranging from relatively simple interface changes (like [My Tab](https://foundryvtt.com/packages/mytab/)) through sophisticated extensions to Foundry's game management (like [Midi Quality of Life Improvements](https://foundryvtt.com/packages/midi-qol)).
|
||||
|
||||
Sooner or later one of three things will happen:
|
||||
|
||||
1. One of the modules you want to use will not be updated to be compatible with your version of Foundry.
|
||||
1. You will find an existing module that *almost* does what you want, but not quite (or it does it in a way you think can be improved).
|
||||
1. You cannot find a module to do what you want.
|
||||
|
||||
In these cases (and assuming you have the time, energy, and know-how---or can learn how) you can:
|
||||
|
||||
* Create your own version of an existing module.[^1]<sup>,</sup>[^2]
|
||||
* Write a new module.
|
||||
|
||||
Either way there are some barriers to doing this. Principal among these issues is the lack of coherent documentation for anyone coming new to Foundry development. There is plenty out there but it tends to be a bit out of date, or written with the assumption you already know a fair bit about how Foundry works. As for documentation of existing module code, well I've yet to stumble on any that is helpful to newbies. This series is aimed at addressing these shortcomings.
|
||||
|
||||
# The Plan
|
||||
|
||||
I have two modules I want to develop.
|
||||
|
||||
1. A control panel for Theatre of the Mind (TotM) style play.
|
||||
1. A way to embed macro triggers into journal entries.
|
||||
|
||||
Addressing the first. The existing module [Theatre of the Mind Manager](https://foundryvtt.com/packages/totm-manager) is fine but limited for what I want to do. The approach most GMs seem to take is using [Monk's Active Tile Triggers](https://foundryvtt.com/packages/monks-active-tiles/), placing "control tiles" on a scene and setting them to 'invisible' so they can be seem by the GM only. This approach works, but means the GM needs to find those control tiles, moving focus from the players. This may be okay for TotM, but I'd rather be able to set up a management console that I can choose to put it anywhere I please (or dismiss when it is not required).
|
||||
|
||||
There are many things one can do to embed game mechanics into a journal entry using [enrichers](https://github.com/foundryvtt/dnd5e/wiki/Enrichers). The module [Dynamic Macro Links](https://foundryvtt.com/packages/dynamic-macro-links) offers a generic way to extend these dynamic links using macros (pretty much exactly what I want), unfortunately there is a conflict between this module and [Monk's Enhanced Journal](https://foundryvtt.com/packages/monks-enhanced-journal)---and I like Monk's Enhanced Journal---so let's see if we can fix that. In addition Dynamic Macro Links seems limited to passing static parameters, perhaps we can improve this?
|
||||
|
||||
I am starting pretty much from scratch in terms of my knowledge of Foundry and my Javascript is pretty non-existent too. Not to worry, this will mean we can learn together.
|
||||
|
||||
## Warning
|
||||
|
||||
Although I will try to explain things as I go my background is pretty technical (so I may assume too much of the reader, feel free to reach out (details at end of this post) if I do and I will try to clarify) and, in the interests of brevity, I will likely skip a lot of detail not directly related to Foundry module development. (Case in point, installing `NodeJS`, `Docker`, etc. are skipped assuming you will follow the instructions on the relevant websites.)
|
||||
|
||||
This is a series on developing modules for Foundry VTT, not a course on Javascript development. If you are new to writting code then I suggest you first master the basics of developing Javascript web products, then come back to this series.
|
||||
|
||||
|
||||
# Setting up a Development Environment
|
||||
|
||||
The main things we need are:
|
||||
|
||||
* A way to run Foundry VTT so we can see our module working.
|
||||
* A way to view our Foundry VTT (this is simply a browser).
|
||||
* A way to view our running code (we will use the developer tools in our browser---I will be using Chromium browsers, specifically Brave and Vivaldi).
|
||||
* A way to version, build, and publish our module for others.
|
||||
* A way to edit our module's code.
|
||||
|
||||
## Running Foundry VTT for development
|
||||
|
||||
You can run Foundry directly (see the [FoundryVTT instructions](https://foundryvtt.com/article/installation/)---use the "Hosting a Dedicated Server with Node.js" instructions), or you can run it in a controlled "virtual" environment (this is basically the same as "Hosting a Dedicated Server with Node.js" but using [`nvm`](https://github.com/nvm-sh/nvm)---this method is not one I would encourage), or (and this is my preferred approach) you can use `Docker`.
|
||||
|
||||
I will be using the Docker approach.
|
||||
|
||||
1. It is the simplest to manage.
|
||||
1. It plays into later stages of development (stay tuned, it gets funky).
|
||||
|
||||
### Install Docker
|
||||
|
||||
I'm going to assume you are working on a graphical interface (most likely Windows) so you will probably want to install the Docker Desktop using the instructions from the [Docker website](https://docs.docker.com/desktop/install/windows-install/).
|
||||
|
||||
### Running Foundry VTT in Docker
|
||||
|
||||
Fortunately [Mark Fedhousen](https://github.com/felddy) has done the heavy lifting for us. Once you have Docker installed just open a terminal window, create a directory to contain your Foundry data, and run up Docker.
|
||||
|
||||
```bash
|
||||
mkdir myfoundry
|
||||
docker run \
|
||||
-d \
|
||||
--name foundrydev \
|
||||
--env FOUNDRY_USERNAME='<your_username>' \
|
||||
--env FOUNDRY_PASSWORD='<your_password>' \
|
||||
--publish 30000:30000/tcp \
|
||||
--volume /the/full/path/to/myfoundry:/data \
|
||||
felddy/foundryvtt:release
|
||||
```
|
||||
|
||||
Replace `<your_username>` and `<your_pasword>` with your account username/password on https://foundryvtt.com where you purchased your Foundry license.[^3]
|
||||
|
||||
The `/the/full/path/to/myfoundry` should be the path to the `myfoundry` directory you created to hold your Foundry data.
|
||||
|
||||
The `-d` tells Docker to run Foundry in the background. Without this the terminal must remain open all the time Foundry is running.
|
||||
|
||||
Once you have run this you will be able to use your browser to visit `http://localhost:30000` where you will find your new Foundry VTT running.
|
||||
|
||||
You can see your instance running in the Docker desktop. From the command line use `docker ps` to view the running Docker containers (you will have only one unless you use Docker for other things---in which case this section is probably not for you).
|
||||
|
||||
```bash
|
||||
docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
ff6b3bc2a3db felddy/foundryvtt:release "./entrypoint.sh res…" 6 seconds ago Up 6 seconds (health: starting) 0.0.0.0:30000->30000/tcp foundrydev
|
||||
```
|
||||
|
||||
To stop the Foundry instance use `docker stop`
|
||||
|
||||
```bash
|
||||
docker stop foundrydev
|
||||
```
|
||||
|
||||
Bonus round. Install `Python`, we're going to need it to procees documentation very shortly.
|
||||
|
||||
* Python
|
||||
|
||||
Bonus round. Install `Python`, we're going to need it to procees documentation very shortly.
|
||||
|
||||
* Python
|
||||
|
||||
You can restart this instance of Foundry using `docker start`
|
||||
|
||||
```bash
|
||||
docker start foundrydev
|
||||
```
|
||||
|
||||
## Using the browser for development
|
||||
|
||||
Okay, we have Foundry running and can see it with our browser at `http://localhost:30000`. This is great for checking our module working as a user will see it but as a developer we want to see the code running, be able to stop the code, look at variable values, etc.
|
||||
|
||||
Fortunately the browser has "Developer Tools" built in. On Chromium based browsers press `F12` or `alt+ctl+I` or (on MacOS) `alt+cmd+I` to open the developer tools. These are a suite of sophisticated tools we will use to monitor and debug our code. Covering anything but the basics of these tools is a whole series in itself, I recommend you browse the [Chrome DevTools](https://developer.chrome.com/docs/devtools/) site to see what these tools can do.
|
||||
|
||||
## Version control, build, and publish
|
||||
|
||||
This is another big topic. We will use `git` so get that [installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). I prefer the command line (CLI) but if you prefer a graphical interface there are plenty to choose from (that said, you will need to use the CLI a lot in this process, so probably best to learn it). Most modules are published through [GitHub](https://github.com) so go ahead and set up an account on there too.
|
||||
|
||||
We are going to be using [GitHub workflows](https://docs.github.com/en/actions/writing-workflows) to build and publish our modules. This facility is free and comes along with GitHub, more on this later.
|
||||
|
||||
We will cover all the local tooling in the next few posts. Some will require local installations but so far as possible we will keep everything local to the project. Most of the development tooling we will use relies on a local `NodeJS` installation. While we could use a Docker container to provide this, fankly it is easier for most purposes to install a local NodeJS (see above). Trust me, ngs can get complicated getting your IDE (say VSCode) to interact with `NodeJS` running in a container to provide language server services. Okay, that may be word salad at the moment. Suffice to say, install `NodeJS` locally, this will all make sense as we progress.
|
||||
|
||||
|
||||
## Editing the code
|
||||
|
||||
This one is a matter of personal preference. You will need to be able to edit text files, beyond that it is up to you. One popular choice is [VSCode](https://code.visualstudio.com/download) which has a lot of additional tooling to help you editing code.
|
||||
|
||||
FWIW, I use [NeoVim](https://github.com/neovim/neovim/releases/).
|
||||
|
||||
|
||||
# Technology Stack Summary
|
||||
|
||||
Install this lot locally to get started (there will be more to come).
|
||||
|
||||
* NodeJS
|
||||
* Docker
|
||||
* A browser
|
||||
* Git
|
||||
* A GitHub account
|
||||
|
||||
Bonus round. Install `Python`, we're going to need it to procees documentation very shortly.
|
||||
|
||||
* Python
|
||||
|
||||
For help with this post please use the [Discord channel](https://discord.com/channels/1226222567292145786/1267486648011329576) and be sure to refer to this post's link ({{< permalink >}})
|
||||
|
||||
[^1]: Assuming the license on the module allows for this.
|
||||
[^2]: If you do this you may also want to contribute your change back to the original module.
|
||||
[^3]: Foundry VTT licensing allows you to use your "play" license for package development (see [FoundryVTT Software License](https://foundryvtt.com/article/license/)).
|
||||
@@ -4,7 +4,7 @@ title = 'Set Up a Local FoundryVTT'
|
||||
date = 2024-07-29T09:00:00Z
|
||||
draft = false
|
||||
summary="To start learning Foundry VTT 'inside and out' we create a local development server."
|
||||
categories = ['Technical', 'Game Master']
|
||||
categories = ['Technical', 'Game Master', 'FoundryVTT']
|
||||
prev = ['/post/do-you-want-to-play-a-game/']
|
||||
+++
|
||||
|
||||
@@ -24,9 +24,9 @@ We could just install Foundry locally, but instead we will do something a little
|
||||
|
||||
We are going to use a technology call *containerisation*. You don't need to worry about all the technical details, just understand that this will allow us to run one or more copies of Foundry (possibly at different versions, which will be useful when we test upgrades).
|
||||
|
||||
The first step is to install a program called 'Docker' (again, don't worry about all the technical details, for our purposes this is just 'the system that runs Foundry'). For instructions on downloading and installing Docker I suggest a quick search on YouTube. I won't cover it here as this article is not a Docker tutorial.
|
||||
The first step is to install a program called 'Docker' (again, don't worry about all the technical details, for our purposes this is just 'the system that runs Foundry'). For instructions on downloading and installing Docker I suggest a quick search on YouTube. I won't cover it here as this post is not a Docker tutorial.
|
||||
|
||||
**Note** If you need only one simple installation then Foundry provide [installation instructions](https://foundryvtt.com/article/installation/). Most of the technical articles on this site apply to any Foundry installation and I will note when an article relies heavily on a Docker installation.
|
||||
**Note** If you need only one simple installation then Foundry provide [installation instructions](https://foundryvtt.com/article/installation/). Most of the technical posts on this site apply to any Foundry installation and I will note when a post relies heavily on a Docker installation.
|
||||
|
||||
I prefer using Docker because:
|
||||
|
||||
@@ -136,4 +136,4 @@ Next you will be invited to tour the Foundry backup functionality. Feel free to
|
||||
|
||||
With that we are ready to start setting up Foundry.
|
||||
|
||||
For help with this article please use the [Discord channel](https://discord.com/channels/1226222567292145786/1267486648011329576) and be sure to refer to this article's link.
|
||||
For help with this post please use the [Discord channel](https://discord.com/channels/1226222567292145786/1267486648011329576) and be sure to refer to this post's link ({{< permalink >}})
|
||||
|
||||
@@ -13,6 +13,12 @@ timeZone = "Europe/London"
|
||||
favicon = "ulenar.png"
|
||||
cyoa = ["Player", "Game Master", "Technical"]
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
|
||||
[menus]
|
||||
[[menus.main]]
|
||||
name = 'Home'
|
||||
@@ -34,3 +40,6 @@ timeZone = "Europe/London"
|
||||
[[params.ananke_socials]]
|
||||
name = 'youtube'
|
||||
url = 'https://www.youtube.com/channel/UCbpj4ryAcG1eIVXHuRSDRXw'
|
||||
[[params.ananke_socials]]
|
||||
name = 'github'
|
||||
url = 'https://github.com/Mondarth'
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="{{ .Site.Home.Permalink }}" >
|
||||
© {{ with .Site.Copyright | default .Site.Title }} {{ . | safeHTML }} {{ now.Format "2006"}} {{ end }}
|
||||
</a>
|
||||
<div>{{ partial "supporter.html" . }}</div>
|
||||
<div>{{ partial "social-follow.html" . }}</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<a href="https://www.patreon.com/bePatron?u=125162698" data-patreon-widget-type="become-patron-button">Become a member!</a><script async src="https://c6.patreon.com/becomePatronButton.bundle.js"></script>
|
||||
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script><script type='text/javascript'>kofiwidget2.init('Support Me on Ko-fi', '#29abe0', 'E1E012BACV');kofiwidget2.draw();</script>
|
||||
@@ -0,0 +1 @@
|
||||
{{ .Page.Permalink }}
|
||||