-
Notifications
You must be signed in to change notification settings - Fork 2
Adding Support for a new Spell Mod
stitch_icon_atlas.py is used to convert input .csv files and directories of images to stiched icon atlas and .csv files that are placed in the mods folder. It is also able to generate the .swf and config for use with Inventory Interface Information Injector to get the icons inside SkyUI.
- Python 3.12 (tested on, maybe works on earlier versions too)
- python packages: (installable with pip)
- opencv-python
- pandas
- pil
- java (for creating i4 .swf icons)
At the top of the script there are two pathes that must be adapted, first the mod_root_path
should point to your installed mods SKSE\Plugins\SpellHotbar
folder, I'm using a MO2 setup.
Also png2swf_executable_path
should be set to a place where you downloaded png2swf.exe, this is needed for the inventory swf icons.
In the "main" section at the bottom of the script are a lot off commented out or "disabled" code lines that were used to generate all the configs. Just copy one of those and change the inputs. The script will copy the results directly into your mod folder.
Nearly the same as the output in #spelldatacsv-format, just with an added "Shouttext" column
Columns:
-
Name
- must match the icon's name: " " and '-' get replaced with "_", "'" is removed. e.G "Kyne's Peace" will turn into "kynes_peace.png" -
FormID
- form id of the spell, without load order index, as HEX number (0x), max 6 digits, leading 0s can be avoided. e.G0x10f7ed
,0x820
-
Plugin
- name of the plugin containing the form, e.GSkyrim.esm
-
Casteffect
- Visual fx attached to the hands while charging, see section below about definition of cast effects, can be empty (also not used for powers and shouts) -
GCD
- Global cooldown, keep -1 for default, can be used to extend if a power triggers some special anim that should lock the player out of using the bar for that time. -
Cooldown
- can be used to give Skills a cooldown (when cast through the bar). For greater powers (once per day) and shouts this is handled automatically, do not set a cooldown for those, You can specify the cooldown as 1s for 1 second, 12m for 1 minute or 1h for 1 hour, no suffix will be seconds. Cooldowns are tracked in gametime and reset when you wait or quick travel. When the Cooldown starts the time is converted to gametime depending on the current timescale. This will cause incorrect timings when you change your timescale afterwards. -
Casttime
- How long charging up the spell takes, leave -1 for reading the value from .esp, for spells with long casttimes this is set to 1.75 to not cause animation problems, very long cast times do not look good. As compensation the slow ritual spells have set a cooldown by default. -
Animation
- Which animation to use, this does not do anything in code besides setting a global variable to this value while the spell is beeing cast. The only place this variable is used is in DAR conditions, e.GValueEqualTo("SpellHotbar.esp" | 0x815, 2)
. By default up to 15 is used. The variable is a short and new numbers can be added (up to 32,767) -
Shouttext
- optional column, can be avoided. If a text is there those letters are getting written over the icon in dragon language font, this is used for shouts with the first two letters of the first word. -
Ranktext
- optional column, can be avoided. Can be used to write Text on the image, rank text parameters can be changed on the top of the python script.
There are no special requirements besides beeing a squared .png, the resolution should be at least 128x128, the script will scale every image to 128x128. Alpha Borders get automatically added to the images. As long as the original images are present (all default used are commited in this repo) the script can be used to create icons for completely different button masks with other alpha cutouts, for this the alpha_mask.png needs to be changed. Alpha mask is a grayscale image that will be multiplied into the alpha channel of the images.
If you release an icon pack please also provide the original unstitched icons for download so changing the button style can easily be done by this script.
build_release_package.py can be used to create release .zip files for spell packs