Skip to content

Instantly share code, notes, and snippets.

@Samma2009
Created February 9, 2026 19:01
Show Gist options
  • Select an option

  • Save Samma2009/05e7a0389b5dac4893772163888f3492 to your computer and use it in GitHub Desktop.

Select an option

Save Samma2009/05e7a0389b5dac4893772163888f3492 to your computer and use it in GitHub Desktop.
Iron Logic mod example 1
local engine = require("engine"); -- Require the engine api (engine.lua file)
engine.registerNode({
uid = "this is an id (00000000-0000-0000-0000-000000000000)",
title = "this is a title",
value = 20, -- this is how much your node costs/sells for
pins = {
Pin1 = {
index = 0,
accepts = "any", -- accepted resource types
title = "pin title",
shape = engine.pinShape.TriangleFilled,
connectionType = engine.nodeConnectionType.Input
},
Pin2 = {
index = 1,
accepts = "any", -- accepted resource types
title = "pin title",
shape = engine.pinShape.CircleFilled,
connectionType = engine.nodeConnectionType.Output
}
}
}, "this is a description"); -- immediatelly register a node
engine.addQuest({
title = "Quest title",
objectives = {
{
title = "requirement 1 title",
stat = "stat id (eg. smelted_iron)",
count = 10 -- how much should the stat increase by before satisfying the requirement
},
{
title = "requirement 2 title",
stat = "stat id (eg. casted_iron_ingot)",
count = 30 -- how much should the stat increase by before satisfying the requirement
},
},
reward = 50 -- XP reward of the quest
}); -- immediatelly add a quest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment