i'm working on a new MOD for Deamonengineer and now i get this Error from Factorio!
Code: Select all
Error Util.cpp:57: Failed to load mod "Battle-Train-MOD 0.1.0"
...en/Factorio Test Instanz/data/core/lualib/dataloader.lua:16: Missing name or type in the following prototype definition {
{
air_resistance = 0.0040000000000000001,
back_light = {
{
add_perspective = true,
color = {
a = 0,
b = 0.050000000000000003,
g = 0.10000000000000001,
r = 1
} --[[table: 0000025CFDBBC7E0]],
intensity = 0.59999999999999998,
minimum_darkness = 0.29999999999999999,
shift = {
-0.59999999999999998,
3.5
} --[[table: 0000025CFDBBD800]],
size = 2
} --[[table: 0000025CFDBBC720]],
{
add_perspective = true,
color = {
a = 0,
b = 0.050000000000000003,
g = 0.10000000000000001,
r = 1
} --[[table: 0000025CFDBBD8C0]],
intensity = 0.59999999999999998,
minimum_darkness = 0.29999999999999999,
shift = {
0.59999999999999998,
3.5
} --[[table: 0000025CFDBBCF00]],
size = 2
} --[[table: 0000025CFDBBD320]]
} --[[table: 0000025CFDBBD620]],
braking_force = 3,
close_sound = {
filename = "__base__/sound/machine-close.ogg",
volume = 0.75
} --[[table: 0000025CFDBBE520]],
collision_box = {
{
-0.59999999999999998,
-2.3999999999999999
} --[[table: 0000025CFDBBC4E0]],
{
0.59999999999999998,
2.3999999999999999
} --[[table: 0000025CFDBBD4A0]]
} --[[table: 0000025CFDBBC3C0]],
color = {
a = 0.5,
b = 0,
g = 0.23000000000000001,
r = 0.42999999999999999
} --[[table: 0000025CFDBBD5C0]],
connection_distance = 3,
corpse = "medium-remnants",
crash_trigger = {
sound = {
{
filename = "__base__/sound/car-crash.ogg",
volume = 0.25
} --[[table: 0000025CFDBBE460]]
} --[[table: 0000025CFDBBDB00]],
type = "play-sound"
} --[[table: 0000025CFDBBECA0]],
drive_over_tie_trigger = {
sound = {
{
filename = "__base__/sound/train-tie-1.ogg",
volume = 0.59999999999999998
} --[[table: 0000025CFDBBE0A0]],
{
filename = "__base__/sound/train-tie-2.ogg",
volume = 0.59999999999999998
} --[[table: 0000025CFDBBEFA0]],
{
filename = "__base__/sound/train-tie-3.ogg",
volume = 0.59999999999999998
} --[[table: 0000025CFDBBF000]],
{
filename = "__base__/sound/train-tie-4.ogg",
volume = 0.59999999999999998
} --[[table: 0000025CFDBBF060]]
} --[[table: 0000025CFDBBE040]],
type = "play-sound"
} --[[table: 0000025CFDBBDB60]],
dying_explosion = "medium-explosion",
energy_per_hit_point = 5,
flags = {
"placeable-neutral",
"player-creation",
"placeable-off-grid",
"not-on-map"
} --[[table: 0000025CFDBBD140]],
friction_force = 0.5,
horizontal_doors = {
layers = {
{
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-end.png",
frame_count = 8,
height = 33,
line_length = 1,
shift = {
0,
-0.921875
} --[[table: 0000025CFDBBF5A0]],
tint = {
b = 238,
g = 187,
r = 22
} --[[table: 0000025CFDBBD3E0]],
width = 220
} --[[table: 0000025CFDBBF720]],
{
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-side.png",
frame_count = 8,
height = 38,
line_length = 1,
shift = {
0,
-0.78125
} --[[table: 0000025CFDBBF480]],
tint = nil --[[ref]],
width = 186
} --[[table: 0000025CFDBBFD20]],
{
apply_runtime_tint = true,
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-side-mask.png",
frame_count = 8,
height = 35,
line_length = 1,
shift = {
0,
-0.828125
} --[[table: 0000025CFDBBFF60]],
tint = nil --[[ref]],
width = 182
} --[[table: 0000025CFDBC0380]],
{
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-top.png",
frame_count = 8,
height = 28,
line_length = 1,
shift = {
0.015625,
-1.125
} --[[table: 0000025CFDBBF780]],
tint = nil --[[ref]],
width = 184
} --[[table: 0000025CFDBBF2A0]],
{
apply_runtime_tint = true,
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-top-mask.png",
frame_count = 8,
height = 23,
line_length = 1,
shift = {
0.015625,
-1.17188
} --[[table: 0000025CFDBBF240]],
tint = nil --[[ref]],
width = 185
} --[[table: 0000025CFDBBF7E0]]
} --[[table: 0000025CFDBBF660]]
} --[[table: 0000025CFDBBF840]],
icon = {
"__base__/graphics/icons/cargo-wagon.png",
tint = nil --[[ref]]
} --[[table: 0000025CFDBBE220]],
inventory_size = 40,
invetory_size = 20,
joint_distance = 4,
max_health = 1000,
max_speed = 1.5,
minable = {
mining_time = 1,
result = "battle-cargo-1"
} --[[table: 0000025CFDBBE160]],
mined_sound = {
filename = "__core__/sound/deconstruct-medium.ogg"
} --[[table: 0000025CFDBBC6C0]],
name = "battle-cargo-1",
open_sound = {
filename = "__base__/sound/machine-open.ogg",
volume = 0.84999999999999998
} --[[table: 0000025CFDBBE4C0]],
pictures = {
layers = {
{
back_equals_front = true,
direction_count = 128,
filenames = {
"__base__/graphics/entity/cargo-wagon/cargo-wagon-1.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-2.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-3.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-4.png"
} --[[table: 0000025CFDBBE3A0]],
height = 205,
line_length = 4,
lines_per_file = 8,
priority = "very-low",
shift = {
0,
-0.796875
} --[[table: 0000025CFDBBEE80]],
tint = nil --[[ref]],
width = 222
} --[[table: 0000025CFDBBE2E0]],
{
apply_runtime_tint = true,
back_equals_front = true,
direction_count = 128,
filenames = {
"__base__/graphics/entity/cargo-wagon/cargo-wagon-mask-1.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-mask-2.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-mask-3.png"
} --[[table: 0000025CFDBBEEE0]],
flags = {
"mask"
} --[[table: 0000025CFDBBE6A0]],
height = 174,
line_length = 4,
lines_per_file = 11,
shift = {
0,
-1.125
} --[[table: 0000025CFDBBE700]],
tint = nil --[[ref]],
width = 196
} --[[table: 0000025CFDBBE640]],
{
back_equals_front = true,
direction_count = 128,
draw_as_shadow = true,
filenames = {
"__base__/graphics/entity/cargo-wagon/cargo-wagon-shadow-1.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-shadow-2.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-shadow-3.png",
"__base__/graphics/entity/cargo-wagon/cargo-wagon-shadow-4.png"
} --[[table: 0000025CFDBBFD80]],
flags = {
"compressed"
} --[[table: 0000025CFDBBF600]],
height = 201,
line_length = 4,
lines_per_file = 8,
shift = {
0.80000000000000004,
-0.078125
} --[[table: 0000025CFDBC0560]],
tint = nil --[[ref]],
width = 246
} --[[table: 0000025CFDBBFE40]]
} --[[table: 0000025CFDBBE280]]
} --[[table: 0000025CFDBBED00]],
rail_category = "regular",
resistances = {
{
decrease = 15,
percent = 50,
type = "fire"
} --[[table: 0000025CFDBBC540]],
{
decrease = 15,
percent = 30,
type = "physical"
} --[[table: 0000025CFDBBD7A0]],
{
decrease = 50,
percent = 60,
type = "impact"
} --[[table: 0000025CFDBBC660]],
{
decrease = 15,
percent = 30,
type = "explosion"
} --[[table: 0000025CFDBBD1A0]],
{
decrease = 10,
percent = 20,
type = "acid"
} --[[table: 0000025CFDBBCDE0]]
} --[[table: 0000025CFDBBCAE0]],
selection_box = {
{
-1,
-3
} --[[table: 0000025CFDBBCA80]],
{
1,
3
} --[[table: 0000025CFDBBC600]]
} --[[table: 0000025CFDBBD500]],
sound_minimum_speed = 0.5,
stand_by_light = {
{
add_perspective = true,
color = {
a = 0,
b = 1,
g = 0.20000000000000001,
r = 0.050000000000000003
} --[[table: 0000025CFDBBC840]],
intensity = 0.5,
minimum_darkness = 0.29999999999999999,
shift = {
-0.59999999999999998,
-3.5
} --[[table: 0000025CFDBBC8A0]],
size = 2
} --[[table: 0000025CFDBBD200]],
{
add_perspective = true,
color = {
a = 0,
b = 1,
g = 0.20000000000000001,
r = 0.050000000000000003
} --[[table: 0000025CFDBBCC00]],
intensity = 0.5,
minimum_darkness = 0.29999999999999999,
shift = {
0.59999999999999998,
-3.5
} --[[table: 0000025CFDBBCC60]],
size = 2
} --[[table: 0000025CFDBBC900]]
} --[[table: 0000025CFDBBCBA0]],
tie_distance = 50,
type = "cargo-wagon",
vehicle_impact_sound = {
filename = "__base__/sound/car-wood-impact.ogg",
volume = 1
} --[[table: 0000025CFDBBE100]],
vertical_doors = {
layers = {
{
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-end.png",
frame_count = 8,
height = 202,
line_length = 8,
shift = {
0,
-0.84375
} --[[table: 0000025CFDBBFC00]],
tint = nil --[[ref]],
width = 30
} --[[table: 0000025CFDBBF4E0]],
{
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-side.png",
frame_count = 8,
height = 169,
line_length = 8,
shift = {
0.015625,
-1.01563
} --[[table: 0000025CFDBC0080]],
tint = nil --[[ref]],
width = 67
} --[[table: 0000025CFDBBFEA0]],
{
apply_runtime_tint = true,
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-side-mask.png",
frame_count = 8,
height = 163,
line_length = 8,
shift = {
0,
-1.10938
} --[[table: 0000025CFDBBFCC0]],
tint = nil --[[ref]],
width = 56
} --[[table: 0000025CFDBC0320]],
{
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-top.png",
frame_count = 8,
height = 168,
line_length = 8,
shift = {
0,
-1.125
} --[[table: 0000025CFDBC04A0]],
width = 32
} --[[table: 0000025CFDBBFF00]],
{
apply_runtime_tint = true,
filename = "__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-top-mask.png",
frame_count = 8,
height = 166,
line_length = 8,
shift = {
0,
-1.15625
} --[[table: 0000025CFDBBFFC0]],
width = 32
} --[[table: 0000025CFDBC0500]],
tint = nil --[[ref]]
} --[[table: 0000025CFDBC0440]]
} --[[table: 0000025CFDBBF1E0]],
weight = 1000,
wheels = {
direction_count = 256,
filenames = {
"__base__/graphics/entity/diesel-locomotive/train-wheels-01.png",
"__base__/graphics/entity/diesel-locomotive/train-wheels-02.png"
} --[[table: 0000025CFDBBE7C0]],
height = 115,
line_length = 8,
lines_per_file = 16,
priority = "very-low",
width = 115
} --[[table: 0000025CFDBBEC40]],
working_sound = {
match_volume_to_activity = true,
sound = {
filename = "__base__/sound/train-wheels.ogg",
volume = 0.59999999999999998
} --[[table: 0000025CFDBBE340]]
} --[[table: 0000025CFDBBD920]]
} --[[table: 0000025CFDBBC480]],
{
flags = {
"goes-to-quickbar"
} --[[table: 0000025CFDBC0020]],
icon = {
"__base__/graphics/icons/cargo-wagon.png",
tint = nil --[[ref]]
} --[[table: 0000025CFDBC07A0]],
name = "battle-cargo-1",
order = "a[train-system]-h[battle-cargo-1]",
place_result = "battle-cargo-1",
stack_size = 5,
subgroup = "transport",
type = "item-with-entity-data"
} --[[table: 0000025CFDBBF900]],
{
enabled = true,
ingredients = {
{
"cargo-wagon",
1
} --[[table: 0000025CFDBBC5A0]]
} --[[table: 0000025CFDBBC180]],
name = "battle-cargo-1",
result = "battle-cargo-1",
type = "recipe"
} --[[table: 0000025CFDBBF300]]
} --[[table: 0000025CFDBBC360]]
Code: Select all
function cargo_wagon_create( nama, invi_size, healtha, tinti, ingre )
local battle_mod = {}
local cargo_pic = "__base__/graphics/entity/cargo-wagon"
local cargo_wagon_enti = util.table.deepcopy(data.raw["cargo-wagon"]["cargo-wagon"])
cargo_wagon_enti.name = nama
cargo_wagon_enti.icon = { "__base__/graphics/icons/cargo-wagon.png", tint = tinti }
cargo_wagon_enti.invetory_size = invi_size
cargo_wagon_enti.minable = { mining_time = 1, result = nama }
cargo_wagon_enti.max_health = healtha
cargo_wagon_enti.pictures = { layers = { { priority = "very-low", width = 222, height = 205, back_equals_front = true, direction_count = 128, filenames = { cargo_pic.."/cargo-wagon-1.png", cargo_pic.."/cargo-wagon-2.png",
cargo_pic.."/cargo-wagon-3.png", cargo_pic.."/cargo-wagon-4.png" }, line_length = 4, lines_per_file = 8, shift = { 0, -0.796875 }, tint = tinti },
{ flags = { "mask" }, width = 196, height = 174, direction_count = 128, back_equals_front = true, apply_runtime_tint = true, shift = { 0, -1.125 },
filenames = { cargo_pic.."/cargo-wagon-mask-1.png", cargo_pic.."/cargo-wagon-mask-2.png", cargo_pic.."/cargo-wagon-mask-3.png" }, line_length = 4, lines_per_file = 11, tint = tinti },
{ flags = { "compressed" }, width = 246, height = 201, back_equals_front = true, draw_as_shadow = true, direction_count = 128, filenames = { cargo_pic.."/cargo-wagon-shadow-1.png",
cargo_pic.."/cargo-wagon-shadow-2.png", cargo_pic.."/cargo-wagon-shadow-3.png", cargo_pic.."/cargo-wagon-shadow-4.png" }, line_length = 4, lines_per_file = 8, shift = { 0.8, -0.078125 }, tint = tinti } } }
cargo_wagon_enti.horizontal_doors = { layers = { { filename = cargo_pic.."/cargo-wagon-door-horizontal-end.png", line_length = 1, width = 220, height = 33, frame_count = 8, shift = { 0, -0.921875 }, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-horizontal-side.png", line_length = 1, width = 186, height = 38, frame_count = 8, shift = { 0, -0.78125 }, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-horizontal-side-mask.png", width = 182, height = 35, line_length = 1, frame_count = 8, shift = { 0, -0.828125 }, apply_runtime_tint = true, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-horizontal-top.png", line_length = 1, width = 184, height = 28, frame_count = 8, shift = { 0.015625, -1.125 }, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-horizontal-top-mask.png", width = 185, height = 23, frame_count = 8, line_length = 1, shift = { 0.015625, -1.17188 }, apply_runtime_tint = true, tint = tinti } } }
cargo_wagon_enti.vertical_doors = { layers = { { filename = cargo_pic.."/cargo-wagon-door-vertical-end.png", line_length = 8, width = 30, height = 202, frame_count = 8, shift = { 0, -0.84375 }, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-vertical-side.png", line_length = 8, width = 67, height = 169, frame_count = 8, shift = { 0.015625, -1.01563 }, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-vertical-side-mask.png", line_length = 8, width = 56, height = 163, frame_count = 8, shift = { 0, -1.10938 }, apply_runtime_tint = true, tint = tinti },
{ filename = cargo_pic.."/cargo-wagon-door-vertical-top.png", line_length = 8, width = 32, height = 168, frame_count = 8, shift = { 0, -1.125 }, tint = tint },
{ filename = cargo_pic.."/cargo-wagon-door-vertical-top-mask.png", line_length = 8, width = 32, height = 166, frame_count = 8, shift = { 0, -1.15625 }, apply_runtime_tint = true }, tint = tinti } }
table.insert(battle_mod, cargo_wagon_enti)
local cargo_wagon_item = util.table.deepcopy(data.raw["item-with-entity-data"]["cargo-wagon"])
cargo_wagon_item.name = nama
cargo_wagon_item.icon = { "__base__/graphics/icons/cargo-wagon.png", tint = tinti }
cargo_wagon_item.order = "a[train-system]-h["..nama.."]"
cargo_wagon_item.place_result = nama
table.insert(battle_mod, cargo_wagon_item)
local cargo_wagon_recipe = util.table.deepcopy(data.raw["recipe"]["cargo-wagon"])
cargo_wagon_recipe.name = nama
cargo_wagon_recipe.enabled = true
cargo_wagon_recipe.ingredients = ingre
cargo_wagon_recipe.result = nama
table.insert(battle_mod, cargo_wagon_recipe)
data:extend( { battle_mod} )
end
cargo_wagon_create( "battle-cargo-1", 20, 1000, { r = 22, g = 187, b = 238 }, { { "cargo-wagon", 1 } } )
Pls help me Guys!
Greetz,
Luzifer