Custom data in object data (Resolved)

Place to get help with not working mods / modding interface.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Custom data in object data (Resolved)

Post by Ranakastrasz »

Is it possible to add custom entries to a object's definition, and access it via script? I am scripting power production for fusion reactors, such that it uses fuel, and since I am now trying to integrate it with bob's mod, If possibly I want to integrate the data with the object's definition instead of the configuration script.

Essentially, I want to add a few entries to the equipment data, and access it via script.
Last edited by Ranakastrasz on Sat May 28, 2016 2:39 pm, edited 1 time in total.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Rseding91
Factorio Staff
Factorio Staff
Posts: 15950
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Custom data in object data

Post by Rseding91 »

That's not possible. Data in the data.lua portion is only used if the backing C++ class is actually looking for it. All other data is discarded after the data loading phase is done.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Custom data in object data

Post by Ranakastrasz »

Awww. No fair.
Good to know.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Post Reply

Return to “Modding help”