So: I'm going to ask stupid questions about modding. Hopefully, someone answers them. I link the answer to the question in this post (for others to find), and I ask another stupid question.
Stupid Question Number One:
So I pretty much worked out that if I'm in load.lua, pinching a loadDefinition from another mod, the value it takes for loadDefinition needs to change from 'data-<theirmod>' to 'data-<mymod>'. This has solved pretty much all the problems I have with load.lua ... except for loadDefinition calls to PartyLore.
I've set the local/require call up for Partylore, called PartyLore in exactly the same way - except my calls get me this error:
Code: Select all
Lua Error: /hooks/myamazingmod/load.lua:41: attempt to index global 'PartyLore' (a nil value)
At [C]:-1 __index
At /hooks/myamazingmod/load.lua:41
What am I missing?
EDIT: Okay, a little more reading done. Apparently, TE4 is getting to and trying to use
PartyLore.loadDefinition in class:bindHook("ToME:load", function(self, data)
before
local Partylore = require "mod.class.interface.PartyLore"
is run. And I have no idea how.