Modding help / guide ?

Place to get help with not working mods / modding interface.
Post Reply
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Modding help / guide ?

Post by Nirahiel »

Hello everyone.

I was wondering, is there any guide to help me ? I want to create a mod but i'm not sure how to get started.
Thanks :)

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Modding help / guide ?

Post by drs9999 »

The wiki contained a more or less complete modding reference, but because it was shut down the only thing you can do right now is to look into the "base" folder which can be found in FactorioDir/data/

Most of the gamecontent actually works like a mod.
Also you cannot go wrong with reading some lua tutorials and looking into other mods.

And obviously the mod-forum contains lots of usefull information

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

Re: Modding help / guide ?

Post by ficolas »

If you know lua, you should start by looking in the files of another mod, if you dont, you should first learn it, it is not a hard language.

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Modding help / guide ?

Post by Nirahiel »

Well, I know some lua (computer craft, and garry's mod), but yeah the wiki has been shut down. :(
I'll try to check the source of the game.

The other problem is that i can't design. So if I make a mod, it'll be really ugly.

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

Re: Modding help / guide ?

Post by ficolas »

Nirahiel wrote:Well, I know some lua (computer craft, and garry's mod), but yeah the wiki has been shut down. :(
I'll try to check the source of the game.

The other problem is that i can't design. So if I make a mod, it'll be really ugly.
Well the game is not made in lua, it is made in c++, so u wont be checking the source.

Im also very bad at desinging and I made a mod :3

If you need help ask and I will try to help ya :)

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Modding help / guide ?

Post by Nirahiel »

Quick question : Is it possible to alter the behaviour of an existing entity ?
(For example : the smart chests and inserters)

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Modding help / guide ?

Post by drs9999 »

If you mean something like you mentioned in this post
https://forums.factorio.com/forum/vie ... 9162#p9162

Then AFAIK it is not possible, except the devs forgot to put in in the changelog for 0.7, but I doubt that.

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Modding help / guide ?

Post by Nirahiel »

I mean exactly this.
Maybe if I could create new entities to replace the old ones, and somehow replace one for the other ?
(Like values in an array ? Can I do this ?)

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

Re: Modding help / guide ?

Post by FreeER »

Sure you can create new/overwrite the logistics chests, but it's not going to effect the core functionality that you are trying to change. If it isn't in the lua prototype files then you can not change it (because if it's not defined in lua then it is defined in the c++ source code that only the devs have access to), unless you are an amazing hacker and know how to reverse engineer code quickly lol.

You could, theoretically, create a new container entity and use lua control code to popup gui buttons when you hover over it or something, the buttons would add the items in the chest to a table and allow you set min/max. You'd then check the table and update the current values and compare that to the min/max, as to how you would send a logistic signal, I'm not sure (I'm not entirely caught up on what has been added while I've been away) and it would probably slow the game down (far far more than if you waited for the devs to make it possible in the prototypes).

In reality (other than waiting on the devs) it is probably better to do some fancy ingame wiring to achieve this.
<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

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Modding help / guide ?

Post by Nirahiel »

Well the thing is, the whole system of bots automatically moving stuff from providers to storage is wrong IMO. Thats why we need tricky stuff like this.
And I think they should rename the chests :
The Requester chest is fine.
The provider chest should be renamed "Extractor" chest, because as soon as there is room in any storage, the bots WILL extract the items from this chest. So i think this chest is only meant to extract stuff from somewhere.
And then the Storage chest should be renamed Provider, because in the end THIS chest is going to provide materials for the requesters.

Also yeah, if they think smart inserters shouldnt have access to the whole network (i can understand this), then they should create logistic inserters, and they know about the network without being wired.

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

Re: Modding help / guide ?

Post by FreeER »

Hmm, I haven't played with the logistics in quite some time, from what I remember anything in provider chests would go to requester chests if it was being asked for and if they got full (or the items were not requested by anything) they would be emptied into storage chests, which never from what I remember never had anything pulled out of them. Honestly I have to agree that items probably shouldn't be moved from providers to storage, unless the providers are being overfilled (and thus vice versa, when the providers have extra space and there are items in storage they could be moved back to provider chests for requesters to access). However, it would be nice if you could set filters on the storage chests so that you know where all of your important resources are at, without mousing over all of your chests, when you want to manually pull something out.

The names, from what I remember of them doing, are fine. The requester chests request the items, that you set, from the provider chests, the provider chests provide the items inside of them to the requester chests and the storage chests store any excess (though if they are never accessed to pull anything out maybe they should be renamed to logistic overflow chests or something)

As for not accessing the entire network it might be nice to have a third wire (or an option for the red/green wires) so that you can directly connect the smart inserters to certain chests/machines and only consider those instead of the entire red/green network (not sure what the programming/memory overhead would be on that). Of course you can also use the red wire to connect everything and then use the green for isolated networks/fancy wiring (which is what I typically tried to do)

edit: quick testing and it appears I was mostly correct on how the chests work, the storage chests do seem to store anything not being requested, but also seem to have priority over supplying requesters than the providers. It seems that a more proper name for provider chests might be 'logistic buffer' lol since they act more like a stop on their way to the storage chests.

side note: on my 1366*768 display (windowed but maximized) the gui when you mouse over chests/machines often extends past (and underneath) the armor/gun slots (and sometimes the crafting queue) so that you can not accurately read what is being stored lol
<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

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Modding help / guide ?

Post by Nirahiel »

Yeah the whole logistics system needs to be redone IMHO :)

Post Reply

Return to “Modding help”