Skip to content

Commit

Permalink
Merge pull request #1 from UranusBytes/dev-0.0.2
Browse files Browse the repository at this point in the history
Dev 0.0.2
  • Loading branch information
UranusBytes authored Jun 16, 2022
2 parents 8984634 + 5b8b3f5 commit fb77462
Show file tree
Hide file tree
Showing 25 changed files with 1,078 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Creation

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# get part of the tag after the `v`
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2

# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'module.json'
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip

# Create a zip file with all files required by the module to add to the release
- run: zip -r ./module.zip module.json README.md CHANGELOG.md LICENSE styles/ scripts/ templates/ lang/

# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: ${{ github.event.release.unpublished }}
prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json, ./module.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Die Hard Changelog

## v0.0.2-ALPHA.0
Jun 16, 2022
* Initial release of Fudge for DND 5e
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Die Hard
This Foundry VTT module is intended to provide functionality that modifies/adjusted die rolls in certain systems.

**NOTE:** This module is still VERY alpha and under active development. I would not recommend using in a real game yet...

# Reporting Issues and Suggestions
Open an issue: https://github.com/UranusBytes/foundry-die-hard/issues

# Development Planning
Currently being (quasi) managed here: https://github.com/users/UranusBytes/projects/1

## Currently Supported Functionality
* DND5e (current)

## Future Supported Functionality
* PF2e


## Currently Supported Functionality
### Fudge
![die-hard-fudge](docs/die-hard-fudge.jpg)

With the module enabled, a poop icon will be displayed above the message tray.

![die-hard-fudge-1](docs/die-hard-fudge-1.jpg)

Clicking on this icon will open a configuration dialog.

![die-hard-fudge-2](docs/die-hard-fudge-2.jpg)

Within the dialog, to create a new Fudge do the following:
* Select the radio beside the actor (currently only PCs) this should affect
* Select the type of roll this should affect
* Enter a formula using the format of "OPERATOR VALUE"
* Available operators are:
* `<`
* `<=`
* `>`
* `>=`
* `=`
* `!=`
* Examples: `< 5` or `> 15`
* Click on `Create Fudge`

All active fudges are listed at the bottom.
To delete an active fudge

![die-hard-fudge-3](docs/die-hard-fudge-3.jpg)

#### Mechanics
The way Fudge works is that the next die roll of that type for that Actor will be evaluated against the formula defined. If it doesn't meet the formula criteria, then the die is rerolled in the background (max of 150 times), with the final result presented to the PC. The GM will get a whisper that outlines if the fudge was used (with all failed results), or if it was removed without being used (if first roll met formula criteria).

![die-hard-fudge-4](docs/die-hard-fudge-4.jpg)


## Future Planned Functionality
### Karmic dice
All for gradual adjustment/influence of player dice over time...
Binary file added docs/die-hard-fudge-1.jpg
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/die-hard-fudge-2.jpg
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/die-hard-fudge-3.jpg
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/die-hard-fudge-4.jpg
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/die-hard-fudge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
33 changes: 33 additions & 0 deletions module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "foundry-die-hard",
"title": "Die Hard",
"description": "Adjustments for DND5e die rolls like fudging...",
"author": "Jeremy (UranusBytes)",
"version": "0.0.2",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"esmodules": [
"scripts/die-hard.js"
],
"styles": [
"styles/die-hard.css"
],
"dependencies": [
{
"name": "lib-wrapper",
"type": "module"
}
],
"languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
}
],
"url": "https://github.com/UranusBytes/foundry-die-hard",
"manifest": "TBD",
"readme": "https://github.com/UranusBytes/foundry-die-hard/blob/main/README.md",
"changelog": "https://github.com/UranusBytes/foundry-die-hard/blob/main/CHANGELOG.md",
"download": "TBD"
}
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "die-hard",
"version": "1.0.0",
"devDependencies": {
"@league-of-foundry-developers/foundry-vtt-dnd5e-types": "^1.5.2-2",
"@league-of-foundry-developers/foundry-vtt-types": "github:kmoschcau/foundry-vtt-types"
}
}
30 changes: 30 additions & 0 deletions scripts/Notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
CONFIG
CONST
canvas
cookieStore
document
foundry
game












// ---- Actor
// rollSkill
// rollAbilitySave
// rollAbilityTest
// rollDeathSave
// roll
// items: weapons
// items: spells



67 changes: 67 additions & 0 deletions scripts/classes/DieHardConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import {dieHardLog} from "../lib/helpers.js";
import {DieHardDnd5e} from "./DieHardDnd5e.js";

export default class DieHardConfig {
// static get defaultOptions() {
// dieHardLog(true,'DieHardConfig - defaultOptions')
// return {
// system: null,
// fudgeConfig: {
// maxFudgeAttemptsPerRoll: 150
// },
// activeFudges: {
// actorId: {
// whatId: {
//
// }
// }
// },
// pendingFudge: {
// who: null,
// what: null,
// how: null
// }
// };
// }

constructor() {
dieHardLog(true, 'DieHardConfig - constructor');

// Setup default settings;

}

init() {
dieHardLog(true, 'DieHardConfig - init');
}

getData() {

}

static registerSettings() {
dieHardLog(true, 'DieHardConfig - registerSettings')
let dieHardSettings = {
system: null,
fudgeConfig: {
maxFudgeAttemptsPerRoll: 150
}
};

if (game.system.id == 'dnd5e') {
dieHardLog(true, 'Configuring for dndn5e system')
dieHardSettings.system = new DieHardDnd5e;

} else {
dieHardLog(true, 'Unsupport game system: ' + game.system.id)
}

game.settings.register('foundry-die-hard', 'dieHardSettings', {
name: '',
default: dieHardSettings,
type: Object,
scope: 'world',
config: false,
});
}
}
Loading

0 comments on commit fb77462

Please sign in to comment.