2.9 KiB
2.9 KiB
Quick Start Guide - Skill Converter
Fastest Way to Convert All Skills
Step 1: Open Command Prompt
- Press
Win + R - Type
cmdand press Enter - Navigate to your project folder:
cd E:\Projects
Step 2: Run the Batch Script (EASIEST)
Double-click convert_all_skills.bat or run:
convert_all_skills.bat
Then choose option 1 to convert from stubs1.cpp automatically!
Step 3: Manual Python Command (RECOMMENDED FOR DEVELOPERS)
cd E:\Projects
python convert_skills_fixed.py --stubs "E:\Projects\perfect-world-source\perfect-world-source\CElement\CElementSkill\stubs1.cpp"
This single command will:
- ✅ Extract all skill IDs from stubs1.cpp
- ✅ Convert all skills from C++ to C#
- ✅ Create organized SkillStubs1 folder
- ✅ Generate SkillStubs1.cs registration file
- ✅ Update skill declarations
What You'll See
Converting skill 1...
[OK] Created E:\Projects\perfect-world-unity\Assets\PerfectWorld\Scripts\Skills\SkillStubs1\skill1.cs
Converting skill 2...
[OK] Created E:\Projects\perfect-world-unity\Assets\PerfectWorld\Scripts\Skills\SkillStubs1\skill2.cs
...
Found 50 skills in stubs file: 1 to 100
[OK] Generated SkillStubs1.cs
[OK] Updated SkillStubs1.cs with 50 skills
============================================================
Conversion complete!
[OK] Successfully converted: 50 skills
============================================================
Common Commands Cheat Sheet
# Convert from stubs file (BEST - automatic everything)
python convert_skills_fixed.py --stubs "path\to\stubs1.cpp"
# Convert specific skills for testing
python convert_skills_fixed.py --ids 1,2,3,4,5
# Convert a range
python convert_skills_fixed.py --range 1-100
# Convert multiple ranges
python convert_skills_fixed.py --range 1-50,100-150,500-600
After Conversion
- Open Unity - Your project at
E:\Projects\perfect-world-unity - Check Skills folder -
Assets/PerfectWorld/Scripts/Skills/SkillStubs1/ - Verify compilation - Unity should auto-compile with no errors
- Test a skill - The converted skills are now ready to use!
Need Help?
- See
convert_skills_HOW_TO_USE.mdfor detailed documentation - Check Python installation:
python --version(should be 3.6+) - Verify paths in
convert_all_skills.batmatch your setup
Troubleshooting
"Python not found"
- Install Python from https://www.python.org/
- Make sure "Add Python to PATH" is checked during installation
"File not found"
- Check paths in the command match your folder structure
- Use quotes around paths with spaces
"Permission denied"
- Close Unity/Visual Studio
- Run as Administrator
Pro Tips
✨ Use --stubs for batch conversion - it's the smartest option!
✨ Test with --ids 1,2,3 before converting hundreds of skills
✨ Backup your Unity project before large conversions
✨ The tool is safe to run multiple times (overwrites old files)