ui changes for modularity and npc generation
This commit is contained in:
@@ -3,10 +3,22 @@ retry_prefix = "Previous attempts failed. Please try again and ensure you follow
|
|||||||
|
|
||||||
# NPC Generation Prompts
|
# NPC Generation Prompts
|
||||||
|
|
||||||
|
[description_from_name_and_level]
|
||||||
|
question = "Based on the name '{name}' and character level {level}, write a short description for this character."
|
||||||
|
constraints = "Respond with a descriptive paragraph (2-4 sentences). Do not include any other text or metadata."
|
||||||
|
|
||||||
[name]
|
[name]
|
||||||
question = "Based on the description, what is a fitting name for this character?"
|
question = "Based on the description, what is a fitting name for this character?"
|
||||||
constraints = "Respond with only the name."
|
constraints = "Respond with only the name."
|
||||||
|
|
||||||
|
[name_from_description_and_level]
|
||||||
|
question = "Based on the description {description} and level {level}, what is a fitting name for this character?"
|
||||||
|
constraints = "Respond with only the name."
|
||||||
|
|
||||||
|
[name_from_level]
|
||||||
|
question = "Based on the character level {level}, what is a fitting name for this character?"
|
||||||
|
constraints = "Respond with only the name."
|
||||||
|
|
||||||
[ability_score_modifier]
|
[ability_score_modifier]
|
||||||
question = "Based on the description, how would you rate the {modifierTier} ability score modifier for a level {level} character in {system}?"
|
question = "Based on the description, how would you rate the {modifierTier} ability score modifier for a level {level} character in {system}?"
|
||||||
constraints = "Respond with only a single word: Extreme, High, Moderate, or Low."
|
constraints = "Respond with only a single word: Extreme, High, Moderate, or Low."
|
||||||
|
|||||||
@@ -53,16 +53,24 @@ namespace finder2e_foundry_converter.ViewModels
|
|||||||
public ObservableCollection<string> Models { get; } = new();
|
public ObservableCollection<string> Models { get; } = new();
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
[NotifyPropertyChangedFor(nameof(IsNpcSelected))]
|
||||||
private string? _selectedCategory;
|
private string? _selectedCategory;
|
||||||
|
|
||||||
public ObservableCollection<string> Categories { get; } = new() { "NPCs" };
|
public ObservableCollection<string> Categories { get; } = new() { "NPCs" };
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private int _selectedLevel = 1;
|
||||||
|
|
||||||
|
public ObservableCollection<int> Levels { get; } = new();
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string _name = string.Empty;
|
private string _name = string.Empty;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string _description = string.Empty;
|
private string _description = string.Empty;
|
||||||
|
|
||||||
|
public bool IsNpcSelected => SelectedCategory == "NPCs";
|
||||||
|
|
||||||
public ObservableCollection<ImageItem> ImageItems { get; } = new();
|
public ObservableCollection<ImageItem> ImageItems { get; } = new();
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -77,6 +85,10 @@ namespace finder2e_foundry_converter.ViewModels
|
|||||||
public MainWindowViewModel()
|
public MainWindowViewModel()
|
||||||
{
|
{
|
||||||
// Load saved preferences would go here if we had a settings service
|
// Load saved preferences would go here if we had a settings service
|
||||||
|
for (int i = -1; i <= 24; i++)
|
||||||
|
{
|
||||||
|
Levels.Add(i);
|
||||||
|
}
|
||||||
_ = StartModelRefreshLoop();
|
_ = StartModelRefreshLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-27
@@ -48,38 +48,18 @@
|
|||||||
ItemsSource="{Binding Categories}"
|
ItemsSource="{Binding Categories}"
|
||||||
SelectedItem="{Binding SelectedCategory}"/>
|
SelectedItem="{Binding SelectedCategory}"/>
|
||||||
|
|
||||||
|
<StackPanel IsVisible="{Binding IsNpcSelected}" Spacing="10">
|
||||||
<Label Content="Name:"/>
|
<Label Content="Name:"/>
|
||||||
<TextBox Text="{Binding Name}" PlaceholderText="Enter name..."/>
|
<TextBox Text="{Binding Name}" PlaceholderText="Enter name..."/>
|
||||||
|
|
||||||
|
<Label Content="Level:"/>
|
||||||
|
<ComboBox HorizontalAlignment="Stretch"
|
||||||
|
ItemsSource="{Binding Levels}"
|
||||||
|
SelectedItem="{Binding SelectedLevel}"/>
|
||||||
|
|
||||||
<Label Content="Description:"/>
|
<Label Content="Description:"/>
|
||||||
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="100" PlaceholderText="Enter description here..."/>
|
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="100" PlaceholderText="Enter description here..."/>
|
||||||
|
</StackPanel>
|
||||||
<Label Content="Images:"/>
|
|
||||||
<ScrollViewer Height="180">
|
|
||||||
<ItemsControl ItemsSource="{Binding ImageItems}">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<WrapPanel />
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Grid Margin="5">
|
|
||||||
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="4" ClipToBounds="True">
|
|
||||||
<Image Source="{Binding Thumbnail}" Width="100" Height="100" Stretch="UniformToFill" />
|
|
||||||
</Border>
|
|
||||||
<Button Content="X"
|
|
||||||
Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).RemoveImageCommand}"
|
|
||||||
CommandParameter="{Binding}"
|
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
||||||
Background="#80000000" Foreground="White" Padding="5,2"/>
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
</ScrollViewer>
|
|
||||||
|
|
||||||
<Button Content="Select Image" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Click="SelectImage_Click"/>
|
|
||||||
|
|
||||||
<Button Content="Generate" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
<Button Content="Generate" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
||||||
Command="{Binding GenerateCommand}" FontWeight="Bold"/>
|
Command="{Binding GenerateCommand}" FontWeight="Bold"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user