Ship Vendor Fix
By Vollmetal Verified
Community Rating
Simple edit to the ShipVendorScript script used by all vendors so they properly take care of ships that are removed whenever their inventories reset.
This will prevent any pointer handle leaks related to ship vendor inventory resets and probably several other bugs related to old supposedly cleaned up ships randomly reappearing on landing pads. The fix is experimental and I've done the most testing make sure it's doing things properly but testing for specific ref handle leaks is a really long and laborious process to do so your mileage may vary.
What Normally Happens With Ship Vendors:
- When you sell a ship, that ship is simply placed back into the vendor's "inventory" array to be displayed in the buy/sell screen.
- Every 7 days (week) the vendor runs the Delete() command on all ships in it's inventory then clears it's inventory array.
- New ships are spawned on the landing pad disabled and linked to the landing pad.
- Repeat
The Problem:
- When ships are supposed to be cleared, the link to the local landing pad/docking port isn't cleared, potentially keeping the ship loaded at all times or at minimum preventing it from being cleaned by the game's garbage collector.
- When ships are supposed to be cleared they are not sent anywhere. There is no holding cell they're placed in. This means that so long as the cell, usually a persistent or city cell, is loaded or not reset garbage collection either can't or rarely will clear out the disabled ships.
- Delete() is called instead of using DisableNoWait() and clearing all references and links. Delete() does nothing to ship references as they're a complex group of multiple references layered on top of each other. Instead you need to disable the ship or kill it and leave it in an unloaded cell until the game's garbage collector comes through and cleans it up, which the engine does properly so long as the ship isn't spawned in as a persistent ship.
The Solution:
This mod does a couple small things:
- It creates an empty "trash" cell to place ships to be killed or cleaned up. That way no scripts, quests, etc can scan them and the engine doesn't try to load them. The player cannot get to this cell.
- When ship vendors go through their list for cleaning it places the ship in the trash cell.
- The ship is then disabled.
- Finally to make absolutely sure the engine knows to clean it up, the ship is killed.
- After all that's done to every ship in the array, the array is forcibly cleared as it is in vanilla.
Release notes
Xbox
-
1.00== Describe this release ==
Playstation
-
1.00== Describe this release ==
PC
-
1.00== Describe this release ==
Additional Screenshots Available
This mod has 1 additional screenshot available on the official Bethesda.net page.
View All Screenshots on Bethesda.netYouTube Videos (11)
Starfield News - Are Paid Mods Worth It? Plus 6 More Stories
#Starfield Creation Kit Tutorial 11 - Create a Mod with Vendors that Sell your Custom Built Ships
Community Rating & Feedback
No reviews with comments yet.
Be the first to leave a review!
Related Starfield Mods
By shadedness • 2 years ago
Strip any equipped armor or clothes from your fallen foes! Or simply loot-all with 1 button. Steal items from knocked-out targets instead of pick-pocketing and waking them up!
By Deebz • 2 years ago
Makes the Chronomark watch visible on your left wrist, as it always should have been. Also equips the watch on other specific members of Constellation.
By rux616 • 2 years ago
A framework allowing mod authors to easily add ships for sale without conflicts.
By PilgrimCreations • 11 months ago
Crimson Fleet Outfitted seeks to add more variety to the Crimson Fleet by equipping them with new outfits in breathable locations.
Quick Actions
Your Rating
Sign in to rate and review this mod—your vote helps the community.
Community Rating
Categories
Mod Information
- Published
- Aug 27, 2026
- Last Updated
- Aug 27, 2026
- Platforms
- Playstation, PC, Xbox
Search Mods
More by Vollmetal