Placeholders/Dummy Ids
Learn about our 'Placeholders/Dummy Ids' Feature
Last updated
Learn about our 'Placeholders/Dummy Ids' Feature
Last updated
The Placeholders/Dummy IDs feature in Durty Cloth Tool is a powerful tool that allows users to add non-functional or placeholder items into the project. These placeholders are useful for preserving item order or reserving specific drawable ID slots for future items, ensuring that your project’s structure remains intact during development.
Preserve Order: In some cases, you might not yet have a specific drawable or texture ready for use, but you still need to maintain the overall item structure. By inserting placeholders, you ensure that the drawable ID numbers or texture variations do not shift or change later when the actual content is added.
Reserving IDs for Future Content: If you're working on a clothing pack or preparing for a large update, you can use placeholders to reserve drawable IDs or texture slots. This helps you manage how future content fits into your project without disrupting the existing content.
Buffer for Game Updates: On game updates all cloth items and their drawable ids are pushed back by the amount of clothes added by the update. By using placeholders, you can build a buffer of placeholder for each drawable type which can be removed on game updates in order to compensate a possible shift of the drawable ids.
Using the placeholder/dummys is not recommended for buffer purposes as it can quickly use up all available drawable slots per cloth resource. Read below for more information.
While placeholders can be useful in certain situations, it is not recommended to rely on them to create a large buffer of reserved IDs for future game updates.
For developers aiming to build a long-term and sustainable solution, the recommended approach would be to engineer a proper clothing shop system that doesn't rely on absolute drawable IDs. Instead of saving the absolute drawable ID directly for character clothing, developers can:
Abstract Drawable IDs: Create a system that stores an abstracted number or identifier instead of the actual drawable ID. This abstracted number represents the clothing item, but it is not tied directly to the game's drawable ID system.
Mapping System: Implement a mapping layer that converts the abstracted number to the real absolute drawable ID. This mapping can be adjusted as needed for each game update. The abstracted number would remain unchanged in the character's clothing data, while the mapping layer would ensure that the correct drawable ID is loaded.
Simplified Game Updates: With this system, developers only need to update the mapping layer each time a game update occurs, rather than having to reorganize or remap the entire drawable system. This provides flexibility and scalability without having to rely on placeholders or fixed ID buffers.
By developing a more abstracted and dynamic system, developers can ensure that the clothing system remains robust and adaptable to future game updates without needing to manage reserved ID slots manually.
Placeholders are handled like any other drawable or texture in Durty Cloth Tool, but they are marked specifically as placeholders, which means they won’t have actual visual or functional content in the game.
Dummy IDs: When you add a reservation dummy, the tool assigns a dummy ID to the slot. This ID acts like a real drawable ID or texture variation but doesn't link to any actual model or texture.
Visual Representation: Placeholders are visible and marked as "(dummy)" within the tool itself, ensuring that cloth maintainer knows a particular slot or ID is reserved for future use.
Using the Add Dummy Feature: When opening the "Add Female" or "Add Male" dropdowns, the tool provides an "Add Reservation Dummy" option, allowing you to insert a placeholder directly into the drawables list.
Automatic Placeholder Insertion: Instead of completely removing a deleted cloth drawable, it can instead automatically be replaced with an placeholder to preserve drawable order. This can be enabled in the Project Settings.
Replacing Placeholders: You can easily swap a placeholder for the real drawable or texture file by replacing the dummy content with the final cloth drawable or texture.
Plan Ahead: When working with large projects or clothing packs, it's a good idea to reserve ID slots for any items that might come later. This avoids the hassle of renumbering or reorganizing drawables when new content is added.
Keep Track: Make sure to document where and why placeholders are used within your project, by giving them a meaningful name. Clearly marking them within your cloth project ensures that you self or collaborators know which items are reserved for future use.
By using Placeholders/Dummy IDs effectively, you can maintain the integrity of your project’s structure while allowing for flexibility and future growth. This feature ensures that Durty Cloth Tool remains an essential utility for developers working on complex cloth projects or clothing resources, especially in scenarios where item ordering and ID management are crucial.