The stand-alone mod S.T.A.L.K.E.R. Anomaly aims to be the most stable and customizable experience for fans of the S.T.A.L.K.E.R. games. It's powered by the Monolith 64-bit engine, a custom fork of the X-Ray engine.

Forum Thread
  Posts  
Modders: lets systematize function injections! (Games : S.T.A.L.K.E.R.: Call of Pripyat : Mods : S.T.A.L.K.E.R. Anomaly : Forum : Discussions : Modders: lets systematize function injections!) Locked
Thread Options
Apr 5 2022 Anchor

Note: function injection == monkeypatch.

Hey! I've had many headaches due to sneaky conflicts in which no files are conflicting but scripts inject the same function with a different implementation into other scripts. My proposition is that lets keep function injections (basically DLTX with scripts) but lets also put the vanilla file that we're modifying into the mod files! That way conflicts show in mod installation in case the same script is altered by different mods but different parts of the same script can be simultaneously changed by different mods.

Example of a function injection in "example.script":

ui_workshop.UIWorkshopRepair.ListInventory = function(self)
printf("Now the repair tab does nothing in the workshop")
end

So in this example the mod's scripts folder contains "example.script" and unmodified "ui_workshop.script".

Edited by: Banjaji

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.