Page 1 of 1
How do I make it find this file to add monster?
Posted: Thu Jul 30, 2015 2:12 am
by xnd
i made a monster
i saw another addon that altered a monster and i put my file in the same place:
\tome-Chrono_Xorn\overload\data\general\npcs
i even copied the entire original file and just added couple monsters so far.
this is temporal horrors to be summoned by the anomaly tear trap.
but the log says the file does not exist and no monsters come.
talent has this place that used to work:
local npcs = mod.class.NPC:loadList{" putstuffhere"}
what should put there to tell it where to get them?
and how do I add monsters and get it to find them in general, not just this talent?
Re: How do I make it find this file to add monster?
Posted: Sun Aug 02, 2015 9:52 pm
by xnd
isnt this supposed to add items to a list? i have this in the load.lua its not doing it
class:bindHook("Entity:loadList", function(self, data)
if data.file == "/data/general/npcs/horror_temporal.lua" then
self:loadList("/data-Chrono_Xorn/general/npcs/horror_temporal.lua")
end
end)
and i put the monsters in the file, even set rarity 1 to try to get them.
i managed to get no error message but no added monsters either. i tried a bunch of different things full of errors so how do i add new monsters or new items?
i either figure the tear anomally would have a rare chance of some exotic powerful monsters or it would pick an instigator of the tear like a Temporal Defiler or Chronolith or something from a list of some options, but i cant get the game to pay any attention to the monster file i made so how do i do it?
Re: How do I make it find this file to add monster?
Posted: Fri Aug 07, 2015 12:56 am
by Zizzo
xnd wrote:class:bindHook("Entity:loadList", function(self, data)
if data.file == "/data/general/npcs/horror_temporal.lua" then
self:loadList("/data-Chrono_Xorn/general/npcs/horror_temporal.lua")
end
end)
That will load entities into a separate list, that will get discarded pretty much immediately. What you want is something like this:
Code: Select all
class:bindHook("Entity:loadList", function(self, data)
if data.file == "/data/general/npcs/horror_temporal.lua" then
self:loadList("/data-Chrono_Xorn/general/npcs/horror_temporal.lua", data.no_default, data.res, data.mod, data.loaded)
end
end)
In particular, data.res is the list into which the "outer" invocation of Entity:loadList() is loading its entities; by passing it through to your "inner" invocation, you're telling it to load the entities from your file into the same list. (The other data.XXX fields are the arguments passed to the outer invocation of Entity:loadlist(), which you'll want to pass through to your inner invocation for consistency.)
Re: How do I make it find this file to add monster?
Posted: Sat Aug 08, 2015 12:21 am
by xnd
thanks, i will try this!