Skip to content

Custom Equipment Support#6032

Closed
Jepvid wants to merge 78 commits intoHarbourMasters:developfrom
Jepvid:Alt-Equipment
Closed

Custom Equipment Support#6032
Jepvid wants to merge 78 commits intoHarbourMasters:developfrom
Jepvid:Alt-Equipment

Conversation

@Jepvid
Copy link
Copy Markdown
Contributor

@Jepvid Jepvid commented Dec 19, 2025

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

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

This header file defines custom equipment display lists for various items, including weapons and shields, with appropriate alignment macros.
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.
Added support for custom scaling of the Deku Shield when the player is a child.
Added includes for GameInteractor and ResourceManager.
Removed the declaration of UpdatePatchCustomEquipmentDlists function.
Removed unnecessary include for custom equipment.
@Jepvid
Copy link
Copy Markdown
Contributor Author

Jepvid commented Dec 28, 2025

Fixed the final crashes made with anchor now. This pr should be ready for review now.

Jepvid and others added 26 commits December 31, 2025 10:57
* updatehooks

* fix crash
* refactor forest

* feedback

* more feedback

* MQ NE island logic

* no kids allowed

* split west corridor

* split up block puzzle room

* comment mapping poe sister colors

* generalize well swim, make novice

* hammer works

* upstream bug fix

* Replace corridor with hallway, rename east/west hallway regions to be based on their red/blue doormats

also change south hallway to overgrown hallway, & replace south/north sides with lower/upper sides
split upper area into region rather than using logic val to manage access from below

2 fixes: adult can groundjump up the middle, child can make the trick with hammer
Based on fishsanity, which is refactored with hooks

Also open up logic catching fairies at oasis if player has bottle
Being captured by random fighter behaves like being captured by a wall master
Coming back from block room to hub, the clip is different, instead it's by wall that both ages can get past with pretty specific sidehop. This is pretty niche since generally logic isn't doing reverse ice cavern
1. deku tree MQ web
2. dodongo's cavern MQ silver rupees
3. jabu lobby switch
4. forest well, lobby eyes, MQ web
5. fire MQ lobby torches
6. spirit MQ lobby silver rupees

adjusts forest MQ logic
* Removed LocationAccess::CanBuy and added GetCheckPrice.

* Made the Magic Bean Salesman a merchant.

* Replaced CanBuyAnother with GetWalletCapacity and inline comparison for easier readability.
Distinct from unintuitive jumps in that I'm unable to get it consistently even after trying a couple times,
even after trying to find some mix of ledge grabbing & ESS turning to try at least put it down to roll timing
…arbourMasters#5983)

Also allow Giant's Knife to logically hit these switches

Ganon's Castle diamond switch can be hit with bomb by setting bomb down instead of shield dropping
Removed unnecessary include for custom equipment.
* 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
* updatehooks

* fix crash
@Jepvid
Copy link
Copy Markdown
Contributor Author

Jepvid commented Dec 31, 2025

Closing this as it got nuked to hell trying to rebase this

@Jepvid Jepvid closed this Dec 31, 2025
@Jepvid Jepvid deleted the Alt-Equipment branch January 1, 2026 00:14
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.

9 participants