Items not showing

Place to get help with not working mods / modding interface.
Post Reply
Deathmage
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Mon Jan 20, 2014 3:28 pm
Contact:

Items not showing

Post by Deathmage »

I have been having a problem with making a mod for more turrets, none of the components appear in the crafting grid,and ideas?
https://www.dropbox.com/s/c904wo3uhg5qk ... urrets.rar this is the link for it, hopefuly i can fix this large bug.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Items not showing

Post by FreeER »

  • 1) you need a data.lua file (see code block below but, this is the file that Factorio actually loads for your prototypes, typically it's used as a place to require the prototype files), without it the mod is practically ignored.
  • 2) in item.lua you use "shock-absorbers" and in recipe you use "shock-absorber" (I'm assuming they are meant to be the same)
  • 3) in item.lua you have a place-result for the "shock-absorbers" but no entity is defined so the place-result on the item causes an error (either create an entity if you meant for it to be placed, or if you meant it only as an intermediate recipe item then simply remove the place-result line).
  • 4) in recipe.lua you use "lubericant" as an ingredient in the "shock-absorber", but the proper spelling is "lubricant"
  • 5) the lubricant fluid (I believe) needs to be specified as {type="fluid", name="lubricant", amount=10}, (otherwise Factorio only searches for an item not a fluid).
  • 6) you can not use fluids in the default crafting category (ie, cannot craft by hand an item that requires a fluid), so add category = "chemistry", (or create your own machine and crafting_category).
  • 7) in item.lua you use the base iron gear icon for the "shock-absorbers" but it is spelled as "iron-gear.png" instead of "iron-gear-wheel.png" and Factorio produces an error of "Sprite outside of "...png" (at 32, 32, size of 0x0 of 0x0)"
here's the data.lua to load what you have

Code: Select all

require("prototypes.entity.projectiles")
require("prototypes.entity.turrets")
require("prototypes.item.item")
require("prototypes.recipe.recipe")

--uncomment the technology and tile when you add them by removing the "--" in front of them
--require("prototypes.technology.technology")
--require("prototypes.tile.tile")
Hope that helps you out :D
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

immibis
Filter Inserter
Filter Inserter
Posts: 303
Joined: Sun Mar 24, 2013 2:25 am
Contact:

Re: Items not showing

Post by immibis »

Alternatively, put your data:extend calls directly in data.lua. Nothing actually forces you to have separate files.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Items not showing

Post by ficolas »

immibis wrote:Alternatively, put your data:extend calls directly in data.lua. Nothing actually forces you to have separate files.
That will make you need to put all base edits in the data.lua

User avatar
AlexPhoenix
Fast Inserter
Fast Inserter
Posts: 149
Joined: Tue Feb 18, 2014 7:48 am
Contact:

Re: Items not showing

Post by AlexPhoenix »

ficolas wrote:
immibis wrote:Alternatively, put your data:extend calls directly in data.lua. Nothing actually forces you to have separate files.
That will make you need to put all base edits in the data.lua
for me it dosnt make sence, i use my own utils for making mods.
so utils count all, not i.


also if you comment code then it is rather easy to find all items.

also with advanced editor you can use diffenent data:extend add different data types, and simply fold them

Deathmage
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Mon Jan 20, 2014 3:28 pm
Contact:

Re: Items not showing

Post by Deathmage »

Thanks i had a feeling that it was just syntax bugs and misspells but i wasn't completely sure. Thanks FreeER :)

Post Reply

Return to “Modding help”