Custom Lineage Size: Pick Small Or Medium In Wizard!

by Admin 53 views
Custom Lineage Size: Pick Small or Medium in Wizard!

Hey everyone! Let's dive into a little quirk we've found with Custom Lineages in our character builder, and how we're planning to fix it up. You know how with Custom Lineages, you get to decide if you want to be Small or Medium? Well, it turns out our system hasn't been letting you make that awesome choice directly in the character wizard. It's a bit of a bummer when you're trying to get your character just right, and the size is a pretty big deal, right? We're going to break down what's happening, what we expect to happen, and how we're going to make this happen, so you guys can get back to creating those epic characters with all the options you deserve!

What's Happening Right Now: The Size Surprise!

So, here's the lowdown on the current situation, guys. When you create a Custom Lineage character, the system automatically defaults to Medium size. We've checked the API, and it's spitting out size: { code: "M", name: "Medium" }. What's also happening is that this crucial size_choice field is coming back as null. This means that even though the trait description itself correctly tells you, "You are Small or Medium (your choice)," the character wizard, the place where you actually build your character step-by-step, isn't giving you the option to pick. There's no pending choice being generated for you to select your preferred size. It's like being told you can have chocolate or vanilla ice cream, but then only being handed a scoop of chocolate without asking! We know how important those little details are when you're bringing your character to life, and this oversight is definitely something we want to iron out. This affects the player's experience by limiting their agency and potentially leading to characters that don't feel quite right from the start. We're all about giving you the tools to create your perfect character, and that includes having control over fundamental aspects like size.

What We Want to Happen: Your Size, Your Way!

This is where the magic happens, folks! Our goal is to make sure that when you're building a Custom Lineage character, the process is as smooth and intuitive as possible. We want the system to recognize that your Custom Lineage has a size option. So, here's the dream scenario: first off, on the backend, we need our systems to be smart enough to parse that specific trait description – the one that says "Small or Medium (your choice)." Once it figures that out, it should generate what we call a size type pending choice. This pending choice will then present you with the actual options: Small and Medium. Think of it like a little prompt popping up, asking, "Hey, you're a Custom Lineage! Do you want to be Small or Medium?"

Secondly, on the frontend, which is what you guys see and interact with in the character wizard, we need to display this choice. When the backend flags that there's a size selection available, the wizard should show it. This will likely appear as a simple set of radio buttons or a toggle switch right there in the race selection step, letting you click on either "Small" or "Medium." It's all about making the choice visible and accessible. Finally, once you've made your selection, whether it's Small or Medium, that choice needs to be correctly saved and reflected on your character sheet. When you look at your completed character's details, it should clearly state the size you picked. This ensures that your character's stats, descriptions, and any other relevant information are all aligned with your chosen size. It’s all about closing the loop and making sure your decision carries through the entire character creation process and beyond!

Getting Technical: The Nitty-Gritty Details

Alright, let's get a little bit nerdy for those of you who are curious about the mechanics behind the scenes, or for our dev buddies out there! On the backend, specifically within the PendingChoiceGenerator, we're going to implement some logic similar to how we handle choices for ability scores when they're granted by race modifiers. The key here is detecting a specific pattern in the text of the Size trait. We'll be looking for that phrase, "Small or Medium (your choice)," or something very close to it. Once this pattern is identified, the generator will create a new pending choice object. This object will have its type set to "size", and it will include two distinct options: one for "Small" and one for "Medium." This way, the system knows there's a size decision to be made and what the available options are.

Moving over to the frontend, we need to update the useUnifiedChoices hook. This hook is pretty central to how we handle various choices in the character wizard. We'll add specific handling for the new "size" type. When the wizard receives a pending choice of type "size", it will know to display the appropriate UI elements. In the StepRace component, which is where race selection typically happens, we'll introduce either radio buttons or a toggle for the user to select between "Small" and "Medium." Once the player makes their selection, this choice will be submitted back to the server using the unified choice API. This ensures that the data flows correctly from your click all the way to being stored with your character. It’s a pretty standard flow for handling these kinds of conditional options, and we're confident it will make the character creation process feel much more complete and intuitive for Custom Lineage players. We're basically teaching the wizard to recognize and present this specific choice, making it just as easy as picking your character's name or class!

Ties to Other Awesome Stuff

This fix isn't happening in a vacuum, guys! It's actually related to some other bits and pieces we've been working on. You might remember Issue #380, which was about enabling feature selections for Custom Lineages in general. This size choice is a perfect example of one of those features that needed a proper selection mechanism. By tackling this, we're building a more robust system for handling all sorts of choices that Custom Lineages might offer. Also, the Size trait itself, which has an ID of 296, is the source of this information. We're essentially improving how we interpret and utilize the data already present in that trait. So, think of this as refining our understanding of existing rules to make the character builder even better. It's all part of a bigger effort to make sure every aspect of character creation is as accurate and user-friendly as possible. We're connecting the dots here to ensure a cohesive and powerful building experience for all you Dungeon Masters and players out there!

How We'll Know We Nailed It: Acceptance Criteria

So, how do we know we've successfully implemented this awesome feature? We've got a checklist, our acceptance criteria, that tells us when we've hit the mark. First up, the backend needs to correctly parse the Size trait and generate that pending choice whenever a size is selectable. No ifs, ands, or buts – it needs to work! Second, the frontend must display this size choice clearly in the wizard. Players should see the option to pick Small or Medium without any confusion. Third, the selected size needs to be saved properly to the character. It's no good if the choice disappears after you make it! Fourth, the character sheet must accurately display the chosen size. When you look at your character's details, it should reflect your decision. And finally, this needs to work not just for Custom Lineages, but for any race that might have a size choice in the future. We're building this to be flexible and future-proof, so it can handle similar situations down the line. Once all these boxes are ticked, we know we've delivered a fantastic improvement that will make character creation even better for everyone. We're aiming for perfection here, guys, so you can build the best characters possible!

That's the plan, team! We're excited to get this implemented and give you all more control over your Custom Lineage characters. Happy adventuring!