oaklands-calculator Svelte Themes

Oaklands Calculator

A fast, interactive Svelte-based calculator for managing game items, calculating profits, and planning your earnings strategy. Perfect for players who need to track item values and plan their farming routes.

Oaklands Calculator

A fast, interactive Svelte-based calculator for managing game items, calculating profits, and planning your earnings strategy. Perfect for players who need to track item values and plan their farming routes.

Features

  • Item Database - Browse and search through an extensive catalog of fruits, flowers, and mushrooms with their base values
  • Color Swatches - View color previews for flowers to match your in-game decorating needs
  • Profit Calculator - Calculate total earnings from selected items with optional 4x processing multiplier
  • Target Profit Planner - Find the most efficient items to farm for reaching your profit goals
  • Smart Sorting - Sort items by name, value, required quantity, and more
  • Processed Item Support - Toggle between raw and processed values (4x multiplier) instantly
  • PWA Ready - Install as a standalone app on your device
  • Responsive Design - Works seamlessly on desktop, tablet, and mobile devices

Tech Stack

Getting Started

Prerequisites

  • Node.js 16+ and npm (or pnpm/yarn)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd oaklands-calculator
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm run dev
    

The app will be available at http://localhost:5173 (or the next available port).

Building for Production

npm run build

Preview the production build locally:

npm run preview

Usage

Item Database

Navigate to the Item Database section to:

  • Browse all available fruits, flowers, and mushrooms
  • View item values and processed values
  • Copy flower color hex codes
  • Sort by name, value, or color

Profit Calculator

Use the Profit Calculator to:

  1. Calculate Items to Profit

    • Search and add items from the dropdown
    • Adjust quantities for each item
    • Instantly see your total profit
    • Toggle between raw and processed values
  2. Find Target Profit Items

    • Enter your target profit amount
    • See how many of each item you need to farm
    • Sort items by value or required quantity
    • Find the most efficient farming strategy

Tips

  • Processed Items: Enable the processed multiplier to calculate values after cooking/crafting
  • Search: Use the search function to quickly find specific items
  • Sorting: Click column headers to sort by different criteria
  • Color Reference: Use the flower color swatches to coordinate with your farm aesthetic

Project Structure

src/
├── lib/
│   ├── data/
│   │   └── items.ts          # Item definitions and values
│   └── index.ts
├── routes/
│   ├── +layout.svelte        # Main layout
│   ├── +page.svelte          # Home page with feature cards
│   ├── items/
│   │   └── +page.svelte      # Item database view
│   └── profit-calculator/
│       └── +page.svelte      # Profit calculator view
└── app.html

Data Format

Items are stored as TypeScript interfaces with their values:

// Fruits
{ name: "Apple", value: 100 }

// Flowers
{ name: "Rose", hex: "#d01823", value: 100 }

// Processed multiplier: 4x the base value

Development Scripts

  • npm run dev - Start dev server with hot reload
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run check - Type check and lint with svelte-check
  • npm run check:watch - Watch mode for type checking

Browser Support

Works in all modern browsers that support ES2020. PWA features require HTTPS in production.

Contributing

Want to add more items or improve the calculator? Contributions are welcome!

Steps to contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test locally with npm run dev
  5. Submit a pull request

Adding New Items

Edit src/lib/data/items.ts to add new fruits, flowers, or mushrooms. Follow the existing format and maintain the TypeScript interfaces.

License

MIT

Top categories

Loading Svelte Themes