Page 1 of 1

Why this entity isnt beeing loaded correctly?

Posted: Fri Sep 27, 2013 4:48 pm
by ficolas

Code: Select all

data:extend(
  {
    type = "explosion",
    name = "alien-artifact-pickup",
    animation_speed = 5,
    animations =
    {
      {
        filename = "__F-mod__/resources/particles/alien-artifact-pickup.png",
        priority = "extra-high",
        frame_width = 32,
        frame_height = 32,
        frame_count = 8,
        line_length = 8
      }
    },
    light = {intensity = 0, size = 0},
    smoke = "smoke",
    smoke_count = 5,
    smoke_slow_down_factor = 1,
    sound =
    {
      {
        filename = "__base__/sound/huge-explosion.wav",
        volume = 0
      }
    }
  })
Im sure the game is loading it, because if I write some error there like writing ((, the game sends an error, but when I try to create an alien-artifact-pickup entity, ( game.createentity({name="alien-artifact-pickup",position=game.player.character.position})), it says that alien-artifact-pickup is an unknown entity name

Re: Why this entity isnt beeing loaded correctly?

Posted: Fri Sep 27, 2013 8:10 pm
by rk84
Does the mod's folder name and name inside info file match?

Re: Why this entity isnt beeing loaded correctly?

Posted: Fri Sep 27, 2013 8:18 pm
by ficolas
rk84 wrote:Does the mod's folder name and name inside info file match?
yup didnt change it and other entities are beeing loaded just fine.

Re: Why this entity isnt beeing loaded correctly?

Posted: Fri Sep 27, 2013 8:39 pm
by rk84
Oh could it be that you are missing one set of curly brackets around that entity definition?

Re: Why this entity isnt beeing loaded correctly?

Posted: Fri Sep 27, 2013 10:01 pm
by ficolas
rk84 wrote:Oh could it be that you are missing one set of curly brackets around that entity definition?
there are no curly brackets missing, and if there where, it would send an error msg

Re: Why this entity isnt beeing loaded correctly?

Posted: Fri Sep 27, 2013 10:37 pm
by rk84
ficolas wrote:
rk84 wrote:Oh could it be that you are missing one set of curly brackets around that entity definition?
there are no curly brackets missing, and if there where, it would send an error msg
I can't remember for sure what was in dataloader.lua, but I think extend() expect to get array of tables. So there is no error message, because it treat it like empty table and skips it.

Re: Why this entity isnt beeing loaded correctly?

Posted: Sat Sep 28, 2013 1:13 am
by slpwnd
rk84 wrote:
ficolas wrote:
rk84 wrote:Oh could it be that you are missing one set of curly brackets around that entity definition?
there are no curly brackets missing, and if there where, it would send an error msg
I can't remember for sure what was in dataloader.lua, but I think extend() expect to get array of tables. So there is no error message, because it treat it like empty table and skips it.
Yes, I would expect that to be the issue here.