Skip to content

elanthia-online/gs4-trainer

Repository files navigation

GemStone IV Character Trainer - Web Edition

A complete web-based port of the GemStone IV Character Trainer spreadsheet (v4.6.3), providing all the functionality of the Excel version in a modern, browser-based application.

Features

Complete Feature Parity with Spreadsheet

  • Character Creation & Management

    • All 10 races (Human, Giantman, Half-Elf, Dark Elf, Sylvan, Elf, Dwarf, Halfling, Aelotoi, Burghal/Forest Gnome, Half Krolvin, Erithian)
    • All 10 classes (Warrior, Rogue, Wizard, Cleric, Empath, Sorcerer, Ranger, Bard, Monk, Paladin)
    • Stat allocation with validation (660 total, 20 minimum)
    • Stat growth calculation across 200 levels
  • Training Planning

    • 28 skills with class-specific training costs
    • 200 level planning grid
    • Training validation against maximum allowed
    • Training points calculation
  • Combat Calculators

    • Round Time Calculator
    • Attack Strength (AS) Calculator
    • Defense (DS) Calculator
    • Runestaff Defense Calculator
    • Ambushing Calculator
    • Lockpicking Difficulty Calculator
  • Character Progression

    • Experience capacity and absorption rates
    • Casting Strength (CS) and Target Defense (TD)
    • Combat Maneuvers (CMAN) tracking
    • Shield Specializations tracking
    • Spell circle management

Web-Specific Enhancements

  • Modern UI/UX

    • Responsive design (mobile-friendly)
    • Tabbed navigation
    • Real-time calculations
    • Form validation with visual feedback
  • Data Management

    • Auto-save to browser local storage
    • Import/Export character data as JSON
    • No installation required
    • Works offline after initial load

Deployment

GitHub Pages Deployment

  1. Upload Files to GitHub Repository:

    # Create a new repository on GitHub
    # Clone it locally
    git clone https://github.com/yourusername/gs4-trainer.git
    cd gs4-trainer
    
    # Copy all files from the zip
    unzip gs4-trainer-web.zip
    
    # Commit and push
    git add .
    git commit -m "Initial commit - GS4 Trainer Web App"
    git push origin main
  2. Enable GitHub Pages:

    • Go to repository Settings
    • Navigate to "Pages" section
    • Source: Deploy from branch "main" / "root"
    • Click Save
    • Your site will be live at: https://yourusername.github.io/gs4-trainer/

Local Development

Simply open index.html in any modern web browser. No server required!

# Extract the zip file
unzip gs4-trainer-web.zip
cd gs4-trainer-web

# Open in browser
# On macOS:
open index.html
# On Linux:
xdg-open index.html
# On Windows:
start index.html

File Structure

gs4-trainer-web/
├── index.html              # Main HTML structure
├── styles.css              # Complete styling
├── data.js                 # Game data (races, classes, skills, etc.)
├── calculations.js         # All calculation functions
├── app.js                  # Main application logic
├── README.md              # This file
└── SPREADSHEET_ANALYSIS.md # Detailed analysis of original spreadsheet

Usage Guide

Getting Started

  1. Create Your Character:

    • Enter your character name
    • Select race and class
    • Allocate stats (must total 660, minimum 20 each)
    • Click "Calculate Stat Growth" to see progression
  2. Plan Training:

    • Switch to "Trainer" tab
    • View levels 0-20 (or adjust range)
    • Enter training ranks for each skill at each level
    • Click "Check Training Plan" to validate
  3. Combat Calculations:

    • Use dedicated calculator tabs for:
      • Round Time
      • Attack Strength
      • Defense
      • Ambushing
      • And more!
  4. Track Abilities:

    • CMAN tab: Track combat maneuvers
    • Shield tab: Track shield specializations
    • Spells tab: Manage known spells
  5. Save Your Work:

    • Auto-saves to browser storage
    • Export to JSON for backup
    • Import JSON to restore

Data Management

  • Auto-Save: Changes save automatically to browser storage
  • Export: Download character as JSON file
  • Import: Upload previously exported JSON file
  • Reset: Clear all data and start fresh

Technical Details

Technologies Used

  • Pure JavaScript (ES6+) - No frameworks required
  • CSS Grid & Flexbox - Responsive layout
  • LocalStorage API - Data persistence
  • File API - Import/Export functionality

Browser Compatibility

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+
  • Any modern browser with ES6 support

Data Accuracy

All calculations mirror the original VBA code from the spreadsheet:

  • Stat growth algorithms match Excel formulas
  • Training costs match per-class values
  • Combat calculations use official GS4 mechanics
  • Experience formulas replicate spreadsheet logic

VBA Functions Implemented

All major VBA macros have been ported:

  • ReportSpellTraining() - Spell availability report
  • CheckTrainingPlan() - Training validation
  • CalculateStatGrowth() - Stat progression
  • ComputeSpellSheet() - Spell calculations
  • ResetSpreadsheet() - Character reset
  • ✅ All calculator functions

Known Differences from Spreadsheet

  1. UI Paradigm: Web tabs instead of Excel sheets
  2. Grid View: Shows level ranges instead of all 200 at once (performance)
  3. Spell Display: Simplified spell list (full spells would require spell database)
  4. Named Ranges: Not applicable in web version
  5. VBA Events: Replaced with JavaScript event listeners

Future Enhancements (Not in Spreadsheet)

Potential additions for web version:

  • Character comparison tool
  • Training path optimizer
  • Mobile app version
  • Cloud sync (optional)
  • Build sharing via URL
  • Equipment calculator
  • Party planning tools

Credits

  • Original Spreadsheet: Tsoran deArgonoth
  • CMAN Tables: Bobmuhthol
  • Monk Information: Kirtland
  • Web Edition: Ported from Excel v4.6.3
  • Game: GemStone IV by Simutronics

License

This is a fan-made tool for GemStone IV. GemStone IV is a trademark of Simutronics Corporation. This tool is not officially endorsed by or affiliated with Simutronics.

The original spreadsheet authors retain rights to their work. This web port is provided free for community use.

Support

For issues or questions:

  • Check SPREADSHEET_ANALYSIS.md for detailed documentation
  • Review calculation functions in calculations.js
  • Inspect browser console for errors

Version History

  • v4.6.3-web (2024) - Initial web port
    • Complete feature parity with Excel version
    • All 16 sheets/tabs implemented
    • All VBA functions ported
    • GitHub Pages ready
    • Mobile responsive

Enjoy planning your GemStone IV character! 🗡️⚔️🛡️

About

Web Application version of GS4 Trainer Spreadsheet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published