Initially, I thought this was 100% possible but I recently found out that it isn’t exactly the case. Instead, I have to amplify the spawn weights of my items to make it pretend to replace it in spawns.
This issue is about trying to make a spawn replacement code that can easily override the item itself. The idea is to make a similar line of code that lets your selected weapon to take over an item’s spawn without modifying the item you want to replace.
It can be structured to be similar to the spawn tables & spawn modifiers that modders use to make their items spawn in maps they wish to put them in. There is also the existing mag replacement for a ranged weapon today, so think about having it to replace any item with another which sounds not too complicated to replicate for this system in mind.
An example of a conceptualized line of code used on Arena_Guns_Military_Common to replace the Eaglefire & Maplestrike:
Replacements 1 Replacement_0_Spawn_ID 5 Tables 2 Table_0_Asset_ID 4 Table_0_Replacement_Asset_ID 69420 Table_0_Weight 10 Table_1_Asset_ID 363 Table_1_Replacement_Asset_ID nUmBeR Table_1_Weight 10
This is very useful for us modders who want to shape the item spawns as we please, like putting an improved or new item to take over an existing one. Like all features, this opens new ways to create spawns, we already have custom spawns. But with spawn replacements, there is much more that can be done.