fast_replaceable_group

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

fast_replaceable_group

Post by Nirahiel »

Hi, I'd like to know if there is a way to add a fast_replaceable_group = "whatever" to any existing entity ingame ?
If so, how do I do that exactly in my mod ?
Thanks :)
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: fast_replaceable_group

Post by ficolas »

I think that you can put anything you want there, just by putting it, so you could put as fast repaceable group "wall" in all your wall entities.
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: fast_replaceable_group

Post by Nirahiel »

Yeah and you don't get it, i want to put it for vanilla walls as well.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: fast_replaceable_group

Post by ficolas »

Then you need to edit data.raw.wall.fast_replaceable_group, to be "wall", and when doing this, you also need to make your mod need the basa to be loaded first (in info.json I think)
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: fast_replaceable_group

Post by rk84 »

two "wall". type and name is same for base mod wall.

Code: Select all

data.raw.wall.wall.fast_replaceable_group = "walls"
and yea you need to add dependencies to info.json

Code: Select all

"dependencies": ["base"]
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: fast_replaceable_group

Post by Nirahiel »

rk84 wrote:

Code: Select all

data.raw.wall.wall.fast_replaceable_group = "walls"
Where do I put this code ? :)
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: fast_replaceable_group

Post by FreeER »

Nirahiel wrote:
rk84 wrote:

Code: Select all

data.raw.wall.wall.fast_replaceable_group = "walls"
Where do I put this code ? :)
data.raw 'commands' need to be in a prototype lua file, or as I always did, placed at the end of your data.lua (which typically calls require for all of the other prototypes).
<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
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: fast_replaceable_group

Post by rk84 »

Nirahiel wrote:
rk84 wrote:

Code: Select all

data.raw.wall.wall.fast_replaceable_group = "walls"
Where do I put this code ? :)
You can put it in data.lua file or any file that you require in data.lua. Example

Code: Select all

--data.lua
require("base-edits")

Code: Select all

--base-edits.lua
data.raw.wall.wall.fast_replaceable_group = "walls"
edit:These files are placed in mod's folder
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: fast_replaceable_group

Post by Nirahiel »

Okay :)
Well i'm gonna try and see how it works, if it's working the way I want, i'll update Industrio :)
Post Reply

Return to “Modding help”