-
Notifications
You must be signed in to change notification settings - Fork 45
Asset Blacklist and Whitelist
ReStock replaces many of Squad's models and textures with new ones. However, KSP will still load the old models and textures, adding to loading time and increasing memory usage.
When KSP loads models and textures, it first generates a list of everything to be loaded, and then loads it. ReStock's plugin modifies this list before KSP actually loads models and textures, modifying the entries so that KSP will ignore them.
We decided that it was probably not practical to maintain a list of which other mods use which stock models/textures on ReStock's side. But it's easy to include just one file in your mod that will tell ReStock not to block the assets you need from loading (see the next section).
Alternately, you might consider having your mod use the ReStock models and textures over the Squad ones if available.
Each line of a blacklist/whitelist file represents a GameData
relative path that ReStock's plugin will attempt to match files in KSP's file list against. Any number of blacklist/whitelist files can be present and will all be read. Blacklist files are identified as having the extension .restockblacklist
, and whitelist files have the extension .restockwhitelist
. If an asset is only blacklisted, it will not be loaded. If it is both blacklisted and whitelisted, it will be loaded. The syntax obeys the following rules:
- Config files (
.cfg
) will never be blacklisted/whitelisted - Comments (starting with a
//
) and empty lines are allowed - If the path ends with a
/
, it will match every file within that directory - If no extension is specified, any file with that name will be matched (it will ignore the extension)
- Wildcards (
*
) can be present in a path and will match anything but cannot cross directory boundaries
Squad/Parts/Aero/aerodynamicNoseCone/
will match
Squad/Parts/Aero/aerodynamicNoseCone/aerodynamicNoseCone.mu
Squad/Parts/Aero/aerodynamicNoseCone/Rockomax_Adapters_diffuse.dds
Squad/Parts/Aero/aerodynamicNoseCone/Rockomax_Adapters_normal.dds
Squad/Parts/Aero/cones/ConesDiffuse*.dds
will match
Squad/Parts/Aero/cones/ConesDiffuse.dds
Squad/Parts/Aero/cones/ConesDiffuse_Orange.dds
Squad/Parts/Aero/cones/ConesDiffuse_White.dds
Squad/Parts/Aero/miniIntake/SmallIntake
will match
Squad/Parts/Aero/miniIntake/SmallIntake.dds
Squad/Parts/Aero/miniIntake/SmallIntake.mu
KSP's log is probably the first place to look. If a part isn't loading because of a missing model, or a model isn't loading because of a missing texture, KSP will produce log messages telling you that. The log will also list every whitelist/blacklist that ReStock reads, a warning message if any line if one of those files does not match anything, and a list of every asset that ReStock is preventing from loading.
If you have further questions or need help, feel free to ask in the ReStock thread or reach out to blowfish directly on the forums.
Mod Information
Restock Parts
- Aerodynamic
- Command
- Engines
- Fuel Tanks
- Control
- Coupling
- Payload
- Electrical
- Utility
- Structural
- Ground
- Thermal
- Communications
- Science
- Resources
Restock+ Parts
- Aerodynamics
- Command
- Engines
- Fuel Tanks
- Control
- Structural
- Electrical
- Payload
- Coupling
- Utility
- Communications
- Science
Artistic Guidelines