Editing base mod file

Place to get help with not working mods / modding interface.
Post Reply
zakman
Inserter
Inserter
Posts: 33
Joined: Fri Jun 03, 2016 1:48 am
Contact:

Editing base mod file

Post 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.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Editing base mod file

Post 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

zakman
Inserter
Inserter
Posts: 33
Joined: Fri Jun 03, 2016 1:48 am
Contact:

Re: Editing base mod file

Post by zakman »

Understood, but assuming I wanted to take those risks and do it anyways, where would I insert that line?

zakman
Inserter
Inserter
Posts: 33
Joined: Fri Jun 03, 2016 1:48 am
Contact:

Re: Editing base mod file

Post 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.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Editing base mod file

Post 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.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Editing base mod file

Post by mrvn »

Or write or simply download an existing mod that changes the walking speed.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7351
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Editing base mod file

Post 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.)
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Modding help”