## Items need standard slot for Required Tech

Anything related to the content on our wiki (https://wiki.factorio.com/)

Moderator: Bilka

Zengief
Burner Inserter
Posts: 18
Joined: Tue Sep 30, 2014 12:09 am
Contact:

### Items need standard slot for Required Tech

It can be hard to figure out what must be researched if you are not well versed in the game. As an example look at this page for storage tanks:
https://forums.factorio.com/wiki/inde ... orage_Tank
I went to the wiki because I wasn't sure what research I was missing. That page didn't help.
It would be nice to have the required tech as part of the recipe box.
I do not have the wiki foo or know the proper etiquette for changing that, especially since it should be consistent across all of the items.

Is this the right place to ask how I go about changing it?

ssilk
Global Moderator
Posts: 12241
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

### Re: Items need standard slot for Required Tech

Zengief wrote:Is this the right place to ask how I go about changing it?
Yes.

But it ain't not the easiest start, cause there is currently no "Placeable" infocard.

See this: https://forums.factorio.com/wiki/inde ... :Infocards
Look into: https://forums.factorio.com/wiki/inde ... Technology
Add a new template: https://forums.factorio.com/wiki/inde ... :Placeable
Add that template to storage tank.
Add the missing informations into that (look for example www.factorioforums.com/wiki/index.php?title=Module )
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

cartmen180
Filter Inserter
Posts: 358
Joined: Fri Jul 25, 2014 2:53 pm
Contact:

### Re: Items need standard slot for Required Tech

if you select the tech that unlock storage tanks ingame you will see the prerequisites for that tech.
Check out my mods

ssilk
Global Moderator
Posts: 12241
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

### Re: Items need standard slot for Required Tech

I think that is not the question. Or do you mean, that it doesn't needs to be documented in wiki, cause it is explained in the game?

I don't think so. It is quite useful to have an "offline" documentation of everything, especially when you are a mod-developer. And factorio modding has a quite big relevance.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Zengief
Burner Inserter
Posts: 18
Joined: Tue Sep 30, 2014 12:09 am
Contact:

### Re: Items need standard slot for Required Tech

Well, I got an account and looked through the links you put there. I don't think we need a placeables template since the machines template would cover everything I would consider a placeable (with maybe the exception of the walls). https://forums.factorio.com/wiki/inde ... :Machinery

With that in mind, I tried doing the template for a nice an easy one: Assembly machine 1 https://forums.factorio.com/wiki/inde ... _machine_1 Now there are obviously some issues with this. For one, the required tech icon isn't clickable, and for the life of me I can't figure out why. Can anyone explain the use of triple and double brackets to me? I am thinking that it means something in particular, but I couldn't find anything relevant from a quick search.

There is also a lot of information for that, that I couldn't find. I looked through some of the lua files, but didn't see anything that defined various stats about buildings like their health and how much pollution they emit. Is most of that figured out from the game or is there text file definitions of the building somewhere that I missed? Closest I came was "...\Factorio\data\base\prototypes\item\item.lua"

I would love to delve into this more and maybe come up with a way to auto generate the card based on the data files if I can.
Last edited by Zengief on Fri Oct 03, 2014 2:44 am, edited 1 time in total.

Zengief
Burner Inserter
Posts: 18
Joined: Tue Sep 30, 2014 12:09 am
Contact:

### Re: Items need standard slot for Required Tech

cartmen180 wrote:if you select the tech that unlock storage tanks ingame you will see the prerequisites for that tech.
The issue was that I didn't know which tech I needed to unlock storage tanks. If I went to the tech that unlocked storage tanks in game, as you say, that would mean I already know.

ssilk
Global Moderator
Posts: 12241
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

### Re: Items need standard slot for Required Tech

Ok, this got a bit long. In short: I answer two questions; one about how to get the informations about an entity and the second how to read and use templates.

1. Well, I use for that currently my converter, which can be found here:
https://github.com/alexaulbach/Factorio ... iGenerator
You need to have Lua installed. It is called like so:

./LuaRaw2Xml.lua factorio/data/base/ factorio/data/core/ >tmp/factorio-data.xml

where "factorio/" is in this case a symlink to the factorio folder, that includes the core and base mods. This works for linux/macos, I don't know how you can do that under windows.
It creates an XML (or JSON or Lua-code, see in the comments for options). The XML for the storage tank looks like so:
XML
You see, the max_health is 500, and it has no pollution at all.

2. How to the brackets:
There are some basic things you need to learn, cause otherwise the wiki won't be understood.
This is a link to a template. A template is nothing else than another wiki-page. If there is nothing special, you can see the template by adding "template:".

https://forums.factorio.com/wiki/inde ... ction=edit
At the top of the text you see

Code: Select all

{{Languages}}

This is nothing else as telling the wiki, that the page "Template:Languages" should be included.
This is the docs for this template. You see the CONTENT of the template by editing it:
https://forums.factorio.com/wiki/inde ... ction=edit

Well. It makes now no sense to explain you step by step this page, you really need to learn that yourself, the mediawiki docu is here very good. http://www.mediawiki.org/wiki/Help:Templates

But I can show you how to read this, without knowing what it does.
First look at some "{{" and try to find the matching "}}". Don't let you irritate with nesting brackets! Just count for each incoming {{ that you need to look for one more }} until you reach the end.
So once you have found the begin and end of an template in the text, you will notice the "|". That is the delimiter for the parameters of the template. Every | separates one more parameter. Again: Don't let you irritate from delimiters inside of nested templates (between more {{ and }}). Just ignore them! And now look again into the documentation of that template: If the author has made his job correctly, the template explains the first, second etc. parameter and how to use it.

In other words: for the machinery template (https://forums.factorio.com/wiki/inde ... :Machinery) you need to have minimum 5 parameters and have some optional named parameters ( http://www.mediawiki.org/wiki/Help:Temp ... parameters ).
And for the icon-template (which is used in the InfocardVRow-template, which is used in the Infocard-template) you need 4 parameters (https://forums.factorio.com/wiki/inde ... plate:Icon - I admit, that it is not well documented). That means you need three "|" in the template.

In the end I looked at it and I found your error:

Code: Select all

Before:
{{InfocardVRow|Required technologies|{{icon|Automation|Automation 1}}}}
After:
{{InfocardVRow|Required technologies|{{icon|Automation||Automation 1}}}}
Just an "empty" number for this icon.

So - as said - you need to look at the parameter and the number of parameters needed for a template.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Zengief
Burner Inserter
Posts: 18
Joined: Tue Sep 30, 2014 12:09 am
Contact:

### Re: Items need standard slot for Required Tech

ssilk, you are amazing.
I looked through the links you gave and read through the information on media wiki about templates. I now have a better understanding. Feel free to take another look at the assembler 1 page: https://forums.factorio.com/wiki/inde ... _machine_1

I really tried getting your lua program to work including how to implement a symlink in windows and downloading a lua binary. In the end, it just didn't happen. I started to look through the files to see if I could understand what I was doing wrong, but I think that might be an exercise for another day.

I was thinking about using your script as a template to implement something of my own in a language I do know and use. Regardless, I don't have the info handy to keep working on this today, but it does give me something to work with.

Thank you for the detailed information and for helping me through figuring it out.

ssilk
Global Moderator
Posts: 12241
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

### Re: Items need standard slot for Required Tech

Nice work! Keep on going!
lua binary. In the end, it just didn't happen. I started to look through the files to see if I could understand what I was doing wrong, but I think that might be an exercise for another day.
Hm. Under windows the data directory is on another place... Maybe that. I I've really no clue what it might be without having error messages.

But you gave me now more reasons to work more on that.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...