Skip to content

Commit

Permalink
Updated Icon,licence, and some general maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
rhagelstrom committed Nov 2, 2024
1 parent 1b6e9ed commit 3a806ee
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 134 deletions.
3 changes: 3 additions & 0 deletions .resources/color
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Base: indigo
Outline: orchid1
Glow: DarkViolet
60 changes: 60 additions & 0 deletions .resources/contaminated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions .resources/icon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/bin/bash
prog=$(basename $0)
version="1.0"

# Default Colors

color="white"
outline="black"
shade_color="white"


function help()
{
echo "$prog Version: $version"
echo "By: Ryan Hagelstrom"
echo "Description: Converts svg files to FG icon format"
echo "Requires: imagemagick"
echo "Syntax: $prog -i <image.svg>"
echo
echo " -h Help"
echo " -i <image> SVG image file to convert (required)"
echo " -b <color> Base color"
echo " -o <color> Outline color"
echo " -g <color> Glow color"
exit
}

function iconify()
{
unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
convert="./magick"
else
convert="convert"
fi

if [ -n "$filename" ] && [[ $filename == *.svg ]]; then
filename_stripped="${filename%.svg}"
filename_png="$filename_stripped"
filename_png+=".png"
filename_webp="$filename_stripped"
filename_webp+="-forge.webp"
filename_webp_sm="$filename_stripped"
filename_webp_sm+=".webp"

echo " Converting $filename $filename_png"

"$convert" -background none "$filename" "$filename_png"

# Color the image
"$convert" "$filename_png" -background none -channel RGB -fuzz 50% -fill "$color" -colorize 100 -alpha on "$filename_png"

# Resize bigger to fit the halos. Add outline under the edges and slight blur
"$convert" "$filename_png" -background none -gravity center -extent '125%' -write mpr:input -fill "$outline" -channel RGB -colorize 100 +channel -morphology dilate:4 disk -blur 0x3 mpr:input -composite "$filename_png"

# Add halow glow under the black with more blur
"$convert" "$filename_png" -write mpr:input -fill "$shade_color" -channel RGB -colorize 100 +channel -morphology dilate:5 disk -blur 0x10 mpr:input -composite -resize 150x150 -quality 50 -define webp:lossless=true "$filename_webp"

# Reduce size 30x30 for chat output
"$convert" "$filename_png" -write mpr:input -fill "$shade_color" -channel RGB -colorize 100 +channel -morphology dilate:5 disk -blur 0x10 mpr:input -composite -resize 30x30 -quality 50 -define webp:lossless=true "$filename_webp_sm"

rm "$filename_png"
else
help
fi
}
while getopts i:b:o:g: flag
do
case "${flag}" in
i) filename=${OPTARG};;
b) color=${OPTARG};;
o) outline=${OPTARG};;
g) shade_color=${OPTARG};;
*) help ;;
esac
done

iconify
121 changes: 0 additions & 121 deletions LICENSE

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-2024 Ryan Hagelstrom

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@

[![Build FG Extension](https://github.com/rhagelstrom/Contaminated/actions/workflows/create-release.yml/badge.svg)](https://github.com/rhagelstrom/Contaminated/actions/workflows/create-release.yml) [![Luacheckrc](https://github.com/rhagelstrom/Contaminated/actions/workflows/luacheck.yml/badge.svg)](https://github.com/rhagelstrom/Contaminated/actions/workflows/luacheck.yml) [![Markdownlint](https://github.com/rhagelstrom/Contaminated/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/rhagelstrom/Contaminated/actions/workflows/markdownlint.yml)

**Current Version:** 1.3
**Last Updated:** 01/21/23
**Current Version:** ~dev_version~ \
**Updated:** ~date~

5E extension for FantasyGrounds that adds contamination as a condition as well as immunities to the contamination condition for support of [Dungeons of Drakkenheim](https://ghostfiregaming.com/dungeons-of-drakkenheim/)
**Overview:**
Contaminated is a 5E extension for Fantasy Grounds that introduces contamination as a condition, alongside immunities to it. This extension supports the [Dungeons of Drakkenheim](https://ghostfiregaming.com/dungeons-of-drakkenheim/) campaign.

This extension also automates the contamination stack by summing contamination levels when applied and decrementing them on long rest. When an actor gains a level of contamination, the mutation table will be rolled on and the result will show if a mutation takes place. The mutation table will need to be entered into FG by the GM, rolled on by the GM and results applied by the GM.
## Features

NPC Sheets and spells will automatically parse contamination as a condition with the text "target is contamination" or "gain(s) (N) level(s) of contamination".
- **Contamination Automation:** Automatically sums contamination levels when applied and decrements them during a long rest.
- **Mutation Table Integration:** When an actor gains a level of contamination, a mutation table is rolled, and the GM applies the results.
- **NPC and Spell Parsing:** Automatically processes contamination in NPC sheets and spells, using phrases like "target is contaminated" or "gain(s) (N) level(s) of contamination".
- **Calendar of Saint Tarna:**

## Contamination Levels and Symptoms

| Level | Symptoms |
|-----|--------|
| --- | --- |
| 1 | None |
| 2 | Hit points regained by spending hit dice halved |
| 3 | No hit points regained at the end of a long rest |
Expand Down
6 changes: 3 additions & 3 deletions extension.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<root release="3.0" version="3">
<announcement text="Contaminated v1.3\rby Ryan Hagelstrom 2022-2024" font="emotefont" icon="Contaminated" />
<announcement text="Contaminated ~dev_version~ \rby Ryan Hagelstrom 2022-2024" font="emotefont" icon="Contaminated" />
<properties>
<loadorder>120</loadorder>
<name>Feature: Contaminated</name>
<version>1.3</version>
<version>~dev_version~</version>
<author>Ryan Hagelstrom</author>
<description>Adds contamination as a 5E condition and automates the contamination stack</description>
<ruleset>
<name>5E</name>
</ruleset>
</properties>
<base>
<icon name="Contaminated" file="graphics/icons/contaminated.png">
<icon name="Contaminated" file="graphics/icons/contaminated.webp">
</icon>
<script name="DoDContaminated" file="scripts/contaminated.lua" />
</base>
Expand Down
Binary file removed icons/contaminated.png
Binary file not shown.
Binary file added icons/contaminated.webp
Binary file not shown.
7 changes: 3 additions & 4 deletions scripts/contaminated.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-- Author: Ryan Hagelstrom
-- Copyright © 2022
-- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-- https://creativecommons.org/licenses/by-sa/4.0/
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
-- luacheck: globals onInit onClose decrementContaminated sumContamination cleanContaminationEffect updateEffect getContaminationLevel
-- luacheck: globals RRActionManager halfDamage performRoll onContamination customApplyDamage customMessageDamage customAddEffect
Expand Down

0 comments on commit 3a806ee

Please sign in to comment.