Page 1 of 1

Mod : unknown entity name - Has added it

Posted: Sat Nov 21, 2015 3:49 pm
by tech
Hey Factorio members :p

I has made a ton of extra stuff, as I wanna be OP beyond OP. But the entity's name is fucking up but ONLY when I am adding it as equipment and only with personal laser
Will only show some of them as I got a ton xD
Under locale/en I got :

Code: Select all

[item-name]
basic-laser-defense-equipment-7 = Basic Laser Defence MK7

[entity-name]
basic-laser-defense-equipment-7 = Basic Laser Defence MK7

[recipe-name]
basic-laser-defense-equipment-7 = Basic Laser Defence MK7

[technology-name]
basic-laser-defense-equipment-7 = Basic Laser Defence MK7

[equipment-name]
basic-laser-defense-equipment-7 = Basic Laser Defence MK7
At prototype.equipment.lua I got

Code: Select all

function more_laser_defence(tier)
data:extend({
{
    type = "item",
    name = "basic-laser-defense-equipment-"..tier .."",
    icon = "__bobwarfare__/graphics/icons/basic-laser-defense-equipment-6.png",
    placed_as_equipment_result = "basic-laser-defense-equipment-"..tier,
    flags = {"goes-to-main-inventory"},
    subgroup = "equipment",
    order = "d[active-defense]-a[basic-laser-defense-equipment-"..tier .."]",
    stack_size = 20
  },{
    type = "active-defense-equipment",
    name = "basic-laser-defense-equipment-"..tier .."",
    sprite = 
    {
      filename = "__bobwarfare__/graphics/equipment/basic-laser-defense-equipment-6.png",
      width = 64,
      height = 96,
      priority = "medium"
    },
    shape =
    {
      width = 2,
      height = 3,
      type = "full"
    },
    energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input",
      buffer_capacity =  22.66*tier .."kJ"
    },
    attack_parameters =
    {
      type = "projectile",
      ammo_category = "electric",
      cooldown = 7,
      damage_modifier = tier*2.2,
      projectile_center = {0, 0},
      projectile_creation_distance = 0.6,
      range = 20,
      sound = make_laser_sounds(),
      ammo_type =
      {
        type = "projectile",
        category = "electric",
        energy_consumption = tier*3.75 .."kJ",
        projectile = "bob-white-laser",
        speed = 1,
        action = 
        {
          {
            type = "direct",
            action_delivery =
            {
              {
                type = "projectile",
                projectile = "bob-white-laser",
                starting_speed = 0.28
              }
            }
          }
        }
      }
    },
	automatic = true
	},{
    type = "recipe",
    name = "basic-laser-defense-equipment-"..tier,
    enabled = false,
    energy_required = 10,
    ingredients =
    {
      {"basic-laser-defense-equipment-"..(tier-1) .."", 1},
      {"advanced-processing-unit", 5},
      {"silver-zinc-battery", 3},
      {"diamond-5", 1},
    },
    result = "basic-laser-defense-equipment-"..tier
  }
})
end
And to create it I got:

Code: Select all

more_laser_defence(t)
Anyone know why it says:
Unknown key: "entity-name.bob-laser-bubble-diamond

But ONLY when I am trying to take it from a logistic network
And yes I am making them ontop of bobwarfare
Regards

Re: Mod : unknown entity name - Has added it

Posted: Sat Dec 12, 2015 6:53 am
by Programmix
I'd imagine that you need to define an entity name for the entity called "bob-laser-bubble-diamond"

Re: Mod : unknown entity name - Has added it

Posted: Sat Dec 12, 2015 10:57 pm
by MrDoomah
tech wrote: Anyone know why it says:
Unknown key: "entity-name.bob-laser-bubble-diamond

But ONLY when I am trying to take it from a logistic network
And yes I am making them ontop of bobwarfare
Regards
entity-name.bob-laser-bubble-diamond is an explosion effect that is added to the bob-white-laser projectile. It should never come up as a name as it is not selectable.

Could you expand on what you mean by "it". What says, "unknown key..."? is it an error message or does it show on the right part of the screen?
Also, what do you take from the logistic network? You mean that you request your mk7 laser equipment?

Perhaps your mod is loaded before bobs mods. Check the factorio-current.log after loading factorio and see in what order the mods are loaded.