Page 1 of 1

Editing base mod file

Posted: Mon Apr 09, 2018 7:37 pm
by zakman
I would like to edit the Factorio base mod in order to up my walking speed a bit. I know it's possible, have done it before on a different install, but cannot for the life of me remember which file to edit or what to put in there.

Any advice? Running 0.16 stable version on Windows 7. Thanks.

Re: Editing base mod file

Posted: Mon Apr 09, 2018 8:02 pm
by DaveMcW
Editing the base mod is not recommended, it resets on updates (or breaks updates entirely).

You can use this cheat:

Code: Select all

/c game.player.character_running_speed_modifier = 1

Re: Editing base mod file

Posted: Mon Apr 09, 2018 8:19 pm
by zakman
Understood, but assuming I wanted to take those risks and do it anyways, where would I insert that line?

Re: Editing base mod file

Posted: Mon Apr 09, 2018 8:28 pm
by zakman
zakman wrote:Understood, but assuming I wanted to take those risks and do it anyways, where would I insert that line?
Nevermind, think I found it:

\data\base\scenarios\freeplay\control.lua.

Re: Editing base mod file

Posted: Tue Apr 10, 2018 11:08 am
by eradicator
It's a much better idea to edit control.lua inside your savegame.zip as that will cause no problems with updates. I think you can also copy the whole scenario folder to \user\documents\factorio\scenario (or whereever your factorio savegames are) to make a new scenario. I've never done that so not sure how exactly it works.

Re: Editing base mod file

Posted: Tue Apr 10, 2018 11:58 am
by mrvn
Or write or simply download an existing mod that changes the walking speed.

Re: Editing base mod file

Posted: Wed Apr 11, 2018 8:09 am
by bobingabout
any and all edits to base game data files will result in you being unable to update your game, and you will have to re-download the whole thing. (unless you're cheating and using steam).

It's a much better solution to write your own mod to do these changes for you. (And that way, after any updates, you'll still have your changes)

You literally just need to make a new folder in the mods folder, add a control.lua with your command in it (Put it inside an event, like on_init and on_configuration_changed or something, personally I put this sort of thing in both of these.) and create an info.json to set up the mod (look up info.json in literally any existing mod. copy it to yours and edit it if you like.)