# Contributing Guidelines

Thank you for your interest in contributing to the OpenKotOR wiki! This document outlines the guidelines and standards for contributing to our documentation project.

## Getting Started

### Prerequisites
- Basic understanding of Markdown syntax
- Familiarity with KotOR file formats (helpful but not required)
- Git knowledge for version control

### Setting Up
1. Fork the repository
2. Clone your fork locally
3. Create a new branch for your contribution
4. Make your changes
5. Submit a pull request

## Documentation Standards

### File Organization
- All wiki content should be placed in the `wiki/` directory
- Use subdirectories to organize related content
- Follow the naming convention: `[a-z0-9\-]` (lowercase letters, numbers, and hyphens only)
- Use descriptive filenames that clearly indicate the content

### File Structure
```
wiki/
├── index.md
├── contributing-guidelines.md
├── file-types/
│   ├── index.md
│   ├── gff.md
│   ├── 2da.md
│   └── ...
├── modding-resources/
│   ├── index.md
│   ├── tutorials/
│   └── best-practices/
├── games/
│   ├── star-wars-knights-of-the-old-republic/
│   ├── star-wars-knights-of-the-old-republic-the-sith-lords/
│   └── ...
└── development-tools/
    ├── index.md
    └── parsers/
```

### Markdown Formatting

#### Headers
- Use `#` for main page titles
- Use `##` for major sections
- Use `###` for subsections
- Use `####` for minor subsections
- Don't skip header levels

#### Code Blocks
- Use triple backticks with language specification
- For file paths, use single backticks: `filename.ext`
- For inline code, use single backticks: `variable_name`

#### Tables
- Use proper table formatting with headers
- Align columns appropriately
- Include units and data types in descriptions

#### Lists
- Use `-` for unordered lists
- Use `1.` for ordered lists
- Use `**bold**` for emphasis
- Use `*italic*` for minor emphasis

### Content Guidelines

#### Technical Accuracy
- Verify all technical information before submitting
- Include source references when possible
- Test any code examples or procedures
- Update related documentation when making changes

#### Writing Style
- Use clear, concise language
- Write for both beginners and advanced users
- Include practical examples where helpful
- Use consistent terminology throughout

#### File Format Documentation
When documenting file formats, include:
- **Overview** - Brief description of the format's purpose
- **File Structure** - Detailed breakdown of the file layout
- **Data Types** - All supported data types and their specifications
- **Usage Examples** - Common use cases and applications
- **Tools** - Relevant tools for working with the format
- **Technical Notes** - Implementation details and gotchas

## Contribution Types

### New Documentation
- Create new files for undocumented file formats
- Add tutorials and guides
- Expand existing documentation
- Create index files for new sections

### Improvements
- Fix typos and grammatical errors
- Clarify confusing explanations
- Add missing information
- Improve formatting and structure

### Bug Fixes
- Correct technical errors
- Fix broken links
- Update outdated information
- Resolve formatting issues

## Pull Request Process

### Before Submitting
1. Ensure your changes follow the documentation standards
2. Test any code examples or procedures
3. Check for typos and formatting issues
4. Update any related documentation as needed

### Pull Request Description
Include:
- Brief description of changes
- Type of contribution (new docs, improvements, bug fixes)
- Any testing performed
- Screenshots for UI changes (if applicable)

### Review Process
- All submissions will be reviewed by maintainers
- Feedback will be provided for improvements
- Changes may be requested before merging
- Approval required from at least one maintainer

## Code of Conduct

### Be Respectful
- Use welcoming and inclusive language
- Be respectful of differing viewpoints
- Focus on what is best for the community
- Show empathy towards other community members

### Be Constructive
- Provide helpful feedback
- Suggest improvements rather than just pointing out problems
- Help others learn and grow
- Share knowledge and resources

### Be Professional
- Keep discussions focused on the project
- Avoid personal attacks or inflammatory language
- Respect others' time and contributions
- Follow the project's communication guidelines

## File Naming Convention

### Rules
- Use only lowercase letters (a-z)
- Use numbers (0-9) when appropriate
- Use hyphens (-) to separate words
- No spaces or special characters
- Keep names descriptive but concise

### Examples
- `gff-file-format.md` ✅
- `2da-array-format.md` ✅
- `modding-tutorials.md` ✅
- `GFF_Format.md` ❌
- `2DA Array Format.md` ❌
- `modding_tutorials.md` ❌

## Getting Help

### Questions
- Check existing documentation first
- Search for similar issues in pull requests
- Ask questions in the Discord server
- Create an issue for complex problems

### Resources
- [Markdown Guide](https://www.markdownguide.org/)
- [Git Documentation](https://git-scm.com/doc)
- [KotOR Modding Community](https://deadlystream.com/)

## Recognition

Contributors will be recognized in:
- The acknowledgments section of relevant documentation
- The project's contributor list
- Release notes for significant contributions

Thank you for contributing to the OpenKotOR wiki!
