Repository navigation
Home
TheGenieOfTheCode edited this page Nov 4, 2026
·
5 revisions
CTLib is a library module for Foundry VTT's Draw Steel system: the shared code the Combat Tools family of modules is built on, open for any module to use.
A module that depends on it gets canvas pickers, line of effect and cover checks that count height, terrain, writes that work for players who don't own the document, a settings window base, rich tooltips, apply hooks and an undo journal for the target sections of Draw Steel 1.2, a shared hook into the Target Damage panel on Draw Steel 1.1, token portraits, damage type icons, resource tokens, and a handful of Draw Steel helpers, without carrying its own copy of any of it.
Requires Foundry v14, the Draw Steel system, and socketlib.
- Line of effect counts height: a wall blocks only up to its height, and floors and solid terrain block too. The system's own check uses it, so flanking and Taunted do as well. See Line of Effect and Cover.
- Flanking counts height, and so does range in modules that use CTLib, so a flier 5 squares up is out of melee reach.
- A dragged token is stopped only by walls tall enough to reach it.
- Scenes get a Terrain region behavior for solid blocks and pits, and use DS Terrain Designer's ground heights. See Terrain.
- On Draw Steel 1.2, each apply button in a target's section gets an undo beside it, a chat message with several targets gets an Apply All Damage button, and players can apply on their own chat messages through the Director. See Apply and Undo.
- When a Draw Steel module can't turn on because a module it needs is missing or too old, the Director is told which one and how to fix it.
- Using CTLib: declaring the dependency, and the ways to reach the library from your code.
- Config and Services: how modules share settings and functions through CTLib without importing each other.
| Area | Page |
|---|---|
| Writes a player can make on documents they don't own | Permission-Safe Writes |
| The picker bar, dimmed canvas and target marks | Pickers |
| Line of effect and cover in height, concealment and burrowing | Line of Effect and Cover |
| Grid maths, footprints, walls, doors and wall heights | Grid and Walls |
| Ground heights, solid blocks, pits and movement terrain | Terrain |
| Wall materials and tags | Materials and Tags |
| Squads, Stamina, abilities, power rolls, monster filters, the action tracker | Draw Steel Helpers |
| A settings window built from your registered settings, and a layout for your settings tab | Settings Window |
| Apply hooks, the undo journal and one target's damage on Draw Steel 1.2 | Apply and Undo |
| Adding to the Target Damage panel alongside other modules, on Draw Steel 1.1 | Target Damage Panel |
| Your own header in the token's status list | Status Headers |
| Token portraits that ping and highlight their tokens | Portraits |
| Tooltips in the system's item layout | Rich Tooltips |
| Damage type icons and colours, and drawn resource tokens | Damage Types and Resource Tokens |
| Theme colours, preview tokens and small utilities | Utilities |
Getting Started
Working With Documents
The Canvas
Interface