Wiki tutorial by FreeER

Place to get help with not working mods / modding interface.
greenlamb
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Mar 14, 2016 11:54 am
Contact:

Re: Wiki tutorial by FreeER

Post 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.
simwir
Inserter
Inserter
Posts: 23
Joined: Wed Mar 16, 2016 7:24 pm
Contact:

Re: Wiki tutorial by FreeER

Post 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
kisPocok
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri Jun 20, 2014 11:05 pm
Contact:

Re: Wiki tutorial by FreeER

Post by kisPocok »

It would be nice to have a GUI example as well. It's hard to find working examples.
der Papst
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Mar 20, 2016 6:15 pm
Contact:

Re: Wiki tutorial by FreeER

Post 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...
simwir
Inserter
Inserter
Posts: 23
Joined: Wed Mar 16, 2016 7:24 pm
Contact:

Re: Wiki tutorial by FreeER

Post 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 :)
jeferymc
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri May 20, 2016 3:08 am
Contact:

Re: Wiki tutorial by FreeER

Post 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.
User avatar
ArderBlackard
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Thu May 05, 2016 12:41 pm
Contact:

Re: Wiki tutorial by FreeER

Post 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.
Gib dich hin bis du Glück bist
jetenergy
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Oct 01, 2015 8:07 am
Contact:

Re: Wiki tutorial by FreeER

Post 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?
Maniah
Inserter
Inserter
Posts: 40
Joined: Thu Mar 24, 2016 4:31 am
Contact:

Re: Wiki tutorial by FreeER

Post 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
Marcus Aseth
Inserter
Inserter
Posts: 37
Joined: Tue Dec 13, 2016 9:34 am
Contact:

Re: Wiki tutorial by FreeER

Post 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
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Wiki tutorial by FreeER

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Marcus Aseth
Inserter
Inserter
Posts: 37
Joined: Tue Dec 13, 2016 9:34 am
Contact:

Re: Wiki tutorial by FreeER

Post 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 : )
GrandEmperorBinks
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Apr 18, 2021 2:07 am
Contact:

Re: Wiki tutorial by FreeER

Post 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?
Post Reply

Return to “Modding help”