Skip to content

[Graphics] Adds Custom Equipment#3932

Closed
Patrick12115 wants to merge 26 commits intoHarbourMasters:developfrom
Patrick12115:Custom-DLists
Closed

[Graphics] Adds Custom Equipment#3932
Patrick12115 wants to merge 26 commits intoHarbourMasters:developfrom
Patrick12115:Custom-DLists

Conversation

@Patrick12115
Copy link
Contributor

@Patrick12115 Patrick12115 commented Feb 13, 2024

Adds Display Lists and patching for custom equipment to separate them from the hand model and separating the swords, sheaths, and shields to be independent of each other.

Known quirk is that both a Custom Shield and Sword/Sheath must be present or it will revert to the vanilla DL, because I can't just patch one and not everything will be loaded properly. i.e. If you have just a custom Master Sword, but no custom Hylian Shield, it would not be able to render a shield at all, because I can't patch into vanilla shield DL's, especially if another mod is being used. So one of each must be present.

Asset Guide for new custom DL's provided by DanaTheElf
https://docs.google.com/spreadsheets/d/1rOTt_7Wr0OGfMR9tHom8dDOooM3rUocz9xi7axpR0sY/edit#gid=556482990

Alt Assets Template with OTR, Blender Files, and unpacked files for the custom DL's provided by DanaTheElf
Alt_Equip_Template.zip

Build Artifacts

Cleaned up and added rest of the equipment
Have all DL's added, but Deku Shield with Adult Sheaths will not scale like it usually does.
Also moved checkbox to under Alt Assets
@skilarmbabcock
Copy link

This is awesome! Are the skeletons for separate tunic that are in the assets guide thing implemented or is this just swords/shields? Also does this work out of the box or is there a toggle you have to have in SoH clicked?

@inspectredc
Copy link
Member

This is awesome! Are the skeletons for separate tunic that are in the assets guide thing implemented or is this just swords/shields? Also does this work out of the box or is there a toggle you have to have in SoH clicked?

The separate tunics are in this PR #3306 although I need to get around to resolving merge stuff for it

@skilarmbabcock
Copy link

Epic! I'll give it a go with my TP Link outfits I did a few years back. Are they in separate folders? How does it work? I see the skeleton names and stuff, but I thought I'd ask in case it doesn't go in the same place

@inspectredc
Copy link
Member

Epic! I'll give it a go with my TP Link outfits I did a few years back. Are they in separate folders? How does it work? I see the skeleton names and stuff, but I thought I'd ask in case it doesn't go in the same place

I believe all that's needed is to export them with the paths listed, so for example for kokiri tunic, what you would normally export to objects/object_link_boy/gLinkAdultSkel, you would want to export to objects/object_link_boy_kokiri/gLinkAdultKokiriTunicSkel

I do, however, need to actually make a commit to the branch since the builds have expired it seems... I'll try and sort that out tomorrow

@Patrick12115 Patrick12115 marked this pull request as draft May 10, 2024 03:30
@Patrick12115 Patrick12115 marked this pull request as ready for review October 30, 2024 04:23
@Patrick12115
Copy link
Contributor Author

Taking this out of Draft as I think it is ready for review and testing. The crashes seem to be fixed and hopefully all equipment combinations are accounted for. The combination that doesn't seem to work is Child Link with just Master Sword/BGS/Giants Knife, which I believe to be the same issue as issue #4496 as this relies on patching and unpatching certain vanilla DL's and in this instance, in vanilla there is no Sheath DL on Child Links back to patch over.

@Malkierian
Copy link
Contributor

I don't know if I'm familiar enough with the system to provide any meaningful feedback on this myself, but this will definitely be a priority for me. Feel free to make a playtest post in soh-threads if you think that will help get feedback.

@Patrick12115
Copy link
Contributor Author

I'll get one set up tomorrow. Certainly more testing will be nice, I'm bound to have missed something that I forgot to check or recheck after making changes. I'll also see if some of the modders are willing to try out making the custom DL's.

@Patrick12115
Copy link
Contributor Author

Patrick12115 commented Jan 26, 2025

uint8_t ResourceMgr_FileExists(const char* resName) seems to be causing parts of this code not to work anymore since I merged in develop recently. It worked back on Oct 30th. Not sure what has changed with it or if there is a good alternative to use instead, but as of now, this PR is not functioning properly as I don't know how to fix this. If anyone has any insight or suggestions, that would help. Also crashes when toggling Alt Assets off. I have not looked into why this is happening yet

@Malkierian
Copy link
Contributor

Malkierian commented Jan 27, 2025

Will require a LUS bump with the fix in Kenix3/libultraship#801

@Malkierian Malkierian added do not merge Not ready or not valid changes and removed do not merge Not ready or not valid changes labels Jan 27, 2025
@Malkierian
Copy link
Contributor

LUS PR has been merged and the SoH reference bumped. Go ahead and rebase and then see if you can figure out the alt assets crash thing.

@Patrick12115
Copy link
Contributor Author

Pushed up fix for alt toggling. Not sure if its the right way to go about it, but it's the only way I could get to work. Still having very random crashes as stated here https://discord.com/channels/808039310850130000/1019824570938699798/1333963499365339266 but have no idea if these are do to my changes or not and I just don't have the understanding of visual studios or most of this GFX code to understand what is actually happening. So I will probably step back from this for a while. If anyone is wanting to test it, it's important to try and test things with Show Age-Dependent Equipment, as that does its own patching at times and may be part of the random crashes. I just simply don't know enough to debug this any further.

@Malkierian
Copy link
Contributor

Does it need to be in both places, or would just the hook be enough?

@Patrick12115
Copy link
Contributor Author

Does it need to be in both places, or would just the hook be enough?

In regards to what?

@Malkierian
Copy link
Contributor

The function call. When you removed it from the callback section of the alt assets toggle, you added it both to a new OnAltAssetsChange hook as well as the prevAltAssets block in OTRGlobals. It seems redundant, I just wanted to make sure it needed to be in both places.

@Patrick12115
Copy link
Contributor Author

The function call. When you removed it from the callback section of the alt assets toggle, you added it both to a new OnAltAssetsChange hook as well as the prevAltAssets block in OTRGlobals. It seems redundant, I just wanted to make sure it needed to be in both places.

Yeah, if I remove one or the other I get a crash. Removing or keeping it in SohMenuBar seemed to have no affect. There's probably a better way of handling it, I just don't know it.

@Malkierian
Copy link
Contributor

That is so weird. With them being called so close together, it doesn't make sense that it needs to be called twice.

@Patrick12115
Copy link
Contributor Author

Patching stuff is weird. I just trial and error until it works

@serprex
Copy link
Contributor

serprex commented Jan 3, 2026

replaced by #6062

@serprex serprex closed this Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants