Getting Started
Create a feature branch
feature/add-xyzfor new featuresfix/resolve-abcfor bug fixesrefactor/improve-xyzfor refactoring
Set up your development environment
Follow the Building Dalamud guide to ensure your environment is properly configured.
Code Standards
C# Coding Style
Dalamud uses StyleCop.Analyzers for code quality enforcement.- Use meaningful names for variables, methods, and classes
- Follow C# naming conventions (PascalCase for public members, camelCase for private)
- Enable nullable reference types (
<Nullable>annotations</Nullable>or<Nullable>enable</Nullable>) - Use XML documentation comments for public APIs
- Unsafe code is allowed where necessary (
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>)
Code Analysis
Dalamud enforces code analysis rules:C++ Coding Style
For native components (Dalamud.Boot, DalamudCrashHandler):- Use C++23 standard (
<LanguageStandard>stdcpp23</LanguageStandard>) - Follow modern C++ practices
- Use precompiled headers where appropriate
- Target x64 platform only
- Use Unicode character set
Testing Requirements
Writing Unit Tests
Dalamud uses xunit v3 for testing:Dalamud.Test/ExampleTest.cs
Running Tests
Pull Request Process
Commit your changes
Write clear, descriptive commit messages:Commit message prefixes:
feat:- New featuresfix:- Bug fixesrefactor:- Code refactoringtest:- Test additions/changesdocs:- Documentation updateschore:- Maintenance tasks
Open a Pull Request
- Go to the Dalamud repository
- Click “New Pull Request”
- Select your fork and branch
- Fill out the PR template with:
- Clear description of changes
- Related issue numbers (if applicable)
- Testing performed
- Screenshots (for UI changes)
API Compatibility
All PRs are automatically checked for API compatibility using Microsoft.DotNet.ApiCompat.Tool:Dalamud.dllFFXIVClientStructs.dllLumina.dllLumina.Excel.dll
- Discuss in an issue first
- Document the breaking change clearly
- Provide migration guidance
- Update the changelog
Documentation
XML Documentation Comments
All public APIs must have XML documentation:Documentation Files
When adding major features, update:- API documentation (if applicable)
- README.md (for user-facing changes)
- Changelog (via GitHub release notes)
Submodule Updates
Key submodules:lib/FFXIVClientStructs- Game structure definitionslib/Lumina.Excel- Game data readinglib/TsudaKageyu-minhook- Hooking library
Code of Conduct
Community Standards
- Be respectful and constructive
- Focus on the technical merits of contributions
- Welcome newcomers and help them learn
- Report inappropriate behavior to maintainers
Review Process
- Expect feedback and iteration on your PR
- Respond to review comments promptly
- Be open to suggestions and alternative approaches
- Maintainers may request changes or additional tests
Special Considerations
Security
If you discover a security vulnerability:- Do not open a public issue
- Report privately to the maintainers via Discord
- Wait for acknowledgment before public disclosure
Game Updates
Dalamud must be updated when FFXIV patches:- Structure offsets in FFXIVClientStructs
- Function signatures for hooks
- Game data changes for Lumina
Performance
Be mindful of performance:- Avoid allocations in hot paths
- Use object pooling for frequently allocated objects
- Profile changes that affect core game loops
- Consider using
stackallocfor small temporary buffers
Resources
Building Dalamud
Set up your build environment
Testing
Learn about testing approaches
Discord Server
Join the developer community
GitHub Issues
Report bugs or request features
Getting Help
If you need assistance:- Check existing documentation and issues
- Ask in the Discord server #dev channel
- Open a discussion on GitHub for design questions
- Ping maintainers in your PR if you’re stuck