[Solved]Edit subgroup of other mods items

Place to get help with not working mods / modding interface.
Post Reply
Photonik
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Aug 16, 2018 2:23 pm
Contact:

[Solved]Edit subgroup of other mods items

Post by Photonik »

Hio,

I use some bigger mods like bobs (logistics, inserters etc), angelsrefining and quite a number of smaller mods. With that, the grouping of items gets kind of weird, irritating and annoying. Example:
Angelsrefining moves the "storage-tank" into subgroup "angels-fluid-control", which is fine. A smaller mod, "StorageTank2" leaves its items in "logistics", which makes me have storage tanks in two different groups. DeadlockLoaders also are more useful (in my view) in group Bobs Logistics with all the other belts instead of being alone in "logistics".

So I tried to write my own "mod" which simply changes the desired subgroups, which caused some problems, or better said nothing at all.

For data.lua, later also tried in data-final-fixes.lua

Code: Select all

data.raw.item["storage-tank2"].subgroup = "angels-fluid-control" -- doesn't work
data.raw.item["deadlock-loader-0"].subgroup = "bob-logistic-tier-0" -- doesn't work
data.raw.item["wooden-chest"].subgroup = "angels-fluid-control" -- works
So doing this with a vanilla item, like the wooden chest, works without problems, but with items added by any mod it doesn't have any effect and only that. I used darkfrei's "_info-mod_0.2.1" which shows the items have the correct subgroup assigned as I wanted them changed, but ingame they stay in their original group.

I tried editing the original mods by adding the subgroup to the entities, which works in cases like DeadlockLoaders (moving them to Bobs Logistics group) or wooden pipes from Bio_Industries. In case of StorageTank2, strangely, not even that works.

I know this isn't too much to go on, but has anyone suggestions to what I might be missing or doing wrong? Probably something obvious I just didn't see, but this can't be that big of a problem?

Thanks in advance!
Photonik
Last edited by Photonik on Thu Aug 16, 2018 7:54 pm, edited 1 time in total.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Edit subgroup of other mods items

Post by Klonan »

Do you want to change the subgroup of the item or the recipes?

Recipes also have a subgroup used for the crafting menu

Photonik
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Aug 16, 2018 2:23 pm
Contact:

Re: Edit subgroup of other mods items

Post by Photonik »

I'm not entirely sure, I guess the recipe?
I want to see the changes in the crafting menu besides the inventory and preferably in the recipe selection of assembling machines.

edit:

Code: Select all

data.raw.recipe["deadlock-loader-0"].subgroup = "bob-logistic-tier-0"
seems to do the trick. Thanks for the hint. :)
Although, mentioned StorageTank2 mod doesn't care about that either. I don't really see the difference in item generation compared to other mods and why one should work while the other doesn't. I have all the edited mods as optional dependency to make sure(?) mine is applied last.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Edit subgroup of other mods items

Post by orzelek »

Photonik wrote:I'm not entirely sure, I guess the recipe?
I want to see the changes in the crafting menu besides the inventory and preferably in the recipe selection of assembling machines.

edit:

Code: Select all

data.raw.recipe["deadlock-loader-0"].subgroup = "bob-logistic-tier-0"
seems to do the trick. Thanks for the hint. :)
Although, mentioned StorageTank2 mod doesn't care about that either. I don't really see the difference in item generation compared to other mods and why one should work while the other doesn't. I have all the edited mods as optional dependency to make sure(?) mine is applied last.
Are you making your edits in data-final-fixes stage?
There are few mods around that do naughty things like creating items/entities in final updates stage.

Photonik
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Aug 16, 2018 2:23 pm
Contact:

Re: Edit subgroup of other mods items

Post by Photonik »

I've seen that too, so yes, everything in data-final-fixes.
Works fine so far with data.raw.recipe, except that mentioned StorageTank2. But well, can't have everything I guess.

edit:
Well, found the final problem, was sitting in front of the screen. :D
StorageTank2 is called "Storage Tank MK2" ingame, bobs logistics has one as well, called "Storage Tank Mk2" (notice K vs. k). I was editing the first, while wondering why the latter wasn't moving.

Post Reply

Return to “Modding help”