Prototype definitions reference format

Place to post guides, observations, things related to modding that are not mods themselves.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Prototype definitions reference format

Post by kovarex »

I started building the reference of all configurable parameters of individual prototypes, so you won't have to guess what works there etc.
I'm not sure about the format, as this will be quite big, I would like you to look at the two sample pages I made, and criticise it before I write the rest :)

https://forums.factorio.com/wiki/inde ... efinitions
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Prototype definitions reference format

Post by Nirahiel »

Looks good :)
If the format needs to be remade, I'm sure we can do it later
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Prototype definitions reference format

Post by FreeER »

Looks great to me :)
<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
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Prototype definitions reference format

Post by drs9999 »

Yep, nothing to complain about ;)
User avatar
Dysoch
Filter Inserter
Filter Inserter
Posts: 445
Joined: Fri Oct 18, 2013 2:27 pm
Contact:

Re: Prototype definitions reference format

Post by Dysoch »

those 2 pages alone helped me alot.

especially the event page, which will be needed for my mod in a few updates once i figured it out how to add it using your starter campaign.

SO YES, write more :P
Creator of:
- DyTech
- DyWorld
- DyWorld-Dynamics
- DyWorld-Dynamics 2
Active since Factorio 0.6
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: Prototype definitions reference format

Post by JamesOFarrell »

Dysoch wrote:those 2 pages alone helped me alot.... SO YES, write more :P
Yes, this. Those 2 pages were the most useful tools while I was programming, Thank you so much.
kitsune9tails
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Jun 29, 2014 1:27 am
Contact:

Re: Prototype definitions reference format

Post by kitsune9tails »

This page is really cool (thank you so much!) and is a necessity, I believe, to true mod development. However, it is still incomplete and is missing several fairly important class definitions (like the "Technology" class). Is there a place where we can actually see all the class prototypes for the Prototype objects? I need to know what properties and subclasses are available for each class and what they mean before I can really dive into modding.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Prototype definitions reference format

Post by FreeER »

kitsune9tails wrote:Is there a place where we can actually see all the class prototypes for the Prototype objects? I need to know what properties and subclasses are available for each class and what they mean before I can really dive into modding.
Not really... All I can say is check out the base game prototypes and you'll see the obvious/common ones (look hard enough and you should see everything with maybe a tiny number of exceptions). Of course you are free to add your 'discoveries' to the wiki :P It's incomplete mainly because it's a long (boring) process of improving the wiki and, of course, everyone only has so much time.
Plorntus
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Nov 24, 2014 10:43 am
Contact:

Re: Prototype definitions reference format

Post by Plorntus »

Currently trying to automatically dump all the prototypes for quick wiki upload, its not 100% working yet however kitsune9tails I have managed to dump the valid parameters of the Technology class:

Code: Select all

  "technology": {
    "effects": {
      "ammo_category": "string",
      "modifier": "number",
      "type": "string",
      "recipe": "string"
    },
    "icon": "string",
    "name": "string",
    "order": "string",
    "prerequisites": "string",
    "type": "string",
    "unit": {
      "count": "number",
      "ingredients": "number",
      "time": "number"
    },
    "upgrade": "string",
    "enabled": "boolean"
  },
EDIT: hah did not realize how old this thread was.
TheSim
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 17, 2014 8:46 pm
Contact:

Re: Prototype definitions reference format

Post by TheSim »

Is there are fresh Modding API reference?
wahming
Fast Inserter
Fast Inserter
Posts: 192
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: Prototype definitions reference format

Post by wahming »

Bump. Is there any way we modders can get a list of available properties/methods for all prototypes? At the moment it's a struggle getting the info we need from the game.
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Prototype definitions reference format

Post by GotLag »

Any news on getting this updated?
johanwanderer
Fast Inserter
Fast Inserter
Posts: 157
Joined: Fri Jun 26, 2015 11:13 pm

Re: Prototype definitions reference format

Post by johanwanderer »

wahming wrote:Bump. Is there any way we modders can get a list of available properties/methods for all prototypes? At the moment it's a struggle getting the info we need from the game.
For Lua objects:

Code: Select all

/c sel = function() return game.player.selected; end
/c mh = function()  game.make_file("help/" .. sel().name, sel().help()); end
Move your mouse over something, and then "/c mh()", then look under script-output/help/ for the help text

For the prototypes themselves, I would just look under data/base/prototypes/... what you see is what you get there.
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Prototype definitions reference format

Post by orzelek »

You can also call the help method on objects like player or game to see what are the available functions and properties.
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Prototype definitions reference format

Post by GotLag »

johanwanderer wrote:
wahming wrote:Bump. Is there any way we modders can get a list of available properties/methods for all prototypes? At the moment it's a struggle getting the info we need from the game.
For Lua objects:

Code: Select all

/c sel = function() return game.player.selected; end
/c mh = function()  game.make_file("help/" .. sel().name, sel().help()); end
Move your mouse over something, and then "/c mh()", then look under script-output/help/ for the help text

For the prototypes themselves, I would just look under data/base/prototypes/... what you see is what you get there.
This outputs a file with the name of the entity selected, but the content is always the same: LuaEntity
Post Reply

Return to “Modding discussion”