Skip to content

Community-driven dataset for Star Resonance life skills, crafting materials, and currency costs (Focus, Luno, Homestead). Includes mining, crafting, and vendor prices from CN and EN sources. Star Resonance life skill & crafting data: materials, Focus cost, and currency prices.

Notifications You must be signed in to change notification settings

asgharkapk/star-resonance-crafting-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

223 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

star-resonance-crafting-database

Community-driven dataset for Star Resonance life skills, crafting materials, and currency costs (Focus, Luno, Homestead). Includes mining, crafting, and vendor prices from CN and EN sources. Star Resonance life skill & crafting data: materials, Focus cost, and currency prices.

🌌 Star Resonance β€” Life Skill & Crafting Data

Community-driven dataset for Star Resonance covering life skills, materials, stamina (Focus) usage, and currency costs.
Includes data from in-game observations and Chinese community sources.


🌟 Star Resonance Crafting Guide

A community-driven crafting database and cost optimizer for Star Resonance, designed to help players explore material recipes, calculate costs, and find the most efficient crafting paths.

This project combines a static HTML interface for browsing crafting data with Python automation scripts that dynamically generate indexes and optimize crafting costs using CSV data.


πŸ“˜ Features

🧭 Interactive Web Guide

  • Displays all crafting, shop, and material data from CSV files automatically.

  • Click on any item name to open a modal popup showing:

    • What it’s made from πŸ”¨
    • Where it’s used 🧩
    • Shop prices πŸͺ
    • Best purchase option πŸ’‘

βš™οΈ Automated Data Processing

  • Automatically detects and loads all CSV files in the /data folder.
  • Builds index.json dynamically with GitHub Actions.
  • Parses recipes, calculates costs, and outputs best/worst value comparisons.

🧠 Smart Cost Optimizer

  • Reads and analyzes all crafting recipes.

  • Identifies lowest and highest-cost items across all currencies.

  • Outputs results to:

    • Console log (for easy CI monitoring)
    • scripts/best_worst_recipes.csv for records

πŸ—‚οΈ Project Structure

πŸ“¦ Star-Resonance-Crafting-Guide
β”œβ”€β”€ index.html                 # Main web interface
β”œβ”€β”€ data/                      # All CSV data lives here
β”‚   β”œβ”€β”€ artisanry.cvs
β”‚   β”œβ”€β”€ shop_prices.cvs
β”‚   β”œβ”€β”€ currencies.cvs
β”‚   └── index.json             # Auto-generated file list
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ craft_optimizer.py     # Analyzes crafting costs
β”‚   β”œβ”€β”€ generate_index_json.py # Generates data/index.json
β”‚   └── best_worst_recipes.csv # Summary file (generated)
β”œβ”€β”€ .github/workflows/
β”‚   └── crafting.yml           # GitHub Actions workflow
└── README.md

🧩 Example CSV Format

artisanry.cvs

action,cin,from,cout,to,cost
craft,28x,Pine Timber,10x,Charcoal,0F
craft,2x,Resin,15x,GemWax,20F
buy,,Exchange,1x,Charcoal,600L

currencies.cvs

action,from,to,cost
define,L,Luno Coin,Used to buy items from Exchange stores
define,F,Focus,Used as stamina to craft
define,H,Homestead Coin,Used in Homestead store

🧰 Python Scripts

generate_index_json.py

Scans /data for .csv or .cvs files and writes:

{
  "files": ["artisanry.cvs", "currencies.cvs", "shop_prices.cvs"]
}

craft_optimizer.py

  • Loads all CSVs dynamically (no manual imports needed).
  • Detects delimiters automatically (| or ,).
  • Calculates per-item costs and identifies the most/least expensive recipes.
  • Saves summary to best_worst_recipes.csv.

πŸ§ͺ GitHub Actions Workflow

Workflow file: .github/workflows/crafting.yml

Tasks:

  1. 🧱 Setup Python environment
  2. πŸ“„ Generate index.json from CSVs
  3. βš™οΈ Run crafting optimizer
  4. πŸ’Ύ Upload and commit results

Artifacts include:

  • output/optimizer_output.txt
  • scripts/best_worst_recipes.csv
  • Updated data/index.json

πŸ–₯️ Local Development

Requirements

  • Python 3.11+
  • pandas

Setup

pip install pandas
python scripts/generate_index_json.py
python scripts/craft_optimizer.py

Then, open index.html in a browser to view the live guide.


🌐 Deployment

You can host this project on:

  • GitHub Pages
  • Netlify
  • Vercel

Simply ensure that:

  • The /data folder and index.json are accessible.
  • CSV files are committed to the repo.

πŸ’Ύ How to Write New Data

Adding new data is simple β€” just follow these steps:

πŸͺΆ 1. Create a New CSV

Place your file in the /data folder. You can name it however you want, for example:

data/materials.cvs

Supported formats: .csv or .cvs Each file should have a header row and comma-separated values.

Example:

action,from,to,cost
craft,Iron Ore,Iron Ingot,15F
buy,Exchange,Iron Ore,250L

🧾 2. Structure Tips

  • action β†’ what type of operation (craft, buy, refine, etc.)
  • from β†’ input material(s)
  • to β†’ output item
  • cost β†’ numeric value + currency symbol (e.g., 20F, 300L, 120H)

Additional optional columns like cin and cout show input/output quantities (e.g., 2x, 15x).

πŸ” 3. Automatic Index Update

When you commit or push, GitHub Actions automatically:

  • Scans the /data folder
  • Updates index.json
  • Regenerates optimized crafting summaries

βœ… No manual editing required! The new CSV appears automatically on the website.


🌍 Live Website

πŸ”— Visit:

πŸ‘‰ Star Resonance Crafting Database

πŸ’‘ What You’ll See

  • Tables for all CSV files in the data directory

  • Searchable, interactive lists of materials and recipes

  • Clickable items that open a modal window showing:

    • Crafting sources (Made From)
    • Usage recipes (Used In)
    • Shop pricing (πŸͺ Shop Prices)
    • Smart recommendation for cheapest option (πŸ’‘ Best Option)

The page updates automatically whenever the repository data changes β€” thanks to the GitHub Actions workflow.


🧠 How Data Reading Works (HTML Explained)

The index.html file dynamically loads all data from the /data folder using JavaScript:

πŸ” Step-by-Step Process

  1. Load index.json

    const resp = await fetch("./data/index.json");
    const { files } = await resp.json();

    This tells the site which .csv files exist.

  2. Fetch Each CSV File

    const rows = await loadCSV(`${DATA_DIR}/${file}`);

    Each CSV is read line-by-line, even if it contains commas inside quotes.

  3. Parse CSV

    • The script detects headers automatically.
    • If a CSV contains duplicate column names, it adds suffixes like _2, _3.
  4. Generate Tables

    createTableSection(file, Object.keys(rows[0]), rows);

    Each CSV becomes a full HTML table with alternating row colors and styled headers.

  5. Clickable Items

    • Any cell containing keywords like "item", "to", or "from" is turned into a clickable link:

      <span class="item-link" data-item="Charcoal">Charcoal</span>
    • Clicking triggers the modal window to appear.

  6. Modal Item Details

    • Searches through all loaded CSVs to find:

      • Where the item is crafted
      • What other items use it
      • Where it’s sold
    • Builds a full HTML summary inside the modal.

  7. Automatic Refresh Since index.json is rebuilt automatically by the workflow, new CSV files appear instantly without editing the HTML code.


πŸ™Œ Credits

Star Resonance Crafting Guide Community-maintained fan project inspired by the crafting system of Star Resonance. All data sourced and compiled by players.

Developed by: community contributors Maintained with love πŸ’™ by: Star Resonance fans


πŸ“„ License

This project is distributed under the MIT License. Use, modify, and share freely β€” attribution appreciated.

About

Community-driven dataset for Star Resonance life skills, crafting materials, and currency costs (Focus, Luno, Homestead). Includes mining, crafting, and vendor prices from CN and EN sources. Star Resonance life skill & crafting data: materials, Focus cost, and currency prices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •