Modding error
Postby Vulcan » Tue Aug 05, 2014 4:23 pm
Sprite outside of
"__F-mod__/resources/technology/icon/icon_tank_tec.png" (at 64, 64, size 0x0 of 0x0
I have been making a tank into the f-mod because it is developed from the turret car in F-mod. What does this error mean?
On the subject of modding gone wrong, I cannot find the problem in my mod for a fusion reactor after getting the error 'Appdata/roaming/factorio/mods/FusionReactor/'prototypes/entity.lua:1: unexpected symbol near '{' '
I would be grateful for any assistance.
{
type = "generator",
name = "fusion-reactor",
icon = "__FusionReactor__/graphics/fusion-reactor-tech.png",
flags = {"placeable-neutral","player-creation"},
minable = {mining_time = 1, result = "oil-refinery"},
max_health = 1000,
corpse = "big-remnants",
collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
effectivity = 1,
fluid_usage_per_tick = 0.5,
energy_source =
{
{
type = "electric",
usage_priority = "primary-output"
}
},
animation =
{
north =
{
filename = "__FusionReactor__/graphics/fusion-reactor.png",
frame_width = 337,
frame_height = 255,
frame_count = 1,
shift = {2.515625, 0.484375}
},
east =
{
filename = "__FusionReactor__/graphics/fusion-reactor.png",
x = 337,
frame_width = 337,
frame_height = 255,
frame_count = 1,
shift = {2.515625, 0.484375}
},
south =
{
filename = "__FusionReactor__/graphics/fusion-reactor.png",
x = 674,
frame_width = 337,
frame_height = 255,
frame_count = 1,
shift = {2.515625, 0.484375}
},
west =
{
filename = "__FusionReactor__/graphics/fusion-reactor.png",
x = 1011,
frame_width = 337,
frame_height = 255,
frame_count = 1,
shift = {2.515625, 0.484375}
}
},
working_visualisations =
{
{
north_position = {1.03125, -1.55},
east_position = {-1.65625, -1.3},
south_position = {-1.875, -2.0},
west_position = {1.8437, -1.2},
light = {intensity = 0.4, size = 6}
}
},
fluid_boxes =
{
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {-1, 3} }}
},
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {1, 3} }}
},
},
pipe_covers = pipecoverspictures()
}
Modding errors
Re: Modding errors
This means that the image was not found. Check the path and names (including capitalization on a case sensitive OS).Vulcan wrote:size 0x0 of 0x0
In general "Sprite outside of" errors mean that the actual image is smaller than the size specified in the prototype definition.
This, is a standard lua syntax error, and would mean that on the first line of that file it found something that doesn't make sense (near an opening '{'). Now I don't see anything in what you posted that seems wrong but if that wasn't the full file exactly then...Vulcan wrote:'Appdata/roaming/factorio/mods/FusionReactor/'prototypes/entity.lua:1: unexpected symbol near '{' '
Re: Modding errors
Could it be that you forgot the "h" in icon_tank_tech.png?Vulcan wrote:Sprite outside of
"__F-mod__/resources/technology/icon/icon_tank_tec.png" (at 64, 64, size 0x0 of 0x0
Because it directly points to the first line: Do you forgot to add theFreeER wrote:This, is a standard lua syntax error, and would mean that on the first line of that file it found something that doesn't make sense (near an opening '{'). Now I don't see anything in what you posted that seems wrong but if that wasn't the full file exactly then...Vulcan wrote:'Appdata/roaming/factorio/mods/FusionReactor/'prototypes/entity.lua:1: unexpected symbol near '{' '
Code: Select all
data:extend({
YourPrototypeDefinition(s) here
})
Re: Modding errors
Or that the icon isn't in the F-Mod directory but in Vulcan's mod instead. There are numerous ways to misspell names and paths (especially if capitalization matters), and occasionally they are done intentionally to prevent name collisions, so I didn't bother making suggestions as to what the exact error might bedrs9999 wrote:Could it be that you forgot the "h" in icon_tank_tech.png?

I thought about mentioning that, but it wouldn't cause a Lua syntax error, without data:extend it's simply an anonymous table that serves no purpose (since it wouldn't be added to Factorio's list of data prototypes to load) so I was assuming it wasn't the full file (and of course if it's not the full file there's no real way to know what the error is, though a data:extend error would be the logical assumption).drs9999 wrote:Do you forgot to add theCode: Select all
data:extend({ YourPrototypeDefinition(s) here })
Re: Modding errors
Thanks FreeER and drs9999, I had forgotten data:extend({. However I have now been plagued by another error:
error while loading prototype "fusion-reactor": no such node (horizontal_animation)
I have no animation and this node is not mentioned in the prototype, how can I get rid of this?
Thanks again,
Vulcan
error while loading prototype "fusion-reactor": no such node (horizontal_animation)
I have no animation and this node is not mentioned in the prototype, how can I get rid of this?
Thanks again,
Vulcan
Re: Modding errors
"no such node" mean that Factorio needs that property (node) to exist for the type. You'll need to add it, if you want it to be a sprite you can just set the frame_count and line_length to 1 in the animation definition. You'll also need a vertical_animation as well...Vulcan wrote:error while loading prototype "fusion-reactor": no such node (horizontal_animation)
When you get these errors it's usually best to look in the base prototypes to see exactly what the property/node is. You can try looking at the wiki Prototype Definitions but they're not complete and could potentially be out of date in a few places. I tried to get the needed properties, and types, for the missing prototypes and uploaded them here (the attached zip in the second post) but it's not exactly friendly...
the information for the generator for example is
Code: Select all
Generator
energy_source = Energy_Source (Electric only)
fluid_box = Fluid Box
horizontal_animation = Animation
vertical_animation = Animation
smoke = Smoke
-- animation runs at least this fast (also corresponds to sound)
min_perceived_performance = d(0.25)
-- Performance / minPerceivedPerformance * performanceToSoundSpeedup gives activity value
performance_to_sound_speedup = d(0.5)
effectivity = double
fluid_usage_per_tick = double