Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions HOW_TO_ADD_SPECIES_PREVIEW_ICONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# How to Add Species Preview Icons

## Overview
The species selection UI now supports preview images for each species. This guide explains how to create and add these preview icons.

## Creating the Icon File

### 1. Create a DMI file
You need to create a file at: `icons/mob/species_previews.dmi`

### 2. Generate Species Preview Images
For each species, you'll need to create preview images. Here are some methods:

#### Method A: In-Game Screenshots
1. Join the game as an admin
2. Spawn a character of each species using the character editor
3. Take screenshots of each species in a neutral pose
4. Crop and resize the images to 200x200 pixels

#### Method B: Character Editor Export
1. Use the character editor to create various characters
2. Export their appearance
3. Compile the images into icon states

### 3. Icon State Naming Convention
Each species should have an icon state matching their species ID:
- `human` - Human preview
- `sarathi` - Sarathi (Lizardperson) preview
- `elzuose` - Elzuose preview
- `elzuose_digi` - Elzuose Digitigrade preview
- `jelly` - Jellyperson preview
- `luminescent` - Luminescent Jellyperson preview
- `slime_person` - Slimeperson preview
- `stargazer` - Stargazer preview
- `ashwalker` - Ashwalker preview
- `kobold` - Kobold preview
- `moth` - Mothperson preview
- `kepori` - Kepori preview
- `vox` - Vox preview
- `rachnid` - Rachnid preview
- `ipc` - IPC preview
- `plasmaman` - Plasmaman preview
- `pod` - Podperson preview
- `skeleton` - Skeleton preview
- `snail` - Snailperson preview

### 4. Updating Species Definitions
After creating the icon file, update each species datum to use their preview:

```dm
/datum/species/elzuose
name = "\improper Elzuose"
id = SPECIES_ELZUOSE
species_preview_icon = 'icons/mob/species_previews.dmi'
species_preview_icon_state = "elzuose"
// ... rest of the species definition
```

**Important:** Make sure:
- The file path is correct (e.g., `'icons/mob/species_previews.dmi'`)
- The icon state name matches exactly what you named it in the DMI file
- Both `species_preview_icon` and `species_preview_icon_state` are set

### 5. Example for Multiple Species

```dm
/datum/species/human
species_preview_icon = 'icons/mob/species_previews.dmi'
species_preview_icon_state = "human"

/datum/species/lizard
species_preview_icon = 'icons/mob/species_previews.dmi'
species_preview_icon_state = "sarathi"

/datum/species/jelly
species_preview_icon = 'icons/mob/species_previews.dmi'
species_preview_icon_state = "jelly"

/datum/species/jelly/luminescent
species_preview_icon = 'icons/mob/species_previews.dmi'
species_preview_icon_state = "luminescent"
```

## Subspecies Support

The system now fully supports subspecies! These are the current subspecies:

### Sarathi (Lizardpeople)
- **Base**: Standard Sarathi
- **Ashwalker**: Tribal lizardpeople with digitigrade legs
- **Kobold**: Smaller lizardpeople

### Jellyperson
- **Base**: Standard Jellyperson
- **Luminescent**: Glowing jellypeople that can use slime cores
- **Slimeperson**: Jellypeople that can split into multiple bodies
- **Stargazer**: Telepathic jellypeople

### Elzuose
- **Base**: Standard Elzuose
- **Digitigrade**: Elzuose with digitigrade legs (NEW!)

## Temporary Placeholder
Until preview icons are created, the UI will display a placeholder message:
"Preview Not Available (You can add species preview icons!)"

## Tools Recommended
- **GIMP** or **Photoshop** for image editing
- **Dream Maker Icon Editor** for creating/editing DMI files
- **SpriteMaker** or similar tools for assembling sprites

## Image Requirements
- **Size**: Recommended 200x200 pixels
- **Format**: PNG with transparency
- **Style**: Character should be centered, facing forward
- **Background**: Transparent

## Testing
After adding icons:
1. Build the project
2. Join the game
3. Open Character Setup → Species Selection
4. Verify that preview images appear correctly
5. Test subspecies selection to ensure it works smoothly

## Notes
- The current implementation uses a fallback to show "Preview Not Available" if icons aren't set
- You can generate multiple variations of each species and create a system to randomize which preview is shown
- Consider adding different poses or color variations for variety
159 changes: 159 additions & 0 deletions PREFERENCES_UI_MODERNIZATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Character Preferences UI Modernization

## Overview
Completely modernized the character preferences UI to match the clean, modern theme created for the species selection system, with additional improvements for better usability and visual appeal.

## Phase 1: Initial Modernization

### 1. Visual Styling
- **Color Scheme**: Applied modern dark theme (#1a1a1a background, #4a9eff accent colors)
- **Typography**: Modern font stack with better readability
- **Spacing**: Improved padding and margins throughout
- **Borders**: Rounded corners and subtle borders for depth

### 2. Tab Navigation
- **Modern Tab Design**: Gradient backgrounds, hover effects, active states
- **Visual Feedback**: Clear indication of current tab with shadow effects
- **Responsive Layout**: Flexbox layout that wraps on smaller screens

### 3. Character Slot Selection
- **Grid Layout**: Clean grid display replacing the old line-break system
- **Hover States**: Visual feedback when hovering over slots
- **Active State**: Bold, highlighted active character slot
- **Consistent Styling**: Uniform appearance across all tabs

### 4. Button Styling
- **Action Buttons**: Gradient blue buttons for primary actions
- **Hover Effects**: Smooth transitions and shadow effects
- **Consistent Design**: All buttons now use the same modern style

### 5. Section Organization
- **Section Backgrounds**: Dark panels with rounded corners
- **Better Headers**: Color-coded h2 and h3 tags with bottom borders
- **Notice Styling**: Special styling for notification messages

### 6. Window Sizing
- **Initial Size**: Window size updated from 640x825 to 900x700
- **Better Proportions**: Wider layout provides more horizontal space
- **Improved Readability**: Less cramped appearance

## Phase 2: Advanced Improvements

### 7. Bubble-Box Sections (Character Setup)
- **Identity Section**: Wrapped in modern `.info-section` bubble box
- Organized rows with labels and values
- Styled action buttons for randomization
- Clean layout for special names and job preferences

- **Clothing Section**: Wrapped in modern `.info-section` bubble box
- Consistent label/value pairs
- Fixed-width option buttons
- Professional appearance

### 8. Lock/Unlock Icon System
- **Visual Icons**: Replaced "Lock"/"Unlock" text with lock emoji icons
- 🔒 (🔒) for locked state
- 🔓 (🔓) for unlocked state

- **Color Coding**:
- **Locked**: Red background (#4a2a2a), red border (#ff4444), red text (#ff6666)
- **Unlocked**: Green background (#2a4a2a), green border (#44ff44), green text (#66ff66)

- **Applied to**:
- Underwear, Undershirt, Socks (and their colors)
- Skin tone
- Eye color
- Hairstyle and hair color
- Facial hairstyle and facial hair color
- Horns
- Kepori feathers

### 9. Fixed-Width Buttons
- **Problem Solved**: Buttons no longer resize based on content
- **`.option-button` class**: Min-width of 150px for consistency
- **Applied to**:
- Name selection
- Gender selection
- Age selection
- All species customization options (underwear, hairstyle, etc.)
- Clothing options (backpack, jumpsuit, etc.)

### 10. Arrow Buttons for Navigation
- **`.arrow-button` class**: Compact 25px width buttons
- **Styled Arrows**: < and > for previous/next navigation
- **Applied to**:
- Hairstyle selection (previous/next)
- Facial hairstyle selection (previous/next)

### 11. Increased Window Width
- **Final Size**: 1050px × 750px (up from 900×700)
- **Reason**: Better accommodation for the appearance tab's extensive content
- **Result**: More breathing room for all elements

## Technical Details

### Modified File
- `code/modules/client/preferences.dm`

### New CSS Classes Added
- `.info-section` - Bubble-box containers for Identity/Clothing
- `.info-row` - Individual rows within bubble sections
- `.info-label` - Labels for settings (min-width: 200px)
- `.lock-button` - Base class for lock/unlock buttons
- `.lock-button.locked` - Red styling for locked state
- `.lock-button.unlocked` - Green styling for unlocked state
- `.option-button` - Fixed-width buttons (min-width: 150px)
- `.arrow-button` - Compact arrow navigation buttons (width: 25px)
- `.appearance-grid` - Grid layout for appearance sections (planned)
- `.appearance-column` - Column containers (planned)
- `.appearance-item` - Individual items in columns (planned)

### Affected Sections
**Character Setup Tab**:
- ✅ Outfit Preview Settings (bubble-box styling)
- ✅ Quirk Setup (bubble-box styling)
- ✅ Identity (complete bubble-box redesign)
- ✅ Clothing (complete bubble-box redesign)

**Character Appearance Tab**:
- ✅ Body section (fixed-width buttons, lock icons)
- ✅ Underwear/Undershirt/Socks (lock icons, fixed-width)
- ✅ Skin Tone (lock icons, fixed-width)
- ✅ Eye Color (lock icons)
- ✅ Hairstyle (arrow buttons, lock icons, fixed-width)
- ✅ Hair Gradient (existing styling maintained)
- ✅ Facial Hairstyle (arrow buttons, lock icons, fixed-width)
- ✅ Horns (lock icons, fixed-width)
- ✅ Kepori Feathers (lock icons, fixed-width)

**All Tabs**:
- ✅ Tab navigation
- ✅ Character slot selection
- ✅ Bottom action buttons (Undo, Save, Reset)

## Build Status
- ✅ Build successful (0 new errors)
- ✅ All pre-existing errors remain unchanged
- ✅ No warnings generated from changes

## Visual Improvements Summary
1. ✅ Modern, cohesive design language across all tabs
2. ✅ Better visual hierarchy with bubble sections
3. ✅ Improved user experience with color-coded lock icons
4. ✅ Consistent button widths prevent layout shifts
5. ✅ Professional, clean appearance
6. ✅ Enhanced readability and navigation
7. ✅ Intuitive visual feedback (red=locked, green=unlocked)
8. ✅ Larger window accommodates content better

## User-Requested Improvements ✅
- ✅ **Identity & Clothing bubble boxes**: Implemented with `.info-section` styling
- ✅ **Lock icon replacement**: 🔒/🔓 with red/green color coding
- ✅ **Fixed button widths**: No more resizing hairstyle buttons
- ✅ **Wider window**: Increased to 1050px to accommodate content

## Next Steps (Optional Future Enhancements)
- Consider implementing grid-based column layout for appearance tab
- Add visual separators between major sections
- Implement collapsible sections for species-specific features
- Add tooltips for lock buttons explaining randomization
75 changes: 75 additions & 0 deletions SPECIES_UI_FIXES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Species Selection UI - Fixes Applied

## Issues Fixed

### 1. ✅ White Hover Text Problem
**Issue:** When hovering over species names in the left panel, the text turned white and became unreadable.

**Fix:** Added explicit CSS rules to force white text color on links inside species items:
```css
.species-item a { color: #fff !important; }
.species-item:hover a { color: #fff !important; }
.species-item.selected a { color: #fff !important; }
```

### 2. ✅ Duplicate Button Under "Done"
**Issue:** Buttons were wrapped in anchor tags (`<a><button></button></a>`), causing display issues with overlapping clickable areas.

**Fix:** Replaced button elements with styled anchor tags:
- **Before:** `<a href='...'><button>Text</button></a>`
- **After:** `<a href='...' style='display: inline-block; padding: 10px 20px; ...'>Text</a>`

This eliminates the nested structure and provides clean, clickable links styled as buttons.

### 3. ✅ Missing Subspecies Options
**Issue:** Subspecies weren't showing up in the UI because they needed to be in the `ROUNDSTART_RACES` config to be detected.

**Fix:** Changed the subspecies detection logic in `generate_selectable_species()`:
- **First pass:** Build the subspecies list from ALL species (not just roundstart eligible ones)
- **Second pass:** Add only non-subspecies roundstart eligible species to the main list

This means subspecies are now automatically available whenever their parent species is enabled, without needing separate config entries.

## What This Means

### For Jellyperson:
When you select Jellyperson, you'll now see subspecies options:
- ✅ Standard Jellyperson
- ✅ Luminescent (glowing, can use slime cores)
- ✅ Slimeperson (can split into multiple bodies)
- ✅ Stargazer (telepathic)

### For Sarathi (Lizardpeople):
When you select Sarathi, you'll see:
- ✅ Standard Sarathi
- ✅ Ash Walker (tribal, digitigrade)
- ✅ Kobold (small lizardpeople)

### For Elzuose:
When you select Elzuose, you'll see:
- ✅ Standard Elzuose
- ✅ Digitigrade Elzuose (brought back!)

## Testing the New UI

1. **Start the game** and open Character Setup
2. **Click on the Species tab**
3. **Select a species** with subspecies (Jellyperson, Sarathi, or Elzuose)
4. **Look for the "Subspecies Variants" section** in the right panel
5. **Click on different subspecies** to preview them
6. **Select your preferred variant** and click "Select This Species"

## Build Status
✅ **Build Successful**
- 0 errors
- 0 warnings
- All systems operational

## Future Enhancements

To complete the visual overhaul, you can add species preview icons:
1. Create `icons/mob/species_previews.dmi`
2. Add icon states for each species (see HOW_TO_ADD_SPECIES_PREVIEW_ICONS.md)
3. Update species datums to reference their preview icons

The UI is already set up to display them once you add the icons!
2 changes: 1 addition & 1 deletion check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ standards:

- exactly:
[
265,
264,
"non-bitwise << uses",
'(?<!\d)(?<!\d\s)(?<!<)<<(?!=|\s\d|\d|<|\/)',
]
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
#define SPECIES_CORPORATE "corporate"
#define SPECIES_DULLAHAN "dullahan"
#define SPECIES_ELZUOSE "elzuose"
// PENTEST ADDITION - Elzuose digitigrade subspecies - Temp removal for now I want to get the others working - Ossa
//#define SPECIES_ELZUOSE_DIGI "elzuose_digi"
// PENTEST ADDITION END
#define SPECIES_FLYPERSON "fly"
#define SPECIES_HUMAN "human"
#define SPECIES_IPC "ipc"
Expand Down
Loading
Loading