# AI Images - Defs Documentation
This folder contains XML definition files that allow you to easily customize art styles and image size presets without recompiling the mod.
## Art Style Definitions (ArtStyleDefs.xml)
Art styles define how images should be generated, including prompts, quality tags, and negative prompts.
### Structure
```xml
ArtStyle_MyStyleDescription of the stylestyle keywords herethings to avoidadditional quality tagstruetrue100
```
### Fields
- **defName**: Unique identifier (must start with `ArtStyle_`)
- **label**: Display name shown in the UI
- **description**: Tooltip text explaining the style
- **positivePrompt**: Keywords added to the positive prompt (e.g., "photorealistic, 8k uhd")
- **negativePrompt**: Keywords added to the negative prompt (e.g., "cartoon, anime")
- **qualityTags**: Style-specific quality tags
- **addBaseQualityTags**: If true, adds "highly detailed, professional, masterpiece, best quality"
- **addBaseNegativePrompts**: If true, adds base negative prompts like "ugly, deformed, low quality"
- **sortOrder**: Determines order in the UI (lower numbers appear first)
### Example: Custom Watercolor Style
```xml
ArtStyle_WatercolorSoft watercolor painting stylewatercolor painting, soft colors, flowing paint, artisticphotograph, digital art, sharp edgestraditional art, paper texturetruetrue65
```
## Image Size Presets (ImageSizePresetDefs.xml)
Image size presets provide quick buttons for common image dimensions.
### Structure
```xml
Size_1024x102410241024Square30
```
### Fields
- **defName**: Unique identifier (should start with `Size_`)
- **label**: Display text on the button
- **width**: Image width in pixels
- **height**: Image height in pixels
- **category**: Grouping category (Square, Portrait, Landscape, or custom)
- **sortOrder**: Determines button order (lower numbers appear first)
### Example: Ultra-wide Size
```xml
Size_2048x102420481024Ultrawide95
```
## Adding Custom Definitions
1. **Create a new XML file** in the `Defs` folder
2. **Start with the XML header**:
```xml
```
3. **Add your definitions** using the structures above
4. **Restart RimWorld** to load the new definitions
## Tips
- Keep `defName` unique to avoid conflicts
- Use descriptive `label` values for the UI
- Adjust `sortOrder` to organize items logically
- Test your prompts with different characters to ensure good results
- For art styles, experiment with different combinations of tags
- Consider using existing styles as templates
## Compatibility
These definitions are compatible with other mods. If another mod adds art styles or size presets, they will all appear together in the UI.
## Troubleshooting
- **Style doesn't appear**: Check that `defName` is unique and starts with `ArtStyle_`
- **Size preset missing**: Verify the XML syntax and that `defName` starts with `Size_`
- **Prompts not working**: Make sure prompts are in English and follow Stable Diffusion prompt syntax
- **XML errors**: Use an XML validator to check your file for syntax errors