Can not create a entity like a car (I use the bomber Guide)

Place to get help with not working mods / modding interface.
Spawn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu May 23, 2013 1:44 pm
Contact:

Can not create a entity like a car (I use the bomber Guide)

Post by Spawn »

Hello,
I´m new and i tried to create a car-like item. I examine the bomber Guide >FreeER's Step by Step Bomber Mod< from FreeER [thanks FreeEr :-)]
But If I craft the Item in my mod - i only become a icon - i cant use it. It will works similar like a axe i can drop it on the tiles with key >Z< but i can not use it with right mouseclick. Also i missed the direction or big pictures from the item if i move it with the mouse over the screen - like other entity´s do.
At least I have copy past the bomber.lua files segments from item.lua, entity.lua, recipe.lua. (and all the graphics)
The same result - no car like entity.
Maybe someone can help me. thx.

By the way - the game crashed if i add locale\de\*.cfg files. The reason: If i save the files they will saved in the wrong format it must be UTF-8 without BOM in ANSI there pop up a error "no '=' in line. ????

Greetings Frank

#######EDIT#####
Problem solved!!!!
in the "xxItem.lua" File I forgot the >>place_result="fooItem",<< Line.

So I have another question:
I got the entity-name, Item-Name and technology-name ... is there a List with all the properties, events and the other stuff u need for a good mod?
thx

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

Re: Can not create a entity like a car (I use the bomber Gui

Post by ficolas »

remember next time to paste code.

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Can not create a entity like a car (I use the bomber Gui

Post by kovarex »

It depends what you want, but basic information can be found here.
https://forums.factorio.com/wiki/inde ... efinitions

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

Re: Can not create a entity like a car (I use the bomber Gui

Post by FreeER »

Spawn wrote:Hello,
I´m new and i tried to create a car-like item. I examine the bomber Guide >FreeER's Step by Step Bomber Mod< from FreeER [thanks FreeEr :-)]
You are entirely welcome, I'm glad I could help someone out :) Also, if you are not aware each chapter should have a link at the start (called: the mod so far), this is the work up to the end of that chapter so you are able to download it and check through why your code is acting differently :) Though if you are not recreating the mod it would probably be easier to look at the default car entity (since you would not have to download anything extra).
#######EDIT#####
Problem solved!!!!
in the "xxItem.lua" File I forgot the >>place_result="fooItem",<< Line.
I forget this one myself a lot of the time (though since I tend to copy and paste it usually places down the wrong entity instead of not working at all)
So I have another question:
I got the entity-name, Item-Name and technology-name ... is there a List with all the properties, events and the other stuff u need for a good mod?
thx
It depends on what your mod does honestly. If you want to add an entity that is placed in world then you are required to have an item for that (unless you use the control.lua to generate it with game.createentity) and unless you want to use the control.lua to give that item to the player (or create a scenario for the player to use) you will need to create a recipe for that item, typically you would have a technology to unlock the recipe but you may decide that it is such a simplistic item (say basic armor made from a piece of wood, aka a shield) that it does not need to be researched. Some mods (like solar expansion) do not need a control.lua file because their items work exactly like the game says they should. However, since most mods add an entity most are going to have items/recipes/entities/and at least one tech to be researched, and alot of people seem to have ideas that factorio does not have entity definitions for, yet, so they have to use the control.lua. Then you would have the language files (I have not added them to the bomber mod, though I know I should, simply because I usually wait until the end to do so and I still intend to add a bit more to the mod lol)
As for the control.lua your most commonly used events are, ontick and onbuiltentity and possibly oninit.
As for the other stuff, basically you'll need graphics for your mod :) and depending on the mod you might add some sounds as well.

Hope that helps you
FreeER
<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

Post Reply

Return to “Modding help”