Skip to content

A comprehensive Foundry module for the CAIN TTRPG. Contains a full suite of features adapted for content from the original book by Tom Bloom.

License

Notifications You must be signed in to change notification settings

diabeatz96/cain

Repository files navigation

project-logo

CAIN

A foundry alternative playing system for CAIN, created by Tom Bloom. Code created by Adam Kostandy

license last-commit repo-top-language repo-language-count Static Badge


Table of Contents

CREDITS

- Myco from the Pilot.NET/CAIN Discord for providing icon assets
- Tom Bloom Creator of Cain
- My sunday DND group
- My friend carmen for miscellaneous ideas and polish
- Diabeatz96, ahandleman and Benji as developers.

v1.2.X Update

v1.2.X update is a rework of the sin-sheet, adjustments to the player character sheet and addition of globaltalismans linked to tiles in game.

This update has features included but not limited too:

  • Trauma Questions can now be checked off and are now sorted out line by line on the sheet of the sin
  • Sins fields have all been updated to smart text boxes for better customization and edits.
  • Sins Now have 6 Quick Action buttons to automate several player interactions (More to be added in future updates)
  • Talismans can now be seen on Sin Sheet directly if you want to link them.
  • Sins now have expanded views of severe attack and can add your own questions for extra fun!
  • Sin page formatting improved.
  • Players stats are now shown as bubbles and not numbers. Stats were added to localization document. (Further work needed)
  • Talismans can now be put inside of the scene and can be edited as such.
  • Fixed Spelling Errors on Hound.
  • Fixed Spelling Errors in Homebrew.

v1.1.X Update

Version 1.1.X update is a rework of the item sheet, blasphemies, agendas, sin-marks, and afflictions. All of these items have now been itemized, and we are able to further update better automation into the system moving forward.

Features are included but not limited too:

  • Re-work of sheet aesthetics to better fit accessibility needs.
  • Re-coloring and re-designing the look of blasphmies, as well as letting you customize your own
  • Kit has been re-styled and icons have been updated.
  • Homebrew page for Agenda and blasphemies for easy to create home-brew content.
  • Afflictions are now items, and afflictions can now be added onto sheet by dragging them on.
  • Sin-mark re-haul, automatic sin-mark rolling, and improved sin-mark roll system.
  • Agendas are now semi-automated. You drag an agenda onto sheet, it will automate the process of adding in agenda items.
  • Blasphmies are now semi-automated, You drag blasphmies onto your sheet and it will automate the process of adding in abilities etc.
  • XP managment has been vastly improved with automated xp advancment, xp maximum increase and decrease, and end of session XP bonuses.
  • Added in some settings for player managment to be more accessible.

Migrating to v1.1.X

If you are coming from an older version of the system here is what you have to know: We have completley re-worked items, and they are Mandatory for the new system work. Details are below when importing the new items, and remember KEEP DOCUMENT IDS When updating, I highly, highly suggest deleting all of your old items and adding the new ones. In addition to this, you may have to wipe some parts of actor-sheets. I would take screenshots of what you had before and replicate them back to the now standard items that are needed.

Things that will most definitley be wiped off your old character sheets are:

  1. Agendas
  2. Blasphemies
  3. Sin Marks
  4. Afflictions

Overall, the rest of your game should be un-changed on the game-master side.

As a side note, it will definitley be in a 1.2.X update where we re-haul sins and improve functionality. This may not be for some time as we perfect the player portion of the game. If you have any questions, message in the foundry vtt channel. Thank you!

Overview

Cain is an open-source project designed to streamline CAIN RPG player, gm and system management within FoundryVTT. Cain enhances user experiences through customizable actors, items, and effects. The projects core functionalities, encapsulated in the cain module, facilitate dynamic talisman management, item roll logic, and interactive character sheet customization.


Read here if you plan on installing Cain

Downloading and Installing the Cain System for Foundry VTT

The Cain system is setup through a manifest file that is downloaded and put onto your foundry.

Obtaining the Manifest URL

Head over to the Cain system.json GitHub repository: Cain System Module

Here's how to find the manifest URL:

On the top right corner of the code, there is a RAW button.

image

Then, proceed to copy the link at the top.

image

Installing the Cain System in Foundry VTT

  • Launch your Foundry VTT instance.
  • Navigate to the "Game Systems" menu (gear icon in the top right corner).
  • Click install system
  • Copy paste the link into manifest url
Recording.2024-08-18.102632.mp4

Creating a World

  1. Click the "Game Worlds" button and then click "Create World".
  2. Fill in info.
  3. Click Create World
Create_Cain_World.mp4

Importing Compendium Information

  • Go to Compendium tab (Book with world looking icon).
  • Right click on each pack and click import content, CLICK KEEP DOCUMENT IDS then click yes.

YOU MUST KEEP DOCUMENT IDS, THIS IS CRITICAL TO THE SYSTEM WORKING AS INTENDED.

Foundry_Virtual_Tabletop_1gXjlk2VMo.mp4

Investigations

Developers

Features

Feature Description
βš™οΈ Architecture The project has a modular architecture with clear separation of concerns, utilizing Sass for styling and JavaScript for functionality. It follows a structured system design in FoundryVTT for efficient data processing and management.
πŸ”© Code Quality The codebase maintains high quality standards with reusable styles, compressed JavaScript libraries, and efficient data handling. It follows a consistent design system for frontend elements, enhancing maintainability and coherence across the project.
πŸ“„ Documentation Extensive documentation is provided, defining metadata, supported types, licensing terms, and localization strings. Detailed explanations are present for classes, helpers, templates, and components, aiding system management, customization, and user interface design.
πŸ”Œ Integrations Key integrations include SASS for CSS compilation, Handlebars templates for fast rendering, and FoundryVTT for system metadata. External dependencies support dynamic image updates, active effects management, and talisman interaction within the system.
🧩 Modularity The codebase exhibits high modularity, enabling easy extension and integration of additional features. Classes, templates, and styles are organized in a structured manner, promoting code reusability and scalability for future enhancements.
πŸ§ͺ Testing Testing frameworks and tools used are not explicitly mentioned in the provided details.
⚑️ Performance The system promotes efficiency and resource optimization through centralized code management, dynamic data handling, and fast rendering using cached Handlebars templates. Layout elements are designed for responsive web display, enhancing user experiences in the application.
πŸ›‘οΈ Security Security measures for data protection and access control are not explicitly discussed in the provided details.
πŸ“¦ Dependencies Key external libraries and dependencies include SASS for CSS compilation, Handlebars for template rendering, and FoundryVTT for managing system metadata and UI components. These libraries enhance styling, performance, and functionality within the project.
πŸš€ Scalability The project demonstrates scalability with its structured architecture, modularity, and efficient resource management. The codebase is well-organized for handling increased traffic and load, facilitating easy integration of new features and extensions.

Repository Structure

└── cain/
    β”œβ”€β”€ CHANGELOG.md
    β”œβ”€β”€ LICENSE.txt
    β”œβ”€β”€ README.md
    β”œβ”€β”€ assets
    β”‚   β”œβ”€β”€ CAT
    β”‚   β”œβ”€β”€ Talismans
    β”‚   β”œβ”€β”€ anvil-impact.png
    β”‚   β”œβ”€β”€ brain.png
    β”‚   └── talisman-icon.png
    β”œβ”€β”€ css
    β”‚   └── cain.css
    β”œβ”€β”€ lang
    β”‚   └── en.json
    β”œβ”€β”€ lib
    β”‚   └── some-lib
    β”œβ”€β”€ module
    β”‚   β”œβ”€β”€ cain.mjs
    β”‚   β”œβ”€β”€ data
    β”‚   β”œβ”€β”€ documents
    β”‚   β”œβ”€β”€ helpers
    β”‚   └── sheets
    β”œβ”€β”€ package.json
    β”œβ”€β”€ packs
    β”‚   └── .gitattributes
    β”œβ”€β”€ src
    β”‚   └── scss
    β”œβ”€β”€ system.json
    β”œβ”€β”€ template.json
    └── templates
        β”œβ”€β”€ actor
        β”œβ”€β”€ item
        └── talisman-window.hbs

Modules

.
File Summary
package.json Enables CSS compilation for the Cain system using SASS. Automates the compilation process and enables watching for style changes. Key features include building expanded CSS and supporting source maps.
template.json Defines supported types for Actors and Items in the system, guiding the template structure.
LICENSE.txt Defines licensing terms for the repository content, granting usage permissions under the MIT License. Excludes compendium content from this license. Specifies attribution for the image anvil-impact.png.
system.json Defines metadata for the Cain system in FoundryVTT, specifying authors, version, media, compatibility, styles, languages, and more. Facilitates system management, compatibility, and customization for users of the system.
lib.some-lib
File Summary
some-lib.css Enhances Cains UI with reusable styles for various components. Supports maintainability and consistency across the projects frontend, complementing the design system.
some-lib.min.js Enables custom functionality within the system using a compressed JavaScript library, enhancing modularity and extensibility. The file serves as a core component of the repositorys architecture for integrating additional features seamlessly.
css
File Summary
cain.css Cain/module/cain.mjsThe cain.mjsfile within themodule` directory of the Cain repository serves as a crucial module orchestrating various functionalities of the system. It acts as a central hub for handling data processing, document management, and providing essential helper functions to streamline operations within the system. This code file integrates key components essential for the overall functioning of the system, promoting efficiency and coherence in managing the systems resources effectively.
module
File Summary
cain.mjs Defines classes, constants, and macros for the Cain system. Registers document, sheet, and handlebars helpers. Enables item creation and macro assignment. Facilitates talisman interaction through a dedicated window and button on the interface.
module.documents
File Summary
item.mjs Enhances Item class with dynamic data handling and roll logic for dice commands. Extends functionality to simplify system data and handle clickable rolls elegantly in chat interface.
talisman-window.mjs Implements TalismanWindow class for managing global Talismans in the Cain system. Enables GMs to add, edit, and delete talismans with image and mark settings. Supports dynamic image and mark updates based on user interactions.
actor.mjs Defines a custom data structure for the Actor document, enhancing data handling for the Simple system in the Cain repository. Extends base Actor functionalities to prepare, augment, and convert data efficiently for character sheets and queries.
module.helpers
File Summary
effects.mjs Manages Active Effects for Actor/Item Sheets with control buttons to create, edit, delete, or toggle effects. Prepares data structure for categorizing effects into temporary, passive, or inactive categories.
templates.mjs Loads and caches Handlebars templates to enable fast rendering in the Cain system. Pre-loads template paths for talismans, actors, and items, enhancing performance for displaying game elements.
config.mjs Defines registered skills, sin marks and abilities used in the system, enhancing gameplay mechanics with rich character customization options and thematic depth.
module.sheets
File Summary
actor-sheet.mjs This code file, located in the module/sheets directory, enhances the functionality related to managing active effects for actors within the larger cain repository. It imports key functions for managing active effects and retrieving configuration settings. By leveraging these imports, the code streamlines the process of organizing and preparing active effect categories, contributing to a more efficient and user-friendly system for handling actor-related data within the project.
item-sheet.mjs Enhances ItemSheet presentation with dynamic templating, enriched descriptions, system flags, and active effects management. Integrates contextual data and UI enhancements for interactive item manipulation within the larger Cain repository.
src.scss
File Summary
cain.scss Enhances styling for the cain module by importing custom fonts, utilities, and global styles. Organizes components related to forms, resources, items, and effects within the .cain class, streamlining the visual presentation in the Cain repository.
src.scss.components
File Summary
_resource.scss Defines bold styling for resource labels in the repositorys SCSS components, enhancing readability and visual hierarchy.
_forms.scss Styles sheet for forms and headers in the Cain module. Defines layout properties for form items, profile images, header fields, character names, tabs, and text editors. Maintains a consistent visual design within the user interface.
_effects.scss Defines centralized styling for item effects in Cain modules UI components. Aligns content, adds borders, and sets font size. Enhances visual consistency and readability for effect-related elements.
_items.scss Styles components for items in the UI, defining headers, lists, names, controls, and individual items. Enhances readability and user interaction.
src.scss.global
File Summary
_grid.scss Defines grid layouts for responsive web design, offering columns ranging from 2 to 12. Includes grid offsets for alignment control. Supports dynamic content structuring for enhanced user experiences within the application.
_flex.scss Enhances layout flexibility with centralized alignment and spacing options using Flexbox properties. Establishes consistent design patterns for center, left, and right alignments, optimizing UI rendering for diverse screen sizes.
_window.scss Window-appuses primary font,rollable` elements change color and shadow on hover/focus. Contributes consistent UI styling for interactive elements aiding user engagement in the projects UI development.
src.scss.utils
File Summary
_variables.scss Define padding and border styles variables for consistent UI spacing and elements in the Cain repositorys styling layer.
_mixins.scss Defines mixins for hiding elements in the repositorys CSS architecture. Supports accessibility and UI design by providing reusable utilities for making elements visually hidden or completely hidden from view.
_colors.scss Defines core color variables for consistent styling in the repositorys SCSS files. Establishes essential color values such as white, black, dark, faint, beige, and tan for maintaining a cohesive design system across the project.
_typography.scss Defines primary and secondary fonts for consistent typography in the parent repositorys stylesheets. Ensures a unified visual language across the project to enhance readability and brand consistency.
lang
File Summary
en.json Define localization strings for skills, abilities, labels, items, and effects in English within the en.json file for the Cain system, facilitating user interface display in the respective game elements.
templates
File Summary
talisman-window.hbs Defines a stylized UI layout for managing Global Talismans. Displays talisman details dynamically, with GM-exclusive controls. Applies custom styling for a Jujutsu Kaisen-themed interface, enhancing user experience within the cain module of the repository.
templates.actor
File Summary
actor-npc-sheet.hbs Implements an NPC character sheet with editable fields for health, power, CR/XP, biography, and owned items. Facilitates interactive character management in the RPG system through a visually appealing and user-friendly interface.
actor-character-sheet.hbs Renders a character sheet with profile information and tabs for managing stats, descriptions, items, abilities, sin, and talismans. Utilizes Handlebars for dynamic content display in the Cain repositorys actor template structure.
templates.actor.parts
File Summary
actor-items.hbs Renders kit points and scrip amount inputs.-Displays gear items with controls for creation, editing, and deletion.-Utilizes CSS styling for a visually appealing and consistent layout.
actor-talismans.hbs Renders a dynamic interface for managing talismans in the actor profile, displaying talisman details with controls to edit and delete. Allows users to add new talismans.
actor-abilities.hbs Renders dynamic content for displaying and managing Psyche and item sections within the actor abilities UI component. Dynamically generates buttons, checkboxes, and lists based on system data for engaging user interactions and customization options.
actor-features.hbs Designs and styles a dynamic character sheet interface with checkboxes, sliders, and dice roller functionality.-Displays character progression indicators and prompts for XP advancement decisions, enhancing the immersive role-playing experience.
actor-sin.hbs Enables tracking and management of sin overflow and sin marks for characters. Allows setting max value, checking overflow, rolling sin marks, and clearing/deleting marks. Supports dynamic display based on character data.
templates.item
File Summary
item-feature-sheet.hbs Enhances item feature sheets by displaying item details, enabling interactive editing, and integrating with a system for enriched text handling. Facilitates easy navigation through tabs for description, attributes, and effects, streamlining user interaction within the repositorys architecture.
item-item-sheet.hbs Customizes item details for an RPG character sheet, integrating image, resource quantities, type, and descriptions. Facilitates seamless editing and organization with tabbed navigation for descriptions and attributes, enhancing gameplay experience.
item-spell-sheet.hbs Empowers spell management by providing tabs for description and attributes. Includes an editor for enriched text data and fields for spell level input. Enhances user experience for customizing and organizing spell information in the system.
item-agenda-sheet.hbs Displays a fallback template for items lacking specific ones. Features a customizable form with item name input. Includes tab navigation for Description section with rich text editing capabilities for system descriptions.
item-blasphemy-sheet.hbs Enables customization of item details and effects in Cains system through a user-friendly interface with tabs for description, attributes, and effects. Facilitates seamless navigation and editing of items with dynamic content.
item-sheet.hbs Defines the fallback template for items without specific ones. Displays item details, such as name and image. Offers tab navigation for Description and Attributes sections, supporting enriched text data editing. Maintains modularity for easy addition of new fields.
templates.item.parts
File Summary
item-effects.hbs Renders a dynamic list of item effects with controls for creation, editing, and deletion. Incorporates localized labels and icons for each effect, enhancing user interaction within the item management module of the greater repository system.

Getting Started

Installation

From source

  1. Clone the cain repository:
$ git clone https://github.com/diabeatz96/cain
  1. Change to the project directory:
$ cd cain

Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/diabeatz96/cain
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


License

This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.


Acknowledgments

  • Myco from the Pilot.NET/CAIN Discord for providing icon assets
  • Tom Bloom Creator of Cain
  • My sunday DND group

Return


About

A comprehensive Foundry module for the CAIN TTRPG. Contains a full suite of features adapted for content from the original book by Tom Bloom.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published