Could someone tell me how to use Redirector Assets? Like how to make a proper .dat file and where to put it?
Here’s a simple example you can put anywhere assets are loaded from:
GUID ba42a1c7ae274d9ea3c6a781e7e83b5d
Type Redirector
TargetAsset "b03d581a5c1a490f995f8deba57b0f17" // Eaglefire
With that, if you do /give ba42a1c7ae274d9ea3c6a781e7e83b5d
it will give you the Eaglefire instead.
Quick question on that, are item and barricade states preserved when using the redirector?
Yes: It doesn’t actually interact with items, barricades, or anything else in a special way. Rather, when the game looks up an asset by GUID or legacy ID it just makes sure it doesn’t return a redirector.
If I understand correctly, these are used to replace assets with other assets right? Or what are these supposed to do? I thought I could make like custom item and replace the vanilla one with it, is that possible?
For example, we used Vehicle Redirectors for backwards compatibility. We replaced tons of vehicle color variants with a single vehicle asset, and redirected those old GUIDs to the new one. You can use Redirectors for backwards compatibility as well.
Maybe you’ve removed an item from the mod, but don’t want to ruin people’s save files or any maps referencing that GUID. You can add a Redirector for the old GUID and point to some other item.
Ahh, thanks for the clarification. Well I thought it was something more exciting like replacing one asset with another, maybe we will get that in the future