Page 2 of 2

Re: Wiki tutorial by FreeER

Posted: Mon Mar 14, 2016 12:12 pm
by greenlamb
Hi FreeER,

Thanks a lot for posting this tutorial, I used it to start my first mod.

I think there were a few changes in the 0.12.26 version of entity.lua:

- The energy_per_hit_point attribute now seems to be required:

Code: Select all

    dying_explosion = "medium-explosion",
    energy_per_hit_point = 1,
    crash_trigger = crash_trigger(),
- The spritesheet is also no longer named "pictures" but is called "animation" and has some other attributes I think

Code: Select all

    animation =
    {
      filename = "__Mod__/graphics/entity/bomber-sheet.png",
      priority = "high",
      width = 140,
      height = 110,
	  frame_count = 1,
	  line_length = 8,     
	  direction_count = 64,
	  shift={0.5, 0},
    },
Maybe this will help other people who are following the tutorial as well.

Re: Wiki tutorial by FreeER

Posted: Wed Mar 16, 2016 7:39 pm
by simwir
This tutorial was really useful for getting started modding, it's just sad that it's a bit outdated. In order to try to ensure there always being a up to date version i created a github with your projekt, so people can contribute with the updates that is added for each new version. I'm hoping this will help new modders getting started, by not having to surf so many boards to figure out whats wrong with the code.

But this is our code and i do not want to steal it from you. If you like i will remove the github page, add you as a collaborator, or just simple transfer the github page to you.

But anyway i think i have made it work for version 0.12.26, so if anyone is having any problems you can check it out. I have not updated the animations so it will look like a car in game. The code on the github is a combination of the previous posts here as well as some i changed my self.

The Github can be found here

Re: Wiki tutorial by FreeER

Posted: Tue Mar 22, 2016 10:24 am
by kisPocok
It would be nice to have a GUI example as well. It's hard to find working examples.

Re: Wiki tutorial by FreeER

Posted: Thu Mar 31, 2016 9:41 am
by der Papst
First, thank you guys for creating and maintaining this tutorial :)

I followed the tutorial in Wiki (latest version of 00:20, 26 March 2016‎) to the end of chapter 4, where the tutorial says "When Factorio is starting, it will tell you if it detects any errors in your mod's code" - but it doesn't. It just crashes at start without any messages.
Was the error report removed from the game or is it because i bought it on steam?

I also get no errors reported if i start factorio in console - might also be steam's fault:
tux@Pinguin:~/.local/share/Steam/steamapps/common/Factorio$ bin/x64/factorio
0.000 Initializing Steam API.
szCmd: /bin/sh -c '"/home/tux/.local/share/Steam/steam.sh" "steam://run/427520"' &
tux@Pinguin:~/.local/share/Steam/steamapps/common/Factorio$ Running Steam on ubuntu 14.04 64-bit
STEAM_RUNTIME is enabled automatically

tux@Pinguin:~/.local/share/Steam/steamapps/common/Factorio$
@simwir: thx for your github, with your code the game starts and i'm able to build the bomber.

BTW: How can i use the bombs? The bomber itself appears in the ammo menu as ammo for the axe, so i can't load it with the bombs...

Re: Wiki tutorial by FreeER

Posted: Wed Apr 20, 2016 3:53 pm
by simwir
der Papst wrote:@simwir: thx for your github, with your code the game starts and i'm able to build the bomber.
Well if it works with my code what are the differences between the two? That is most likely also where you error lies :)

Re: Wiki tutorial by FreeER

Posted: Fri May 20, 2016 3:12 am
by jeferymc
i have a problem, when i open factorio after step one it says that info.json for reading: permission denied i need help plz.

Re: Wiki tutorial by FreeER

Posted: Fri May 20, 2016 8:45 am
by ArderBlackard
As the first guess: take a look at the applications that may hold the 'info.json' file open. While almost all text editors can share open files without problems - there is still a chance that some other application has captured access to 'info.json'. Try to close all the applications that have it open.

Re: Wiki tutorial by FreeER

Posted: Tue Jul 12, 2016 8:13 am
by jetenergy
hello thank you for the tutorial but it is a bit out of date and i got a question about the crafting system, how does factorio know in what crafters the item can be crafted with?

Re: Wiki tutorial by FreeER

Posted: Tue Mar 07, 2017 7:44 pm
by Maniah
I'm trying to learn modding, but it's pretty annoying the tutorial on the official wiki is out of date.

So I've updated chapter 1-4 for Factorio 0.14 as I was trying to figure it out. The notes here viewtopic.php?f=25&t=4570&p=66592#p66592 are useful, but to cryptic at times. I've incorporated as much as I could.

I' continuing on through the next chapters but I'm a bit stuck. I've used the new sprite from this thread, but only half of the sprite is being used. If you fly down, you become "invisible".

Here is what I have so far: https://dl.dropboxusercontent.com/u/755 ... _0.1.1.zip

Re: Wiki tutorial by FreeER

Posted: Sat Apr 01, 2017 7:58 am
by Marcus Aseth
The code in the tutorial appear to be broken, I've copy pasted it inside the entity file but when I launch the game I got this error:
The error goes away if I change the "direction_count = 16" to "direction_count = 8", but I really have no idea of what the effect of the change is.
Anyway, the wiki need to be fixed :)
Image

Re: Wiki tutorial by FreeER

Posted: Sat Apr 01, 2017 8:18 am
by Bilka
There are currently two new modding tutorials that will be added to the main wiki once 0.15 is out, so be patient or check them out here: https://wiki.factorio.com/User:Gangsir/moddingTutorial or more in depth: https://wiki.factorio.com/User:Adil/Modding_tutorial

Re: Wiki tutorial by FreeER

Posted: Sat Apr 01, 2017 8:59 am
by Marcus Aseth
Bilka wrote:There are currently two new modding tutorials that will be added to the main wiki once 0.15 is out, so be patient or check them out here: https://wiki.factorio.com/User:Gangsir/moddingTutorial or more in depth: https://wiki.factorio.com/User:Adil/Modding_tutorial
Oh nice, I'll wait, looking forward to them : )

Re: Wiki tutorial by FreeER

Posted: Sun Apr 18, 2021 2:15 am
by GrandEmperorBinks
I know its been a long time, but is there any chance the tutorial could be updated? Also, when trying to follow the dropbox links, all the files have been deleted. Is there any chance the sprites at least could be put back up?