Skip to content

Commit

Permalink
Some spriggit docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed May 18, 2024
1 parent f4b635f commit 9fb8e90
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/DeployMkDocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: DeployMkDocs

# Controls when the action will run.
on:
# Triggers the workflow on push on the master branch
push:
branches:
- dev
paths:
- 'docs/**'
- 'mkdocs.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Branch
uses: actions/checkout@v2

# Deploy MkDocs
- name: Deploy MkDocs
# You may pin to the exact commit or the version.
# uses: mhausenblas/mkdocs-deploy-gh-pages@66340182cb2a1a63f8a3783e3e2146b7d151a0bb
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REQUIREMENTS: ./docs/requirements.txt
Binary file added docs/images/Spiggit-git-tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Spriggit-file-structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Spriggit-git-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gitflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Spriggit
## Overview
Spriggit is a tool to facilitate converting Bethesda plugin files to a text based format that can be stored in Git. Large scale projects can then live in Github, and accept Pull Requests from many developers.

The goal is to help modders store their files in a versioning system that allows them to easily iterate in the same way that programmers do with their code.

<iframe width="560" height="315" src="https://www.youtube.com/embed/VgJaCaZSh98?si=5n6UIDiYBGZ-ba_U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

## Reasons to Use Git for Mods
Git is an extremely powerful versioning and iteration tool that almost all programmers use when working. It's what powers the world of coding to be able to iterate new code quickly and collaborate easily.

Some things Git can help you do when developing your mod:

![Git Flow](/images/gitflow.png)

- Keep track of the many versions of your mod, without resorting to Dropbox folder hell.
- Create a living "changelog" as you work
- Be able to go back in time and view your mod exactly as it was at any point in history
- Stamp your mod with version tags, letting you see how it looked at any one from the past
- Easily experiment on side branches without worrying your stable setup
- Share your work on Github, allowing people to see your mod's development progress
- Collaborate easily, by allowing others to contribute to your mod via Pull Requests
- More easily merge the work of multiple developers with Git Merge technology
53 changes: 53 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

# Output
Spriggit processes Bethesda plugins into a format that Git can support.

## Example Record Output

!!! info "Yaml or Json"
Yaml or Json formatting is currently supported

Here is a snippet of what a record file might look like if Yaml output is used:
```yaml
FormKey: 087835:Skyrim.esm
EditorID: JewelryNecklaceGoldGems
ObjectBounds:
First: -3, -9, 0
Second: 3, 9, 1
Name: Gold Jeweled Necklace
WorldModel:
Male:
Model:
File: Armor\AmuletsandRings\GoldAmuletGemsGO.nif
Data: 0x020000000300000000000000A4E51E5364647300D8C674AFC031228D64647300D8C674AFB8EC307B64647300262C333B
PickUpSound: 08AB15:Immersive Sounds - Compendium.esp
PutDownSound: 08AB16:Immersive Sounds - Compendium.esp
Race: 013749:Skyrim.esm
Keywords:
- 06BBE9:Skyrim.esm
- 08F95A:Skyrim.esm
- 0A8664:Skyrim.esm
- 10CD0A:Skyrim.esm
Armature:
- 09171F:Skyrim.esm
Value: 485
Weight: 0.5
```
This file is more palatable to Git and can support diff tools and similar functionality.
## Mods are Split into Folders
Rather than having one large file of all of a mod's data, Spriggit splits a mod into a folder of files.
A typical mod folder structure might look like:
```
Some/Dedicated/Mod/Folder/ - A folder dedicated to storing Spriggit content for a single mod
RecordData.yaml - The mod header
Weapons/ - Folder for all the weapons
GlassDagger.yaml - File dedicated to the record Glass Dagger
IronLongsword.yaml - Seperate file for the Iron Longsword
Npcs/ - Folder for all the weapons
Goblin.yaml - File dedicated to the Goblin's data
```

This folder structure helps organize git diffs to be more meaningful. If a new record is added, then this will be seen as a new file. If a record is modified, it will be a modified file. Similar to wanting to avoid having a program's code be in one large monolith file, having smaller bite sized files helps navigate and digest changes being made.
21 changes: 21 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
:root {
--md-primary-fg-color: #372773;
--md-accent-fg-color: #fa7376;
}

.md-sidebar__inner {
--md-typeset-a-color: #fa7376;
}

.md-content {
--md-typeset-a-color: #09bfdd;
}

[data-md-color-scheme="slate"] {
--md-hue: 234;
}

.md-grid {
width: 100%;
max-width: 1900px;
}
29 changes: 29 additions & 0 deletions docs/workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Workflow

This area discusses the typical patterns for using Spriggit in your workflow.

<iframe width="560" height="315" src="https://www.youtube.com/embed/VgJaCaZSh98?si=5n6UIDiYBGZ-ba_U" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

## An Individual Modder

- Create a Git Repository to hold your mod
- Create a Bethesda plugin with existing normal tools of choice
- Use Spriggit to convert the `.esp/m/l` files from your Bethesda workspace, to `.yaml` or `.json` files inside your Git Repository
- Make commits in Git.
"Added all the bandit Npc definitions"
"Fixed the Powerblade damage to be more reasonable"
- Upload your mod, in its text format, up to Github (or your host of preference)

## Many Collaborators

Other modders, whether on your team or just helpful people out in the world can help collaborate and participate in your mod's development.

- They can clone the mod via Git to their computers
- Use Spriggit to convert from the `.yaml` or `.json` files to a Bethesda plugin
- Open the Bethesda plugin with the game, or other tools
- Modify the mod and help work on something
- Use Spriggit to convert back to text format
- Make commits in Git
- Upload their improvements to Github
- Initiate a Pull Request to ask that you consider their changes
- You can discuss with them about further changes, or merge their improvements into your mod
57 changes: 57 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
site_name: Spriggit Documentation
site_url: https://mutagen-modding.github.io/Spriggit/

repo_name: Spriggit
repo_url: https://github.com/Mutagen-Modding/Spriggit

extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/Mutagen-Modding

markdown_extensions:
- admonition
- tables
- pymdownx.details
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.tasklist
- def_list
- meta
- md_in_html
- attr_list
- footnotes
- pymdownx.tabbed:
alternate_style: true
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg

extra_css:
- stylesheets/extra.css

plugins:
- search

theme:
name: material
font:
text: Inter
palette:
primary: custom
accent: custom
scheme: slate
favicon: mutagen-icon.png
logo: mutagen-icon.png
features:
- content.tooltips
- content.code.copy
- navigation.instant
- navigation.tracking
- navigation.indexes
- navigation.path

nav:
- Overview: index.md
- Workflow: workflow.md
- Output: output.md

0 comments on commit 9fb8e90

Please sign in to comment.