Avorion

Avorion

System Replicator for Equipment Docks (2.4.3)
 This topic has been pinned, so it's probably important
Lt Derp  [developer] 9 Jun, 2023 @ 3:45pm
How to combine with other mods
This mod only edits one base game file: equipementdock.lua, and adds one additional file: rglx_systemreplicator.lua

This is the entire modded equipmentdock.lua file:

--Start of System Replicator

-- bootstraps the system replicator menu into every equipment dock as soon as its loaded and initialized.

local oldEquipmentDockinitialize = EquipmentDock.initialize
function EquipmentDock.initialize()
-- run existing code
oldEquipmentDockinitialize()
-- load the System Replicator into every equipment dock
Entity():addScriptOnce("data/scripts/entity/merchants/rglx_systemreplicator.lua")
end

--End of System Replicator


There are two scenarios where you would want to combine mods:

1. You are using a mod that modifies the equipmentdock.lua game file, but does not modify the initialize() function.

2. You are using a mod that modifies both the equipmentdock.lua file and the initialize() function within the file.

In the case 1, you would simply copy the above code into the other mod's equipmentdock.lua and save a copy of the rglx_systemreplicator.lua in the same place.

In case 2, you need to copy the line(from above):

Entity():addScriptOnce("data/scripts/entity/merchants/rglx_systemreplicator.lua")

into the modified initialize() function and also save a copy of the rglx_systemreplicator.lua in the same folder.

Shoot me a message if you need help.