WO2WO2
edited June 2023 in ORK Support
I've been trying to build an outfit/costume system using separate non-contributing equipment. The idea is there is a "head" and a "body" slot that enables/disables the prefab's body/head to match the selected outfit rather than a more indepth visual equipment system with gloves/boots etc. (Dragon Quest 11 has a similar system.)

image

Here is a crude prototype:
image

I don't think I can use the conditional prefabs for a combatant because I want to have a modifiable head for hairstyle/hat options for example. I considered using the equipment viewer component but I think that might be more difficult since it's not adding gloves to a model I want to replace an entire body (or head).

I created a test prefab made of different coloured spheres and cubes to represent different "costumes" and used the Game Object Manager component to enable/disable them based on whether the relevant equipment was equipped by the user. This works and the costumes are toggled correctly within the scene.

However the costume equipment menu's prefab view portrait no longer displays the combatant's prefab. It works fine with other combatants who don't have any costume/game object manager set up but it does not show combatants who do. The prefab view prefabs are spawned in the world under DontDestroyOnLoad but every component is disabled by the Game Object Manager.
image

The Game Object Manager is set up to use the User from the equipment menu.
image

Setting the game object to target does nothing. Setting the game object to player naturally only works when the combatant is in slot 1.

I tried using SelectedData using a schematic on opening the equipment menu to store the selected combatant and added that as a requirement to display the costume.
image

This results in the portrait prefab menu showing the combatant but them being invisible outside of the menu so I'm not sure that's the best approach and might create issues later.
image

I could use conditional prefabs under the combatants but that would necessitate a lot of items to represent the different combinations of hair/hat and bodies and I would rather do it dynamically if possible.

The set up I have using Game Object Manager should suit all my needs the only problem it has is that the equipment menu where you would switch out different costumes does not show a preview of the combatant because the prefab view portrait (which works correctly for other combatants) isn't sure who the user is. I'm not sure how to fix this without causing further issues.

Thank you.
Post edited by WO2 on
  • Why nut just use the regular Equipment Viewer setup?
    That handles displaying the equipment for you.

    Also, your costume equipment's equipment slot setup (e.g. via the template) can block equipment viewers of other equipment slots - e.g. if the body costume is equipped, it can block the 'real' body equipment viewer to not show both at the same time.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • WO2WO2
    edited June 2023
    Sorry for the late reply, busy weekend.

    I'll experiment more with equipment viewers and see if I can get them to work. Thanks for the reply.
    Post edited by WO2 on
Sign In or Register to comment.