Skip to content

duaselipar/ItemtypeDatEditorCT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ItemtypeDatEditorCT

ItemtypeDatEditorCT is a modern Windows tool for viewing, editing, exporting, and syncing itemtype.dat files from Crazy Tao private server with MySQL databases (v4/v5).
It is designed for power users, private server admins, and database managers who need full control over the CT itemtype.dat structure — including conditional MonsterType/Hitrate logic — with seamless MySQL integration.


🚀 Features

  • Open & Edit itemtype.dat:

    • Full support for Crazy Tao itemtype.dat (216 bytes per record).
    • Automatically detects and maps MonsterType (≥11000) or Hitrate (<11000) from shared slot.
    • Load, view, and edit all fields in a sortable, searchable DataGridView.
    • Add, edit, delete, copy, and paste rows with keyboard shortcuts.
  • Conditional Field Logic:

    • MonsterType and Hitrate share one 4-byte slot in the file.
    • Editor automatically determines:
      • Values ≥11000 → saved as MonsterType
      • Values <11000 → saved as Hitrate
    • Ensures clean, conflict-free save behaviour.
  • Search & Filter:

    • Search by keyword or specific column (combo box).
    • Looping search (press Search repeatedly to find next match).
    • Case-insensitive matching.
  • Import & Export CSV:

    • Export all or selected rows to CSV (Excel compatible).
    • Import CSV back into the grid (skips duplicate IDs automatically).
    • Safe CSV format (handles commas and quotes properly).
  • Context Menu (Right-click):

    • Ctrl+N — Add new row
    • Ctrl+C — Copy selected
    • Ctrl+V — Paste copied rows
    • Ctrl+E — Export selected
    • Del — Delete selected
    • Add Selected to DB — insert selected rows to MySQL (skip existing IDs)
  • Live Status Bar:

    • Displays total items, connection status, and last operation result (load, save, export, import).
  • Smart Row Handling:

    • Empty rows auto-deleted on focus loss.
    • Prevents invalid zero/blank entries when saving.
  • MySQL Integration (v4/v5 Compatible):

    • Works with old MySQL 4.x servers using MySql.Data.dll 1.0.10.0.
    • ? parameter markers supported.
    • Add All: inserts all new items that don’t exist in cq_itemtype.
    • Add Selected to DB: inserts only selected rows to DB (skips duplicates).
    • Update Name: updates item names by id (safe, skips missing).
    • Pull Names: fetches item names from DB into the grid (DB → Client).
    • Automatically skips existing IDs or missing records safely.
  • Lightweight & Fast:

    • Loads thousands of items instantly.
    • Auto-removes duplicate IDs when saving.
    • Description (description) field kept local — not synced to DB.

📦 How to Use

  1. Load itemtype.dat
    Click Load DAT, select your Crazy Tao itemtype.dat.
    The program will parse the binary structure and display all items.

  2. Edit Data
    Double-click cells to edit, or right-click for the context menu.

  3. Search
    Type a keyword, select a field, click Search (repeat to move to next match).

  4. Export / Import CSV
    Export to CSV for Excel editing, import back later.
    Duplicate IDs are auto-skipped.

  5. Connect to MySQL
    Fill in your host, port, username, password, and database.
    Click Connect to enable database buttons.

  6. Sync to Database

    • Add All: inserts all non-existing items.
    • Add Selected to DB: inserts only highlighted rows.
    • Update Name: updates name for matching IDs.
    • Pull Names: fetches latest name from DB to grid.
  7. Save to .dat
    After editing, click Save.
    The editor auto-removes duplicate IDs and applies the MonsterType/Hitrate logic.


⚠️ Important Notes

  • description is not synced to the database (not present in cq_itemtype).
  • Always backup your itemtype.dat and database before large updates.
  • Conditional slot (MonsterType/Hitrate) uses threshold 11000.
  • Duplicates by ID are removed automatically before saving.

🧠 Keyboard Shortcuts

Action Shortcut
Add Row Ctrl + N
Copy Ctrl + C
Paste Ctrl + V
Export Selected to CSV Ctrl + E
Delete Selected Rows Del
Add Selected to Database Ctrl + Shift + A

🖱️ Context Menu Actions

  • Add Row
  • Copy / Paste / Delete / Export Selected
  • Add Selected to DB (skip duplicates automatically)

🗄️ MySQL Features Summary

Action Direction Description
Add All Client → DB Inserts all new IDs (skips existing)
Add Selected to DB Client → DB Inserts selected items only
Update Name Client → DB Updates only item names by id
Pull Names DB → Client Loads names from database into grid

📬 Feedback & Support

Found a bug or feature idea?
→ Submit via GitHub Issues
→ or contact me on Facebook


Enjoy managing your Crazy Tao private server with precision and safety!
© DuaSelipar – 2025

About

For Crazy tao client and database only

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages