Skip to content

Conversation

@Jepvid
Copy link
Contributor

@Jepvid Jepvid commented Jan 1, 2026

Used #3932 as base
Gonna update hooks once #6026 is merged Done

Commit history is wierd as i used github actions for building and debugging

Files

https://github.com/HarbourMasters/Shipwright/files/14305452/Alt_Equip_Template.zip

Download template mod file from this link and mess around

If you wish to make your own mod to test this

https://docs.google.com/spreadsheets/d/1rOTt_7Wr0OGfMR9tHom8dDOooM3rUocz9xi7axpR0sY/edit#gid=556482990

Export to the items to objects/object_custom_equip following Dana's spreadsheet

What this pr does

This PR implements object_custom_equip objects that adds more support to have items modified by modders without having to export with hands or do xml edits to load hands. This PR will make this autonomous if exported as a object_custom_equip.

This pr will also add non existing DisplayList for items that originally did not have a DisplayList. Longshot and Big Goron Sword Sheath is 2 examples

Summary of what I did

Changes make patching safe and idempotent when toggling Alt Assets and when mods overwrite assets.

Moved hooks to use ShipInit to work on the assets not loading issue.

New function made with help of chatgpt in order to protect vanilla assets from ever being unloaded.
Creates a runtime alt DisplayList by cloning the vanilla asset if no alt asset exist, enabling safe custom equipment patching.
Link to discord message explaining the reason why this function exist

ChatGPT was used during troubleshooting.

Important Info

From Pats PR

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.

Known Issues

  • Models ocassionally reverts back to normal assets Fixed with new hooks and ShipInit
  • sometimes when alt toggling vanilla assets unload completely Fixed by implementing a function to protect vanilla assets from unload shenanigans
  • when child Link is using adult items with Scale Adult Equiment As Child enabled. Hands get scaled down Not an issue from this pr. Is just part of what that cvar does, in order to make it proper with custom equipment a refactor of the cvar may be in order.
  • When child and swordless, if Link has a shield it will display master sword on the back with dekushield, working on a fix Fix implemented, tried my best for timeless support but there are some edgecases that seems more engine issue than custom equipment. Vanilla combo is working as expected

Small word of thanks

Thanks to @aMannus and @Patrick12115 For giving me helping hand either directly or indirectly

Build Artifacts

Jepvid and others added 4 commits January 1, 2026 01:03
This header file defines custom equipment display lists for various items, including weapons and shields, with appropriate alignment macros.

Add ResourceMgr_PatchCustomGfxByName function

Add ResourceMgr_PatchCustomGfxByName function

Add custom equipment patching functionality

This file implements custom equipment patching for various items, including swords, shields, and ocarinas, based on player context and equipped items. It registers hooks to update the display lists for custom equipment dynamically.

Implement custom scaling for Deku Shield on child

Added support for custom scaling of the Deku Shield when the player is a child.

Include GameInteractor and ResourceManager headers

Added includes for GameInteractor and ResourceManager.

Fix include path for ResourceManager header

Replace ResourceManager include with ResourceManagerHelpers

Fix include path for ResourceManagerHelpers header

Implement equipment visibility updates for child and adult

Add custom equipment Dlists handler registration

Add custom equipment header to mods.cpp

Add include for custom equipment header

Add custom equipment header with registration function

Add include guards to customequipment.h

Add function declaration for RegisterPatchCustomEquipmentDlistsHandler

Add UpdatePatchCustomEquipmentDlists function declaration

Remove UpdatePatchCustomEquipmentDlists declaration

Removed the declaration of UpdatePatchCustomEquipmentDlists function.

Remove custom equipment include from mods.cpp

Removed unnecessary include for custom equipment.

Add ShipInit.hpp include to customequipment.cpp

Add custom equipment header to mods.cpp

Add Patch Hand Handler registration

Add RegisterPatchHandHandler function declaration

Call UpdatePatchCustomEquipmentDlists after registration

Change enhancement setting check in PatchOrUnpatch

Change setting check from 'EnabledMods' to 'AltAssets'

Call UpdatePatchCustomEquipmentDlists after registration

Fix registration of OnAssetAltChange hook

Update customequipment.cpp

Update customequipment.cpp

Update customequipment.cpp

Update customequipment.cpp

Update ResourceManagerHelpers.cpp

Update Custom Equipment (#1)

* Update customequipment.cpp

* Shipinit and 2 new hooks

* Fix Build error

* Cleanup ShipInit

* Come on Shipinit, work...

* Woops

* Error between user and keyboard

* Forgot this existed

* Add Enter FPS hook

* Remove "duplicate" hook and test disable extra hook

* Vanilla Fix please, i want vanilla

* I said i wanted vanilla

Alt equipment Unstable Build (#3)

* Update customequipment.cpp

* Shipinit and 2 new hooks

* Fix Build error

* Cleanup ShipInit

* Come on Shipinit, work...

* Woops

* Error between user and keyboard

* Forgot this existed

* Add Enter FPS hook

* Remove "duplicate" hook and test disable extra hook

* Vanilla Fix please, i want vanilla

* I said i wanted vanilla

* Scaling Cleanup

* Remove cond_hook

* Lets Pray

* FINAL PRAYER!

* go back!

* GO BACK MORE

Alt equipment Cleanup (#4)

* Update ResourceManagerHelpers.cpp

* Electric Boogalooooo

* Revert Resourcemanager and make "revised" resourcemanager function for custom

* Forgot header file....

* Revert more stuff

* Hookshot better be hooking now

* hoooooks

* wooops

* scatterbrain moment

* Forceloadhookshot dl

* i forgor

* Revert last stuff and cleanup

* Dont give custom equipment special treatment

* git failed

* lets try this style

* new try

* Helpers Hope

* I believe in this one

* No helpers this time

* once more

* Im at the tip of this hookshot

* im tired

* Im feeling fancy

* Cleanslate

Alt equipment (#5)

* Another layer

* Fux sake

* really?

* again?

Clang time

BugFix for swordless child link (some timeless support) (#6)

* BugFix for child link back sword

* Second try

* Test this

* Another one

* Getting close

* Timeless support

* Sanity check

* Final patch for timeless

Alt equipment suggestions (#7)

* first pass

* im dumb

* i forgor

* seriously?

* Hopefully lastone

* frogot

* clang

Optimize and make customequip.cpp more readable

Applied fix to a crash when changing age

clang

Final Fixes

forgot to save

clang clang

one line.....

Thx pat!

I shouldnt have done that

Removed a line along time ago that was being used for something that wasnt apparent on my end

Update CVAR to correct CVAR

* FOUND IT

* Cleanup
* Otherversion

* Final Build for reals

* Cleanup

* Debuggers

* clang

* Update customequipment.cpp

* Fix Fallback for BGS

* Fix anchor crash

* Clang
@Jepvid
Copy link
Contributor Author

Jepvid commented Jan 1, 2026

I know, Dont say anything. Git CLI can go off a cliff for all i want

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.

1 participant